[PATCH v5 4/4] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
Maxime Ripard
maxime.ripard at free-electrons.com
Thu Feb 25 11:38:09 PST 2016
Hi,
On Mon, Feb 22, 2016 at 02:03:28PM +0100, Krzysztof Adamski wrote:
> OrangePi Plus board has two leds - green ("pwr") and red ("status")
> and a switch ("sw4"). This patch describes them in a devicetree.
>
> Signed-off-by: Krzysztof Adamski <k at japko.eu>
> ---
> arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> index e67df59..5f159d0 100644
> --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
> @@ -45,6 +45,7 @@
> #include "sunxi-common-regulators.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> #include <dt-bindings/pinctrl/sun4i-a10.h>
>
> / {
> @@ -58,6 +59,68 @@
> chosen {
> stdout-path = "serial0:115200n8";
> };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&leds_opc>;
> +
> + status_led {
> + label = "status:red:user";
> + gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
> + };
> + };
> +
> + r_leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&leds_r_opc>;
> +
> + tx {
> + label = "pwr:green:user";
> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
> + default-state = "on";
> + };
> + };
You can merge the two gpio-leds nodes into a single one.
Plus, the label format is <board>:<colour>:<role>
In these case, it would be more "orangepi-plus:red:status" and
"orangepi-plus:green:pwr".
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160225/a0c53bfe/attachment.sig>
More information about the linux-arm-kernel
mailing list