diff options
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 11 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/palmtreo.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtreo.c | 161 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 2 |
4 files changed, 180 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index ce6519c000a6..28f0260777a3 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -425,6 +425,17 @@ config PALM_TREO | |||
425 | bool | 425 | bool |
426 | depends on ARCH_PXA_PALM | 426 | depends on ARCH_PXA_PALM |
427 | 427 | ||
428 | config MACH_CENTRO | ||
429 | bool "Palm Centro 685 (GSM)" | ||
430 | default y | ||
431 | depends on ARCH_PXA_PALM | ||
432 | select PXA27x | ||
433 | select IWMMXT | ||
434 | select PALM_TREO | ||
435 | help | ||
436 | Say Y here if you intend to run this kernel on Palm Centro 685 (GSM) | ||
437 | smartphone. | ||
438 | |||
428 | config MACH_TREO680 | 439 | config MACH_TREO680 |
429 | bool "Palm Treo 680" | 440 | bool "Palm Treo 680" |
430 | default y | 441 | default y |
diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h index 8cb0bca7f707..2d3f14e3be29 100644 --- a/arch/arm/mach-pxa/include/mach/palmtreo.h +++ b/arch/arm/mach-pxa/include/mach/palmtreo.h | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * currently supported: | 4 | * currently supported: |
5 | * Palm Treo 680 (GSM) | 5 | * Palm Treo 680 (GSM) |
6 | * Palm Centro 685 (GSM) | ||
6 | * | 7 | * |
7 | * Author: Tomas Cech <sleep_walker@suse.cz> | 8 | * Author: Tomas Cech <sleep_walker@suse.cz> |
8 | * | 9 | * |
@@ -45,6 +46,12 @@ | |||
45 | #define GPIO_NR_TREO680_BT_EN 43 | 46 | #define GPIO_NR_TREO680_BT_EN 43 |
46 | #endif /* CONFIG_MACH_TREO680 */ | 47 | #endif /* CONFIG_MACH_TREO680 */ |
47 | 48 | ||
49 | /* Centro685 specific GPIOs */ | ||
50 | #define GPIO_NR_CENTRO_SD_POWER 21 | ||
51 | #define GPIO_NR_CENTRO_VIBRATE_EN 22 | ||
52 | #define GPIO_NR_CENTRO_KEYB_BL 33 | ||
53 | #define GPIO_NR_CENTRO_BT_EN 80 | ||
54 | |||
48 | /* Various addresses */ | 55 | /* Various addresses */ |
49 | #define TREO_PHYS_RAM_START 0xa0000000 | 56 | #define TREO_PHYS_RAM_START 0xa0000000 |
50 | #define TREO_PHYS_IO_START 0x40000000 | 57 | #define TREO_PHYS_IO_START 0x40000000 |
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 5e66028d2911..c071b60ebed8 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * currently supported: | 4 | * currently supported: |
5 | * Palm Treo 680 (GSM) | 5 | * Palm Treo 680 (GSM) |
6 | * Palm Centro 685 (GSM) | ||
6 | * | 7 | * |
7 | * Author: Tomas Cech <sleep_walker@suse.cz> | 8 | * Author: Tomas Cech <sleep_walker@suse.cz> |
8 | * | 9 | * |
@@ -160,6 +161,21 @@ static unsigned long treo680_pin_config[] __initdata = { | |||
160 | }; | 161 | }; |
161 | #endif /* CONFIG_MACH_TREO680 */ | 162 | #endif /* CONFIG_MACH_TREO680 */ |
162 | 163 | ||
164 | #ifdef CONFIG_MACH_CENTRO | ||
165 | static unsigned long centro685_pin_config[] __initdata = { | ||
166 | /* Bluetooth attached to BT UART*/ | ||
167 | MFP_CFG_OUT(GPIO80, AF0, DRIVE_LOW), /* power: LOW = off */ | ||
168 | GPIO42_BTUART_RXD, | ||
169 | GPIO43_BTUART_TXD, | ||
170 | GPIO44_BTUART_CTS, | ||
171 | GPIO45_BTUART_RTS, | ||
172 | |||
173 | /* MATRIX KEYPAD - different wake up source */ | ||
174 | GPIO100_KP_MKIN_0, | ||
175 | GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, | ||
176 | }; | ||
177 | #endif /* CONFIG_MACH_CENTRO */ | ||
178 | |||
163 | /****************************************************************************** | 179 | /****************************************************************************** |
164 | * SD/MMC card controller | 180 | * SD/MMC card controller |
165 | ******************************************************************************/ | 181 | ******************************************************************************/ |
@@ -172,6 +188,16 @@ static struct pxamci_platform_data treo680_mci_platform_data = { | |||
172 | }; | 188 | }; |
173 | #endif /* CONFIG_MACH_TREO680 */ | 189 | #endif /* CONFIG_MACH_TREO680 */ |
174 | 190 | ||
191 | #ifdef CONFIG_MACH_CENTRO | ||
192 | static struct pxamci_platform_data centro_mci_platform_data = { | ||
193 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
194 | .gpio_card_detect = GPIO_NR_TREO_SD_DETECT_N, | ||
195 | .gpio_card_ro = -1, | ||
196 | .gpio_power = GPIO_NR_CENTRO_SD_POWER, | ||
197 | .gpio_power_invert = 1, | ||
198 | }; | ||
199 | #endif /* CONFIG_MACH_CENTRO */ | ||
200 | |||
175 | /****************************************************************************** | 201 | /****************************************************************************** |
176 | * GPIO keyboard | 202 | * GPIO keyboard |
177 | ******************************************************************************/ | 203 | ******************************************************************************/ |
@@ -247,6 +273,78 @@ static struct pxa27x_keypad_platform_data treo680_keypad_platform_data = { | |||
247 | }; | 273 | }; |
248 | #endif /* CONFIG_MACH_TREO680 */ | 274 | #endif /* CONFIG_MACH_TREO680 */ |
249 | 275 | ||
276 | #ifdef CONFIG_MACH_CENTRO | ||
277 | static unsigned int centro_matrix_keys[] = { | ||
278 | KEY(0, 0, KEY_F9), /* Home */ | ||
279 | KEY(0, 1, KEY_LEFT), | ||
280 | KEY(0, 2, KEY_LEFTCTRL), /* Alternate */ | ||
281 | KEY(0, 3, KEY_L), | ||
282 | KEY(0, 4, KEY_A), | ||
283 | KEY(0, 5, KEY_Q), | ||
284 | KEY(0, 6, KEY_P), | ||
285 | |||
286 | KEY(1, 0, KEY_RIGHTCTRL), /* Menu */ | ||
287 | KEY(1, 1, KEY_RIGHT), | ||
288 | KEY(1, 2, KEY_LEFTSHIFT), /* Left shift */ | ||
289 | KEY(1, 3, KEY_Z), | ||
290 | KEY(1, 4, KEY_S), | ||
291 | KEY(1, 5, KEY_W), | ||
292 | |||
293 | KEY(2, 0, KEY_F1), /* Phone */ | ||
294 | KEY(2, 1, KEY_UP), | ||
295 | KEY(2, 2, KEY_0), | ||
296 | KEY(2, 3, KEY_X), | ||
297 | KEY(2, 4, KEY_D), | ||
298 | KEY(2, 5, KEY_E), | ||
299 | |||
300 | KEY(3, 0, KEY_F10), /* Calendar */ | ||
301 | KEY(3, 1, KEY_DOWN), | ||
302 | KEY(3, 2, KEY_SPACE), | ||
303 | KEY(3, 3, KEY_C), | ||
304 | KEY(3, 4, KEY_F), | ||
305 | KEY(3, 5, KEY_R), | ||
306 | |||
307 | KEY(4, 0, KEY_F12), /* Mail */ | ||
308 | KEY(4, 1, KEY_KPENTER), | ||
309 | KEY(4, 2, KEY_RIGHTALT), /* Alt */ | ||
310 | KEY(4, 3, KEY_V), | ||
311 | KEY(4, 4, KEY_G), | ||
312 | KEY(4, 5, KEY_T), | ||
313 | |||
314 | KEY(5, 0, KEY_F8), /* Red/Off/Power */ | ||
315 | KEY(5, 1, KEY_PAGEUP), /* Side up */ | ||
316 | KEY(5, 2, KEY_DOT), | ||
317 | KEY(5, 3, KEY_B), | ||
318 | KEY(5, 4, KEY_H), | ||
319 | KEY(5, 5, KEY_Y), | ||
320 | |||
321 | KEY(6, 0, KEY_TAB), /* Side Activate */ | ||
322 | KEY(6, 1, KEY_PAGEDOWN), /* Side down */ | ||
323 | KEY(6, 2, KEY_ENTER), | ||
324 | KEY(6, 3, KEY_N), | ||
325 | KEY(6, 4, KEY_J), | ||
326 | KEY(6, 5, KEY_U), | ||
327 | |||
328 | KEY(7, 0, KEY_F6), /* Green/Call */ | ||
329 | KEY(7, 1, KEY_O), | ||
330 | KEY(7, 2, KEY_BACKSPACE), | ||
331 | KEY(7, 3, KEY_M), | ||
332 | KEY(7, 4, KEY_K), | ||
333 | KEY(7, 5, KEY_I), | ||
334 | }; | ||
335 | |||
336 | static struct pxa27x_keypad_platform_data centro_keypad_platform_data = { | ||
337 | .matrix_key_rows = 8, | ||
338 | .matrix_key_cols = 7, | ||
339 | .matrix_key_map = centro_matrix_keys, | ||
340 | .matrix_key_map_size = ARRAY_SIZE(centro_matrix_keys), | ||
341 | .direct_key_map = { KEY_CONNECT }, | ||
342 | .direct_key_num = 1, | ||
343 | |||
344 | .debounce_interval = 30, | ||
345 | }; | ||
346 | #endif /* CONFIG_MACH_CENTRO */ | ||
347 | |||
250 | /****************************************************************************** | 348 | /****************************************************************************** |
251 | * aSoC audio | 349 | * aSoC audio |
252 | ******************************************************************************/ | 350 | ******************************************************************************/ |
@@ -423,6 +521,40 @@ static struct platform_device treo680_leds = { | |||
423 | }; | 521 | }; |
424 | #endif /* CONFIG_MACH_TREO680 */ | 522 | #endif /* CONFIG_MACH_TREO680 */ |
425 | 523 | ||
524 | #ifdef CONFIG_MACH_CENTRO | ||
525 | static struct gpio_led centro_gpio_leds[] = { | ||
526 | { | ||
527 | .name = "centro:vibra:vibra", | ||
528 | .default_trigger = "none", | ||
529 | .gpio = GPIO_NR_CENTRO_VIBRATE_EN, | ||
530 | }, | ||
531 | { | ||
532 | .name = "centro:green:led", | ||
533 | .default_trigger = "mmc0", | ||
534 | .gpio = GPIO_NR_TREO_GREEN_LED, | ||
535 | }, | ||
536 | { | ||
537 | .name = "centro:white:keybbl", | ||
538 | .default_trigger = "none", | ||
539 | .active_low = 1, | ||
540 | .gpio = GPIO_NR_CENTRO_KEYB_BL, | ||
541 | }, | ||
542 | }; | ||
543 | |||
544 | static struct gpio_led_platform_data centro_gpio_led_info = { | ||
545 | .leds = centro_gpio_leds, | ||
546 | .num_leds = ARRAY_SIZE(centro_gpio_leds), | ||
547 | }; | ||
548 | |||
549 | static struct platform_device centro_leds = { | ||
550 | .name = "leds-gpio", | ||
551 | .id = -1, | ||
552 | .dev = { | ||
553 | .platform_data = ¢ro_gpio_led_info, | ||
554 | } | ||
555 | }; | ||
556 | #endif /* CONFIG_MACH_CENTRO */ | ||
557 | |||
426 | /****************************************************************************** | 558 | /****************************************************************************** |
427 | * Framebuffer | 559 | * Framebuffer |
428 | ******************************************************************************/ | 560 | ******************************************************************************/ |
@@ -484,6 +616,12 @@ static struct platform_device *treo680_devices[] __initdata = { | |||
484 | }; | 616 | }; |
485 | #endif /* CONFIG_MACH_TREO680 */ | 617 | #endif /* CONFIG_MACH_TREO680 */ |
486 | 618 | ||
619 | #ifdef CONFIG_MACH_CENTRO | ||
620 | static struct platform_device *centro_devices[] __initdata = { | ||
621 | ¢ro_leds, | ||
622 | }; | ||
623 | #endif /* CONFIG_MACH_CENTRO */ | ||
624 | |||
487 | /* setup udc GPIOs initial state */ | 625 | /* setup udc GPIOs initial state */ |
488 | static void __init treo_udc_init(void) | 626 | static void __init treo_udc_init(void) |
489 | { | 627 | { |
@@ -549,3 +687,26 @@ MACHINE_START(TREO680, "Palm Treo 680") | |||
549 | .init_machine = treo680_init, | 687 | .init_machine = treo680_init, |
550 | MACHINE_END | 688 | MACHINE_END |
551 | #endif /* CONFIG_MACH_TREO680 */ | 689 | #endif /* CONFIG_MACH_TREO680 */ |
690 | |||
691 | #ifdef CONFIG_MACH_CENTRO | ||
692 | static void __init centro_init(void) | ||
693 | { | ||
694 | treo_init(); | ||
695 | pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config)); | ||
696 | pxa_set_mci_info(¢ro_mci_platform_data); | ||
697 | |||
698 | pxa_set_keypad_info(¢ro_keypad_platform_data); | ||
699 | |||
700 | platform_add_devices(ARRAY_AND_SIZE(centro_devices)); | ||
701 | } | ||
702 | |||
703 | MACHINE_START(CENTRO, "Palm Centro 685") | ||
704 | .phys_io = TREO_PHYS_IO_START, | ||
705 | .io_pg_offst = io_p2v(0x40000000), | ||
706 | .boot_params = 0xa0000100, | ||
707 | .map_io = pxa_map_io, | ||
708 | .init_irq = pxa27x_init_irq, | ||
709 | .timer = &pxa_timer, | ||
710 | .init_machine = centro_init, | ||
711 | MACHINE_END | ||
712 | #endif /* CONFIG_MACH_CENTRO */ | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ea67be0223ac..3e8556b16a9f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -881,7 +881,7 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
881 | BOOTMEM_EXCLUSIVE); | 881 | BOOTMEM_EXCLUSIVE); |
882 | } | 882 | } |
883 | 883 | ||
884 | if (machine_is_treo680()) { | 884 | if (machine_is_treo680() || machine_is_centro()) { |
885 | reserve_bootmem_node(pgdat, 0xa0000000, 0x1000, | 885 | reserve_bootmem_node(pgdat, 0xa0000000, 0x1000, |
886 | BOOTMEM_EXCLUSIVE); | 886 | BOOTMEM_EXCLUSIVE); |
887 | reserve_bootmem_node(pgdat, 0xa2000000, 0x1000, | 887 | reserve_bootmem_node(pgdat, 0xa2000000, 0x1000, |