From 69eafa62d60b993ba9500f56af568357b16b1504 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Fri, 10 Nov 2017 14:33:28 +0100
Subject: [PATCH 44/82] ARM: dts: sun8i-a83t-tbs-a711: Add PN544 NFC support

Regulators on the schematic are named incorrectly. Both cameras are
is in fact connected to the dvdd-csi-f regulator and dvdd-csi-r is
in reality used for digital pad supply for NFC chip.

At the same time vcc-mipi regulator is not used for MIPI, but for NFC
VBAT power.

Interpreting schematics is an art form! :D

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

diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
index ec986498114e..787277f4d455 100644
--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
@@ -277,6 +277,16 @@
 		interrupt-parent = <&pio>;
 		interrupts = <6 12 IRQ_TYPE_EDGE_FALLING>; /* PG12 */
 	};
+
+	/* NFC (NPC 100) */
+	npc100: nfc@28 {
+		compatible = "nxp,nxp-nci-i2c";
+		reg = <0x28>;
+		interrupt-parent = <&r_pio>;
+		interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; /* PL6 */
+		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+		firmware-gpios = <&pio 3 3 GPIO_ACTIVE_HIGH>; /* PD3 */
+	};
 };
 
 &mmc0 {
@@ -434,9 +444,10 @@
 };
 
 &reg_dldo2 {
-	regulator-min-microvolt = <2800000>;
+	regulator-min-microvolt = <3300000>;
 	regulator-max-microvolt = <4200000>;
-	regulator-name = "vcc-mipi";
+	regulator-name = "vbat-nfc";
+	regulator-always-on;
 };
 
 &reg_dldo3 {
@@ -459,7 +470,8 @@
 &reg_eldo1 {
 	regulator-min-microvolt = <1800000>;
 	regulator-max-microvolt = <1800000>;
-	regulator-name = "dvdd-csi-r";
+	regulator-name = "pvdd-nfc";
+	regulator-always-on;
 };
 
 &reg_eldo2 {
-- 
2.20.1