Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp343453ybv; Wed, 5 Feb 2020 06:34:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwfDgVt4LRuXAR7tdpQzjxGYPJUlKGsnHqy/h5WvFRthdWyn7m/kSIjeQ/F8mg/K8PXbAUe X-Received: by 2002:a9d:760d:: with SMTP id k13mr7091240otl.42.1580913247066; Wed, 05 Feb 2020 06:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580913247; cv=none; d=google.com; s=arc-20160816; b=iMRTgVDMTwiSm8qs0CabucSNOns14FMsicbC88C2O7iSnMgqIGQq4G5uyR4RWOquG6 1i5UVjCCmgkDvi+gA1THMOw0sHarrPZ4KGJHFEHw7j8lDusGc1TuoVn6uKisRHtn5+IZ 6eve3gaHQLv0amkrb8F4yZeDUb1dvZzBBospFJL0PzCDylBHaYlaTNgYxeVJMgBAS0Br CN64YuJElBMoWQSCGomX1nvM4aWiLfA4DTpBiyu76yF+sHZWHO3V1k42SmqBSw3EV3c/ XkjYEzTTZQuzE3ewn78ihkYa4Nn5zL0FFBPm+WhIDXRpJMhZGw8FFjBbEMxKf9e0lwxv bo7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from; bh=Ngs9qfv4oFgkPyfnZSqW9EiZ2zI4Z1UHiTmS+mH8J8s=; b=uPa8dj5hSWANMtBxiZTqa0MKkSHTKju+3/iEFnLrUOJy2QBkdGwtOs59JabBmwZWb6 4rhINLzwsYo3ABV69PE/yGJXf31JKK9p2rdX1zL8eQhEAb67zzpLydKtRnN5fFiDrIWH N5jgcnBPV69A584ZlYyUpL2nsnpCT50TLwSIjWHa9WIQwYlhkgzWO/EpGEDkfdmcrg4Z jBFM2NZBLZfjprrO4//PSFGSa6Dsin4KFhobhJJWDYdf4UUkauwbpLSzunHJ7jQTcJ1F 8/4JwillBuC6fh/6MI7EmqJjs8gy1SubtynSqSnOS9XNGKzvoBikBXC/yfhYw8Q1cz0H f2qA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si11540oic.126.2020.02.05.06.33.54; Wed, 05 Feb 2020 06:34:07 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbgBEOba (ORCPT + 99 others); Wed, 5 Feb 2020 09:31:30 -0500 Received: from comms.puri.sm ([159.203.221.185]:49184 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbgBEOb2 (ORCPT ); Wed, 5 Feb 2020 09:31:28 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id F21EEE0F66; Wed, 5 Feb 2020 06:31:27 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d-hzdEaWknlN; Wed, 5 Feb 2020 06:31:27 -0800 (PST) From: Martin Kepplinger To: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: linux-imx@nxp.com, Anson.Huang@nxp.com, devicetree@vger.kernel.org, kernel@puri.sm, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kepplinger , Marco Felsch Subject: [PATCH v1 12/12] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Date: Wed, 5 Feb 2020 15:30:03 +0100 Message-Id: <20200205143003.28408-13-martin.kepplinger@puri.sm> In-Reply-To: <20200205143003.28408-1-martin.kepplinger@puri.sm> References: <20200205143003.28408-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Marco Felsch --- this is what I've previously sent as a single patch already: https://lore.kernel.org/linux-arm-kernel/20200120100722.30359-1-martin.kepplinger@puri.sm/ 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 15cc05c0d6cf..e2db3866bdee 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -550,6 +550,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