From 2a3460a07d4ef36bd754c83dce9b6b7ea9844aa3 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Fri, 10 Nov 2017 13:24:58 +0100
Subject: [PATCH 42/82] ARM: dts: sun8i-a83t-tbs-a711: Enable AK8963
 magnetometer

Though the chip is probably broken on my tablet. It doesn't respond
on I2C 0x0d address.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
index 6acc678d1b5b..ec986498114e 100644
--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
@@ -251,6 +251,24 @@
 		interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */
 	};
 
+	/* Magnetic Sensor */
+	ak8963: ak8963@0d {
+		status = "disabled"; /* broken */ 
+		compatible = "asahi-kasei,ak8963";
+		reg = <0x0d>;
+		interrupt-parent = <&pio>;
+		interrupts = <1 2 IRQ_TYPE_EDGE_RISING>; /* PB2 */
+		mount-matrix =  /* x0 */ "-0.984807753012208",
+				/* y0 */ "0",
+				/* z0 */ "-0.173648177666930",
+				/* x1 */ "0",
+				/* y1 */ "-1",
+				/* z1 */ "0",
+				/* x2 */ "-0.173648177666930",
+				/* y2 */ "0",
+				/* z2 */ "0.984807753012208";
+	};
+
 	/* Light Sensor */
 	ltr501: ltr501@23 {
 		status = "disabled"; /* no output */ 
-- 
2.20.1

