diff mbox

[2/3] gpio-twl4030: new dt properties for BeagleBoard and omap3-EVM

Message ID 1346680491-4211-3-git-send-email-florian.vaussard@epfl.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Florian Vaussard Sept. 3, 2012, 1:54 p.m. UTC
Add device tree properties for twl4030/gpio, according to the
platform data of corresponding boards. This enables the led
connected to LEDB output for both boards, as well as
pullups/pulldowns on GPIO for the BeagleBoard.

Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
 arch/arm/boot/dts/omap3-beagle.dts |   20 ++++++++++++++++++++
 arch/arm/boot/dts/omap3-evm.dts    |   13 +++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)

Comments

Vaibhav Hiremath Sept. 4, 2012, 7:27 a.m. UTC | #1
On 9/3/2012 7:24 PM, Florian Vaussard wrote:
> Add device tree properties for twl4030/gpio, according to the
> platform data of corresponding boards. This enables the led
> connected to LEDB output for both boards, as well as
> pullups/pulldowns on GPIO for the BeagleBoard.
> 
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
> ---
>  arch/arm/boot/dts/omap3-beagle.dts |   20 ++++++++++++++++++++
>  arch/arm/boot/dts/omap3-evm.dts    |   13 +++++++++++++
>  2 files changed, 33 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
> index cdcb98c..16bff8b 100644
> --- a/arch/arm/boot/dts/omap3-beagle.dts
> +++ b/arch/arm/boot/dts/omap3-beagle.dts
> @@ -17,6 +17,14 @@
>  		device_type = "memory";
>  		reg = <0x80000000 0x20000000>; /* 512 MB */
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		pmu_stat {
> +			label = "beagleboard::pmu_stat";
> +			gpios = <&twl_gpio 19 0>; /* LEDB */
> +		};
> +	};
>  };
>  
>  &i2c1 {
> @@ -67,3 +75,15 @@
>  &mmc3 {
>  	status = "disabled";
>  };
> +
> +&twl_gpio {
> +	ti,use-leds = "true";
> +	/* pullups: BIT(1) */
> +	ti,pullups = <2>;
> +	/*
> +	 * pulldowns:
> +	 * BIT(2), BIT(6), BIT(7), BIT(8), BIT(13)
> +	 * BIT(15), BIT(16), BIT(17)
> +	 */
> +	ti,pulldowns = <238020>;

Consider changing above value to hex presentation.
Otherwise looks ok to me, also I have tested it on OMAP3EVM.

Tested-&-Acked-By: Vaibhav Hiremath <hvaibhav@ti.com>

Thanks,
Vaibhav

> +};
> diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts
> index f349ee9..f1e18fe 100644
> --- a/arch/arm/boot/dts/omap3-evm.dts
> +++ b/arch/arm/boot/dts/omap3-evm.dts
> @@ -17,6 +17,15 @@
>  		device_type = "memory";
>  		reg = <0x80000000 0x10000000>; /* 256 MB */
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		ledb {
> +			label = "omap3evm::ledb";
> +			gpios = <&twl_gpio 19 0>; /* LEDB */
> +			linux,default-trigger = "default-on";
> +		};
> +	};
>  };
>  
>  &i2c1 {
> @@ -46,3 +55,7 @@
>  		reg = <0x5c>;
>  	};
>  };
> +
> +&twl_gpio {
> +	ti,use-leds = "true";
> +};
>
Linus Walleij Sept. 4, 2012, 7:30 a.m. UTC | #2
On Mon, Sep 3, 2012 at 3:54 PM, Florian Vaussard
<florian.vaussard@epfl.ch> wrote:

> Add device tree properties for twl4030/gpio, according to the
> platform data of corresponding boards. This enables the led
> connected to LEDB output for both boards, as well as
> pullups/pulldowns on GPIO for the BeagleBoard.
>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index cdcb98c..16bff8b 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -17,6 +17,14 @@ 
 		device_type = "memory";
 		reg = <0x80000000 0x20000000>; /* 512 MB */
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		pmu_stat {
+			label = "beagleboard::pmu_stat";
+			gpios = <&twl_gpio 19 0>; /* LEDB */
+		};
+	};
 };
 
 &i2c1 {
@@ -67,3 +75,15 @@ 
 &mmc3 {
 	status = "disabled";
 };
+
+&twl_gpio {
+	ti,use-leds = "true";
+	/* pullups: BIT(1) */
+	ti,pullups = <2>;
+	/*
+	 * pulldowns:
+	 * BIT(2), BIT(6), BIT(7), BIT(8), BIT(13)
+	 * BIT(15), BIT(16), BIT(17)
+	 */
+	ti,pulldowns = <238020>;
+};
diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts
index f349ee9..f1e18fe 100644
--- a/arch/arm/boot/dts/omap3-evm.dts
+++ b/arch/arm/boot/dts/omap3-evm.dts
@@ -17,6 +17,15 @@ 
 		device_type = "memory";
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		ledb {
+			label = "omap3evm::ledb";
+			gpios = <&twl_gpio 19 0>; /* LEDB */
+			linux,default-trigger = "default-on";
+		};
+	};
 };
 
 &i2c1 {
@@ -46,3 +55,7 @@ 
 		reg = <0x5c>;
 	};
 };
+
+&twl_gpio {
+	ti,use-leds = "true";
+};