Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3654955ybl; Mon, 3 Feb 2020 04:14:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwkB+bry2CCflsyutf4mBN4EUr0kXZTDA+yKV7HzcBy4BOw5J2JoGK7672SOpG826C36Du4 X-Received: by 2002:aca:190b:: with SMTP id l11mr14590457oii.65.1580732090919; Mon, 03 Feb 2020 04:14:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580732090; cv=none; d=google.com; s=arc-20160816; b=FYRpQ6sLDl3/GEdLWuzTlJhXcbecqryen4+Gk1Ql5Zb+5MieTIcVH/pZg6LPOGjkUv E/7xlFUW440cPktskMT+PzGq0TBU+Z7hIC8JHopmXsg82uiSMR0dk5t/Fms4eG+dye5H 8zax6v/FgPQ9Aryodgc845wHOO6C//WbYzfDJESKgaZur/aZYoSEHUmefxwpra8bOeOO ypmQXE+TQMi9KCTBZMq1Yy2UfyofgU4tedB5LqS1o6ak1kgl5krRf4sGeb0rEf+ApRds VAGHX5xlxGYBvVDJxFVzn4iDkvumMTXytGwXTuPZdxEMs/Mj7GW+EUkHoyGXhw2ZlWeu sjSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4FelDBCA7gZvfyvaQchUiAudx4F3wrXAflHMK1DNqxw=; b=PyVTS5ijltwN2LbHU7qKNNPE5gdGjRmWs93b5prrkwCiIkOjYtANe0lsmc7bg/M5OR 4s9rx+X1Ty7yvjKnMZWyy+Gx8sql+RpA2OP0Gy06MT7XrAvn6mipZChsNEjVleFCMIQ1 3HyMs2DwwBEtUEMe5Dg0Vr60xzkjVUnd/UAvtYnqXKwudulkcK1oU9LWb7qo/Bl+KQ6U wRfxICBiQoi1cqG2QLXkpQ/Jlh3Wzv6QFjSW2G6bmZ1Id9vdZCytLhKIx9N+O1GcJ5BU eDNUcGtuBDZK7cUcNExzoC+s/umT3AyCthE2e9VAjz4+siucsZMJRdUZACcAPNxYHajc cEGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si3487292oic.57.2020.02.03.04.14.37; Mon, 03 Feb 2020 04:14:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbgBCLF5 (ORCPT + 99 others); Mon, 3 Feb 2020 06:05:57 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:34991 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727268AbgBCLF5 (ORCPT ); Mon, 3 Feb 2020 06:05:57 -0500 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iyZY5-00046n-Hb; Mon, 03 Feb 2020 12:05:49 +0100 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iyZY1-00028x-QW; Mon, 03 Feb 2020 12:05:45 +0100 Date: Mon, 3 Feb 2020 12:05:45 +0100 From: Marco Felsch To: Martin Kepplinger Cc: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Message-ID: <20200203110545.GB24291@pengutronix.de> References: <20200120100722.30359-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200120100722.30359-1-martin.kepplinger@puri.sm> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 11:57:57 up 157 days, 23:12, 161 users, load average: 0.07, 0.17, 0.15 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, 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: I didn't found the patch which adds the iio_read_mount_matrix() support. Appart of that your patch looks good so feel free to add my: Reviewed-by: Marco Felsch Regards, Marco > 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 > --- > > 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 = <®_3v3_p>; > vddio-supply = <®_3v3_p>; > + mount-matrix = "1", "0", "0", > + "0", "1", "0", > + "0", "0", "-1"; > }; > }; > > -- > 2.20.1