]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: sun5i: chip: add a node for the w1 gpio controller
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Thu, 1 Oct 2015 14:39:43 +0000 (16:39 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 22 Nov 2016 14:33:54 +0000 (15:33 +0100)
The CHIP uses a 1-Wire bus to discover the DIPs. Enable the bus in the DT.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun5i-r8-chip.dts

index e616084b9495042feb3f34d9b0c34a6d7216260a..059d86865b73383ee8cd468f0f2ac4105c4766e0 100644 (file)
                pinctrl-0 = <&chip_wifi_reg_on_pin>;
                reset-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
        };
+
+       onewire {
+               compatible = "w1-gpio";
+               gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
+               pinctrl-names = "default";
+               pinctrl-0 = <&chip_w1_pin>;
+       };
 };
 
 &be0 {
                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 {