From 6fc4419de036c1a0d45bfc2e40568113fd014905 Mon Sep 17 00:00:00 2001 From: "Leonardo G. Trombetta" Date: Mon, 13 Mar 2023 17:45:19 +0100 Subject: [PATCH 295/464] Add mount-matrix of the PinePhone Pro magnetometer 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-of-by: Leonardo G. Trombetta --- 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 5ee9d3448277..873f88565cb0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -1075,6 +1075,11 @@ af8133j: compass@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.34.1