diff mbox

[U-Boot,RESEND,2/9] sunxi: chip: Add 1-wire node

Message ID 75fcd857674134096a717c63a62cecc01f6426b1.1478600213.git-series.maxime.ripard@free-electrons.com
State Deferred
Delegated to: Tom Rini
Headers show

Commit Message

Maxime Ripard Nov. 8, 2016, 10:19 a.m. UTC
The CHIP uses on PD2 (a pin incorrectly called LCD_D2) a bitbanged 1-Wire
bus to discover the adapters plug into it.

Add that bus to the device tree.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/dts/sun5i-r8-chip.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/dts/sun5i-r8-chip.dts b/arch/arm/dts/sun5i-r8-chip.dts
index 7a8cc2727960..fdba47c2bc33 100644
--- a/arch/arm/dts/sun5i-r8-chip.dts
+++ b/arch/arm/dts/sun5i-r8-chip.dts
@@ -59,6 +59,7 @@ 
 		i2c2 = &i2c2;
 		serial0 = &uart1;
 		serial1 = &uart3;
+		w10 = &w1;
 	};
 
 	chosen {
@@ -76,6 +77,13 @@ 
 		gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */
 		enable-active-high;
 	};
+
+	w1: onewire {
+		compatible = "w1-gpio";
+		gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+		pinctrl-names = "default";
+	        pinctrl-0 = <&chip_w1_pin>;
+	};
 };
 
 &be0 {
@@ -175,6 +183,13 @@ 
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	chip_w1_pin: chip_w1_pin@0 {
+	        allwinner,pins = "PD2";
+	        allwinner,function = "gpio_in";
+	        allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+	        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_dcdc2 {