From: Rudraksha Gupta via B4 Relay <devnull+guptarud.gmail.com@kernel.org>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org,
Rudraksha Gupta <guptarud@gmail.com>,
"Leonardo G. Trombetta" <lgtrombetta@gmx.com>
Subject: [PATCH v2 4/5] arm64: dts: rk3399-pinephone-pro: Add mount-matrix for magnetometer
Date: Sun, 21 Sep 2025 01:04:22 -0700 [thread overview]
Message-ID: <20250921-ppp_light_accel_mag_vol-down-v2-4-e6bcc6ca74ae@gmail.com> (raw)
In-Reply-To: <20250921-ppp_light_accel_mag_vol-down-v2-0-e6bcc6ca74ae@gmail.com>
From: "Leonardo G. Trombetta" <lgtrombetta@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@gmx.com>
Signed-off-by: Rudraksha Gupta <guptarud@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..0a4121b05d36c5a7e05eddbd3514a11ae4f7d3eb 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@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
next prev parent reply other threads:[~2025-09-21 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 8:04 [PATCH v2 0/5] Upstreaming Pinephone Pro Patches Rudraksha Gupta via B4 Relay
2025-09-21 8:04 ` [PATCH v2 1/5] arm64: dts: rk3399-pinephone-pro: Add light/proximity sensor support Rudraksha Gupta via B4 Relay
2025-09-21 8:04 ` [PATCH v2 2/5] arm64: dts: rk3399-pinephone-pro: Add accelerometer " Rudraksha Gupta via B4 Relay
2025-09-21 13:10 ` Ondřej Jirman
2025-09-21 13:23 ` Ondřej Jirman
2025-09-21 21:07 ` Rudraksha Gupta
2025-09-22 16:59 ` Ondřej Jirman
2025-09-28 3:54 ` Rudraksha Gupta
2025-09-21 8:04 ` [PATCH v2 3/5] arm64: dts: rk3399-pinephone-pro: Add magnetometer " Rudraksha Gupta via B4 Relay
2025-09-21 8:04 ` Rudraksha Gupta via B4 Relay [this message]
2025-09-21 8:04 ` [PATCH v2 5/5] arm64: dts: rk3399-pinephone-pro: Fix voltage threshold for volume down key Rudraksha Gupta via B4 Relay
2025-09-21 11:20 ` Ondřej Jirman
2025-09-21 21:06 ` Rudraksha Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250921-ppp_light_accel_mag_vol-down-v2-4-e6bcc6ca74ae@gmail.com \
--to=devnull+guptarud.gmail.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=guptarud@gmail.com \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=lgtrombetta@gmx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox