Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6CD1C531C9 for ; Sat, 25 Jul 2026 11:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=v1XnvhuBoDG4y1lmMQbiSiZ7jqw05+luvbjxzkw9QGE=; b=ATdYYKS13J3M6Ys3A3Q1ycyttD Wvo+4E8S6jK4dbDeXPVnSCS4X/lXncbcuA7teLaxA/6BFwnTShRQmqS9lrb0yjKuGymT96rhY+2j/ NOWzGz2lNvk0EkwhX9x36mG2sjsyGJosktC/goxghlFZTUbtE347FiK4dbQSxtC+BMYOPjHaz5lO0 Da3O8FP1QvkBuFLxjshOOSjqCrsvPOvAwlzLzjjlGxlyIZ48/DvVcVEtM2hWYUARgKRqfCSsIW2GQ X40KX4QTUOI+v05NF1q/OEoN37WahHBtVbFN4Nj2xiUVnzC/wtJ2n18UNkgEI7Q8vQVBobSCficc9 FOMbwT7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnaPh-00000000HMd-1PnM; Sat, 25 Jul 2026 11:19:29 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wnaPd-00000000HLH-1NXW for linux-arm-kernel@lists.infradead.org; Sat, 25 Jul 2026 11:19:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1784978359; bh=nORByVcuztvWSuATQGRl/ZUN9+Z8frojPCDBSo1YEf0=; h=From:To:Cc:Subject:Date:From; b=BBmXOeQrrJSNckm6ef2MoIsNiyP0+iwbmFnUEGR142y7YL9Q91LU5lHhPJCkv5Oyf TOJkleY6jitLWgP/HqbtWuTZGwG7lfxiYb5TBPZykmwB2+sCPELV1/YcG/FEQ56lkF HlAqVvNeafJyZYwkRsvVSTY60+s3Tzp3xturx49A= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= To: linux-sunxi@lists.linux.dev Cc: linux-kernel@vger.kernel.org, Ondrej Jirman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Dragan Simic , Andrey Skvortsov , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support) Subject: [PATCH] arm64: dts: allwinner: sun50i-a64-pinephone: Fix mpu6050 mount matrix Date: Sat, 25 Jul 2026 13:19:07 +0200 Message-ID: <20260725111909.2244868-1-megi@xff.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260725_041925_821616_B8A5E68E X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ondrej Jirman The current mount matrix for mpu6050 is wrong. The mount matrix is a simple transform from the sensor coordinate space to the device coordinate space described in DT, where, looking at the screen, X points to the right, Y to the top, and Z towards the user. The mpu6050 is mounted like this (looking at the screen from the front; the sensor is on the near side of the PCB, so its Z axis points towards the user; o marks the pin 1 corner): +Xs ^ | +------+ +Ys <--| | | o | +------+ so this gives: Xd = -Ys [0, -1, 0] Yd = Xs [1, 0, 0] Zd = Zs [0, 0, 1] Fixes: 2496b2aaacf1 ("arm64: dts: allwinner: pinephone: Add mount matrix to accelerometer") Signed-off-by: Ondrej Jirman --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 4bc6c1ef2cde..f958bdbb0d33 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -230,8 +230,8 @@ accelerometer@68 { interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */ vdd-supply = <®_dldo1>; vddio-supply = <®_dldo1>; - mount-matrix = "0", "1", "0", - "-1", "0", "0", + mount-matrix = "0", "-1", "0", + "1", "0", "0", "0", "0", "1"; }; }; -- 2.54.0