From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To: Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Shoji Keita <awaittrot@shjk.jp>, Icenowy Zheng <icenowy@aosc.io>,
Andre Przywara <andre.przywara@arm.com>,
Andrey Skvortsov <andrej.skvortzov@gmail.com>
Subject: [PATCH 1/2] arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhone
Date: Mon, 9 Sep 2024 00:47:17 +0300 [thread overview]
Message-ID: <20240908214718.36316-2-andrej.skvortzov@gmail.com> (raw)
In-Reply-To: <20240908214718.36316-1-andrej.skvortzov@gmail.com>
From: Icenowy Zheng <icenowy@aosc.io>
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 <icenowy@aosc.io>
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
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";
--
2.45.2
next prev parent reply other threads:[~2024-09-08 21:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-08 21:47 [PATCH 0/2] Fix magnetometers on PinePhone Andrey Skvortsov
2024-09-08 21:47 ` Andrey Skvortsov [this message]
2024-09-09 8:08 ` [PATCH 1/2] arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhone Chen-Yu Tsai
2024-09-15 10:12 ` Andrey Skvortsov
2024-10-19 2:04 ` Chen-Yu Tsai
2024-11-05 19:51 ` Andrey Skvortsov
2024-11-06 2:31 ` Chen-Yu Tsai
2024-11-06 7:05 ` Andrey Skvortsov
2024-09-08 21:47 ` [PATCH 2/2] arm64: dts: sun50i-a64-pinephone: Add mount-matrix for PinePhone magnetometers Andrey Skvortsov
2024-11-07 15:26 ` [PATCH 0/2] Fix magnetometers on PinePhone Chen-Yu Tsai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240908214718.36316-2-andrej.skvortzov@gmail.com \
--to=andrej.skvortzov@gmail.com \
--cc=andre.przywara@arm.com \
--cc=awaittrot@shjk.jp \
--cc=icenowy@aosc.io \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox