rk3318: add uboot Recovery button support

This commit is contained in:
Alex Shumsky
2023-12-16 15:18:24 +03:00
committed by Paolo
parent 1c3b7ec36c
commit eec57ef6ce
2 changed files with 19 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ new file mode 100644
index 00000000..b6a038f7
--- /dev/null
+++ b/configs/rk3318-box_defconfig
@@ -0,0 +1,118 @@
@@ -0,0 +1,121 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SYS_TEXT_BASE=0x00200000
@@ -122,3 +122,6 @@ index 00000000..b6a038f7
+CONFIG_TPL_TINY_MEMSET=y
+CONFIG_ERRNO_STR=y
+CONFIG_CMD_BTRFS=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_ADC=y
+CONFIG_CMD_BUTTON=y

View File

@@ -98,7 +98,7 @@ new file mode 100644
index 00000000..d4678c7c
--- /dev/null
+++ b/arch/arm/dts/rk3318-box.dts
@@ -0,0 +1,634 @@
@@ -0,0 +1,648 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
@@ -123,6 +123,20 @@ index 00000000..d4678c7c
+ stdout-path = "serial2:1500000n8";
+ };
+
+ adc_keys: adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-recovery {
+ label = "Recovery";
+ linux,code = <0x168>; /*KEY_VENDOR*/
+ press-threshold-microvolt = <17000>;
+ };
+ };
+
+ xin32k: xin32k {
+ compatible = "fixed-clock";
+ clock-frequency = <32768>;