arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
authorMartin Kepplinger <martin.kepplinger@puri.sm>
Thu, 27 Feb 2020 13:17:33 +0000 (14:17 +0100)
committerShawn Guo <shawnguo@kernel.org>
Wed, 11 Mar 2020 07:59:19 +0000 (15:59 +0800)
The IMU chip on the librem5-devkit is not mounted at the "natural" place
that would match normal phone orientation (see the documentation for the
details about what that is).

Since the lsm9ds1 driver supports providing a mount matrix, we can describe
the orientation on the board in the dts:

Create a right-handed coordinate system (x * -1; see the datasheet for the
axis) and rotate 180 degrees around the y axis because the device sits on
the back side from the display.

Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

index 72c622f..10eca94 100644 (file)
                reg = <0x6a>;
                vdd-supply = <&reg_3v3_p>;
                vddio-supply = <&reg_3v3_p>;
+               mount-matrix =  "1",  "0",  "0",
+                               "0",  "1",  "0",
+                               "0",  "0", "-1";
        };
 };