Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Hardware definitions for PalmTX |
| 3 | * |
| 4 | * Author: Marek Vasut <marek.vasut@gmail.com> |
| 5 | * |
| 6 | * Based on work of: |
| 7 | * Alex Osborne <ato@meshy.org> |
| 8 | * Cristiano P. <cristianop@users.sourceforge.net> |
| 9 | * Jan Herman <2hp@seznam.cz> |
| 10 | * Michal Hrusecky |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License version 2 as |
| 14 | * published by the Free Software Foundation. |
| 15 | * |
| 16 | * (find more info at www.hackndev.com) |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/delay.h> |
| 22 | #include <linux/irq.h> |
| 23 | #include <linux/gpio_keys.h> |
| 24 | #include <linux/input.h> |
Marek Vašut | d4b19c4 | 2008-07-07 17:31:58 +0100 | [diff] [blame] | 25 | #include <linux/pda_power.h> |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 26 | #include <linux/pwm_backlight.h> |
| 27 | #include <linux/gpio.h> |
Marek Vasut | 241cf47 | 2010-06-04 03:07:33 +0200 | [diff] [blame] | 28 | #include <linux/wm97xx.h> |
Marek Vašut | 4e9687d | 2008-09-11 19:37:32 +0100 | [diff] [blame] | 29 | #include <linux/power_supply.h> |
Marek Vasut | 8768dc9 | 2009-04-23 11:12:37 +0200 | [diff] [blame] | 30 | #include <linux/usb/gpio_vbus.h> |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 31 | #include <linux/mtd/nand.h> |
| 32 | #include <linux/mtd/partitions.h> |
Marek Vasut | 91cf6a9 | 2009-07-27 02:07:41 +0200 | [diff] [blame] | 33 | #include <linux/mtd/mtd.h> |
| 34 | #include <linux/mtd/physmap.h> |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 35 | |
| 36 | #include <asm/mach-types.h> |
| 37 | #include <asm/mach/arch.h> |
| 38 | #include <asm/mach/map.h> |
| 39 | |
Eric Miao | 51c6298 | 2009-01-02 23:17:22 +0800 | [diff] [blame] | 40 | #include <mach/pxa27x.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 41 | #include <mach/audio.h> |
| 42 | #include <mach/palmtx.h> |
Arnd Bergmann | 293b2da | 2012-08-24 15:16:48 +0200 | [diff] [blame] | 43 | #include <linux/platform_data/mmc-pxamci.h> |
| 44 | #include <linux/platform_data/video-pxafb.h> |
| 45 | #include <linux/platform_data/irda-pxaficp.h> |
| 46 | #include <linux/platform_data/keypad-pxa27x.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 47 | #include <mach/udc.h> |
Arnd Bergmann | 293b2da | 2012-08-24 15:16:48 +0200 | [diff] [blame] | 48 | #include <linux/platform_data/asoc-palm27x.h> |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 49 | #include <mach/palm27x.h> |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 50 | |
| 51 | #include "generic.h" |
| 52 | #include "devices.h" |
| 53 | |
| 54 | /****************************************************************************** |
| 55 | * Pin configuration |
| 56 | ******************************************************************************/ |
| 57 | static unsigned long palmtx_pin_config[] __initdata = { |
| 58 | /* MMC */ |
| 59 | GPIO32_MMC_CLK, |
| 60 | GPIO92_MMC_DAT_0, |
| 61 | GPIO109_MMC_DAT_1, |
| 62 | GPIO110_MMC_DAT_2, |
| 63 | GPIO111_MMC_DAT_3, |
| 64 | GPIO112_MMC_CMD, |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 65 | GPIO14_GPIO, /* SD detect */ |
| 66 | GPIO114_GPIO, /* SD power */ |
| 67 | GPIO115_GPIO, /* SD r/o switch */ |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 68 | |
| 69 | /* AC97 */ |
| 70 | GPIO28_AC97_BITCLK, |
| 71 | GPIO29_AC97_SDATA_IN_0, |
| 72 | GPIO30_AC97_SDATA_OUT, |
| 73 | GPIO31_AC97_SYNC, |
Marek Vasut | 6ec04f4 | 2009-05-22 01:39:10 +0200 | [diff] [blame] | 74 | GPIO89_AC97_SYSCLK, |
Marek Vasut | efb12cd | 2009-04-12 16:37:23 +0200 | [diff] [blame] | 75 | GPIO95_AC97_nRESET, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 76 | |
| 77 | /* IrDA */ |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 78 | GPIO40_GPIO, /* ir disable */ |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 79 | GPIO46_FICP_RXD, |
| 80 | GPIO47_FICP_TXD, |
| 81 | |
| 82 | /* PWM */ |
| 83 | GPIO16_PWM0_OUT, |
| 84 | |
| 85 | /* USB */ |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 86 | GPIO13_GPIO, /* usb detect */ |
Marek Vasut | efb12cd | 2009-04-12 16:37:23 +0200 | [diff] [blame] | 87 | GPIO93_GPIO, /* usb power */ |
Marek Vašut | 3597840 | 2008-07-07 17:28:59 +0100 | [diff] [blame] | 88 | |
| 89 | /* PCMCIA */ |
| 90 | GPIO48_nPOE, |
| 91 | GPIO49_nPWE, |
| 92 | GPIO50_nPIOR, |
| 93 | GPIO51_nPIOW, |
| 94 | GPIO85_nPCE_1, |
| 95 | GPIO54_nPCE_2, |
| 96 | GPIO79_PSKTSEL, |
| 97 | GPIO55_nPREG, |
| 98 | GPIO56_nPWAIT, |
| 99 | GPIO57_nIOIS16, |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 100 | GPIO94_GPIO, /* wifi power 1 */ |
| 101 | GPIO108_GPIO, /* wifi power 2 */ |
| 102 | GPIO116_GPIO, /* wifi ready */ |
| 103 | |
| 104 | /* MATRIX KEYPAD */ |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 105 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
| 106 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
| 107 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
| 108 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 109 | GPIO103_KP_MKOUT_0, |
| 110 | GPIO104_KP_MKOUT_1, |
| 111 | GPIO105_KP_MKOUT_2, |
| 112 | |
| 113 | /* LCD */ |
Eric Miao | bedbda9 | 2010-01-04 11:37:14 +0800 | [diff] [blame] | 114 | GPIOxx_LCD_TFT_16BPP, |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 115 | |
Marek Vasut | ecf763c | 2009-07-16 19:37:29 +0200 | [diff] [blame] | 116 | /* FFUART */ |
| 117 | GPIO34_FFUART_RXD, |
| 118 | GPIO39_FFUART_TXD, |
| 119 | |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 120 | /* NAND */ |
| 121 | GPIO15_nCS_1, |
| 122 | GPIO18_RDY, |
| 123 | |
Marek Vasut | a730b32 | 2008-11-20 17:34:57 +0100 | [diff] [blame] | 124 | /* MISC. */ |
| 125 | GPIO10_GPIO, /* hotsync button */ |
| 126 | GPIO12_GPIO, /* power detect */ |
| 127 | GPIO107_GPIO, /* earphone detect */ |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 128 | }; |
| 129 | |
| 130 | /****************************************************************************** |
Marek Vasut | 91cf6a9 | 2009-07-27 02:07:41 +0200 | [diff] [blame] | 131 | * NOR Flash |
| 132 | ******************************************************************************/ |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 133 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
Marek Vasut | 91cf6a9 | 2009-07-27 02:07:41 +0200 | [diff] [blame] | 134 | static struct mtd_partition palmtx_partitions[] = { |
| 135 | { |
| 136 | .name = "Flash", |
| 137 | .offset = 0x00000000, |
| 138 | .size = MTDPART_SIZ_FULL, |
| 139 | .mask_flags = 0 |
| 140 | } |
| 141 | }; |
| 142 | |
| 143 | static struct physmap_flash_data palmtx_flash_data[] = { |
| 144 | { |
| 145 | .width = 2, /* bankwidth in bytes */ |
| 146 | .parts = palmtx_partitions, |
| 147 | .nr_parts = ARRAY_SIZE(palmtx_partitions) |
| 148 | } |
| 149 | }; |
| 150 | |
| 151 | static struct resource palmtx_flash_resource = { |
| 152 | .start = PXA_CS0_PHYS, |
| 153 | .end = PXA_CS0_PHYS + SZ_8M - 1, |
| 154 | .flags = IORESOURCE_MEM, |
| 155 | }; |
| 156 | |
| 157 | static struct platform_device palmtx_flash = { |
| 158 | .name = "physmap-flash", |
| 159 | .id = 0, |
| 160 | .resource = &palmtx_flash_resource, |
| 161 | .num_resources = 1, |
| 162 | .dev = { |
| 163 | .platform_data = palmtx_flash_data, |
| 164 | }, |
| 165 | }; |
| 166 | |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 167 | static void __init palmtx_nor_init(void) |
| 168 | { |
| 169 | platform_device_register(&palmtx_flash); |
| 170 | } |
| 171 | #else |
| 172 | static inline void palmtx_nor_init(void) {} |
| 173 | #endif |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 174 | |
| 175 | /****************************************************************************** |
| 176 | * GPIO keyboard |
| 177 | ******************************************************************************/ |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 178 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
Chao Xie | 0a085a9 | 2013-05-05 20:24:58 -0700 | [diff] [blame] | 179 | static const unsigned int palmtx_matrix_keys[] = { |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 180 | KEY(0, 0, KEY_POWER), |
| 181 | KEY(0, 1, KEY_F1), |
| 182 | KEY(0, 2, KEY_ENTER), |
| 183 | |
| 184 | KEY(1, 0, KEY_F2), |
| 185 | KEY(1, 1, KEY_F3), |
| 186 | KEY(1, 2, KEY_F4), |
| 187 | |
| 188 | KEY(2, 0, KEY_UP), |
| 189 | KEY(2, 2, KEY_DOWN), |
| 190 | |
| 191 | KEY(3, 0, KEY_RIGHT), |
| 192 | KEY(3, 2, KEY_LEFT), |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 193 | }; |
| 194 | |
Chao Xie | 0a085a9 | 2013-05-05 20:24:58 -0700 | [diff] [blame] | 195 | static struct matrix_keymap_data palmtx_matrix_keymap_data = { |
| 196 | .keymap = palmtx_matrix_keys, |
| 197 | .keymap_size = ARRAY_SIZE(palmtx_matrix_keys), |
| 198 | }; |
| 199 | |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 200 | static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = { |
| 201 | .matrix_key_rows = 4, |
| 202 | .matrix_key_cols = 3, |
Chao Xie | 0a085a9 | 2013-05-05 20:24:58 -0700 | [diff] [blame] | 203 | .matrix_keymap_data = &palmtx_matrix_keymap_data, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 204 | |
| 205 | .debounce_interval = 30, |
| 206 | }; |
| 207 | |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 208 | static void __init palmtx_kpc_init(void) |
| 209 | { |
| 210 | pxa_set_keypad_info(&palmtx_keypad_platform_data); |
| 211 | } |
| 212 | #else |
| 213 | static inline void palmtx_kpc_init(void) {} |
| 214 | #endif |
| 215 | |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 216 | /****************************************************************************** |
| 217 | * GPIO keys |
| 218 | ******************************************************************************/ |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 219 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 220 | static struct gpio_keys_button palmtx_pxa_buttons[] = { |
| 221 | {KEY_F8, GPIO_NR_PALMTX_HOTSYNC_BUTTON_N, 1, "HotSync Button" }, |
| 222 | }; |
| 223 | |
| 224 | static struct gpio_keys_platform_data palmtx_pxa_keys_data = { |
| 225 | .buttons = palmtx_pxa_buttons, |
| 226 | .nbuttons = ARRAY_SIZE(palmtx_pxa_buttons), |
| 227 | }; |
| 228 | |
| 229 | static struct platform_device palmtx_pxa_keys = { |
| 230 | .name = "gpio-keys", |
| 231 | .id = -1, |
| 232 | .dev = { |
| 233 | .platform_data = &palmtx_pxa_keys_data, |
| 234 | }, |
| 235 | }; |
| 236 | |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 237 | static void __init palmtx_keys_init(void) |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 238 | { |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 239 | platform_device_register(&palmtx_pxa_keys); |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 240 | } |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 241 | #else |
| 242 | static inline void palmtx_keys_init(void) {} |
| 243 | #endif |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 244 | |
| 245 | /****************************************************************************** |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 246 | * NAND Flash |
| 247 | ******************************************************************************/ |
Marek Vasut | 9f1ee15 | 2010-11-06 23:34:03 +0100 | [diff] [blame] | 248 | #if defined(CONFIG_MTD_NAND_PLATFORM) || \ |
| 249 | defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 250 | static void palmtx_nand_cmd_ctl(struct mtd_info *mtd, int cmd, |
| 251 | unsigned int ctrl) |
| 252 | { |
| 253 | struct nand_chip *this = mtd->priv; |
Arnd Bergmann | 97b09da | 2011-10-01 22:03:45 +0200 | [diff] [blame] | 254 | char __iomem *nandaddr = this->IO_ADDR_W; |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 255 | |
| 256 | if (cmd == NAND_CMD_NONE) |
| 257 | return; |
| 258 | |
| 259 | if (ctrl & NAND_CLE) |
| 260 | writeb(cmd, PALMTX_NAND_CLE_VIRT); |
| 261 | else if (ctrl & NAND_ALE) |
| 262 | writeb(cmd, PALMTX_NAND_ALE_VIRT); |
| 263 | else |
| 264 | writeb(cmd, nandaddr); |
| 265 | } |
| 266 | |
| 267 | static struct mtd_partition palmtx_partition_info[] = { |
| 268 | [0] = { |
| 269 | .name = "palmtx-0", |
| 270 | .offset = 0, |
| 271 | .size = MTDPART_SIZ_FULL |
| 272 | }, |
| 273 | }; |
| 274 | |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 275 | struct platform_nand_data palmtx_nand_platdata = { |
| 276 | .chip = { |
| 277 | .nr_chips = 1, |
| 278 | .chip_offset = 0, |
| 279 | .nr_partitions = ARRAY_SIZE(palmtx_partition_info), |
| 280 | .partitions = palmtx_partition_info, |
| 281 | .chip_delay = 20, |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 282 | }, |
| 283 | .ctrl = { |
| 284 | .cmd_ctrl = palmtx_nand_cmd_ctl, |
| 285 | }, |
| 286 | }; |
| 287 | |
| 288 | static struct resource palmtx_nand_resource[] = { |
| 289 | [0] = { |
| 290 | .start = PXA_CS1_PHYS, |
| 291 | .end = PXA_CS1_PHYS + SZ_1M - 1, |
| 292 | .flags = IORESOURCE_MEM, |
| 293 | }, |
| 294 | }; |
| 295 | |
| 296 | static struct platform_device palmtx_nand = { |
| 297 | .name = "gen_nand", |
| 298 | .num_resources = ARRAY_SIZE(palmtx_nand_resource), |
| 299 | .resource = palmtx_nand_resource, |
| 300 | .id = -1, |
| 301 | .dev = { |
| 302 | .platform_data = &palmtx_nand_platdata, |
| 303 | } |
| 304 | }; |
| 305 | |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 306 | static void __init palmtx_nand_init(void) |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 307 | { |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 308 | platform_device_register(&palmtx_nand); |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 309 | } |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 310 | #else |
| 311 | static inline void palmtx_nand_init(void) {} |
| 312 | #endif |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 313 | |
Marek Vasut | 81854f8 | 2009-03-28 12:37:42 +0100 | [diff] [blame] | 314 | /****************************************************************************** |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 315 | * Machine init |
| 316 | ******************************************************************************/ |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 317 | static struct map_desc palmtx_io_desc[] __initdata = { |
| 318 | { |
Arnd Bergmann | 97b09da | 2011-10-01 22:03:45 +0200 | [diff] [blame] | 319 | .virtual = (unsigned long)PALMTX_PCMCIA_VIRT, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 320 | .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS), |
| 321 | .length = PALMTX_PCMCIA_SIZE, |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 322 | .type = MT_DEVICE, |
| 323 | }, { |
Arnd Bergmann | 97b09da | 2011-10-01 22:03:45 +0200 | [diff] [blame] | 324 | .virtual = (unsigned long)PALMTX_NAND_ALE_VIRT, |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 325 | .pfn = __phys_to_pfn(PALMTX_NAND_ALE_PHYS), |
| 326 | .length = SZ_1M, |
| 327 | .type = MT_DEVICE, |
| 328 | }, { |
Arnd Bergmann | 97b09da | 2011-10-01 22:03:45 +0200 | [diff] [blame] | 329 | .virtual = (unsigned long)PALMTX_NAND_CLE_VIRT, |
Marek Vasut | 3eb37ff | 2009-07-18 16:51:41 +0200 | [diff] [blame] | 330 | .pfn = __phys_to_pfn(PALMTX_NAND_CLE_PHYS), |
| 331 | .length = SZ_1M, |
| 332 | .type = MT_DEVICE, |
| 333 | } |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 334 | }; |
| 335 | |
| 336 | static void __init palmtx_map_io(void) |
| 337 | { |
Marek Vasut | 851982c | 2010-10-11 02:20:19 +0200 | [diff] [blame] | 338 | pxa27x_map_io(); |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 339 | iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc)); |
| 340 | } |
| 341 | |
| 342 | static void __init palmtx_init(void) |
| 343 | { |
| 344 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); |
Russell King | cc155c6 | 2009-11-09 13:34:08 +0800 | [diff] [blame] | 345 | pxa_set_ffuart_info(NULL); |
| 346 | pxa_set_btuart_info(NULL); |
| 347 | pxa_set_stuart_info(NULL); |
| 348 | |
Marek Vasut | 31620e2 | 2010-07-13 08:16:45 +0200 | [diff] [blame] | 349 | palm27x_mmc_init(GPIO_NR_PALMTX_SD_DETECT_N, GPIO_NR_PALMTX_SD_READONLY, |
| 350 | GPIO_NR_PALMTX_SD_POWER, 0); |
| 351 | palm27x_pm_init(PALMTX_STR_BASE); |
| 352 | palm27x_lcd_init(-1, &palm_320x480_lcd_mode); |
| 353 | palm27x_udc_init(GPIO_NR_PALMTX_USB_DETECT_N, |
| 354 | GPIO_NR_PALMTX_USB_PULLUP, 1); |
| 355 | palm27x_irda_init(GPIO_NR_PALMTX_IR_DISABLE); |
| 356 | palm27x_ac97_init(PALMTX_BAT_MIN_VOLTAGE, PALMTX_BAT_MAX_VOLTAGE, |
| 357 | GPIO_NR_PALMTX_EARPHONE_DETECT, 95); |
| 358 | palm27x_pwm_init(GPIO_NR_PALMTX_BL_POWER, GPIO_NR_PALMTX_LCD_POWER); |
| 359 | palm27x_power_init(GPIO_NR_PALMTX_POWER_DETECT, -1); |
| 360 | palm27x_pmic_init(); |
| 361 | palmtx_kpc_init(); |
| 362 | palmtx_keys_init(); |
| 363 | palmtx_nor_init(); |
| 364 | palmtx_nand_init(); |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 365 | } |
| 366 | |
| 367 | MACHINE_START(PALMTX, "Palm T|X") |
Nicolas Pitre | 7375aba | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 368 | .atag_offset = 0x100, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 369 | .map_io = palmtx_map_io, |
Rob Herring | 4e61109 | 2012-01-03 16:53:48 -0600 | [diff] [blame] | 370 | .nr_irqs = PXA_NR_IRQS, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 371 | .init_irq = pxa27x_init_irq, |
Eric Miao | 8a97ae2 | 2011-05-18 21:30:04 +0800 | [diff] [blame] | 372 | .handle_irq = pxa27x_handle_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 373 | .init_time = pxa_timer_init, |
Russell King | 271a74f | 2011-11-04 14:15:53 +0000 | [diff] [blame] | 374 | .init_machine = palmtx_init, |
| 375 | .restart = pxa_restart, |
Marek Vašut | b5e4ad5 | 2008-07-07 17:25:46 +0100 | [diff] [blame] | 376 | MACHINE_END |