]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: dts: qcom: msm8226-microsoft-common: Add inertial sensors
authorRayyan Ansari <rayyan@ansari.sh>
Sun, 14 Jul 2024 17:33:05 +0000 (18:33 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 15 Aug 2024 02:31:47 +0000 (21:31 -0500)
Add nodes for the Asahi Kasei AK09911 magnetometer and the Kionix
KX022-1020 accelerometer, both of which are connected over i2c2, in the
common device tree for msm8x26 Lumias.

Moneypenny (Lumia 630) does not have a magnetometer, and so the node is
deleted.
Tesla's (Lumia 830's) magnetometer is currently unknown.

Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240714173431.54332-4-rayyan@ansari.sh
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
arch/arm/boot/dts/qcom/qcom-msm8926-microsoft-tesla.dts

index 8839b23fc69364377c25ecc8f554251c0ddaa99d..ca76bf8af75e463bc3a2a5cfc1c2b574f0ac17f5 100644 (file)
        };
 };
 
+&blsp1_i2c2 {
+       status = "okay";
+
+       magnetometer: magnetometer@c {
+               compatible = "asahi-kasei,ak09911";
+               reg = <0x0c>;
+
+               vdd-supply = <&pm8226_l15>;
+               vid-supply = <&pm8226_l6>;
+       };
+
+       accelerometer: accelerometer@1e {
+               compatible = "kionix,kx022-1020";
+               reg = <0x1e>;
+
+               interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_RISING>;
+
+               vdd-supply = <&pm8226_l15>;
+               vddio-supply = <&pm8226_l6>;
+
+               mount-matrix = "1",  "0",  "0",
+                              "0", "-1",  "0",
+                              "0",  "0",  "1";
+       };
+};
+
 &blsp1_i2c5 {
        status = "okay";
 
index 992b7115b5f8f5da9c147514cde4a4c49c233c44..a28a83cb534055a36a55f907094b34f48b6266be 100644 (file)
@@ -10,6 +10,9 @@
 
 #include "qcom-msm8226-microsoft-common.dtsi"
 
+/* This device has no magnetometer */
+/delete-node/ &magnetometer;
+
 / {
        model = "Nokia Lumia 630";
        compatible = "microsoft,moneypenny", "qcom,msm8226";
index 53a6d4e85959fb48b5e6b7e07637d714a4f8e378..55077a5f2e34f84857ee35d22157362759151c5a 100644 (file)
@@ -13,6 +13,9 @@
 /* This device has touchscreen on i2c1 instead */
 /delete-node/ &touchscreen;
 
+/* The magnetometer used on this device is currently unknown */
+/delete-node/ &magnetometer;
+
 / {
        model = "Nokia Lumia 830";
        compatible = "microsoft,tesla", "qcom,msm8926", "qcom,msm8226";