Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1116073ybf; Thu, 27 Feb 2020 05:20:12 -0800 (PST) X-Google-Smtp-Source: APXvYqz5RHing14e3zjUxDNbdiAtI5Ce38MfvcpuYEiCK7V6czExOUdchIL2BsmJ74OkfupPaOqg X-Received: by 2002:a05:6808:8ca:: with SMTP id k10mr3243785oij.164.1582809612420; Thu, 27 Feb 2020 05:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582809612; cv=none; d=google.com; s=arc-20160816; b=bs/Y44C/fdkOKRK9hriFGiNcWTrxz26xa8KGfNDY+TwJtNNxmEyyMEHp5mGOFx7PZj CgJ6kmi9V86rmjuOzD5+C3YNeRiylQb8ZB2/JyVzOvv2rUvgD18gh6GYnIjj/Y6vG/sj poPmWv0Gp9YyRCEtagvIkzIatTZEJz0GB8IN1SPW/88Io4bfWed3gcnkVLcsmfjLVtZx CNDt+dvb0F2Y9VQyWnrD4TaX7XSupkEb4pW54BmXbPZhGjuD8pAmBmeUa+JqV7Taxtan G80eaRNYUH+oKzzpkB3IVp3FC516DIEX5O+dXOWmZOlWiVzQIizGpT7zfrRv83XTGZtd 9TyA== 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=JsXDkkrYA0EkAQHe5RWALC43jAhEn84HbKO5B9JK1hE=; b=TmP/wMQGwPfUSntx5sZvk/hmVZwdTlCQvRFZy4g5nb/9oSWMmGoDjmlRhS2Q+M/neo trqSFXRRVzhawfMjHkFiBf2ceWliXG5bt3sKnxwUDXcWZPHTY7eQHNspywMFXCIh0X+C 8oeLrERgBXmhAWag37ECwiwP+dsxLxhnxmt+9sw+TyEwVjQqwD3Wc5zS+iX+arz+8rYa G5aMer0Dg/sr5EBey/UY0ifEntEaChq+fBCRxg54iK/tVpfhlCaMm5e2yMTjVbBoTIzG eTuivGmZkzLhcF/U2Cyq1r91Qft1nTSk4R98UUJJ4j2i1wEmjG2tRnJrhy6KC3PN2vOT cFvQ== 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 c10si2126947ots.106.2020.02.27.05.19.59; Thu, 27 Feb 2020 05:20:12 -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 S1729288AbgB0NSM (ORCPT + 99 others); Thu, 27 Feb 2020 08:18:12 -0500 Received: from comms.puri.sm ([159.203.221.185]:39914 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729278AbgB0NSL (ORCPT ); Thu, 27 Feb 2020 08:18:11 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 4E3EADFD84; Thu, 27 Feb 2020 05:18:11 -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 hKoThQI50WXp; Thu, 27 Feb 2020 05:18:10 -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 v4 8/8] arm64: dts: librem5-devkit: add lsm9ds1 mount matrix Date: Thu, 27 Feb 2020 14:17:33 +0100 Message-Id: <20200227131733.4228-9-martin.kepplinger@puri.sm> In-Reply-To: <20200227131733.4228-1-martin.kepplinger@puri.sm> References: <20200227131733.4228-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 72c622ffe6de..10eca94194be 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -539,6 +539,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