build/patch/kernel/archive/sunxi-6.2/patches.megous/arm64-dts-sun50i-a64-pinephone-Add-AF8133J-to-PinePhone.patch

42 lines
1.3 KiB
Diff

From 1cf6f3e262c44e97946f4da2a45362ca189ba942 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 18 Mar 2021 20:22:05 +0800
Subject: [PATCH 108/391] arm64: dts: sun50i-a64-pinephone: Add AF8133J to
PinePhone
New batches of PinePhones switched the magnetometer to AF8133J from
LIS3MDL because lack of ST components.
Add this magnetometer to the device tree. These two sensors do not
conflict with each other, and the non-existent sensor's driver won't
just get probed properly.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 4cf527b06..e174c3cfc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -492,6 +492,15 @@ &i2c1 {
status = "okay";
clock-frequency = <400000>;
+ /* Alternative magnetometer */
+ af8133j: magnetometer@1c {
+ compatible = "voltafield,af8133j";
+ reg = <0x1c>;
+ reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
+ avdd-supply = <&reg_dldo1>;
+ dvdd-supply = <&reg_dldo1>;
+ };
+
/* Magnetometer */
lis3mdl: magnetometer@1e {
compatible = "st,lis3mdl-magn";
--
2.35.3