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>,
"Ondrej Jirman" <megi@xff.cz>,
"Martijn Braam" <martijn@brixit.nl>,
"Kamil Trzciński" <ayufan@ayufan.eu>
Subject: [PATCH v4 2/4] arm64: dts: rk3399-pinephone-pro: Add accelerometer sensor support
Date: Mon, 29 Sep 2025 00:35:13 -0700 [thread overview]
Message-ID: <20250929-ppp_light_accel_mag_vol-down-v4-2-6598f22d3451@gmail.com> (raw)
In-Reply-To: <20250929-ppp_light_accel_mag_vol-down-v4-0-6598f22d3451@gmail.com>
From: Ondrej Jirman <megi@xff.cz>
Pinephone Pro uses mpu6500 according to the schematic.
Tests:
// Setup: This watches the raw values from the device. The variable with
// the biggest magnitude and its sign will be recorded
$ sudo systemctl stop iio-sensor-proxy
$ cat /sys/bus/iio/devices/iio:device3/in_accel_{x,y,z}_raw
// Let's start with phone screen facing up to the sky and the charger
// port closer to you than the front camera.
z: -16000
// Tilt the phone onto it's left edge
x: -16000
// Tilt the phone onto it's right edge
x: 16000
// Tilt the phone so that the charger port is pointing straight up to
// the sky
y: -16000
// Tilt the phone so that the top of the phone is pointing straight up
// to the sky
y: 16000
// Put the phone face down so the screen is touching the table
z: 16000
Co-developed-by: Martijn Braam <martijn@brixit.nl>
Signed-off-by: Martijn Braam <martijn@brixit.nl>
Co-developed-by: Kamil Trzciński <ayufan@ayufan.eu>
Signed-off-by: Kamil Trzciński <ayufan@ayufan.eu>
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index 71d32c4bae0d0336ac0c912043618fc9b94919ef..d9f18a8005f15f3ec26e086e5b451bf1bbdc21c0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -542,7 +542,13 @@ mpu6500@68 {
reg = <0x68>;
interrupt-parent = <&gpio1>;
interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
+ vdd-supply = <&vcc_1v8>;
vddio-supply = <&vcc_1v8>;
+
+ mount-matrix =
+ "1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "-1";
};
};
--
2.51.0
next prev parent reply other threads:[~2025-09-29 7:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 7:35 [PATCH v4 0/4] Upstreaming Pinephone Pro Patches Rudraksha Gupta via B4 Relay
2025-09-29 7:35 ` [PATCH v4 1/4] arm64: dts: rk3399-pinephone-pro: Add light/proximity sensor support Rudraksha Gupta via B4 Relay
2025-09-29 9:57 ` Diederik de Haas
2025-10-07 5:59 ` Rudraksha Gupta
2025-09-29 7:35 ` Rudraksha Gupta via B4 Relay [this message]
2025-10-22 11:11 ` [PATCH v4 2/4] arm64: dts: rk3399-pinephone-pro: Add accelerometer " Pavel Machek
2025-09-29 7:35 ` [PATCH v4 3/4] arm64: dts: rk3399-pinephone-pro: Add magnetometer " Rudraksha Gupta via B4 Relay
2025-10-22 11:12 ` Pavel Machek
2025-09-29 7:35 ` [PATCH v4 4/4] arm64: dts: rk3399-pinephone-pro: Fix voltage threshold for volume keys Rudraksha Gupta via B4 Relay
2025-10-22 11:13 ` Pavel Machek
2025-09-29 8:32 ` [PATCH v4 0/4] Upstreaming Pinephone Pro Patches Dragan Simic
2025-09-29 15:39 ` Heiko Stuebner
2025-10-07 5:56 ` Rudraksha Gupta
2025-10-22 11:09 ` Pavel Machek
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=20250929-ppp_light_accel_mag_vol-down-v4-2-6598f22d3451@gmail.com \
--to=devnull+guptarud.gmail.com@kernel.org \
--cc=ayufan@ayufan.eu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=guptarud@gmail.com \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=martijn@brixit.nl \
--cc=megi@xff.cz \
--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
all inboxes | Powered by JetHome®