Add the LED definitions from vendor's DTS.

Add gpioled support to A20 kernel.

While here rename the gpio phandle to match the one used in the vendor's
DTS.
This commit is contained in:
Luiz Otavio O Souza 2015-08-30 23:20:00 +00:00
parent fbb065700c
commit 765701d193
4 changed files with 29 additions and 1 deletions

View File

@ -78,6 +78,7 @@ device random # Entropy device
# GPIO
device gpio
device gpioled
device scbus # SCSI bus (required for ATA/SCSI)
device da # Direct Access (disks)

View File

@ -30,6 +30,8 @@
/include/ "sun7i-a20.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "LeMaker Banana Pi";
compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
@ -72,6 +74,15 @@
};
};
leds {
compatible = "gpio-leds";
green {
label = "bananapi:green:usr";
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
};
};
chosen {
bootargs = "-v";
stdin = "UART0";

View File

@ -30,6 +30,8 @@
/include/ "sun7i-a20.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Cubietech Cubieboard2";
@ -70,6 +72,20 @@
};
};
leds {
compatible = "gpio-leds";
blue {
label = "cubieboard2:blue:usr";
gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
};
green {
label = "cubieboard2:green:usr";
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
};
};
chosen {
bootargs = "-v";
stdin = "UART0";

View File

@ -86,7 +86,7 @@
reg = <0x01c20c90 0x10>;
};
GPIO: gpio@01c20800 {
pio: gpio@01c20800 {
#gpio-cells = <3>;
compatible = "allwinner,sun4i-gpio";
gpio-controller;