From: Chen-Yu Tsai Date: Fri, 31 Oct 2014 03:05:49 +0000 (+0800) Subject: ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board X-Git-Tag: v3.19-rc1~167^2~9^2~23 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=420d9310c3a871d891d5d1b17dabe6917849a9e1;p=linux.git ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board The A80 Optimus board has 3 usable LEDs that are controlled via GPIO. This patch adds support for 2 of them which are driver by GPIOs in the main pin controller. The remaining one uses GPIO from the R_PIO controller, which we don't support yet. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts index 955436aa91d4..87b1355e3cd7 100644 --- a/arch/arm/boot/dts/sun9i-a80-optimus.dts +++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts @@ -64,6 +64,13 @@ i2c3_pins_a: i2c3@0 { /* Enable internal pull-up */ allwinner,pull = <1>; }; + + led_pins_optimus: led-pins@0 { + allwinner,pins = "PH0", "PH1"; + allwinner,function = "gpio_out"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; }; uart0: serial@07000000 { @@ -78,4 +85,24 @@ i2c3: i2c@07003400 { status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_optimus>; + + /* The LED names match those found on the board */ + + led2 { + label = "optimus:led2:usr"; + gpios = <&pio 7 1 0>; + }; + + /* led3 is on PM15, in R_PIO */ + + led4 { + label = "optimus:led4:usr"; + gpios = <&pio 7 0 0>; + }; + }; };