Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5630665ybv; Tue, 18 Feb 2020 00:51:50 -0800 (PST) X-Google-Smtp-Source: APXvYqx+TnlBITnBgRst8NB4DcRmXWz6wBpdfXw6JEP69Y+8bFudVpCNYLxiFRzditPJ8HdbR57r X-Received: by 2002:aca:dd05:: with SMTP id u5mr557500oig.91.1582015910306; Tue, 18 Feb 2020 00:51:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582015910; cv=none; d=google.com; s=arc-20160816; b=I3Xoz7x0SZnU3REpVPHawwmJCwuZsgwG8q6KcDxoek6ChofCFwYI8bpfTsejZS9LXt AE6fFEXfP51BHmYkTeGwA+HUhreYhpXNQlVP4AlBHeKUi6whTBE2tDr/GKHMIc3JVGL6 iGuq7AyK1+XT2yGjo/HKzu/krCpooFvCAMexBP+W3mLQ3Mq7nck+tbAyieyikCt9VRnq 1RLWw6UI7mSOtec8nF3rRrqgcdQ0+9TBMCreQ8X6tM677zMeZe6ABK5SpoTbwYh5VS+P 0zczyDPxQyd7ivOyfl2YfWj5VBqn3PnzcBAFdpjXohYCs44M7pAG03+etVutdiDJcLEe R9pg== 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=wPPTLBn8SgGyVc0sw0pcNGkwhiO0TO/jgxuNG9ZDwq8=; b=R5riqmOq4KGXyBlwEjc6b0EvkbOu71/go68fnu187CfRmU0k9czAOFnwjIdA33bsJQ 3b0Fuz9R+/dEx1b2yL9p/T5qHp7JyjPdm29lwTVY3DDEU4u52PK6wCFRbZkEv/41CoB1 Esc7PbbSYoaueUJCtXtzqJXjr7vigy5+uWKTLUlTtohNRha/659Q6c8XWvSgqzCt4F/f CS98uyEfqAajK5mTytdPOLkdjPdWkbC0sc0FxAT4x1WYzlfBlkqMJJzSsoqBDwJc6H3r 15rqgc7QAm4Q8S3hoWxD2iK+wUCi9MCQCU8N+z/dTRSFgoO1/ZW+4rAM77PZo9AvTlKH unwA== 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 p189si199838oic.134.2020.02.18.00.51.38; Tue, 18 Feb 2020 00:51: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbgBRIvF (ORCPT + 99 others); Tue, 18 Feb 2020 03:51:05 -0500 Received: from comms.puri.sm ([159.203.221.185]:39986 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726671AbgBRIvE (ORCPT ); Tue, 18 Feb 2020 03:51:04 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 8FE51E114C; Tue, 18 Feb 2020 00:51:04 -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 qYOfLCYxd975; Tue, 18 Feb 2020 00:51:03 -0800 (PST) From: Martin Kepplinger To: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de 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 v2 9/9] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Date: Tue, 18 Feb 2020 09:49:42 +0100 Message-Id: <20200218084942.4884-10-martin.kepplinger@puri.sm> In-Reply-To: <20200218084942.4884-1-martin.kepplinger@puri.sm> References: <20200218084942.4884-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 --- 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 4cb11ed17c24..19ca3b4f802f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -537,6 +537,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