arm64: dts: rockchip: Correct Device Orientation
Subsystems (2)
PATCH 1/1 arm64: dts: rockchip: Correct Device Orientation
From: Chris Morgan <[email protected]>
The display, touchscreen, and IMU are currently not oriented consistently. The touchscreen is 90 degrees offset and the IMU is using the default mount matrix which is 180 degrees offset.
Fix the touchscreen alignment and add a mount matrix for the IMU. When the device is held vertically relative to the display hardware, the touchscreen 0,0 position is in the top left corner of the display (next to the home button), and the IMU reads the correct orientation.
--- arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts +5 -2
@@ -596,6 +596,7 @@ regulator-state-mem { &i2c3 { status = "okay"; + /* Touchscreen is rotated 90 degrees with 0,0 position near home button. */ touchscreen@14 { compatible = "goodix,gt911"; reg = <0x14>;
@@ -605,10 +606,8 @@ touchscreen@14 { pinctrl-0 = <&touch_int>, <&touch_rst>; pinctrl-names = "default"; reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; - touchscreen-inverted-x; touchscreen-size-x = <1080>; touchscreen-size-y = <1920>; - touchscreen-swapped-x-y; }; };
@@ -641,11 +640,15 @@ channel@7 { }; }; + /* IMU oriented relative to panel, which is rotated 90 degrees. */ imu@68 { compatible = "invensense,mpu6880"; reg = <0x68>; interrupt-parent = <&gpio0>; interrupts = <RK_PD3 IRQ_TYPE_EDGE_RISING>; + mount-matrix = "-1", "0", "0", + "0", "-1", "0", + "0", "0", "1"; }; };
Signature · 1 line
2.43.0
Quoted 10 lines · Chris Morgan
The display, touchscreen, and IMU are currently not oriented consistently. The touchscreen is 90 degrees offset and the IMU is using the default mount matrix which is 180 degrees offset.
Fix the touchscreen alignment and add a mount matrix for the IMU. When the device is held vertically relative to the display hardware, the touchscreen 0,0 position is in the top left corner of the display (next to the home button), and the IMU reads the correct orientation.
[...]
Applied, thanks!
[1/1] arm64: dts: rockchip: Correct Device Orientation
commit: 0d170ee38e7a943248082cdb4b3e40b45a96e2f6
Best regards,
Signature · 6 lines
Heiko Stuebner <[email protected]> _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip