ARM: socfpga: socrates: enable gpio0/1
PATCH 1/2 ARM: socfpga: socrates: enable gpio0/1
Enable the gpio0+1 controller.
--- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +8 -0
@@ -36,6 +36,14 @@ status = "okay"; }; +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + &i2c0 { status = "okay";
Signature · 1 line
2.1.4
PATCH 2/2 ARM: socfpga: socrates: add gpio-leds
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.
--- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +23 -0
@@ -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"; };
Signature · 1 line
2.1.4
PATCH 2/2 ARM: socfpga: socrates: add gpio-leds
Quoted 13 lines · Steffen Trumtrar
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 <[email protected]>--- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +0
-0
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts line 34
Quoted 5 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +2
-0@@ -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"?
Quoted 22 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +14
-0+ }; }; &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>; + };
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts line 81
Quoted 10 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +7
-0+ + led at 2 { + label = "led:green:D8"; + gpios = <&portb 25 1>; + }; +}; + &mmc { status = "okay"; };
Dinh
PATCH 2/2 ARM: socfpga: socrates: add gpio-leds
Quoted 9 lines · Dinh Nguyen
Quoted 8 lines · Steffen Trumtrar
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 <[email protected]>--- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Quoted 14 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts line 34
Quoted 10 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +2
-0@@ -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
Dinh Nguyen
AppliedPATCH 1/2 ARM: socfpga: socrates: enable gpio0/1
In reply to Steffen TrumtrarQuoted 17 lines · Steffen Trumtrar
Enable the gpio0+1 controller.
Signed-off-by Steffen Trumtrar <[email protected]>--- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +1
-0@@ -36,6 +36,14 @@ status = "okay"; }; +&gpio0 {
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts line 49
Quoted 10 lines
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +7
-0+ status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + &i2c0 { status = "okay";
Applied.
Thanks,
Dinh