linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1
@ 2015-05-29 14:33 Steffen Trumtrar
  2015-05-29 14:33 ` [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds Steffen Trumtrar
  2015-05-29 19:24 ` [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Dinh Nguyen
  0 siblings, 2 replies; 5+ messages in thread
From: Steffen Trumtrar @ 2015-05-29 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the gpio0+1 controller.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
index a1814b457450..a81f33deaa3a 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
@@ -36,6 +36,14 @@
 	status = "okay";
 };
 
+&gpio0 {
+	status = "okay";
+};
+
+&gpio1 {
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds
  2015-05-29 14:33 [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Steffen Trumtrar
@ 2015-05-29 14:33 ` Steffen Trumtrar
  2015-05-29 19:19   ` Dinh Nguyen
  2015-05-29 19:24 ` [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Dinh Nguyen
  1 sibling, 1 reply; 5+ messages in thread
From: Steffen Trumtrar @ 2015-05-29 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

The SOCrates has three HPS LEDs that can be turned on/off via gpio.
Use the first one has heartbeat and add the other two as free LEDs.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
index a81f33deaa3a..019dd2fea208 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
@@ -30,6 +30,9 @@
 		device_type = "memory";
 		reg = <0x0 0x40000000>; /* 1GB */
 	};
+
+	leds: gpio-leds {
+	};
 };
 
 &gmac1 {
@@ -53,6 +56,26 @@
 	};
 };
 
+&leds {
+	compatible = "gpio-leds";
+
+	led at 0 {
+		label = "led:green:heartbeat";
+		gpios = <&porta 28 1>;
+		linux,default-trigger = "heartbeat";
+	};
+
+	led at 1 {
+		label = "led:green:D7";
+		gpios = <&portb 19 1>;
+	};
+
+	led at 2 {
+		label = "led:green:D8";
+		gpios = <&portb 25 1>;
+	};
+};
+
 &mmc {
 	status = "okay";
 };
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds
  2015-05-29 14:33 ` [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds Steffen Trumtrar
@ 2015-05-29 19:19   ` Dinh Nguyen
  2015-06-02 19:31     ` Dinh Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Dinh Nguyen @ 2015-05-29 19:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/29/2015 09:33 AM, Steffen Trumtrar wrote:
> The SOCrates has three HPS LEDs that can be turned on/off via gpio.
> Use the first one has heartbeat and add the other two as free LEDs.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> index a81f33deaa3a..019dd2fea208 100644
> --- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> @@ -30,6 +30,9 @@
>  		device_type = "memory";
>  		reg = <0x0 0x40000000>; /* 1GB */
>  	};
> +
> +	leds: gpio-leds {

Wonder if you should just place all the led nodes under here instead of
under the "&leds"?
	
> +	};
>  };
>  
>  &gmac1 {
> @@ -53,6 +56,26 @@
>  	};
>  };
>  
> +&leds {
> +	compatible = "gpio-leds";
> +
> +	led at 0 {
> +		label = "led:green:heartbeat";
> +		gpios = <&porta 28 1>;
> +		linux,default-trigger = "heartbeat";
> +	};
> +
> +	led at 1 {
> +		label = "led:green:D7";
> +		gpios = <&portb 19 1>;
> +	};
> +
> +	led at 2 {
> +		label = "led:green:D8";
> +		gpios = <&portb 25 1>;
> +	};
> +};
> +
>  &mmc {
>  	status = "okay";
>  };
> 

Dinh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1
  2015-05-29 14:33 [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Steffen Trumtrar
  2015-05-29 14:33 ` [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds Steffen Trumtrar
@ 2015-05-29 19:24 ` Dinh Nguyen
  1 sibling, 0 replies; 5+ messages in thread
From: Dinh Nguyen @ 2015-05-29 19:24 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/29/2015 09:33 AM, Steffen Trumtrar wrote:
> Enable the gpio0+1 controller.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> index a1814b457450..a81f33deaa3a 100644
> --- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
> @@ -36,6 +36,14 @@
>  	status = "okay";
>  };
>  
> +&gpio0 {
> +	status = "okay";
> +};
> +
> +&gpio1 {
> +	status = "okay";
> +};
> +
>  &i2c0 {
>  	status = "okay";
>  
> 

Applied.

Thanks,
Dinh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds
  2015-05-29 19:19   ` Dinh Nguyen
@ 2015-06-02 19:31     ` Dinh Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Dinh Nguyen @ 2015-06-02 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/29/2015 02:19 PM, Dinh Nguyen wrote:
> On 05/29/2015 09:33 AM, Steffen Trumtrar wrote:
>> The SOCrates has three HPS LEDs that can be turned on/off via gpio.
>> Use the first one has heartbeat and add the other two as free LEDs.
>>
>> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>> ---
>>  arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
>> index a81f33deaa3a..019dd2fea208 100644
>> --- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
>> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
>> @@ -30,6 +30,9 @@
>>  		device_type = "memory";
>>  		reg = <0x0 0x40000000>; /* 1GB */
>>  	};
>> +
>> +	leds: gpio-leds {
> 
> Wonder if you should just place all the led nodes under here instead of
> under the "&leds"?
> 	

patch applied as is.

Thanks,
Dinh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-02 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 14:33 [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Steffen Trumtrar
2015-05-29 14:33 ` [PATCH 2/2] ARM: socfpga: socrates: add gpio-leds Steffen Trumtrar
2015-05-29 19:19   ` Dinh Nguyen
2015-06-02 19:31     ` Dinh Nguyen
2015-05-29 19:24 ` [PATCH 1/2] ARM: socfpga: socrates: enable gpio0/1 Dinh Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).