ARM: dts: rk322x: move the gpio_keys node from dtsi to product dts.
authorWenping Zhang <wenping.zhang@rock-chips.com>
Fri, 30 Jun 2017 07:28:56 +0000 (15:28 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 3 Jul 2017 12:21:43 +0000 (20:21 +0800)
The keys configuration is constantly changed on different products,
so move it to product's dts.

Change-Id: Ifec408a0529a224b8716797a88b97eddeab10fa7
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
arch/arm/boot/dts/rk3229-echo-v10.dts
arch/arm/boot/dts/rk3229-evb.dts
arch/arm/boot/dts/rk3229-gva-sdk.dts
arch/arm/boot/dts/rk322x-android.dtsi

index a2903ec2ebf35b35fea8b6992cebc678c5b218c4..fccddd6ab77544cdc6e8461a3f92c6fe8ff1885c 100644 (file)
                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 {
                };
        };
 
+       keys {
+               pwr_key: pwr-key {
+                       rockchip,pins = <3 23 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
 };
 
 &sdio {
index f137b0d9d4295950c2f5a37ef8497efe9ab44687..027558b257718ddc163bd46e55b39c3dd28ba48c 100644 (file)
                        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 {
                        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 {
index 11b82c23a6883cc1b06a65529929ba212239585d..34b5717df1277a19f6d78cfb04a3caf76661a6e3 100644 (file)
                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 {
        status = "disabled";
 };
 
-&power_key {
-       gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
-};
-
 &i2c0 {
        status = "okay";
 
                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 {
index 211fcdd8cf30b364a9ea453b0ec33ae62929b200..8ba6e7987e873e0d6d4059a91203a719757c2ff5 100644 (file)
                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 {
        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";