From 4e760f013d4d4a2ea134977401bf1480ffbcdea0 Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Sun, 15 May 2016 15:56:48 +0000 Subject: [PATCH] Add gpio-leds for Sinovoip BananaPi BPI-M3. The green LED on the board is wired to AXP813 GPIO0 and the blue LED is wired to AXP813 GPIO1. --- sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts b/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts index b161d0b99543..89089bdb534e 100644 --- a/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts +++ b/sys/boot/fdt/dts/arm/sinovoip-bpi-m3.dts @@ -104,5 +104,23 @@ reg = <0x3a3>; interrupt-parent = <&nmi_intc>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + gpio-controller; + #gpio-cells = <1>; + }; +}; + +/ { + leds { + compatible = "gpio-leds"; + + green_led { + gpios = <&axp81x 0>; /* AXP PMIC GPIO0 */ + label = "green_led"; + }; + + blue_led { + gpios = <&axp81x 1>; /* AXP PMIC GPIO1 */ + label = "blue_led"; + }; }; };