lkml.org 
[lkml]   [2020]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix
From
Date
On 20.01.20 11:07, Martin Kepplinger wrote:
> 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>
> ---
>
> tested on the librem5-devkit of course, finally fixing the orientation problem
> for the accelerometer :)
>
> thanks,
>
> martin
>
>
> arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index 703254282b96..6c8ab009081b 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -457,6 +457,9 @@
> reg = <0x6a>;
> vdd-supply = <&reg_3v3_p>;
> vddio-supply = <&reg_3v3_p>;
> + mount-matrix = "1", "0", "0",
> + "0", "1", "0",
> + "0", "0", "-1";
> };
> };
>
>

hi all. are there any questions about this addition?

thanks a lot,

martin

\
 
 \ /
  Last update: 2020-01-27 10:22    [W:0.110 / U:3.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site