diff options
Diffstat (limited to 'arch/arm/mach-pxa/hx4700.c')
-rw-r--r-- | arch/arm/mach-pxa/hx4700.c | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index b83b95a29503..d09da6a746b8 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/gpio_keys.h> | 23 | #include <linux/gpio_keys.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/input/navpoint.h> | ||
25 | #include <linux/lcd.h> | 26 | #include <linux/lcd.h> |
26 | #include <linux/mfd/htc-egpio.h> | 27 | #include <linux/mfd/htc-egpio.h> |
27 | #include <linux/mfd/asic3.h> | 28 | #include <linux/mfd/asic3.h> |
@@ -102,6 +103,10 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
102 | GPIO44_BTUART_CTS, | 103 | GPIO44_BTUART_CTS, |
103 | GPIO45_BTUART_RTS_LPM_LOW, | 104 | GPIO45_BTUART_RTS_LPM_LOW, |
104 | 105 | ||
106 | /* STUART (IRDA) */ | ||
107 | GPIO46_STUART_RXD, | ||
108 | GPIO47_STUART_TXD, | ||
109 | |||
105 | /* PWM 1 (Backlight) */ | 110 | /* PWM 1 (Backlight) */ |
106 | GPIO17_PWM1_OUT, | 111 | GPIO17_PWM1_OUT, |
107 | 112 | ||
@@ -113,7 +118,7 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
113 | GPIO113_I2S_SYSCLK, | 118 | GPIO113_I2S_SYSCLK, |
114 | 119 | ||
115 | /* SSP 1 (NavPoint) */ | 120 | /* SSP 1 (NavPoint) */ |
116 | GPIO23_SSP1_SCLK, | 121 | GPIO23_SSP1_SCLK_IN, |
117 | GPIO24_SSP1_SFRM, | 122 | GPIO24_SSP1_SFRM, |
118 | GPIO25_SSP1_TXD, | 123 | GPIO25_SSP1_TXD, |
119 | GPIO26_SSP1_RXD, | 124 | GPIO26_SSP1_RXD, |
@@ -125,10 +130,13 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
125 | GPIO88_GPIO, | 130 | GPIO88_GPIO, |
126 | 131 | ||
127 | /* HX4700 specific input GPIOs */ | 132 | /* HX4700 specific input GPIOs */ |
128 | GPIO12_GPIO, /* ASIC3_IRQ */ | 133 | GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, /* ASIC3_IRQ */ |
129 | GPIO13_GPIO, /* W3220_IRQ */ | 134 | GPIO13_GPIO, /* W3220_IRQ */ |
130 | GPIO14_GPIO, /* nWLAN_IRQ */ | 135 | GPIO14_GPIO, /* nWLAN_IRQ */ |
131 | 136 | ||
137 | /* HX4700 specific output GPIOs */ | ||
138 | GPIO102_GPIO | MFP_LPM_DRIVE_LOW, /* SYNAPTICS_POWER_ON */ | ||
139 | |||
132 | GPIO10_GPIO, /* GSM_IRQ */ | 140 | GPIO10_GPIO, /* GSM_IRQ */ |
133 | GPIO13_GPIO, /* CPLD_IRQ */ | 141 | GPIO13_GPIO, /* CPLD_IRQ */ |
134 | GPIO107_GPIO, /* DS1WM_IRQ */ | 142 | GPIO107_GPIO, /* DS1WM_IRQ */ |
@@ -183,6 +191,23 @@ static struct platform_device gpio_keys = { | |||
183 | }; | 191 | }; |
184 | 192 | ||
185 | /* | 193 | /* |
194 | * Synaptics NavPoint connected to SSP1 | ||
195 | */ | ||
196 | |||
197 | static struct navpoint_platform_data navpoint_platform_data = { | ||
198 | .port = 1, | ||
199 | .gpio = GPIO102_HX4700_SYNAPTICS_POWER_ON, | ||
200 | }; | ||
201 | |||
202 | static struct platform_device navpoint = { | ||
203 | .name = "navpoint", | ||
204 | .id = -1, | ||
205 | .dev = { | ||
206 | .platform_data = &navpoint_platform_data, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | /* | ||
186 | * ASIC3 | 211 | * ASIC3 |
187 | */ | 212 | */ |
188 | 213 | ||
@@ -227,7 +252,6 @@ static u16 asic3_gpio_config[] = { | |||
227 | ASIC3_GPIOC0_LED0, /* red */ | 252 | ASIC3_GPIOC0_LED0, /* red */ |
228 | ASIC3_GPIOC1_LED1, /* green */ | 253 | ASIC3_GPIOC1_LED1, /* green */ |
229 | ASIC3_GPIOC2_LED2, /* blue */ | 254 | ASIC3_GPIOC2_LED2, /* blue */ |
230 | ASIC3_GPIOC4_CF_nCD, | ||
231 | ASIC3_GPIOC5_nCIOW, | 255 | ASIC3_GPIOC5_nCIOW, |
232 | ASIC3_GPIOC6_nCIOR, | 256 | ASIC3_GPIOC6_nCIOR, |
233 | ASIC3_GPIOC7_nPCE_1, | 257 | ASIC3_GPIOC7_nPCE_1, |
@@ -241,6 +265,7 @@ static u16 asic3_gpio_config[] = { | |||
241 | ASIC3_GPIOC15_nPIOR, | 265 | ASIC3_GPIOC15_nPIOR, |
242 | 266 | ||
243 | /* GPIOD: input GPIOs, CF */ | 267 | /* GPIOD: input GPIOs, CF */ |
268 | ASIC3_GPIOD4_CF_nCD, | ||
244 | ASIC3_GPIOD11_nCIOIS16, | 269 | ASIC3_GPIOD11_nCIOIS16, |
245 | ASIC3_GPIOD12_nCWAIT, | 270 | ASIC3_GPIOD12_nCWAIT, |
246 | ASIC3_GPIOD15_nPIOW, | 271 | ASIC3_GPIOD15_nPIOW, |
@@ -291,6 +316,7 @@ static struct asic3_platform_data asic3_platform_data = { | |||
291 | .gpio_config_num = ARRAY_SIZE(asic3_gpio_config), | 316 | .gpio_config_num = ARRAY_SIZE(asic3_gpio_config), |
292 | .irq_base = IRQ_BOARD_START, | 317 | .irq_base = IRQ_BOARD_START, |
293 | .gpio_base = HX4700_ASIC3_GPIO_BASE, | 318 | .gpio_base = HX4700_ASIC3_GPIO_BASE, |
319 | .clock_rate = 4000000, | ||
294 | .leds = asic3_leds, | 320 | .leds = asic3_leds, |
295 | }; | 321 | }; |
296 | 322 | ||
@@ -680,12 +706,8 @@ static struct platform_device power_supply = { | |||
680 | */ | 706 | */ |
681 | 707 | ||
682 | static struct regulator_consumer_supply bq24022_consumers[] = { | 708 | static struct regulator_consumer_supply bq24022_consumers[] = { |
683 | { | 709 | REGULATOR_SUPPLY("vbus_draw", NULL), |
684 | .supply = "vbus_draw", | 710 | REGULATOR_SUPPLY("ac_draw", NULL), |
685 | }, | ||
686 | { | ||
687 | .supply = "ac_draw", | ||
688 | }, | ||
689 | }; | 711 | }; |
690 | 712 | ||
691 | static struct regulator_init_data bq24022_init_data = { | 713 | static struct regulator_init_data bq24022_init_data = { |
@@ -764,9 +786,8 @@ static struct platform_device strataflash = { | |||
764 | * Maxim MAX1587A on PI2C | 786 | * Maxim MAX1587A on PI2C |
765 | */ | 787 | */ |
766 | 788 | ||
767 | static struct regulator_consumer_supply max1587a_consumer = { | 789 | static struct regulator_consumer_supply max1587a_consumer = |
768 | .supply = "vcc_core", | 790 | REGULATOR_SUPPLY("vcc_core", NULL); |
769 | }; | ||
770 | 791 | ||
771 | static struct regulator_init_data max1587a_v3_info = { | 792 | static struct regulator_init_data max1587a_v3_info = { |
772 | .constraints = { | 793 | .constraints = { |
@@ -828,6 +849,7 @@ static struct platform_device audio = { | |||
828 | static struct platform_device *devices[] __initdata = { | 849 | static struct platform_device *devices[] __initdata = { |
829 | &asic3, | 850 | &asic3, |
830 | &gpio_keys, | 851 | &gpio_keys, |
852 | &navpoint, | ||
831 | &backlight, | 853 | &backlight, |
832 | &w3220, | 854 | &w3220, |
833 | &hx4700_lcd, | 855 | &hx4700_lcd, |
@@ -859,6 +881,7 @@ static void __init hx4700_init(void) | |||
859 | int ret; | 881 | int ret; |
860 | 882 | ||
861 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); | 883 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); |
884 | gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); | ||
862 | ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); | 885 | ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); |
863 | if (ret) | 886 | if (ret) |
864 | pr_err ("hx4700: Failed to request GPIOs.\n"); | 887 | pr_err ("hx4700: Failed to request GPIOs.\n"); |