From patchwork Mon Sep 16 20:45:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrey Skvortsov X-Patchwork-Id: 13805780 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 5883DC3ABB2 for ; Mon, 16 Sep 2024 20:47:01 +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: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=07RrCbel2n57k5JkA+rd7wEQD1Pp3W7MwcNJcieDSAA=; b=P/pdC4ROywotJcVULLL0tJE1lB nFCvInVKD5dEIA7h9CNW4pDChvkkaahH6Z7uToQuo36hRYQVKfSM4P8vUJwFoGSYy+9oh1xtAxCZS 153AP0MLa2g+hwJ0TaEu/Cj1LlaNFVprqftvhRED+UvP0DdGe9kNiUpI0mD1phDIeticxn9eGyZND x8IriLBwghLm14sX4Us14gXW/6lIBhLwAmkaUtegEGIEnMFgdYuJEvENwxLrNDewwiIsvz1+ovFWe euxyYWwffOb0NFAZUNkbiMgfPYygxYYBMQKnlzd1G0gN+7dUEDH9jishNOzpowys74LMrPL50cKFE YeEBfW0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqIcU-00000004sc0-16gr; Mon, 16 Sep 2024 20:46:50 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqIbO-00000004sSs-0OM5 for linux-arm-kernel@lists.infradead.org; Mon, 16 Sep 2024 20:45:43 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-536584f6c84so6095931e87.0 for ; Mon, 16 Sep 2024 13:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726519540; x=1727124340; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=07RrCbel2n57k5JkA+rd7wEQD1Pp3W7MwcNJcieDSAA=; b=S7MA94ljS2nI+ATi1NwHbFRckW9pOB0L33ij62EcuXPoKztTPNne0KBrobHjxlDKSN O2r/H+xWzgOVqsPpWAzVjxatJeMKVdQqu2MpN//GdaAB0q6MaEo779Exjkwsf5PqSiQ/ ZmNZ9ytJgY3PbFuiuhnU4DO1w7M/PLmCOpNnBFMyVSdA7HyKUAEUqmpWFsOspg50apKj PR6sZkKL6fYfmEtw8Xdzzh6ogX7iipuBulCVZsoOdPnBMEyCGE7ZwXxan8A3c7NDRtMQ eVR47JzIMRGGzLHZXxrSv7DkDBOvKFR1HWf/tuN7SwVTU1+oaXnBLpNoWG5VOWrbCCXL SyaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726519540; x=1727124340; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=07RrCbel2n57k5JkA+rd7wEQD1Pp3W7MwcNJcieDSAA=; b=Ki7J1U/jzPVe5DnGBrp6nOp6Wwd3IXBkoDIDLjLmLHSg0aTDp7IodpEss9dMO7jWSu DWcPE5p4gy1GjYNCzlQk2tr62VB3KStoBi82pj1SgQLEbm6yRn/eCXEiuyfNBXM5hsJB t0xsKwuCKI0WUMk9ad63QHM+enxW2AjmcD82LGp0YdYIYmZ6yDHEmcF8rqm/d+9NjWrt uJK+OMtFiNAYT7brDl9GjRRs902hCyq6iIrdwXlYBE2Z0uudQYn3NCzFzMv3/+IwpsiS Mp9OIvI9jmmqOX+iKa397isCXZr/uGgsv+vOs664+SHkdEXvG4RqkmvVue5HSZ3dw1j8 UC9Q== X-Forwarded-Encrypted: i=1; AJvYcCURtLvWlI4NsX/4N4ixGGuZIZGpaz+CiSZDrTPr0XQZuX/IGEaocc3bdNT3vcvdQj84NZouzwWluGLjqt7aX7RZ@lists.infradead.org X-Gm-Message-State: AOJu0YzMiSYJJHUkFYyCTbnTFriBSm8ydivKIO33g7Wr9NJbF7gNZ6WF FpP84EAKjauPmlsH17xBOxIdRqZVoS+gaP7ob0z2Q9xJDmIKwHEZ4FOlnbHd X-Google-Smtp-Source: AGHT+IGBoVGZktyfnJSc0q/3ib+Kll8oaCcvG9CIVVKc1VXar2Wf+ks+DR12B2Ikz4FXjCJJmsrGKQ== X-Received: by 2002:a05:6512:b03:b0:52f:244:206f with SMTP id 2adb3069b0e04-53678ff5e1cmr8511739e87.53.1726519538654; Mon, 16 Sep 2024 13:45:38 -0700 (PDT) Received: from localhost.localdomain ([94.19.228.143]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870ad17dsm990738e87.241.2024.09.16.13.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 13:45:37 -0700 (PDT) From: Andrey Skvortsov To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?utf-8?q?Ond=C5=99ej_Jirman?= , Andrey Skvortsov Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Add mount matrix for accelerometer Date: Mon, 16 Sep 2024 23:45:21 +0300 Message-ID: <20240916204521.2033218-1-andrej.skvortzov@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240916_134542_157548_89EA305B X-CRM114-Status: GOOD ( 11.04 ) 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: OndÅ™ej Jirman accelerometer is mounted the way x and z-axis are invereted, x and y axis have to be spawed to match device orientation. The mount matrix is based on PCB drawing and was tested on the device. Signed-off-by: Ondrej Jirman Signed-off-by: Andrey Skvortsov --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index bc6af17e9267a..1da7506c38cd0 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -229,6 +229,9 @@ accelerometer@68 { interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */ vdd-supply = <®_dldo1>; vddio-supply = <®_dldo1>; + mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "-1"; }; };