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

42 lines
1.3 KiB
Diff
Raw Normal View History

From abb044e5bab36dcff94d08e61b21ba91d2b8632f Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 18 Mar 2021 20:22:05 +0800
Subject: [PATCH 106/464] 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 4cf527b06303..e174c3cfc34f 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.34.1