Skip to content

Commit

Permalink
arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Marco Felsch <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
  • Loading branch information
merge authored and Shawn Guo committed Mar 11, 2020
1 parent 5369d19 commit eef22bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@
reg = <0x6a>;
vdd-supply = <&reg_3v3_p>;
vddio-supply = <&reg_3v3_p>;
mount-matrix = "1", "0", "0",
"0", "1", "0",
"0", "0", "-1";
};
};

Expand Down

0 comments on commit eef22bb

Please sign in to comment.