Skip to content

Commit 870dcb5

Browse files
Wenping Zhangrkhuangtao
authored andcommitted
ARM: dts: rk322x: move the gpio_keys node from dtsi to product dts.
The keys configuration is constantly changed on different products, so move it to product's dts. Change-Id: Ifec408a0529a224b8716797a88b97eddeab10fa7 Signed-off-by: Wenping Zhang <[email protected]>
1 parent 15b83a7 commit 870dcb5

File tree

4 files changed

+87
-30
lines changed

4 files changed

+87
-30
lines changed

arch/arm/boot/dts/rk3229-echo-v10.dts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,24 @@
104104
WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
105105
status = "okay";
106106
};
107+
108+
gpio_keys {
109+
compatible = "gpio-keys";
110+
#address-cells = <1>;
111+
#size-cells = <0>;
112+
autorepeat;
113+
114+
pinctrl-names = "default";
115+
pinctrl-0 = <&pwr_key>;
116+
117+
power_key: power-key {
118+
label = "GPIO Key Power";
119+
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
120+
linux,code = <116>;
121+
debounce-interval = <100>;
122+
wakeup-source;
123+
};
124+
};
107125
};
108126

109127
&gpu {
@@ -279,6 +297,11 @@
279297
};
280298
};
281299

300+
keys {
301+
pwr_key: pwr-key {
302+
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
303+
};
304+
};
282305
};
283306

284307
&sdio {

arch/arm/boot/dts/rk3229-evb.dts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,24 @@
128128
regulator-always-on;
129129
};
130130
};
131+
132+
gpio_keys {
133+
compatible = "gpio-keys";
134+
#address-cells = <1>;
135+
#size-cells = <0>;
136+
autorepeat;
137+
138+
pinctrl-names = "default";
139+
pinctrl-0 = <&pwr_key>;
140+
141+
power_key: power-key {
142+
label = "GPIO Key Power";
143+
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
144+
linux,code = <116>;
145+
debounce-interval = <100>;
146+
wakeup-source;
147+
};
148+
};
131149
};
132150

133151
&cpu0 {
@@ -169,6 +187,12 @@
169187
rockchip,pins = <3 20 RK_FUNC_GPIO &pcfg_pull_none>;
170188
};
171189
};
190+
191+
keys {
192+
pwr_key: pwr-key {
193+
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
194+
};
195+
};
172196
};
173197

174198
&pwm1 {

arch/arm/boot/dts/rk3229-gva-sdk.dts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,38 @@
8888
WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
8989
status = "okay";
9090
};
91+
92+
gpio_keys {
93+
compatible = "gpio-keys";
94+
#address-cells = <1>;
95+
#size-cells = <0>;
96+
autorepeat;
97+
98+
pinctrl-names = "default";
99+
pinctrl-0 = <&pwr_key &bt_key &mute_key>;
100+
101+
power_key {
102+
label = "GPIO Key Power";
103+
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
104+
linux,code = <116>;
105+
debounce-interval = <100>;
106+
wakeup-source;
107+
};
108+
109+
bt_key {
110+
label = "Blutooth Key";
111+
gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>;
112+
linux,code = <237>;
113+
debounce-interval = <100>;
114+
};
115+
116+
mute_key {
117+
label = "Mute Key";
118+
gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
119+
linux,code = <113>;
120+
debounce-interval = <100>;
121+
};
122+
};
91123
};
92124

93125
&gpu {
@@ -103,10 +135,6 @@
103135
status = "disabled";
104136
};
105137

106-
&power_key {
107-
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
108-
};
109-
110138
&i2c0 {
111139
status = "okay";
112140

@@ -279,6 +307,14 @@
279307
pwr_key: pwr-key {
280308
rockchip,pins = <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
281309
};
310+
311+
bt_key: bt-key {
312+
rockchip,pins = <3 31 RK_FUNC_GPIO &pcfg_pull_down>;
313+
};
314+
315+
mute_key: mute-key {
316+
rockchip,pins = <3 20 RK_FUNC_GPIO &pcfg_pull_down>;
317+
};
282318
};
283319

284320
pmic {

arch/arm/boot/dts/rk322x-android.dtsi

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,6 @@
6262
compatible = "arm,psci-1.0";
6363
method = "smc";
6464
};
65-
66-
gpio_keys {
67-
compatible = "gpio-keys";
68-
#address-cells = <1>;
69-
#size-cells = <0>;
70-
autorepeat;
71-
72-
pinctrl-names = "default";
73-
pinctrl-0 = <&pwr_key>;
74-
75-
power_key: power-key {
76-
label = "GPIO Key Power";
77-
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
78-
linux,code = <116>;
79-
debounce-interval = <100>;
80-
wakeup-source;
81-
};
82-
};
8365
};
8466

8567
&cpu0 {
@@ -145,14 +127,6 @@
145127
supports-sdio;
146128
};
147129

148-
&pinctrl {
149-
keys {
150-
pwr_key: pwr-key {
151-
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
152-
};
153-
};
154-
};
155-
156130
&tsadc {
157131
rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
158132
status = "okay";

0 commit comments

Comments
 (0)