diff options
Diffstat (limited to 'arch/arm/mach-pxa/hx4700.c')
-rw-r--r-- | arch/arm/mach-pxa/hx4700.c | 71 |
1 files changed, 26 insertions, 45 deletions
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index d09da6a746b8..e6311988add2 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -127,7 +127,11 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
127 | GPIO19_SSP2_SCLK, | 127 | GPIO19_SSP2_SCLK, |
128 | GPIO86_SSP2_RXD, | 128 | GPIO86_SSP2_RXD, |
129 | GPIO87_SSP2_TXD, | 129 | GPIO87_SSP2_TXD, |
130 | GPIO88_GPIO, | 130 | GPIO88_GPIO | MFP_LPM_DRIVE_HIGH, /* TSC2046_CS */ |
131 | |||
132 | /* BQ24022 Regulator */ | ||
133 | GPIO72_GPIO | MFP_LPM_KEEP_OUTPUT, /* BQ24022_nCHARGE_EN */ | ||
134 | GPIO96_GPIO | MFP_LPM_KEEP_OUTPUT, /* BQ24022_ISET2 */ | ||
131 | 135 | ||
132 | /* HX4700 specific input GPIOs */ | 136 | /* HX4700 specific input GPIOs */ |
133 | GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, /* ASIC3_IRQ */ | 137 | GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, /* ASIC3_IRQ */ |
@@ -135,6 +139,10 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
135 | GPIO14_GPIO, /* nWLAN_IRQ */ | 139 | GPIO14_GPIO, /* nWLAN_IRQ */ |
136 | 140 | ||
137 | /* HX4700 specific output GPIOs */ | 141 | /* HX4700 specific output GPIOs */ |
142 | GPIO61_GPIO | MFP_LPM_DRIVE_HIGH, /* W3220_nRESET */ | ||
143 | GPIO71_GPIO | MFP_LPM_DRIVE_HIGH, /* ASIC3_nRESET */ | ||
144 | GPIO81_GPIO | MFP_LPM_DRIVE_HIGH, /* CPU_GP_nRESET */ | ||
145 | GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, /* CPU_HW_nRESET */ | ||
138 | GPIO102_GPIO | MFP_LPM_DRIVE_LOW, /* SYNAPTICS_POWER_ON */ | 146 | GPIO102_GPIO | MFP_LPM_DRIVE_LOW, /* SYNAPTICS_POWER_ON */ |
139 | 147 | ||
140 | GPIO10_GPIO, /* GSM_IRQ */ | 148 | GPIO10_GPIO, /* GSM_IRQ */ |
@@ -288,27 +296,11 @@ static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = { | |||
288 | 296 | ||
289 | static struct resource asic3_resources[] = { | 297 | static struct resource asic3_resources[] = { |
290 | /* GPIO part */ | 298 | /* GPIO part */ |
291 | [0] = { | 299 | [0] = DEFINE_RES_MEM(ASIC3_PHYS, ASIC3_MAP_SIZE_16BIT), |
292 | .start = ASIC3_PHYS, | 300 | [1] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ)), |
293 | .end = ASIC3_PHYS + ASIC3_MAP_SIZE_16BIT - 1, | ||
294 | .flags = IORESOURCE_MEM, | ||
295 | }, | ||
296 | [1] = { | ||
297 | .start = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), | ||
298 | .end = PXA_GPIO_TO_IRQ(GPIO12_HX4700_ASIC3_IRQ), | ||
299 | .flags = IORESOURCE_IRQ, | ||
300 | }, | ||
301 | /* SD part */ | 301 | /* SD part */ |
302 | [2] = { | 302 | [2] = DEFINE_RES_MEM(ASIC3_SD_PHYS, ASIC3_MAP_SIZE_16BIT), |
303 | .start = ASIC3_SD_PHYS, | 303 | [3] = DEFINE_RES_IRQ(PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ)), |
304 | .end = ASIC3_SD_PHYS + ASIC3_MAP_SIZE_16BIT - 1, | ||
305 | .flags = IORESOURCE_MEM, | ||
306 | }, | ||
307 | [3] = { | ||
308 | .start = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | ||
309 | .end = PXA_GPIO_TO_IRQ(GPIO66_HX4700_ASIC3_nSDIO_IRQ), | ||
310 | .flags = IORESOURCE_IRQ, | ||
311 | }, | ||
312 | }; | 304 | }; |
313 | 305 | ||
314 | static struct asic3_platform_data asic3_platform_data = { | 306 | static struct asic3_platform_data asic3_platform_data = { |
@@ -335,11 +327,7 @@ static struct platform_device asic3 = { | |||
335 | */ | 327 | */ |
336 | 328 | ||
337 | static struct resource egpio_resources[] = { | 329 | static struct resource egpio_resources[] = { |
338 | [0] = { | 330 | [0] = DEFINE_RES_MEM(PXA_CS5_PHYS, 0x4), |
339 | .start = PXA_CS5_PHYS, | ||
340 | .end = PXA_CS5_PHYS + 0x4 - 1, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, | ||
343 | }; | 331 | }; |
344 | 332 | ||
345 | static struct htc_egpio_chip egpio_chips[] = { | 333 | static struct htc_egpio_chip egpio_chips[] = { |
@@ -529,11 +517,7 @@ static struct w100fb_mach_info w3220_info = { | |||
529 | }; | 517 | }; |
530 | 518 | ||
531 | static struct resource w3220_resources[] = { | 519 | static struct resource w3220_resources[] = { |
532 | [0] = { | 520 | [0] = DEFINE_RES_MEM(ATI_W3220_PHYS, SZ_16M), |
533 | .start = ATI_W3220_PHYS, | ||
534 | .end = ATI_W3220_PHYS + 0x00ffffff, | ||
535 | .flags = IORESOURCE_MEM, | ||
536 | }, | ||
537 | }; | 521 | }; |
538 | 522 | ||
539 | static struct platform_device w3220 = { | 523 | static struct platform_device w3220 = { |
@@ -675,20 +659,12 @@ static struct pda_power_pdata power_supply_info = { | |||
675 | }; | 659 | }; |
676 | 660 | ||
677 | static struct resource power_supply_resources[] = { | 661 | static struct resource power_supply_resources[] = { |
678 | [0] = { | 662 | [0] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), 1, "ac", |
679 | .name = "ac", | 663 | IORESOURCE_IRQ | |
680 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 664 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE), |
681 | IORESOURCE_IRQ_LOWEDGE, | 665 | [1] = DEFINE_RES_NAMED(PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), 1, "usb", |
682 | .start = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), | 666 | IORESOURCE_IRQ | |
683 | .end = PXA_GPIO_TO_IRQ(GPIOD9_nAC_IN), | 667 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE), |
684 | }, | ||
685 | [1] = { | ||
686 | .name = "usb", | ||
687 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | ||
688 | IORESOURCE_IRQ_LOWEDGE, | ||
689 | .start = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), | ||
690 | .end = PXA_GPIO_TO_IRQ(GPIOD14_nUSBC_DETECT), | ||
691 | }, | ||
692 | }; | 668 | }; |
693 | 669 | ||
694 | static struct platform_device power_supply = { | 670 | static struct platform_device power_supply = { |
@@ -872,14 +848,19 @@ static struct gpio global_gpios[] = { | |||
872 | { GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" }, | 848 | { GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" }, |
873 | { GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" }, | 849 | { GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" }, |
874 | { GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" }, | 850 | { GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" }, |
851 | { GPIO61_HX4700_W3220_nRESET, GPIOF_OUT_INIT_HIGH, "W3220_nRESET" }, | ||
875 | { GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" }, | 852 | { GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" }, |
853 | { GPIO81_HX4700_CPU_GP_nRESET, GPIOF_OUT_INIT_HIGH, "CPU_GP_nRESET" }, | ||
876 | { GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" }, | 854 | { GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" }, |
855 | { GPIO116_HX4700_CPU_HW_nRESET, GPIOF_OUT_INIT_HIGH, "CPU_HW_nRESET" }, | ||
877 | }; | 856 | }; |
878 | 857 | ||
879 | static void __init hx4700_init(void) | 858 | static void __init hx4700_init(void) |
880 | { | 859 | { |
881 | int ret; | 860 | int ret; |
882 | 861 | ||
862 | PCFR = PCFR_GPR_EN | PCFR_OPDE; | ||
863 | |||
883 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); | 864 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); |
884 | gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); | 865 | gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); |
885 | ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); | 866 | ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); |