[PATCH v3 4/5] arm64: dts: rk3399-pinephone-pro: Add mount-matrix for magnetometer
Rudraksha Gupta via B4 Relay
devnull+guptarud.gmail.com at kernel.org
Sun Sep 21 14:05:57 PDT 2025
From: "Leonardo G. Trombetta" <lgtrombetta at gmx.com>
After experimenting with the magnetometer on the Pinephone Pro I found
out the mount-matrix currently reported by the AF8133J driver is just
the identity matrix (no rotation), which is wrong. It would seem to me
that there is currently no `mount-matrix` info and that's why the driver
reports a trivial answer. As far as I can tell from my tests, a 90
degree clockwise rotation in the XY plane would align it properly.
Signed-off-by: Leonardo G. Trombetta <lgtrombetta at gmx.com>
Signed-off-by: Rudraksha Gupta <guptarud at gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index 266a08540dd0fe099319ec703bb0828c8c5c2c25..a744f207dd1acebcdf566eef1c2a471b1e8f3f56 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -561,6 +561,11 @@ af8133j: compass at 1c {
reset-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>;
avdd-supply = <&vcc_3v0>;
dvdd-supply = <&vcc_1v8>;
+
+ mount-matrix =
+ "0", "1", "0",
+ "1", "0", "0",
+ "0", "0", "-1";
};
};
--
2.51.0
More information about the linux-arm-kernel
mailing list