Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501912 > unrolled thread

[PATCH 2/6] ARM: sun5i: chip: add a node for the w1 gpio controller

Started byMaxime Ripard <maxime.ripard@free-electrons.com>
First post2016-10-17 14:10 +0200
Last post2016-10-21 05:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/6] ARM: sun5i: chip: add a node for the w1 gpio controller Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-17 14:10 +0200
    Re: [PATCH 2/6] ARM: sun5i: chip: add a node for the w1 gpio controller Chen-Yu Tsai <wens@csie.org> - 2016-10-21 05:10 +0200

#1501912 — [PATCH 2/6] ARM: sun5i: chip: add a node for the w1 gpio controller

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-10-17 14:10 +0200
Subject[PATCH 2/6] ARM: sun5i: chip: add a node for the w1 gpio controller
Message-ID<steTT-3gZ-13@gated-at.bofh.it>
From: Antoine Tenart <antoine.tenart@free-electrons.com>

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>
---
 arch/arm/boot/dts/sun5i-r8-chip.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
index e616084b9495..059d86865b73 100644
--- a/arch/arm/boot/dts/sun5i-r8-chip.dts
+++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
@@ -81,6 +81,13 @@
 		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 {
@@ -181,6 +188,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 {
-- 
git-series 0.8.10

[toc] | [next] | [standalone]


#1505429

FromChen-Yu Tsai <wens@csie.org>
Date2016-10-21 05:10 +0200
Message-ID<suynw-8hS-9@gated-at.bofh.it>
In reply to#1501912
On Mon, Oct 17, 2016 at 7:48 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> From: Antoine Tenart <antoine.tenart@free-electrons.com>
>
> 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>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web