From 0c3acc6de890947f7735457b2dfdb0677e09c64e Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <icenowy@aosc.io>
Date: Thu, 18 Mar 2021 20:22:05 +0800
Subject: [PATCH 184/463] 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 0a8352147280a..694d715ff8759 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -499,6 +499,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.46.0

