linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] arm64: dts: rockchip: add power button support for Firefly-RK3399
       [not found] <20180718145727.30217-1-cheat.sc.linux@outlook.com>
@ 2018-07-18 14:58 ` Maruyama Shohei
  2018-07-24 13:26   ` Heiko Stuebner
  2018-07-18 14:58 ` [PATCH 3/3] arm64: dts: rockchip: add led " Maruyama Shohei
  1 sibling, 1 reply; 4+ messages in thread
From: Maruyama Shohei @ 2018-07-18 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Shohei Maruyama <cheat.sc.linux@outlook.com>

This commit adds power button support for the Firefly-RK3399.

Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>
---
 .../boot/dts/rockchip/rk3399-firefly.dts      | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index 8ac29824923c..2fe443511d21 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -42,6 +42,7 @@
 
 /dts-v1/;
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/input/linux-event-codes.h>
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
 
@@ -132,6 +133,25 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pwrbtn>;
+
+		button at 0 {
+			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+			label = "GPIO Key Power";
+			linux,input-type = <1>;
+			gpio-key,wakeup = <1>;
+			debounce-interval = <100>;
+		};
+	};
+
 	sdio_pwrseq: sdio-pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		clocks = <&rk808 1>;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] arm64: dts: rockchip: add led support for Firefly-RK3399
       [not found] <20180718145727.30217-1-cheat.sc.linux@outlook.com>
  2018-07-18 14:58 ` [PATCH 2/3] arm64: dts: rockchip: add power button support for Firefly-RK3399 Maruyama Shohei
@ 2018-07-18 14:58 ` Maruyama Shohei
  2018-07-25 10:21   ` Heiko Stuebner
  1 sibling, 1 reply; 4+ messages in thread
From: Maruyama Shohei @ 2018-07-18 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

From: Shohei Maruyama <cheat.sc.linux@outlook.com>

This commit adds led support for the Firefly-RK3399. The board has two
leds, this commit enables them.

Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>
---
 .../boot/dts/rockchip/rk3399-firefly.dts      | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index 2fe443511d21..69851757584d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -233,6 +233,26 @@
 		regulator-max-microvolt = <1400000>;
 		vin-supply = <&vcc_sys>;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		work-led {
+			label = "work";
+			default-state = "on";
+			gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&work_led_gpio>;
+		};
+
+		diy-led {
+			label = "diy";
+			default-state = "off";
+			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&diy_led_gpio>;
+		};
+	};
 };
 
 &cpu_l0 {
@@ -647,6 +667,16 @@
 			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
+
+	leds {
+		work_led_gpio: work_led-gpio {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		diy_led_gpio: diy_led-gpio {
+			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &pwm0 {
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] arm64: dts: rockchip: add power button support for Firefly-RK3399
  2018-07-18 14:58 ` [PATCH 2/3] arm64: dts: rockchip: add power button support for Firefly-RK3399 Maruyama Shohei
@ 2018-07-24 13:26   ` Heiko Stuebner
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2018-07-24 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, 18. Juli 2018, 16:58:21 CEST schrieb Maruyama Shohei:
> From: Shohei Maruyama <cheat.sc.linux@outlook.com>
> 
> This commit adds power button support for the Firefly-RK3399.
> 
> Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>

applied for 4.19 with some minor changes, like reordering properties
and using a descriptive node name for the power buttons
and also using the correct wakeup property.

Thanks
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] arm64: dts: rockchip: add led support for Firefly-RK3399
  2018-07-18 14:58 ` [PATCH 3/3] arm64: dts: rockchip: add led " Maruyama Shohei
@ 2018-07-25 10:21   ` Heiko Stuebner
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2018-07-25 10:21 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, 18. Juli 2018, 16:58:23 CEST schrieb Maruyama Shohei:
> From: Shohei Maruyama <cheat.sc.linux@outlook.com>
> 
> This commit adds led support for the Firefly-RK3399. The board has two
> leds, this commit enables them.
> 
> Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>

applied for 4.19 after moving some things around

Thanks
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-25 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180718145727.30217-1-cheat.sc.linux@outlook.com>
2018-07-18 14:58 ` [PATCH 2/3] arm64: dts: rockchip: add power button support for Firefly-RK3399 Maruyama Shohei
2018-07-24 13:26   ` Heiko Stuebner
2018-07-18 14:58 ` [PATCH 3/3] arm64: dts: rockchip: add led " Maruyama Shohei
2018-07-25 10:21   ` Heiko Stuebner

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).