Skip to content

Commit

Permalink
ARM: dts: rk322x: move the gpio_keys node from dtsi to product dts.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Wenping Zhang authored and rkhuangtao committed Jul 3, 2017
1 parent 15b83a7 commit 870dcb5
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 30 deletions.
23 changes: 23 additions & 0 deletions arch/arm/boot/dts/rk3229-echo-v10.dts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@
WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
status = "okay";
};

gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;

pinctrl-names = "default";
pinctrl-0 = <&pwr_key>;

power_key: power-key {
label = "GPIO Key Power";
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
linux,code = <116>;
debounce-interval = <100>;
wakeup-source;
};
};
};

&gpu {
Expand Down Expand Up @@ -279,6 +297,11 @@
};
};

keys {
pwr_key: pwr-key {
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};

&sdio {
Expand Down
24 changes: 24 additions & 0 deletions arch/arm/boot/dts/rk3229-evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@
regulator-always-on;
};
};

gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;

pinctrl-names = "default";
pinctrl-0 = <&pwr_key>;

power_key: power-key {
label = "GPIO Key Power";
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
linux,code = <116>;
debounce-interval = <100>;
wakeup-source;
};
};
};

&cpu0 {
Expand Down Expand Up @@ -169,6 +187,12 @@
rockchip,pins = <3 20 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

keys {
pwr_key: pwr-key {
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};

&pwm1 {
Expand Down
44 changes: 40 additions & 4 deletions arch/arm/boot/dts/rk3229-gva-sdk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,38 @@
WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
status = "okay";
};

gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;

pinctrl-names = "default";
pinctrl-0 = <&pwr_key &bt_key &mute_key>;

power_key {
label = "GPIO Key Power";
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
linux,code = <116>;
debounce-interval = <100>;
wakeup-source;
};

bt_key {
label = "Blutooth Key";
gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>;
linux,code = <237>;
debounce-interval = <100>;
};

mute_key {
label = "Mute Key";
gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
linux,code = <113>;
debounce-interval = <100>;
};
};
};

&gpu {
Expand All @@ -103,10 +135,6 @@
status = "disabled";
};

&power_key {
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
};

&i2c0 {
status = "okay";

Expand Down Expand Up @@ -279,6 +307,14 @@
pwr_key: pwr-key {
rockchip,pins = <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
};

bt_key: bt-key {
rockchip,pins = <3 31 RK_FUNC_GPIO &pcfg_pull_down>;
};

mute_key: mute-key {
rockchip,pins = <3 20 RK_FUNC_GPIO &pcfg_pull_down>;
};
};

pmic {
Expand Down
26 changes: 0 additions & 26 deletions arch/arm/boot/dts/rk322x-android.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,6 @@
compatible = "arm,psci-1.0";
method = "smc";
};

gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;

pinctrl-names = "default";
pinctrl-0 = <&pwr_key>;

power_key: power-key {
label = "GPIO Key Power";
gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
linux,code = <116>;
debounce-interval = <100>;
wakeup-source;
};
};
};

&cpu0 {
Expand Down Expand Up @@ -145,14 +127,6 @@
supports-sdio;
};

&pinctrl {
keys {
pwr_key: pwr-key {
rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};

&tsadc {
rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
status = "okay";
Expand Down

0 comments on commit 870dcb5

Please sign in to comment.