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

Maxime Ripard maxime.ripard at free-electrons.com
Tue Nov 8 11:19:22 CET 2016


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 at free-electrons.com>
---
 arch/arm/dts/sun5i-r8-chip.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+), 0 deletions(-)

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 at 0 {
+	        allwinner,pins = "PD2";
+	        allwinner,function = "gpio_in";
+	        allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+	        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_dcdc2 {
-- 
git-series 0.8.11


More information about the U-Boot mailing list