* [PATCH v7] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards
@ 2016-03-20 18:55 Hans de Goede
[not found] ` <1458500102-11071-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2016-03-20 18:55 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai
Cc: Krzysztof Adamski,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede
From: Krzysztof Adamski <k@japko.eu>
OrangePi Plus board has two leds - green ("pwr") and red ("status")
and two switches ("sw4" and "sw2"). This patch describes them in
devicetree.
Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Changes in v6 (hdegoede):
-Merge leds and r_leds nodes into one
-Fix led labels to be in <board>:<colour>:<role> form
-Alphabetically sort the added nodes
-Add support for sw2 (this is the small reset-like button)
Changes in v7 (hdegoede):
-Use PL3 / PL4 in the pinctrl node, not PL03 / PL04
---
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 a680b1f..9d8c038 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>
/ {
@@ -59,6 +60,43 @@
stdout-path = "serial0:115200n8";
};
+ gpio_keys {
+ compatible = "gpio-keys";
+ input-name = "sw4";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&sw_r_opc>;
+
+ sw2@0 {
+ label = "sw2";
+ linux,code = <BTN_1>;
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>;
+ };
+
+ sw4@0 {
+ label = "sw4";
+ linux,code = <BTN_0>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ 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";
+ };
+ };
+
reg_usb3_vbus: usb3-vbus {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -72,6 +110,31 @@
};
};
+&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 = "PL3", "PL4";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
&ehci1 {
status = "okay";
};
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1458500102-11071-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v7] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards [not found] ` <1458500102-11071-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2016-03-21 7:59 ` Maxime Ripard 2016-03-21 11:57 ` [linux-sunxi] " Hans de Goede 2016-03-21 22:16 ` Hans de Goede 0 siblings, 2 replies; 4+ messages in thread From: Maxime Ripard @ 2016-03-21 7:59 UTC (permalink / raw) To: Hans de Goede Cc: Chen-Yu Tsai, Krzysztof Adamski, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2014 bytes --] Hi, On Sun, Mar 20, 2016 at 07:55:02PM +0100, Hans de Goede wrote: > From: Krzysztof Adamski <k@japko.eu> > > OrangePi Plus board has two leds - green ("pwr") and red ("status") > and two switches ("sw4" and "sw2"). This patch describes them in > devicetree. > > Signed-off-by: Krzysztof Adamski <k@japko.eu> > Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> An earlier version has already been sent for 4.6, please base your changes on top of this one. And there's a bunch of things I didn't catch at that time :/ > --- > Changes in v6 (hdegoede): > -Merge leds and r_leds nodes into one > -Fix led labels to be in <board>:<colour>:<role> form > -Alphabetically sort the added nodes > -Add support for sw2 (this is the small reset-like button) > Changes in v7 (hdegoede): > -Use PL3 / PL4 in the pinctrl node, not PL03 / PL04 > --- > 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 a680b1f..9d8c038 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> > > / { > @@ -59,6 +60,43 @@ > stdout-path = "serial0:115200n8"; > }; > > + gpio_keys { > + compatible = "gpio-keys"; > + input-name = "sw4"; This is an undocumented (and apparently unused) property > + > + pinctrl-names = "default"; > + pinctrl-0 = <&sw_r_opc>; > + > + sw2@0 { You shouldn't have a unit-address here > + label = "sw2"; > + linux,code = <BTN_1>; > + gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; > + }; > + > + sw4@0 { Ditto. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-sunxi] Re: [PATCH v7] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards 2016-03-21 7:59 ` Maxime Ripard @ 2016-03-21 11:57 ` Hans de Goede 2016-03-21 22:16 ` Hans de Goede 1 sibling, 0 replies; 4+ messages in thread From: Hans de Goede @ 2016-03-21 11:57 UTC (permalink / raw) To: Maxime Ripard Cc: Chen-Yu Tsai, Krzysztof Adamski, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw Hi, On 21-03-16 08:59, Maxime Ripard wrote: > Hi, > > On Sun, Mar 20, 2016 at 07:55:02PM +0100, Hans de Goede wrote: >> From: Krzysztof Adamski <k@japko.eu> >> >> OrangePi Plus board has two leds - green ("pwr") and red ("status") >> and two switches ("sw4" and "sw2"). This patch describes them in >> devicetree. >> >> Signed-off-by: Krzysztof Adamski <k@japko.eu> >> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > An earlier version has already been sent for 4.6, please base your > changes on top of this one. Ah, I missed that one because it is not in your for-next branch! It is only in sunxi-dt-for-4.6. > And there's a bunch of things I didn't catch at that time :/ I'll cherry-pick the patch you've in sunxi-dt-for-4.6 into my tree and send a fixup patch to apply on top. Regards, Hans > >> --- >> Changes in v6 (hdegoede): >> -Merge leds and r_leds nodes into one >> -Fix led labels to be in <board>:<colour>:<role> form >> -Alphabetically sort the added nodes >> -Add support for sw2 (this is the small reset-like button) >> Changes in v7 (hdegoede): >> -Use PL3 / PL4 in the pinctrl node, not PL03 / PL04 >> --- >> 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 a680b1f..9d8c038 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> >> >> / { >> @@ -59,6 +60,43 @@ >> stdout-path = "serial0:115200n8"; >> }; >> >> + gpio_keys { >> + compatible = "gpio-keys"; >> + input-name = "sw4"; > > This is an undocumented (and apparently unused) property > >> + >> + pinctrl-names = "default"; >> + pinctrl-0 = <&sw_r_opc>; >> + >> + sw2@0 { > > You shouldn't have a unit-address here > >> + label = "sw2"; >> + linux,code = <BTN_1>; >> + gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; >> + }; >> + >> + sw4@0 { > > Ditto. > > Thanks! > Maxime > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-sunxi] Re: [PATCH v7] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards 2016-03-21 7:59 ` Maxime Ripard 2016-03-21 11:57 ` [linux-sunxi] " Hans de Goede @ 2016-03-21 22:16 ` Hans de Goede 1 sibling, 0 replies; 4+ messages in thread From: Hans de Goede @ 2016-03-21 22:16 UTC (permalink / raw) To: Maxime Ripard Cc: Chen-Yu Tsai, Krzysztof Adamski, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw Hi, On 21-03-16 08:59, Maxime Ripard wrote: > Hi, > > On Sun, Mar 20, 2016 at 07:55:02PM +0100, Hans de Goede wrote: >> From: Krzysztof Adamski <k@japko.eu> >> >> OrangePi Plus board has two leds - green ("pwr") and red ("status") >> and two switches ("sw4" and "sw2"). This patch describes them in >> devicetree. >> >> Signed-off-by: Krzysztof Adamski <k@japko.eu> >> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > An earlier version has already been sent for 4.6, please base your > changes on top of this one. > > And there's a bunch of things I didn't catch at that time :/ As promised I will send a fixup patch for this, I was wondering if you can push your current queue, where you've already merged my other orangepi-plus patches somewhere, so that I can base this fixup patch on top of it ? Regards, Hans > >> --- >> Changes in v6 (hdegoede): >> -Merge leds and r_leds nodes into one >> -Fix led labels to be in <board>:<colour>:<role> form >> -Alphabetically sort the added nodes >> -Add support for sw2 (this is the small reset-like button) >> Changes in v7 (hdegoede): >> -Use PL3 / PL4 in the pinctrl node, not PL03 / PL04 >> --- >> 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 a680b1f..9d8c038 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> >> >> / { >> @@ -59,6 +60,43 @@ >> stdout-path = "serial0:115200n8"; >> }; >> >> + gpio_keys { >> + compatible = "gpio-keys"; >> + input-name = "sw4"; > > This is an undocumented (and apparently unused) property > >> + >> + pinctrl-names = "default"; >> + pinctrl-0 = <&sw_r_opc>; >> + >> + sw2@0 { > > You shouldn't have a unit-address here > >> + label = "sw2"; >> + linux,code = <BTN_1>; >> + gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; >> + }; >> + >> + sw4@0 { > > Ditto. > > Thanks! > Maxime > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-21 22:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 18:55 [PATCH v7] ARM: dts: sun8i: Add leds and switches on Orangepi Plus boards Hans de Goede
[not found] ` <1458500102-11071-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-21 7:59 ` Maxime Ripard
2016-03-21 11:57 ` [linux-sunxi] " Hans de Goede
2016-03-21 22:16 ` Hans de Goede
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).