Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 1 | /* |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 2 | * Hardware definitions for Palm Treo smartphones |
| 3 | * |
| 4 | * currently supported: |
| 5 | * Palm Treo 680 (GSM) |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 6 | * Palm Centro 685 (GSM) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 7 | * |
| 8 | * Author: Tomas Cech <sleep_walker@suse.cz> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. |
| 13 | * |
| 14 | * (find more info at www.hackndev.com) |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/delay.h> |
| 20 | #include <linux/irq.h> |
| 21 | #include <linux/gpio_keys.h> |
| 22 | #include <linux/input.h> |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 23 | #include <linux/memblock.h> |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 24 | #include <linux/pda_power.h> |
| 25 | #include <linux/pwm_backlight.h> |
| 26 | #include <linux/gpio.h> |
| 27 | #include <linux/wm97xx_batt.h> |
| 28 | #include <linux/power_supply.h> |
| 29 | #include <linux/sysdev.h> |
| 30 | #include <linux/w1-gpio.h> |
| 31 | |
| 32 | #include <asm/mach-types.h> |
| 33 | #include <asm/mach/arch.h> |
| 34 | #include <asm/mach/map.h> |
| 35 | |
| 36 | #include <mach/pxa27x.h> |
| 37 | #include <mach/pxa27x-udc.h> |
| 38 | #include <mach/audio.h> |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 39 | #include <mach/palmtreo.h> |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 40 | #include <mach/mmc.h> |
| 41 | #include <mach/pxafb.h> |
| 42 | #include <mach/irda.h> |
| 43 | #include <mach/pxa27x_keypad.h> |
| 44 | #include <mach/udc.h> |
| 45 | #include <mach/ohci.h> |
| 46 | #include <mach/pxa2xx-regs.h> |
| 47 | #include <mach/palmasoc.h> |
| 48 | #include <mach/camera.h> |
| 49 | |
| 50 | #include <sound/pxa2xx-lib.h> |
| 51 | |
| 52 | #include "generic.h" |
| 53 | #include "devices.h" |
| 54 | |
| 55 | /****************************************************************************** |
| 56 | * Pin configuration |
| 57 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 58 | static unsigned long treo_pin_config[] __initdata = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 59 | /* MMC */ |
| 60 | GPIO32_MMC_CLK, |
| 61 | GPIO92_MMC_DAT_0, |
| 62 | GPIO109_MMC_DAT_1, |
| 63 | GPIO110_MMC_DAT_2, |
| 64 | GPIO111_MMC_DAT_3, |
| 65 | GPIO112_MMC_CMD, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 66 | GPIO113_GPIO, /* SD detect */ |
| 67 | |
| 68 | /* AC97 */ |
| 69 | GPIO28_AC97_BITCLK, |
| 70 | GPIO29_AC97_SDATA_IN_0, |
| 71 | GPIO30_AC97_SDATA_OUT, |
| 72 | GPIO31_AC97_SYNC, |
| 73 | GPIO89_AC97_SYSCLK, |
| 74 | GPIO95_AC97_nRESET, |
| 75 | |
| 76 | /* IrDA */ |
| 77 | GPIO46_FICP_RXD, |
| 78 | GPIO47_FICP_TXD, |
| 79 | |
| 80 | /* PWM */ |
| 81 | GPIO16_PWM0_OUT, |
| 82 | |
| 83 | /* USB */ |
| 84 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, /* usb detect */ |
| 85 | |
| 86 | /* MATRIX KEYPAD */ |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 87 | GPIO101_KP_MKIN_1, |
| 88 | GPIO102_KP_MKIN_2, |
| 89 | GPIO97_KP_MKIN_3, |
| 90 | GPIO98_KP_MKIN_4, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 91 | GPIO91_KP_MKIN_6, |
| 92 | GPIO13_KP_MKIN_7, |
| 93 | GPIO103_KP_MKOUT_0 | MFP_LPM_DRIVE_HIGH, |
| 94 | GPIO104_KP_MKOUT_1, |
| 95 | GPIO105_KP_MKOUT_2, |
| 96 | GPIO106_KP_MKOUT_3, |
| 97 | GPIO107_KP_MKOUT_4, |
| 98 | GPIO108_KP_MKOUT_5, |
| 99 | GPIO96_KP_MKOUT_6, |
| 100 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ |
| 101 | |
| 102 | /* LCD */ |
Eric Miao | bedbda9 | 2010-01-04 11:37:14 +0800 | [diff] [blame] | 103 | GPIOxx_LCD_TFT_16BPP, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 104 | |
| 105 | /* Quick Capture Interface */ |
| 106 | GPIO84_CIF_FV, |
| 107 | GPIO85_CIF_LV, |
| 108 | GPIO53_CIF_MCLK, |
| 109 | GPIO54_CIF_PCLK, |
| 110 | GPIO81_CIF_DD_0, |
| 111 | GPIO55_CIF_DD_1, |
| 112 | GPIO51_CIF_DD_2, |
| 113 | GPIO50_CIF_DD_3, |
| 114 | GPIO52_CIF_DD_4, |
| 115 | GPIO48_CIF_DD_5, |
| 116 | GPIO17_CIF_DD_6, |
| 117 | GPIO12_CIF_DD_7, |
| 118 | |
| 119 | /* I2C */ |
| 120 | GPIO117_I2C_SCL, |
| 121 | GPIO118_I2C_SDA, |
| 122 | |
| 123 | /* GSM */ |
| 124 | GPIO14_GPIO | WAKEUP_ON_EDGE_BOTH, /* GSM host wake up */ |
| 125 | GPIO34_FFUART_RXD, |
| 126 | GPIO35_FFUART_CTS, |
| 127 | GPIO39_FFUART_TXD, |
| 128 | GPIO41_FFUART_RTS, |
| 129 | |
| 130 | /* MISC. */ |
| 131 | GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, /* external power detect */ |
| 132 | GPIO15_GPIO | WAKEUP_ON_EDGE_BOTH, /* silent switch */ |
| 133 | GPIO116_GPIO, /* headphone detect */ |
| 134 | GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* bluetooth host wake up */ |
| 135 | }; |
| 136 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 137 | #ifdef CONFIG_MACH_TREO680 |
| 138 | static unsigned long treo680_pin_config[] __initdata = { |
| 139 | GPIO33_GPIO, /* SD read only */ |
| 140 | |
| 141 | /* MATRIX KEYPAD - different wake up source */ |
| 142 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
| 143 | GPIO99_KP_MKIN_5, |
| 144 | }; |
| 145 | #endif /* CONFIG_MACH_TREO680 */ |
| 146 | |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 147 | #ifdef CONFIG_MACH_CENTRO |
| 148 | static unsigned long centro685_pin_config[] __initdata = { |
| 149 | /* Bluetooth attached to BT UART*/ |
| 150 | MFP_CFG_OUT(GPIO80, AF0, DRIVE_LOW), /* power: LOW = off */ |
| 151 | GPIO42_BTUART_RXD, |
| 152 | GPIO43_BTUART_TXD, |
| 153 | GPIO44_BTUART_CTS, |
| 154 | GPIO45_BTUART_RTS, |
| 155 | |
| 156 | /* MATRIX KEYPAD - different wake up source */ |
| 157 | GPIO100_KP_MKIN_0, |
| 158 | GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, |
| 159 | }; |
| 160 | #endif /* CONFIG_MACH_CENTRO */ |
| 161 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 162 | /****************************************************************************** |
| 163 | * SD/MMC card controller |
| 164 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 165 | #ifdef CONFIG_MACH_TREO680 |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 166 | static struct pxamci_platform_data treo680_mci_platform_data = { |
walker@suse.cz | 7dafdf3 | 2009-08-31 19:25:57 +0200 | [diff] [blame] | 167 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 168 | .gpio_card_detect = GPIO_NR_TREO_SD_DETECT_N, |
walker@suse.cz | 7dafdf3 | 2009-08-31 19:25:57 +0200 | [diff] [blame] | 169 | .gpio_card_ro = GPIO_NR_TREO680_SD_READONLY, |
| 170 | .gpio_power = GPIO_NR_TREO680_SD_POWER, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 171 | }; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 172 | #endif /* CONFIG_MACH_TREO680 */ |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 173 | |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 174 | #ifdef CONFIG_MACH_CENTRO |
| 175 | static struct pxamci_platform_data centro_mci_platform_data = { |
| 176 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 177 | .gpio_card_detect = GPIO_NR_TREO_SD_DETECT_N, |
| 178 | .gpio_card_ro = -1, |
| 179 | .gpio_power = GPIO_NR_CENTRO_SD_POWER, |
| 180 | .gpio_power_invert = 1, |
| 181 | }; |
| 182 | #endif /* CONFIG_MACH_CENTRO */ |
| 183 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 184 | /****************************************************************************** |
| 185 | * GPIO keyboard |
| 186 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 187 | #ifdef CONFIG_MACH_TREO680 |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 188 | static unsigned int treo680_matrix_keys[] = { |
| 189 | KEY(0, 0, KEY_F8), /* Red/Off/Power */ |
| 190 | KEY(0, 1, KEY_LEFT), |
| 191 | KEY(0, 2, KEY_LEFTCTRL), /* Alternate */ |
| 192 | KEY(0, 3, KEY_L), |
| 193 | KEY(0, 4, KEY_A), |
| 194 | KEY(0, 5, KEY_Q), |
| 195 | KEY(0, 6, KEY_P), |
| 196 | |
| 197 | KEY(1, 0, KEY_RIGHTCTRL), /* Menu */ |
| 198 | KEY(1, 1, KEY_RIGHT), |
| 199 | KEY(1, 2, KEY_LEFTSHIFT), /* Left shift */ |
| 200 | KEY(1, 3, KEY_Z), |
| 201 | KEY(1, 4, KEY_S), |
| 202 | KEY(1, 5, KEY_W), |
| 203 | |
| 204 | KEY(2, 0, KEY_F1), /* Phone */ |
| 205 | KEY(2, 1, KEY_UP), |
| 206 | KEY(2, 2, KEY_0), |
| 207 | KEY(2, 3, KEY_X), |
| 208 | KEY(2, 4, KEY_D), |
| 209 | KEY(2, 5, KEY_E), |
| 210 | |
| 211 | KEY(3, 0, KEY_F10), /* Calendar */ |
| 212 | KEY(3, 1, KEY_DOWN), |
| 213 | KEY(3, 2, KEY_SPACE), |
| 214 | KEY(3, 3, KEY_C), |
| 215 | KEY(3, 4, KEY_F), |
| 216 | KEY(3, 5, KEY_R), |
| 217 | |
| 218 | KEY(4, 0, KEY_F12), /* Mail */ |
| 219 | KEY(4, 1, KEY_KPENTER), |
| 220 | KEY(4, 2, KEY_RIGHTALT), /* Alt */ |
| 221 | KEY(4, 3, KEY_V), |
| 222 | KEY(4, 4, KEY_G), |
| 223 | KEY(4, 5, KEY_T), |
| 224 | |
| 225 | KEY(5, 0, KEY_F9), /* Home */ |
| 226 | KEY(5, 1, KEY_PAGEUP), /* Side up */ |
| 227 | KEY(5, 2, KEY_DOT), |
| 228 | KEY(5, 3, KEY_B), |
| 229 | KEY(5, 4, KEY_H), |
| 230 | KEY(5, 5, KEY_Y), |
| 231 | |
| 232 | KEY(6, 0, KEY_TAB), /* Side Activate */ |
| 233 | KEY(6, 1, KEY_PAGEDOWN), /* Side down */ |
| 234 | KEY(6, 2, KEY_ENTER), |
| 235 | KEY(6, 3, KEY_N), |
| 236 | KEY(6, 4, KEY_J), |
| 237 | KEY(6, 5, KEY_U), |
| 238 | |
| 239 | KEY(7, 0, KEY_F6), /* Green/Call */ |
| 240 | KEY(7, 1, KEY_O), |
| 241 | KEY(7, 2, KEY_BACKSPACE), |
| 242 | KEY(7, 3, KEY_M), |
| 243 | KEY(7, 4, KEY_K), |
| 244 | KEY(7, 5, KEY_I), |
| 245 | }; |
| 246 | |
| 247 | static struct pxa27x_keypad_platform_data treo680_keypad_platform_data = { |
| 248 | .matrix_key_rows = 8, |
| 249 | .matrix_key_cols = 7, |
| 250 | .matrix_key_map = treo680_matrix_keys, |
| 251 | .matrix_key_map_size = ARRAY_SIZE(treo680_matrix_keys), |
| 252 | .direct_key_map = { KEY_CONNECT }, |
| 253 | .direct_key_num = 1, |
| 254 | |
| 255 | .debounce_interval = 30, |
| 256 | }; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 257 | #endif /* CONFIG_MACH_TREO680 */ |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 258 | |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 259 | #ifdef CONFIG_MACH_CENTRO |
| 260 | static unsigned int centro_matrix_keys[] = { |
| 261 | KEY(0, 0, KEY_F9), /* Home */ |
| 262 | KEY(0, 1, KEY_LEFT), |
| 263 | KEY(0, 2, KEY_LEFTCTRL), /* Alternate */ |
| 264 | KEY(0, 3, KEY_L), |
| 265 | KEY(0, 4, KEY_A), |
| 266 | KEY(0, 5, KEY_Q), |
| 267 | KEY(0, 6, KEY_P), |
| 268 | |
| 269 | KEY(1, 0, KEY_RIGHTCTRL), /* Menu */ |
| 270 | KEY(1, 1, KEY_RIGHT), |
| 271 | KEY(1, 2, KEY_LEFTSHIFT), /* Left shift */ |
| 272 | KEY(1, 3, KEY_Z), |
| 273 | KEY(1, 4, KEY_S), |
| 274 | KEY(1, 5, KEY_W), |
| 275 | |
| 276 | KEY(2, 0, KEY_F1), /* Phone */ |
| 277 | KEY(2, 1, KEY_UP), |
| 278 | KEY(2, 2, KEY_0), |
| 279 | KEY(2, 3, KEY_X), |
| 280 | KEY(2, 4, KEY_D), |
| 281 | KEY(2, 5, KEY_E), |
| 282 | |
| 283 | KEY(3, 0, KEY_F10), /* Calendar */ |
| 284 | KEY(3, 1, KEY_DOWN), |
| 285 | KEY(3, 2, KEY_SPACE), |
| 286 | KEY(3, 3, KEY_C), |
| 287 | KEY(3, 4, KEY_F), |
| 288 | KEY(3, 5, KEY_R), |
| 289 | |
| 290 | KEY(4, 0, KEY_F12), /* Mail */ |
| 291 | KEY(4, 1, KEY_KPENTER), |
| 292 | KEY(4, 2, KEY_RIGHTALT), /* Alt */ |
| 293 | KEY(4, 3, KEY_V), |
| 294 | KEY(4, 4, KEY_G), |
| 295 | KEY(4, 5, KEY_T), |
| 296 | |
| 297 | KEY(5, 0, KEY_F8), /* Red/Off/Power */ |
| 298 | KEY(5, 1, KEY_PAGEUP), /* Side up */ |
| 299 | KEY(5, 2, KEY_DOT), |
| 300 | KEY(5, 3, KEY_B), |
| 301 | KEY(5, 4, KEY_H), |
| 302 | KEY(5, 5, KEY_Y), |
| 303 | |
| 304 | KEY(6, 0, KEY_TAB), /* Side Activate */ |
| 305 | KEY(6, 1, KEY_PAGEDOWN), /* Side down */ |
| 306 | KEY(6, 2, KEY_ENTER), |
| 307 | KEY(6, 3, KEY_N), |
| 308 | KEY(6, 4, KEY_J), |
| 309 | KEY(6, 5, KEY_U), |
| 310 | |
| 311 | KEY(7, 0, KEY_F6), /* Green/Call */ |
| 312 | KEY(7, 1, KEY_O), |
| 313 | KEY(7, 2, KEY_BACKSPACE), |
| 314 | KEY(7, 3, KEY_M), |
| 315 | KEY(7, 4, KEY_K), |
| 316 | KEY(7, 5, KEY_I), |
| 317 | }; |
| 318 | |
| 319 | static struct pxa27x_keypad_platform_data centro_keypad_platform_data = { |
| 320 | .matrix_key_rows = 8, |
| 321 | .matrix_key_cols = 7, |
| 322 | .matrix_key_map = centro_matrix_keys, |
| 323 | .matrix_key_map_size = ARRAY_SIZE(centro_matrix_keys), |
| 324 | .direct_key_map = { KEY_CONNECT }, |
| 325 | .direct_key_num = 1, |
| 326 | |
| 327 | .debounce_interval = 30, |
| 328 | }; |
| 329 | #endif /* CONFIG_MACH_CENTRO */ |
| 330 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 331 | /****************************************************************************** |
| 332 | * aSoC audio |
| 333 | ******************************************************************************/ |
| 334 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 335 | static pxa2xx_audio_ops_t treo_ac97_pdata = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 336 | .reset_gpio = 95, |
| 337 | }; |
| 338 | |
| 339 | /****************************************************************************** |
| 340 | * Backlight |
| 341 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 342 | static int treo_backlight_init(struct device *dev) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 343 | { |
| 344 | int ret; |
| 345 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 346 | ret = gpio_request(GPIO_NR_TREO_BL_POWER, "BL POWER"); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 347 | if (ret) |
| 348 | goto err; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 349 | ret = gpio_direction_output(GPIO_NR_TREO_BL_POWER, 0); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 350 | if (ret) |
| 351 | goto err2; |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 352 | |
| 353 | return 0; |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 354 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 355 | err2: |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 356 | gpio_free(GPIO_NR_TREO_BL_POWER); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 357 | err: |
| 358 | return ret; |
| 359 | } |
| 360 | |
Eric Miao | 2d51a52 | 2010-01-04 11:42:01 +0800 | [diff] [blame] | 361 | static int treo_backlight_notify(struct device *dev, int brightness) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 362 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 363 | gpio_set_value(GPIO_NR_TREO_BL_POWER, brightness); |
| 364 | return TREO_MAX_INTENSITY - brightness; |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 365 | }; |
| 366 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 367 | static void treo_backlight_exit(struct device *dev) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 368 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 369 | gpio_free(GPIO_NR_TREO_BL_POWER); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 370 | } |
| 371 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 372 | static struct platform_pwm_backlight_data treo_backlight_data = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 373 | .pwm_id = 0, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 374 | .max_brightness = TREO_MAX_INTENSITY, |
| 375 | .dft_brightness = TREO_DEFAULT_INTENSITY, |
| 376 | .pwm_period_ns = TREO_PERIOD_NS, |
| 377 | .init = treo_backlight_init, |
| 378 | .notify = treo_backlight_notify, |
| 379 | .exit = treo_backlight_exit, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 380 | }; |
| 381 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 382 | static struct platform_device treo_backlight = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 383 | .name = "pwm-backlight", |
| 384 | .dev = { |
| 385 | .parent = &pxa27x_device_pwm0.dev, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 386 | .platform_data = &treo_backlight_data, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 387 | }, |
| 388 | }; |
| 389 | |
| 390 | /****************************************************************************** |
| 391 | * IrDA |
| 392 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 393 | static struct pxaficp_platform_data treo_ficp_info = { |
| 394 | .gpio_pwdown = GPIO_NR_TREO_IR_EN, |
Marek Vasut | c4bd017 | 2009-07-17 12:50:43 +0200 | [diff] [blame] | 395 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 396 | }; |
| 397 | |
| 398 | /****************************************************************************** |
| 399 | * UDC |
| 400 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 401 | static struct pxa2xx_udc_mach_info treo_udc_info __initdata = { |
| 402 | .gpio_vbus = GPIO_NR_TREO_USB_DETECT, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 403 | .gpio_vbus_inverted = 1, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 404 | .gpio_pullup = GPIO_NR_TREO_USB_PULLUP, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 405 | }; |
| 406 | |
| 407 | |
| 408 | /****************************************************************************** |
| 409 | * USB host |
| 410 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 411 | #ifdef CONFIG_MACH_TREO680 |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 412 | static struct pxaohci_platform_data treo680_ohci_info = { |
| 413 | .port_mode = PMM_PERPORT_MODE, |
| 414 | .flags = ENABLE_PORT1 | ENABLE_PORT3, |
| 415 | .power_budget = 0, |
| 416 | }; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 417 | #endif /* CONFIG_MACH_TREO680 */ |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 418 | |
| 419 | /****************************************************************************** |
| 420 | * Power supply |
| 421 | ******************************************************************************/ |
| 422 | static int power_supply_init(struct device *dev) |
| 423 | { |
| 424 | int ret; |
| 425 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 426 | ret = gpio_request(GPIO_NR_TREO_POWER_DETECT, "CABLE_STATE_AC"); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 427 | if (ret) |
| 428 | goto err1; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 429 | ret = gpio_direction_input(GPIO_NR_TREO_POWER_DETECT); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 430 | if (ret) |
| 431 | goto err2; |
| 432 | |
| 433 | return 0; |
| 434 | |
| 435 | err2: |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 436 | gpio_free(GPIO_NR_TREO_POWER_DETECT); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 437 | err1: |
| 438 | return ret; |
| 439 | } |
| 440 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 441 | static int treo_is_ac_online(void) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 442 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 443 | return gpio_get_value(GPIO_NR_TREO_POWER_DETECT); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | static void power_supply_exit(struct device *dev) |
| 447 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 448 | gpio_free(GPIO_NR_TREO_POWER_DETECT); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 449 | } |
| 450 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 451 | static char *treo_supplicants[] = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 452 | "main-battery", |
| 453 | }; |
| 454 | |
| 455 | static struct pda_power_pdata power_supply_info = { |
| 456 | .init = power_supply_init, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 457 | .is_ac_online = treo_is_ac_online, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 458 | .exit = power_supply_exit, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 459 | .supplied_to = treo_supplicants, |
| 460 | .num_supplicants = ARRAY_SIZE(treo_supplicants), |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 461 | }; |
| 462 | |
| 463 | static struct platform_device power_supply = { |
| 464 | .name = "pda-power", |
| 465 | .id = -1, |
| 466 | .dev = { |
| 467 | .platform_data = &power_supply_info, |
| 468 | }, |
| 469 | }; |
| 470 | |
| 471 | /****************************************************************************** |
| 472 | * Vibra and LEDs |
| 473 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 474 | #ifdef CONFIG_MACH_TREO680 |
| 475 | static struct gpio_led treo680_gpio_leds[] = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 476 | { |
| 477 | .name = "treo680:vibra:vibra", |
| 478 | .default_trigger = "none", |
| 479 | .gpio = GPIO_NR_TREO680_VIBRATE_EN, |
| 480 | }, |
| 481 | { |
| 482 | .name = "treo680:green:led", |
| 483 | .default_trigger = "mmc0", |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 484 | .gpio = GPIO_NR_TREO_GREEN_LED, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 485 | }, |
| 486 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 487 | .name = "treo680:white:keybbl", |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 488 | .default_trigger = "none", |
| 489 | .gpio = GPIO_NR_TREO680_KEYB_BL, |
| 490 | }, |
| 491 | }; |
| 492 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 493 | static struct gpio_led_platform_data treo680_gpio_led_info = { |
| 494 | .leds = treo680_gpio_leds, |
| 495 | .num_leds = ARRAY_SIZE(treo680_gpio_leds), |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 496 | }; |
| 497 | |
| 498 | static struct platform_device treo680_leds = { |
| 499 | .name = "leds-gpio", |
| 500 | .id = -1, |
| 501 | .dev = { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 502 | .platform_data = &treo680_gpio_led_info, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 503 | } |
| 504 | }; |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 505 | #endif /* CONFIG_MACH_TREO680 */ |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 506 | |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 507 | #ifdef CONFIG_MACH_CENTRO |
| 508 | static struct gpio_led centro_gpio_leds[] = { |
| 509 | { |
| 510 | .name = "centro:vibra:vibra", |
| 511 | .default_trigger = "none", |
| 512 | .gpio = GPIO_NR_CENTRO_VIBRATE_EN, |
| 513 | }, |
| 514 | { |
| 515 | .name = "centro:green:led", |
| 516 | .default_trigger = "mmc0", |
| 517 | .gpio = GPIO_NR_TREO_GREEN_LED, |
| 518 | }, |
| 519 | { |
| 520 | .name = "centro:white:keybbl", |
| 521 | .default_trigger = "none", |
| 522 | .active_low = 1, |
| 523 | .gpio = GPIO_NR_CENTRO_KEYB_BL, |
| 524 | }, |
| 525 | }; |
| 526 | |
| 527 | static struct gpio_led_platform_data centro_gpio_led_info = { |
| 528 | .leds = centro_gpio_leds, |
| 529 | .num_leds = ARRAY_SIZE(centro_gpio_leds), |
| 530 | }; |
| 531 | |
| 532 | static struct platform_device centro_leds = { |
| 533 | .name = "leds-gpio", |
| 534 | .id = -1, |
| 535 | .dev = { |
| 536 | .platform_data = ¢ro_gpio_led_info, |
| 537 | } |
| 538 | }; |
| 539 | #endif /* CONFIG_MACH_CENTRO */ |
| 540 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 541 | /****************************************************************************** |
| 542 | * Framebuffer |
| 543 | ******************************************************************************/ |
| 544 | /* TODO: add support for 324x324 */ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 545 | static struct pxafb_mode_info treo_lcd_modes[] = { |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 546 | { |
| 547 | .pixclock = 86538, |
| 548 | .xres = 320, |
| 549 | .yres = 320, |
| 550 | .bpp = 16, |
| 551 | |
| 552 | .left_margin = 20, |
| 553 | .right_margin = 8, |
| 554 | .upper_margin = 8, |
| 555 | .lower_margin = 5, |
| 556 | |
| 557 | .hsync_len = 4, |
| 558 | .vsync_len = 1, |
| 559 | }, |
| 560 | }; |
| 561 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 562 | static void treo_lcd_power(int on, struct fb_var_screeninfo *info) |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 563 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 564 | gpio_set_value(GPIO_NR_TREO_BL_POWER, on); |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 565 | } |
| 566 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 567 | static struct pxafb_mach_info treo_lcd_screen = { |
| 568 | .modes = treo_lcd_modes, |
| 569 | .num_modes = ARRAY_SIZE(treo_lcd_modes), |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 570 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
| 571 | }; |
| 572 | |
| 573 | /****************************************************************************** |
| 574 | * Power management - standby |
| 575 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 576 | static void __init treo_pm_init(void) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 577 | { |
| 578 | static u32 resume[] = { |
| 579 | 0xe3a00101, /* mov r0, #0x40000000 */ |
| 580 | 0xe380060f, /* orr r0, r0, #0x00f00000 */ |
| 581 | 0xe590f008, /* ldr pc, [r0, #0x08] */ |
| 582 | }; |
| 583 | |
| 584 | /* this is where the bootloader jumps */ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 585 | memcpy(phys_to_virt(TREO_STR_BASE), resume, sizeof(resume)); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 586 | } |
| 587 | |
| 588 | /****************************************************************************** |
| 589 | * Machine init |
| 590 | ******************************************************************************/ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 591 | static struct platform_device *treo_devices[] __initdata = { |
| 592 | &treo_backlight, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 593 | &power_supply, |
| 594 | }; |
| 595 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 596 | #ifdef CONFIG_MACH_TREO680 |
| 597 | static struct platform_device *treo680_devices[] __initdata = { |
| 598 | &treo680_leds, |
| 599 | }; |
| 600 | #endif /* CONFIG_MACH_TREO680 */ |
| 601 | |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 602 | #ifdef CONFIG_MACH_CENTRO |
| 603 | static struct platform_device *centro_devices[] __initdata = { |
| 604 | ¢ro_leds, |
| 605 | }; |
| 606 | #endif /* CONFIG_MACH_CENTRO */ |
| 607 | |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 608 | /* setup udc GPIOs initial state */ |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 609 | static void __init treo_udc_init(void) |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 610 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 611 | if (!gpio_request(GPIO_NR_TREO_USB_PULLUP, "UDC Vbus")) { |
| 612 | gpio_direction_output(GPIO_NR_TREO_USB_PULLUP, 1); |
| 613 | gpio_free(GPIO_NR_TREO_USB_PULLUP); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 614 | } |
| 615 | } |
| 616 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 617 | static void __init treo_lcd_power_init(void) |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 618 | { |
| 619 | int ret; |
| 620 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 621 | ret = gpio_request(GPIO_NR_TREO_LCD_POWER, "LCD POWER"); |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 622 | if (ret) { |
| 623 | pr_err("Treo680: LCD power GPIO request failed!\n"); |
| 624 | return; |
| 625 | } |
| 626 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 627 | ret = gpio_direction_output(GPIO_NR_TREO_LCD_POWER, 0); |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 628 | if (ret) { |
| 629 | pr_err("Treo680: setting LCD power GPIO direction failed!\n"); |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 630 | gpio_free(GPIO_NR_TREO_LCD_POWER); |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 631 | return; |
| 632 | } |
| 633 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 634 | treo_lcd_screen.pxafb_lcd_power = treo_lcd_power; |
Tomáš Čech | 28d7a94 | 2009-09-03 16:55:47 +0200 | [diff] [blame] | 635 | } |
| 636 | |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 637 | static void __init treo_reserve(void) |
| 638 | { |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 639 | memblock_reserve(0xa0000000, 0x1000); |
| 640 | memblock_reserve(0xa2000000, 0x1000); |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 641 | } |
| 642 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 643 | static void __init treo_init(void) |
| 644 | { |
Russell King | cc155c6 | 2009-11-09 13:34:08 +0800 | [diff] [blame] | 645 | pxa_set_ffuart_info(NULL); |
| 646 | pxa_set_btuart_info(NULL); |
| 647 | pxa_set_stuart_info(NULL); |
| 648 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 649 | treo_pm_init(); |
| 650 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo_pin_config)); |
| 651 | treo_lcd_power_init(); |
| 652 | set_pxa_fb_info(&treo_lcd_screen); |
| 653 | treo_udc_init(); |
| 654 | pxa_set_udc_info(&treo_udc_info); |
| 655 | pxa_set_ac97_info(&treo_ac97_pdata); |
| 656 | pxa_set_ficp_info(&treo_ficp_info); |
| 657 | |
| 658 | platform_add_devices(ARRAY_AND_SIZE(treo_devices)); |
| 659 | } |
| 660 | |
| 661 | #ifdef CONFIG_MACH_TREO680 |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 662 | static void __init treo680_init(void) |
| 663 | { |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 664 | treo_init(); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 665 | pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 666 | pxa_set_mci_info(&treo680_mci_platform_data); |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 667 | pxa_set_keypad_info(&treo680_keypad_platform_data); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 668 | pxa_set_ohci_info(&treo680_ohci_info); |
| 669 | |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 670 | platform_add_devices(ARRAY_AND_SIZE(treo680_devices)); |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 671 | } |
| 672 | |
| 673 | MACHINE_START(TREO680, "Palm Treo 680") |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 674 | .phys_io = TREO_PHYS_IO_START, |
| 675 | .io_pg_offst = io_p2v(0x40000000), |
| 676 | .boot_params = 0xa0000100, |
| 677 | .map_io = pxa_map_io, |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 678 | .reserve = treo_reserve, |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 679 | .init_irq = pxa27x_init_irq, |
| 680 | .timer = &pxa_timer, |
| 681 | .init_machine = treo680_init, |
Tomas 'Sleep_Walker' Cech | e6c3f4b | 2009-05-18 15:24:14 +0200 | [diff] [blame] | 682 | MACHINE_END |
Tomáš Čech | bb2ae8f | 2009-09-11 13:57:01 +0200 | [diff] [blame] | 683 | #endif /* CONFIG_MACH_TREO680 */ |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 684 | |
| 685 | #ifdef CONFIG_MACH_CENTRO |
| 686 | static void __init centro_init(void) |
| 687 | { |
| 688 | treo_init(); |
| 689 | pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config)); |
| 690 | pxa_set_mci_info(¢ro_mci_platform_data); |
| 691 | |
| 692 | pxa_set_keypad_info(¢ro_keypad_platform_data); |
| 693 | |
| 694 | platform_add_devices(ARRAY_AND_SIZE(centro_devices)); |
| 695 | } |
| 696 | |
| 697 | MACHINE_START(CENTRO, "Palm Centro 685") |
| 698 | .phys_io = TREO_PHYS_IO_START, |
| 699 | .io_pg_offst = io_p2v(0x40000000), |
| 700 | .boot_params = 0xa0000100, |
| 701 | .map_io = pxa_map_io, |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 702 | .reserve = treo_reserve, |
Tomáš Čech | d0a92fd | 2009-09-11 13:57:02 +0200 | [diff] [blame] | 703 | .init_irq = pxa27x_init_irq, |
| 704 | .timer = &pxa_timer, |
| 705 | .init_machine = centro_init, |
| 706 | MACHINE_END |
| 707 | #endif /* CONFIG_MACH_CENTRO */ |