From patchwork Sun Sep 8 21:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Skvortsov X-Patchwork-Id: 13795667 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 D7BCBECE577 for ; Sun, 8 Sep 2024 21:50:05 +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:References:In-Reply-To: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:List-Owner; bh=K3h/dy8U8KeKo9pl0s6GpX+Ff1bmWBiKnyAT/bdQlUo=; b=kZH9VYCXuyhszDldIM5wjYoG76 VqG2gdhcUK44sJnBniC/xhi3wd0SjaT7m5IDlLXuGYmpySiCAjKIl5GSibVu14OZ/hoKitpfzN6qe tWcOmZAhEm+1b91yr4TheO6qRLf7MH66D5Dv0oYd/RwK6t/rgOdKAmWQZRE2Ha0wXugNFJgCFRYAY pIDjWD2qmpDAyMQulZppI0lFnc5O+WjScdxjEImqgqpncEIYG3fOcwjdI/fi3sfx2/ZpiS430RAOX xAJBksbReOtCoeOzpGyyp7YUv1oc44T8zyn7LtotWKIXSiEIdTEvP4/nIB3yfEJaRN4TbGbyeUlT1 YOhBdFUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snPnB-0000000HWte-0Xgs; Sun, 08 Sep 2024 21:49:57 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snPlJ-0000000HWdy-0hFc for linux-arm-kernel@lists.infradead.org; Sun, 08 Sep 2024 21:48:03 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2f762de00fbso7787941fa.2 for ; Sun, 08 Sep 2024 14:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725832079; x=1726436879; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K3h/dy8U8KeKo9pl0s6GpX+Ff1bmWBiKnyAT/bdQlUo=; b=J39kfog6pKN9gR/N36XON19pIlWBtWfG0rG/Mgj54cBLav0hxFa/Z6GQFBnQ61i39f gaUkMAe79BxN/i8g9A6BnYWdXH+uyLZDG+m/NyOD48Yqr/KOE1ghNdNkYh/kSs7es+Uu PPs0ZSEo0ixdhv4k9jdF4NuwQljecg2E3lFoGG5LYdgC4O00aYCl0xtbAUg7dHyOQuGD fXf0PoWnra5YOiXzbpkd2olKcVf+yjqLCJYjITWjgsqAq672f7JDYPX82Axcc9799L40 raFQcIo4WIYaawNVNR2llzrCaLlC6c8jI7lJkfwoblPESC/ebSEBdP85oOy1KUGiEQxu +/7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725832079; x=1726436879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K3h/dy8U8KeKo9pl0s6GpX+Ff1bmWBiKnyAT/bdQlUo=; b=SzHUlOjJI3YvQY9MEQg/Yf4AItuxG5rGNXUtTPHFO6K/3MtWn5JjG++E7mzOeqaRwc uqwKx3M+M1cAyVyzFbq2AJZEa55BLRo/x9HWwKijrWORXVU1Z94YEjXcSJ5Ao14F3Kev 6sGqGyqI8neohwHwmfzKPKYNn2FzCzm2lYBwu59oQ7EQ0q1aFqMyCJnenEuC7doXnQ/G 25ttSE4dqqgPLJrhoSe6MurVVP4kI3qs0DaREXLhYBEijQqT/JfvUtVp+JFGLYwONUok vymIVZkjIzddSnwwby1DJjqXxA695M9a/lvbN+WUjkePAXyadJWevnAnMiPtkeyhlWzs 93xw== X-Forwarded-Encrypted: i=1; AJvYcCWSNOXDmYa1gvbAEDorZj4fJGXfOczKToXVwnToNmeB6HJ7u6OUrvY5XAhJcTVEPthiO7+av2SKF06AdHhBoVH0@lists.infradead.org X-Gm-Message-State: AOJu0YyPQRPkgNZOige/2WRHY5011egAmLPJalqavN4qBLubnPHIBtf7 PLwvm9Mb1UfGL1YLEsZWD8tbjjfH2JRLpDTv9mWSCymcxLUkmNcW X-Google-Smtp-Source: AGHT+IGrW/26G4fqJ55LEXa+E3HPJe1Oq8TWJKGljblgXwZFH5PCcrjxnSDxIUyY7RjRWG/956715A== X-Received: by 2002:a2e:a58e:0:b0:2f3:d82b:1959 with SMTP id 38308e7fff4ca-2f751f00b02mr77757571fa.23.1725832078203; Sun, 08 Sep 2024 14:47:58 -0700 (PDT) Received: from localhost.localdomain ([94.19.228.143]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2f75c009a5dsm6094001fa.72.2024.09.08.14.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2024 14:47:57 -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 Cc: Shoji Keita , Icenowy Zheng , Andre Przywara , Andrey Skvortsov Subject: [PATCH 1/2] arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhone Date: Mon, 9 Sep 2024 00:47:17 +0300 Message-ID: <20240908214718.36316-2-andrej.skvortzov@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240908214718.36316-1-andrej.skvortzov@gmail.com> References: <20240908214718.36316-1-andrej.skvortzov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240908_144801_239074_12EF71D5 X-CRM114-Status: GOOD ( 12.64 ) 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: Icenowy Zheng New batches of PinePhones switched the magnetometer to AF8133J from LIS3MDL because lack of ST components. Both chips use the same PB1 pin, but in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time, because both drivers try to acquire the same gpio in different modes. Device tree fixup will be done in firmware without introducing new board revision and new dts. Signed-off-by: Icenowy Zheng Signed-off-by: Andrey Skvortsov Link: https://patchwork.ozlabs.org/project/uboot/patch/20240211092824.395155-1-andrej.skvortzov@gmail.com/ --- .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 6eab61a12cd8f..66fbb35a7fae9 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -188,6 +188,18 @@ touchscreen@5d { &i2c1 { status = "okay"; + /* Alternative magnetometer */ + af8133j: magnetometer@1c { + compatible = "voltafield,af8133j"; + reg = <0x1c>; + reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>; + avdd-supply = <®_dldo1>; + dvdd-supply = <®_dldo1>; + + /* status will be fixed up in firmware */ + status = "disabled"; + }; + /* Magnetometer */ lis3mdl: magnetometer@1e { compatible = "st,lis3mdl-magn";