diff options
| -rw-r--r-- | arch/arm/mach-pxa/include/mach/palmtreo.h | 5 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/include/mach/smemc.h | 1 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/palmtreo.c | 70 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/smemc.c | 15 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/spitz.c | 4 |
5 files changed, 80 insertions, 15 deletions
diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h index 2d3f14e3be29..714b6574393e 100644 --- a/arch/arm/mach-pxa/include/mach/palmtreo.h +++ b/arch/arm/mach-pxa/include/mach/palmtreo.h | |||
| @@ -38,13 +38,14 @@ | |||
| 38 | #define GPIO_NR_TREO_LCD_POWER 25 | 38 | #define GPIO_NR_TREO_LCD_POWER 25 |
| 39 | 39 | ||
| 40 | /* Treo680 specific GPIOs */ | 40 | /* Treo680 specific GPIOs */ |
| 41 | #ifdef CONFIG_MACH_TREO680 | ||
| 42 | #define GPIO_NR_TREO680_SD_READONLY 33 | 41 | #define GPIO_NR_TREO680_SD_READONLY 33 |
| 43 | #define GPIO_NR_TREO680_SD_POWER 42 | 42 | #define GPIO_NR_TREO680_SD_POWER 42 |
| 44 | #define GPIO_NR_TREO680_VIBRATE_EN 44 | 43 | #define GPIO_NR_TREO680_VIBRATE_EN 44 |
| 45 | #define GPIO_NR_TREO680_KEYB_BL 24 | 44 | #define GPIO_NR_TREO680_KEYB_BL 24 |
| 46 | #define GPIO_NR_TREO680_BT_EN 43 | 45 | #define GPIO_NR_TREO680_BT_EN 43 |
| 47 | #endif /* CONFIG_MACH_TREO680 */ | 46 | #define GPIO_NR_TREO680_LCD_POWER 77 |
| 47 | #define GPIO_NR_TREO680_LCD_EN 86 | ||
| 48 | #define GPIO_NR_TREO680_LCD_EN_N 25 | ||
| 48 | 49 | ||
| 49 | /* Centro685 specific GPIOs */ | 50 | /* Centro685 specific GPIOs */ |
| 50 | #define GPIO_NR_CENTRO_SD_POWER 21 | 51 | #define GPIO_NR_CENTRO_SD_POWER 21 |
diff --git a/arch/arm/mach-pxa/include/mach/smemc.h b/arch/arm/mach-pxa/include/mach/smemc.h index b7de471b273a..b802f285fe00 100644 --- a/arch/arm/mach-pxa/include/mach/smemc.h +++ b/arch/arm/mach-pxa/include/mach/smemc.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */ | 37 | #define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */ |
| 38 | #define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */ | 38 | #define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */ |
| 39 | #define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */ | 39 | #define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */ |
| 40 | #define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */ | ||
| 40 | 41 | ||
| 41 | /* | 42 | /* |
| 42 | * More handy macros for PCMCIA | 43 | * More handy macros for PCMCIA |
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index d17bda278782..a29849d181c8 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
| @@ -98,9 +98,6 @@ static unsigned long treo_pin_config[] __initdata = { | |||
| 98 | GPIO96_KP_MKOUT_6, | 98 | GPIO96_KP_MKOUT_6, |
| 99 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ | 99 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ |
| 100 | 100 | ||
| 101 | /* LCD */ | ||
| 102 | GPIOxx_LCD_TFT_16BPP, | ||
| 103 | |||
| 104 | /* Quick Capture Interface */ | 101 | /* Quick Capture Interface */ |
| 105 | GPIO84_CIF_FV, | 102 | GPIO84_CIF_FV, |
| 106 | GPIO85_CIF_LV, | 103 | GPIO85_CIF_LV, |
| @@ -140,6 +137,12 @@ static unsigned long treo680_pin_config[] __initdata = { | |||
| 140 | /* MATRIX KEYPAD - different wake up source */ | 137 | /* MATRIX KEYPAD - different wake up source */ |
| 141 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 138 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
| 142 | GPIO99_KP_MKIN_5, | 139 | GPIO99_KP_MKIN_5, |
| 140 | |||
| 141 | /* LCD... L_BIAS alt fn not configured on Treo680; is GPIO instead */ | ||
| 142 | GPIOxx_LCD_16BPP, | ||
| 143 | GPIO74_LCD_FCLK, | ||
| 144 | GPIO75_LCD_LCLK, | ||
| 145 | GPIO76_LCD_PCLK, | ||
| 143 | }; | 146 | }; |
| 144 | #endif /* CONFIG_MACH_TREO680 */ | 147 | #endif /* CONFIG_MACH_TREO680 */ |
| 145 | 148 | ||
| @@ -155,6 +158,9 @@ static unsigned long centro685_pin_config[] __initdata = { | |||
| 155 | /* MATRIX KEYPAD - different wake up source */ | 158 | /* MATRIX KEYPAD - different wake up source */ |
| 156 | GPIO100_KP_MKIN_0, | 159 | GPIO100_KP_MKIN_0, |
| 157 | GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, | 160 | GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, |
| 161 | |||
| 162 | /* LCD */ | ||
| 163 | GPIOxx_LCD_TFT_16BPP, | ||
| 158 | }; | 164 | }; |
| 159 | #endif /* CONFIG_MACH_CENTRO */ | 165 | #endif /* CONFIG_MACH_CENTRO */ |
| 160 | 166 | ||
| @@ -328,7 +334,6 @@ static inline void palmtreo_uhc_init(void) {} | |||
| 328 | /****************************************************************************** | 334 | /****************************************************************************** |
| 329 | * Vibra and LEDs | 335 | * Vibra and LEDs |
| 330 | ******************************************************************************/ | 336 | ******************************************************************************/ |
| 331 | #ifdef CONFIG_MACH_TREO680 | ||
| 332 | static struct gpio_led treo680_gpio_leds[] = { | 337 | static struct gpio_led treo680_gpio_leds[] = { |
| 333 | { | 338 | { |
| 334 | .name = "treo680:vibra:vibra", | 339 | .name = "treo680:vibra:vibra", |
| @@ -379,21 +384,17 @@ static struct gpio_led_platform_data centro_gpio_led_info = { | |||
| 379 | static struct platform_device palmtreo_leds = { | 384 | static struct platform_device palmtreo_leds = { |
| 380 | .name = "leds-gpio", | 385 | .name = "leds-gpio", |
| 381 | .id = -1, | 386 | .id = -1, |
| 382 | .dev = { | ||
| 383 | .platform_data = &treo680_gpio_led_info, | ||
| 384 | } | ||
| 385 | }; | 387 | }; |
| 386 | 388 | ||
| 387 | static void __init palmtreo_leds_init(void) | 389 | static void __init palmtreo_leds_init(void) |
| 388 | { | 390 | { |
| 389 | if (machine_is_centro()) | 391 | if (machine_is_centro()) |
| 390 | palmtreo_leds.dev.platform_data = ¢ro_gpio_led_info; | 392 | palmtreo_leds.dev.platform_data = ¢ro_gpio_led_info; |
| 393 | else if (machine_is_treo680()) | ||
| 394 | palmtreo_leds.dev.platform_data = &treo680_gpio_led_info; | ||
| 391 | 395 | ||
| 392 | platform_device_register(&palmtreo_leds); | 396 | platform_device_register(&palmtreo_leds); |
| 393 | } | 397 | } |
| 394 | #else | ||
| 395 | static inline void palmtreo_leds_init(void) {} | ||
| 396 | #endif | ||
| 397 | 398 | ||
| 398 | /****************************************************************************** | 399 | /****************************************************************************** |
| 399 | * Machine init | 400 | * Machine init |
| @@ -424,10 +425,59 @@ static void __init palmphone_common_init(void) | |||
| 424 | } | 425 | } |
| 425 | 426 | ||
| 426 | #ifdef CONFIG_MACH_TREO680 | 427 | #ifdef CONFIG_MACH_TREO680 |
| 428 | void __init treo680_gpio_init(void) | ||
| 429 | { | ||
| 430 | unsigned int gpio; | ||
| 431 | |||
| 432 | /* drive all three lcd gpios high initially */ | ||
| 433 | const unsigned long lcd_flags = GPIOF_INIT_HIGH | GPIOF_DIR_OUT; | ||
| 434 | |||
| 435 | /* | ||
| 436 | * LCD GPIO initialization... | ||
| 437 | */ | ||
| 438 | |||
| 439 | /* | ||
| 440 | * This is likely the power to the lcd. Toggling it low/high appears to | ||
| 441 | * turn the lcd off/on. Can be toggled after lcd is initialized without | ||
| 442 | * any apparent adverse effects to the lcd operation. Note that this | ||
| 443 | * gpio line is used by the lcd controller as the L_BIAS signal, but | ||
| 444 | * treo680 configures it as gpio. | ||
| 445 | */ | ||
| 446 | gpio = GPIO_NR_TREO680_LCD_POWER; | ||
| 447 | if (gpio_request_one(gpio, lcd_flags, "LCD power") < 0) | ||
| 448 | goto fail; | ||
| 449 | |||
| 450 | /* | ||
| 451 | * These two are called "enables", for lack of a better understanding. | ||
| 452 | * If either of these are toggled after the lcd is initialized, the | ||
| 453 | * image becomes degraded. N.B. The IPL shipped with the treo | ||
| 454 | * configures GPIO_NR_TREO680_LCD_EN_N as output and drives it high. If | ||
| 455 | * the IPL is ever reprogrammed, this initialization may be need to be | ||
| 456 | * revisited. | ||
| 457 | */ | ||
| 458 | gpio = GPIO_NR_TREO680_LCD_EN; | ||
| 459 | if (gpio_request_one(gpio, lcd_flags, "LCD enable") < 0) | ||
| 460 | goto fail; | ||
| 461 | gpio = GPIO_NR_TREO680_LCD_EN_N; | ||
| 462 | if (gpio_request_one(gpio, lcd_flags, "LCD enable_n") < 0) | ||
| 463 | goto fail; | ||
| 464 | |||
| 465 | /* driving this low turns LCD on */ | ||
| 466 | gpio_set_value(GPIO_NR_TREO680_LCD_EN_N, 0); | ||
| 467 | |||
| 468 | return; | ||
| 469 | fail: | ||
| 470 | pr_err("gpio %d initialization failed\n", gpio); | ||
| 471 | gpio_free(GPIO_NR_TREO680_LCD_POWER); | ||
| 472 | gpio_free(GPIO_NR_TREO680_LCD_EN); | ||
| 473 | gpio_free(GPIO_NR_TREO680_LCD_EN_N); | ||
| 474 | } | ||
| 475 | |||
| 427 | static void __init treo680_init(void) | 476 | static void __init treo680_init(void) |
| 428 | { | 477 | { |
| 429 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); | 478 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); |
| 430 | palmphone_common_init(); | 479 | palmphone_common_init(); |
| 480 | treo680_gpio_init(); | ||
| 431 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, | 481 | palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, |
| 432 | GPIO_NR_TREO680_SD_POWER, 0); | 482 | GPIO_NR_TREO680_SD_POWER, 0); |
| 433 | } | 483 | } |
diff --git a/arch/arm/mach-pxa/smemc.c b/arch/arm/mach-pxa/smemc.c index 79923058d10f..f38aa890b2c9 100644 --- a/arch/arm/mach-pxa/smemc.c +++ b/arch/arm/mach-pxa/smemc.c | |||
| @@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void) | |||
| 40 | __raw_writel(csadrcfg[1], CSADRCFG1); | 40 | __raw_writel(csadrcfg[1], CSADRCFG1); |
| 41 | __raw_writel(csadrcfg[2], CSADRCFG2); | 41 | __raw_writel(csadrcfg[2], CSADRCFG2); |
| 42 | __raw_writel(csadrcfg[3], CSADRCFG3); | 42 | __raw_writel(csadrcfg[3], CSADRCFG3); |
| 43 | /* CSMSADRCFG wakes up in its default state (0), so we need to set it */ | ||
| 44 | __raw_writel(0x2, CSMSADRCFG); | ||
| 43 | } | 45 | } |
| 44 | 46 | ||
| 45 | static struct syscore_ops smemc_syscore_ops = { | 47 | static struct syscore_ops smemc_syscore_ops = { |
| @@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = { | |||
| 49 | 51 | ||
| 50 | static int __init smemc_init(void) | 52 | static int __init smemc_init(void) |
| 51 | { | 53 | { |
| 52 | if (cpu_is_pxa3xx()) | 54 | if (cpu_is_pxa3xx()) { |
| 55 | /* | ||
| 56 | * The only documentation we have on the | ||
| 57 | * Chip Select Configuration Register (CSMSADRCFG) is that | ||
| 58 | * it must be programmed to 0x2. | ||
| 59 | * Moreover, in the bit definitions, the second bit | ||
| 60 | * (CSMSADRCFG[1]) is called "SETALWAYS". | ||
| 61 | * Other bits are reserved in this register. | ||
| 62 | */ | ||
| 63 | __raw_writel(0x2, CSMSADRCFG); | ||
| 64 | |||
| 53 | register_syscore_ops(&smemc_syscore_ops); | 65 | register_syscore_ops(&smemc_syscore_ops); |
| 66 | } | ||
| 54 | 67 | ||
| 55 | return 0; | 68 | return 0; |
| 56 | } | 69 | } |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index f90aa27ad599..362726c49c70 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
| @@ -732,7 +732,7 @@ static inline void spitz_lcd_init(void) {} | |||
| 732 | #endif | 732 | #endif |
| 733 | 733 | ||
| 734 | /****************************************************************************** | 734 | /****************************************************************************** |
| 735 | * Framebuffer | 735 | * NAND Flash |
| 736 | ******************************************************************************/ | 736 | ******************************************************************************/ |
| 737 | #if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) | 737 | #if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) |
| 738 | static struct mtd_partition spitz_nand_partitions[] = { | 738 | static struct mtd_partition spitz_nand_partitions[] = { |
| @@ -858,7 +858,7 @@ static inline void spitz_nor_init(void) {} | |||
| 858 | #endif | 858 | #endif |
| 859 | 859 | ||
| 860 | /****************************************************************************** | 860 | /****************************************************************************** |
| 861 | * GPIO expander | 861 | * I2C devices |
| 862 | ******************************************************************************/ | 862 | ******************************************************************************/ |
| 863 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) | 863 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) |
| 864 | static struct pca953x_platform_data akita_pca953x_pdata = { | 864 | static struct pca953x_platform_data akita_pca953x_pdata = { |
