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

Martin Kepplinger martin.kepplinger at puri.sm
Thu Mar 9 12:46:02 PST 2023


From: Angus Ainslie <angus at akkea.ca>

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

Signed-off-by: Angus Ainslie <angus at akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger at 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 --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 at 1e	{
+	magnetometer: magnetometer at 1e	{
 		compatible = "st,lsm9ds1-magn";
 		reg = <0x1e>;
 		pinctrl-names = "default";
-- 
2.30.2




More information about the linux-arm-kernel mailing list