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 4/5] arm64: dts: rk3399-pinephone-pro: Add mount-matrix for magnetometer
Date: Sat, 20 Sep 2025 23:41:06 -0700 [thread overview]
Message-ID: <20250920-ppp_light_accel_mag_vol-down-v1-4-c8bbcd3e2e94@gmail.com> (raw)
In-Reply-To: <20250920-ppp_light_accel_mag_vol-down-v1-0-c8bbcd3e2e94@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 8ff64004b0a6e3b472077516ab360c29852d7c9f..9442ca4c9ae47d639ed6139c370bacf1bffa65b6 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 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 6:41 [PATCH 0/5] Upstreaming Pinephone Pro Patches Rudraksha Gupta via B4 Relay
2025-09-21 6:41 ` [PATCH 1/5] arm64: dts: rk3399-pinephone-pro: Add light/proximity sensor support Rudraksha Gupta via B4 Relay
2025-09-21 6:41 ` [PATCH 2/5] arm64: dts: rk3399-pinephone-pro: Add accelerometer " Rudraksha Gupta via B4 Relay
2025-09-21 6:41 ` [PATCH 3/5] arm64: dts: rk3399-pinephone-pro: Add magnetometer " Rudraksha Gupta via B4 Relay
2025-09-21 6:41 ` Rudraksha Gupta via B4 Relay [this message]
2025-09-21 6:41 ` [PATCH 5/5] arm64: dts: rk3399-pinephone-pro: Fix voltage threshold for volume down key Rudraksha Gupta via B4 Relay
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=20250920-ppp_light_accel_mag_vol-down-v1-4-c8bbcd3e2e94@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;
as well as URLs for NNTP newsgroup(s).