* [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
@ 2016-02-25 20:42 Krzysztof Adamski
2016-02-25 22:54 ` kbuild test robot
2016-02-26 19:36 ` Maxime Ripard
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Adamski @ 2016-02-25 20:42 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Pawel Moll,
Mark Rutland, Ian Campbell, Kumar Gala, Russell King, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
OrangePi Plus board has dwo leds - green ("pwr") and red ("status")
and a switch ("sw4"). This patch describes them in a devicetree.
Signed-off-by: Krzysztof Adamski <k@japko.eu>
---
Changes compared to v1:
- Fixed leds labels
- Merged two led sections into one
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 57 ++++++++++++++++++++++++++++
1 file changed, 57 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..d81eca6 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,62 @@
chosen {
stdout-path = "serial0:115200n8";
};
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_opc &leds_r_opc>;
+
+ status_led {
+ label = "orangepi-plus:red:status";
+ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ pwr_led {
+ label = "orangepi-plus:green:pwr";
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+ };
+
+ r_gpio_keys {
+ compatible = "gpio-keys";
+ input-name = "sw4";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sw_r_opc>;
+
+ sw4@0 {
+ label = "sw4";
+ linux,code = <BTN_0>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&pio {
+ leds_opc: led_pins@0 {
+ allwinner,pins = "PA15";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
+&r_pio {
+ leds_r_opc: led_pins@0 {
+ allwinner,pins = "PL10";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ sw_r_opc: key_pins@0 {
+ allwinner,pins = "PL03";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
&mmc0 {
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
2016-02-25 20:42 [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards Krzysztof Adamski
@ 2016-02-25 22:54 ` kbuild test robot
2016-02-26 8:24 ` [linux-sunxi] " Krzysztof Adamski
2016-02-26 19:36 ` Maxime Ripard
1 sibling, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2016-02-25 22:54 UTC (permalink / raw)
To: Krzysztof Adamski
Cc: kbuild-all, Maxime Ripard, Chen-Yu Tsai, Rob Herring, Pawel Moll,
Mark Rutland, Ian Campbell, Kumar Gala, Russell King, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
Hi Krzysztof,
[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.5-rc5 next-20160225]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Krzysztof-Adamski/ARM-dts-sun8i-Add-leds-and-switch-on-Orangepi-Plus-boards/20160226-044640
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux for-next
config: arm-sunxi_defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
>> Error: arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts:104.1-7 Label or path r_pio not found
FATAL ERROR: Syntax error parsing input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 17442 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-sunxi] Re: [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
2016-02-25 22:54 ` kbuild test robot
@ 2016-02-26 8:24 ` Krzysztof Adamski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Adamski @ 2016-02-26 8:24 UTC (permalink / raw)
To: fengguang.wu
Cc: kbuild-all, Maxime Ripard, Chen-Yu Tsai, Rob Herring, Pawel Moll,
Mark Rutland, Ian Campbell, Kumar Gala, Russell King, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
On Fri, Feb 26, 2016 at 06:54:29AM +0800, kbuild test robot wrote:
>Hi Krzysztof,
>
>[auto build test ERROR on robh/for-next]
>[also build test ERROR on v4.5-rc5 next-20160225]
I posted this patch to early. Patches it depends on are only avaiable in
next-20160226, not 25. It went through Maximes tree (
https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/
sunxi/for-next). This build error can be ignored.
Best regards,
Krzysztof Adamski
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards
2016-02-25 20:42 [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards Krzysztof Adamski
2016-02-25 22:54 ` kbuild test robot
@ 2016-02-26 19:36 ` Maxime Ripard
1 sibling, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2016-02-26 19:36 UTC (permalink / raw)
To: Krzysztof Adamski
Cc: Chen-Yu Tsai, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Russell King, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
On Thu, Feb 25, 2016 at 09:42:35PM +0100, Krzysztof Adamski wrote:
> OrangePi Plus board has dwo leds - green ("pwr") and red ("status")
> and a switch ("sw4"). This patch describes them in a devicetree.
>
> Signed-off-by: Krzysztof Adamski <k@japko.eu>
Applied (with a minor change to the pinctrl list to have pinctrl-0 =
<&node1>, <&node2>;), thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-26 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 20:42 [PATCH v2] ARM: dts: sun8i: Add leds and switch on Orangepi Plus boards Krzysztof Adamski
2016-02-25 22:54 ` kbuild test robot
2016-02-26 8:24 ` [linux-sunxi] " Krzysztof Adamski
2016-02-26 19:36 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).