aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-11-15 07:43:02 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-11-26 15:01:56 -0500
commit1a780d45b10eb904be6a923fa09365255b5e733b (patch)
tree15a4f457084bb861dfe013b266a517a68d236ce1
parent3ae2750a8c7112b83697dda5ef915886cb2a38cf (diff)
ARM: ux500: move GPIO key configuration to device tree
This moves over the configuration of the GPIO keys (used for proximity sensor and Hall effect sensor) from the static pin configuration file to the device tree. As part of the exercise, implement the GPIO keys properly in a per-UIB file as this setup actually differs with each UIB. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/boot/dts/ste-href-stuib.dtsi41
-rw-r--r--arch/arm/boot/dts/ste-href-tvk1281618.dtsi38
-rw-r--r--arch/arm/boot/dts/ste-href.dtsi11
-rw-r--r--arch/arm/boot/dts/ste-hrefv60plus.dtsi6
-rw-r--r--arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi5
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c8
6 files changed, 84 insertions, 25 deletions
diff --git a/arch/arm/boot/dts/ste-href-stuib.dtsi b/arch/arm/boot/dts/ste-href-stuib.dtsi
index 76704ec0ffcc..1c3574435ea8 100644
--- a/arch/arm/boot/dts/ste-href-stuib.dtsi
+++ b/arch/arm/boot/dts/ste-href-stuib.dtsi
@@ -12,6 +12,28 @@
12#include <dt-bindings/interrupt-controller/irq.h> 12#include <dt-bindings/interrupt-controller/irq.h>
13 13
14/ { 14/ {
15 gpio_keys {
16 compatible = "gpio-keys";
17 #address-cells = <1>;
18 #size-cells = <0>;
19 vdd-supply = <&ab8500_ldo_aux1_reg>;
20 pinctrl-names = "default";
21 pinctrl-0 = <&prox_stuib_mode>, <&hall_stuib_mode>;
22
23 button@139 {
24 /* Proximity sensor */
25 gpios = <&gpio6 25 0x4>;
26 linux,code = <11>; /* SW_FRONT_PROXIMITY */
27 label = "SFH7741 Proximity Sensor";
28 };
29 button@145 {
30 /* Hall sensor */
31 gpios = <&gpio4 17 0x4>;
32 linux,code = <0>; /* SW_LID */
33 label = "HED54XXU11 Hall Effect Sensor";
34 };
35 };
36
15 soc { 37 soc {
16 i2c@80004000 { 38 i2c@80004000 {
17 stmpe1601: stmpe1601@40 { 39 stmpe1601: stmpe1601@40 {
@@ -74,5 +96,24 @@
74 rohm,flip-y; 96 rohm,flip-y;
75 }; 97 };
76 }; 98 };
99
100 pinctrl {
101 prox {
102 prox_stuib_mode: prox_stuib {
103 stuib_cfg {
104 ste,pins = "GPIO217_AH12";
105 ste,config = <&gpio_in_pu>;
106 };
107 };
108 };
109 hall {
110 hall_stuib_mode: stuib_tvk {
111 stuib_cfg {
112 ste,pins = "GPIO145_C13";
113 ste,config = <&gpio_in_pu>;
114 };
115 };
116 };
117 };
77 }; 118 };
78}; 119};
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi
index 3f31f9206fb3..c40565320978 100644
--- a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi
+++ b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi
@@ -14,6 +14,28 @@
14#include <dt-bindings/interrupt-controller/irq.h> 14#include <dt-bindings/interrupt-controller/irq.h>
15 15
16/ { 16/ {
17 gpio_keys {
18 compatible = "gpio-keys";
19 #address-cells = <1>;
20 #size-cells = <0>;
21 vdd-supply = <&ab8500_ldo_aux1_reg>;
22 pinctrl-names = "default";
23 pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
24
25 button@139 {
26 /* Proximity sensor */
27 gpios = <&gpio6 25 0x4>;
28 linux,code = <11>; /* SW_FRONT_PROXIMITY */
29 label = "SFH7741 Proximity Sensor";
30 };
31 button@145 {
32 /* Hall sensor */
33 gpios = <&gpio4 17 0x4>;
34 linux,code = <0>; /* SW_LID */
35 label = "HED54XXU11 Hall Effect Sensor";
36 };
37 };
38
17 soc { 39 soc {
18 /* Add Synaptics touch screen, TC35893 keypad etc here */ 40 /* Add Synaptics touch screen, TC35893 keypad etc here */
19 i2c@80004000 { 41 i2c@80004000 {
@@ -76,6 +98,22 @@
76 }; 98 };
77 }; 99 };
78 }; 100 };
101 prox {
102 prox_tvk_mode: prox_tvk {
103 tvk_cfg {
104 ste,pins = "GPIO217_AH12";
105 ste,config = <&gpio_in_pu>;
106 };
107 };
108 };
109 hall {
110 hall_tvk_mode: hall_tvk {
111 tvk_cfg {
112 ste,pins = "GPIO145_C13";
113 ste,config = <&gpio_in_pu>;
114 };
115 };
116 };
79 }; 117 };
80 }; 118 };
81}; 119};
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index 56772c3ebb28..e28242173d18 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -18,17 +18,6 @@
18 reg = <0x00000000 0x20000000>; 18 reg = <0x00000000 0x20000000>;
19 }; 19 };
20 20
21 gpio_keys {
22 compatible = "gpio-keys";
23 #address-cells = <1>;
24 #size-cells = <0>;
25
26 button@1 {
27 linux,code = <11>;
28 label = "SFH7741 Proximity Sensor";
29 };
30 };
31
32 soc { 21 soc {
33 usb_per5@a03e0000 { 22 usb_per5@a03e0000 {
34 pinctrl-names = "default", "sleep"; 23 pinctrl-names = "default", "sleep";
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi
index 452f00c4f7c0..6e0105d2f461 100644
--- a/arch/arm/boot/dts/ste-hrefv60plus.dtsi
+++ b/arch/arm/boot/dts/ste-hrefv60plus.dtsi
@@ -16,12 +16,6 @@
16 model = "ST-Ericsson HREF (v60+) platform with Device Tree"; 16 model = "ST-Ericsson HREF (v60+) platform with Device Tree";
17 compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500"; 17 compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
18 18
19 gpio_keys {
20 button@1 {
21 gpios = <&gpio5 25 0x4>;
22 };
23 };
24
25 soc { 19 soc {
26 // External Micro SD slot 20 // External Micro SD slot
27 sdi0_per1@80126000 { 21 sdi0_per1@80126000 {
diff --git a/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi
index ee143b0a5baa..e6f22b266420 100644
--- a/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi
@@ -36,6 +36,11 @@
36 ste,input = <INPUT_PULLUP>; 36 ste,input = <INPUT_PULLUP>;
37 }; 37 };
38 38
39 gpio_in_pd: gpio_input_pull_down {
40 ste,gpio = <GPIOMODE_ENABLED>;
41 ste,input = <INPUT_PULLDOWN>;
42 };
43
39 gpio_out_lo: gpio_output_low { 44 gpio_out_lo: gpio_output_low {
40 ste,gpio = <GPIOMODE_ENABLED>; 45 ste,gpio = <GPIOMODE_ENABLED>;
41 ste,output = <OUTPUT_LOW>; 46 ste,output = <OUTPUT_LOW>;
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 257c97a214a5..4535702a8e3f 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -382,14 +382,6 @@ static struct pinctrl_map __initdata hrefv60_pinmap[] = {
382 /* Accelerometer interrupt lines */ 382 /* Accelerometer interrupt lines */
383 DB8500_PIN_HOG("GPIO82_C1", gpio_in_pu), /* ACC_INT1 */ 383 DB8500_PIN_HOG("GPIO82_C1", gpio_in_pu), /* ACC_INT1 */
384 DB8500_PIN_HOG("GPIO83_D3", gpio_in_pu), /* ACC_INT2 */ 384 DB8500_PIN_HOG("GPIO83_D3", gpio_in_pu), /* ACC_INT2 */
385 /*
386 * Runtime stuff
387 * Pull up/down of some sensor GPIO pins, for proximity, HAL sensor
388 * etc.
389 */
390 DB8500_PIN("GPIO217_AH12", gpio_in_pu_slpm_gpio_nopull, "gpio-keys.0"),
391 DB8500_PIN("GPIO145_C13", gpio_in_pd_slpm_gpio_nopull, "gpio-keys.0"),
392 DB8500_PIN("GPIO139_C9", gpio_in_pu_slpm_gpio_nopull, "gpio-keys.0"),
393}; 385};
394 386
395static struct pinctrl_map __initdata u9500_pinmap[] = { 387static struct pinctrl_map __initdata u9500_pinmap[] = {