* [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square
@ 2018-02-18 17:03 John Keeping
2018-02-18 17:03 ` [PATCH 2/3] ARM: dts: rockchip: add recovery button " John Keeping
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: John Keeping @ 2018-02-18 17:03 UTC (permalink / raw)
To: linux-arm-kernel
Support the power button on Radxa Rock2 Square.
Signed-off-by: John Keeping <john@metanate.com>
---
arch/arm/boot/dts/rk3288-rock2-square.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts
index 0e084b8a86ac..6adeb331452f 100644
--- a/arch/arm/boot/dts/rk3288-rock2-square.dts
+++ b/arch/arm/boot/dts/rk3288-rock2-square.dts
@@ -39,6 +39,7 @@
*/
/dts-v1/;
+#include <dt-bindings/input/input.h>
#include "rk3288-rock2-som.dtsi"
/ {
@@ -49,6 +50,19 @@
stdout-path = "serial2:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ power {
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO Power";
+ linux,code = <KEY_POWER>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwr_key>;
+ wakeup-source;
+ };
+ };
+
gpio-leds {
compatible = "gpio-leds";
@@ -220,6 +234,12 @@
};
};
+ keys {
+ pwr_key: pwr-key {
+ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
pmic {
pmic_int: pmic-int {
rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.16.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ARM: dts: rockchip: add recovery button for Rock2 Square
2018-02-18 17:03 [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square John Keeping
@ 2018-02-18 17:03 ` John Keeping
2018-02-18 17:03 ` [PATCH 3/3] ARM: dts: rockchip: enable USB-OTG port on Radxa " John Keeping
2018-02-19 5:59 ` [PATCH 1/3] ARM: dts: rockchip: add power key for " Heiko Stuebner
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2018-02-18 17:03 UTC (permalink / raw)
To: linux-arm-kernel
The recovery button is connected to ADC1. This is the same setup as the
Firefly board, but for Rock2 the power supply is connected on the module
and all of the inputs are wired up to the edge connector, so use of the
ADC depends on the carrier board.
Signed-off-by: John Keeping <john@metanate.com>
---
arch/arm/boot/dts/rk3288-rock2-som.dtsi | 4 ++++
arch/arm/boot/dts/rk3288-rock2-square.dts | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
index b9c471fcbd42..51f36a1b698e 100644
--- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
@@ -280,6 +280,10 @@
};
};
+&saradc {
+ vref-supply = <&vcc_18>;
+};
+
&tsadc {
rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts
index 6adeb331452f..0ea2a3a1fa51 100644
--- a/arch/arm/boot/dts/rk3288-rock2-square.dts
+++ b/arch/arm/boot/dts/rk3288-rock2-square.dts
@@ -50,6 +50,19 @@
stdout-path = "serial2:115200n8";
};
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <0>;
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
@@ -281,6 +294,10 @@
};
};
+&saradc {
+ status = "okay";
+};
+
&spdif {
status = "okay";
};
--
2.16.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ARM: dts: rockchip: enable USB-OTG port on Radxa Rock2 Square
2018-02-18 17:03 [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square John Keeping
2018-02-18 17:03 ` [PATCH 2/3] ARM: dts: rockchip: add recovery button " John Keeping
@ 2018-02-18 17:03 ` John Keeping
2018-02-19 5:59 ` [PATCH 1/3] ARM: dts: rockchip: add power key for " Heiko Stuebner
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2018-02-18 17:03 UTC (permalink / raw)
To: linux-arm-kernel
This allows the USB gadget framework to be used on Rock2 Square.
Signed-off-by: John Keeping <john@metanate.com>
---
arch/arm/boot/dts/rk3288-rock2-square.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts
index 0ea2a3a1fa51..8ccc89dbdfaf 100644
--- a/arch/arm/boot/dts/rk3288-rock2-square.dts
+++ b/arch/arm/boot/dts/rk3288-rock2-square.dts
@@ -321,3 +321,7 @@
&usb_host1 {
status = "okay";
};
+
+&usb_otg {
+ status = "okay";
+};
--
2.16.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square
2018-02-18 17:03 [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square John Keeping
2018-02-18 17:03 ` [PATCH 2/3] ARM: dts: rockchip: add recovery button " John Keeping
2018-02-18 17:03 ` [PATCH 3/3] ARM: dts: rockchip: enable USB-OTG port on Radxa " John Keeping
@ 2018-02-19 5:59 ` Heiko Stuebner
2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2018-02-19 5:59 UTC (permalink / raw)
To: linux-arm-kernel
Am Sonntag, 18. Februar 2018, 18:03:34 CET schrieb John Keeping:
> Support the power button on Radxa Rock2 Square.
>
> Signed-off-by: John Keeping <john@metanate.com>
applied all 3 patches for 4.17
Thanks
Heiko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-19 5:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-18 17:03 [PATCH 1/3] ARM: dts: rockchip: add power key for Rock2 Square John Keeping
2018-02-18 17:03 ` [PATCH 2/3] ARM: dts: rockchip: add recovery button " John Keeping
2018-02-18 17:03 ` [PATCH 3/3] ARM: dts: rockchip: enable USB-OTG port on Radxa " John Keeping
2018-02-19 5:59 ` [PATCH 1/3] ARM: dts: rockchip: add power key for " 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).