From patchwork Sat Jul 25 11:19:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 2802 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 58F1A1C1E8F for ; Sat, 25 Jul 2026 13:26:33 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=xff.cz; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24764-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-24764-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 6586930182BD for ; Sat, 25 Jul 2026 11:26:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E5F93939B6; Sat, 25 Jul 2026 11:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="BBmXOeQr" X-Original-To: linux-sunxi@lists.linux.dev Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EEED36195A for ; Sat, 25 Jul 2026 11:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784978790; cv=none; b=meuwoLSIY6y96LMtKiWt0ZD+NknqBSDIoImARiKzmbcHfiUJ/wciqccVNnQmKHo/Xj+kDlfQyez1KkMvvQhI98LYe35p/V0ZD78ZV2hoQSfJXmOVcx0dGSEGHL6LkArJ2UdAUArR8p+PDrVxFS6l/myXKH9a0IMKvO2kK3doiyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784978790; c=relaxed/simple; bh=nORByVcuztvWSuATQGRl/ZUN9+Z8frojPCDBSo1YEf0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AykeQzuRKth2UEG1Jxro4X4efjtwA11VbE2oqfzbwdX1XZPVh8miU2tc/z6WVqkd/9+O2pdUvwZUi1iOy3P3u0ka5YMl8WBmsFOEujqwDrSt6J0tpWpXFGO0qWN4z+CM7TkNLIpmvirIGigskaLziTQygyw7P8tkXdK37eRzAYA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=BBmXOeQr; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz 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_Jirman?= 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> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_RCPT(0.00)[dt]; RCPT_COUNT_TWELVE(0.00)[13]; PRECEDENCE_BULK(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,xff.cz,kernel.org,gmail.com,sholland.org,manjaro.org,lists.infradead.org]; DBL_PROHIBIT(0.00)[0.0.0.68:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[xff.cz:email,xff.cz:dkim,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; FROM_HAS_DN(0.00)[]; R_DKIM_ALLOW(0.00)[xff.cz:s=mail]; DKIM_TRACE(0.00)[xff.cz:+]; DMARC_POLICY_ALLOW(0.00)[xff.cz,none]; RCVD_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_SENDER_MAILLIST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-24764-noreply=patchwork.local]; FROM_NEQ_ENVFROM(0.00)[megi@xff.cz,linux-sunxi@lists.linux.dev]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 58F1A1C1E8F X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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"; }; };