diff mbox series

[v1,08/14] arm64: dts: imx8mq-librem5: add the magnetometer mount matrix

Message ID 20230309204608.237605-9-martin.kepplinger@puri.sm (mailing list archive)
State New, archived
Headers show
Series arm64: dts: imx8mq-librem5: updates and fixes until march 2023 | expand

Commit Message

Martin Kepplinger March 9, 2023, 8:46 p.m. UTC
From: Angus Ainslie <angus@akkea.ca>

Userland needs the mount matrix to know the correct orientation of
the part.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi | 6 ++++++
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
index c1279e96effd7..db81ed699de75 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
@@ -38,6 +38,12 @@  MX8MQ_IOMUXC_SPDIF_RX_GPIO5_IO4		0x83
 	};
 };
 
+&magnetometer {
+	mount-matrix =  "1",  "0",  "0",
+			"0", "-1",  "0",
+			"0",  "0", "-1";
+};
+
 &proximity {
 	proximity-near-level = <25>;
 };
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index eaf35cff2f8a6..7e470135b86a4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -981,7 +981,7 @@  &i2c2 {
 	pinctrl-0 = <&pinctrl_i2c2>;
 	status = "okay";
 
-	magnetometer@1e	{
+	magnetometer: magnetometer@1e	{
 		compatible = "st,lsm9ds1-magn";
 		reg = <0x1e>;
 		pinctrl-names = "default";