eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-pxa/zylonite.c |
| 3 | * |
| 4 | * Support for the PXA3xx Development Platform (aka Zylonite) |
| 5 | * |
| 6 | * Copyright (C) 2006 Marvell International Ltd. |
| 7 | * |
eric miao | e9bba8e | 2007-10-30 08:01:38 +0100 | [diff] [blame] | 8 | * 2007-09-04: eric miao <eric.miao@marvell.com> |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 9 | * rewrite to align with latest kernel |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/kernel.h> |
| 18 | #include <linux/interrupt.h> |
| 19 | #include <linux/init.h> |
| 20 | #include <linux/platform_device.h> |
Eric Miao | 80796f2 | 2008-11-25 11:03:03 +0800 | [diff] [blame] | 21 | #include <linux/gpio.h> |
eric miao | 5cca914 | 2008-04-13 21:46:34 +0100 | [diff] [blame] | 22 | #include <linux/pwm_backlight.h> |
Eric Miao | 88c36eb | 2008-06-24 16:47:37 +0800 | [diff] [blame] | 23 | #include <linux/smc91x.h> |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 24 | |
| 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 27 | #include <mach/hardware.h> |
| 28 | #include <mach/audio.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 29 | #include <mach/pxafb.h> |
| 30 | #include <mach/zylonite.h> |
| 31 | #include <mach/mmc.h> |
Eric Miao | 7ff4353 | 2008-09-27 18:05:49 +0800 | [diff] [blame] | 32 | #include <mach/ohci.h> |
Mark F. Brown | 4a2490e | 2010-09-03 18:28:06 -0400 | [diff] [blame] | 33 | #include <plat/pxa27x_keypad.h> |
Haojian Zhuang | 82b95ec | 2009-09-10 13:55:23 +0800 | [diff] [blame] | 34 | #include <plat/pxa3xx_nand.h> |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 35 | |
eric miao | 5cca914 | 2008-04-13 21:46:34 +0100 | [diff] [blame] | 36 | #include "devices.h" |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 37 | #include "generic.h" |
| 38 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 39 | int gpio_eth_irq; |
Eric Miao | 5c9f50e | 2008-06-17 19:03:54 +0800 | [diff] [blame] | 40 | int gpio_debug_led1; |
| 41 | int gpio_debug_led2; |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 42 | |
Mark Brown | 768dec4 | 2008-04-15 15:50:49 +0100 | [diff] [blame] | 43 | int wm9713_irq; |
| 44 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 45 | int lcd_id; |
| 46 | int lcd_orientation; |
| 47 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 48 | struct platform_device pxa_device_wm9713_audio = { |
| 49 | .name = "wm9713-codec", |
| 50 | .id = -1, |
| 51 | }; |
| 52 | |
| 53 | static void __init zylonite_init_wm9713_audio(void) |
| 54 | { |
| 55 | platform_device_register(&pxa_device_wm9713_audio); |
| 56 | } |
| 57 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 58 | static struct resource smc91x_resources[] = { |
| 59 | [0] = { |
| 60 | .start = ZYLONITE_ETH_PHYS + 0x300, |
| 61 | .end = ZYLONITE_ETH_PHYS + 0xfffff, |
| 62 | .flags = IORESOURCE_MEM, |
| 63 | }, |
| 64 | [1] = { |
| 65 | .start = -1, /* for run-time assignment */ |
| 66 | .end = -1, |
Russell King | e7b3dc7 | 2008-01-14 22:30:10 +0000 | [diff] [blame] | 67 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 68 | } |
| 69 | }; |
| 70 | |
Eric Miao | 88c36eb | 2008-06-24 16:47:37 +0800 | [diff] [blame] | 71 | static struct smc91x_platdata zylonite_smc91x_info = { |
| 72 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | |
| 73 | SMC91X_NOWAIT | SMC91X_USE_DMA, |
| 74 | }; |
| 75 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 76 | static struct platform_device smc91x_device = { |
| 77 | .name = "smc91x", |
| 78 | .id = 0, |
| 79 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 80 | .resource = smc91x_resources, |
Eric Miao | 88c36eb | 2008-06-24 16:47:37 +0800 | [diff] [blame] | 81 | .dev = { |
| 82 | .platform_data = &zylonite_smc91x_info, |
| 83 | }, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 84 | }; |
| 85 | |
Eric Miao | 5c9f50e | 2008-06-17 19:03:54 +0800 | [diff] [blame] | 86 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
| 87 | static struct gpio_led zylonite_debug_leds[] = { |
| 88 | [0] = { |
| 89 | .name = "zylonite:yellow:1", |
| 90 | .default_trigger = "heartbeat", |
| 91 | }, |
| 92 | [1] = { |
| 93 | .name = "zylonite:yellow:2", |
| 94 | .default_trigger = "default-on", |
| 95 | }, |
| 96 | }; |
| 97 | |
| 98 | static struct gpio_led_platform_data zylonite_debug_leds_info = { |
| 99 | .leds = zylonite_debug_leds, |
| 100 | .num_leds = ARRAY_SIZE(zylonite_debug_leds), |
| 101 | }; |
| 102 | |
| 103 | static struct platform_device zylonite_device_leds = { |
| 104 | .name = "leds-gpio", |
| 105 | .id = -1, |
| 106 | .dev = { |
| 107 | .platform_data = &zylonite_debug_leds_info, |
| 108 | } |
| 109 | }; |
| 110 | |
| 111 | static void __init zylonite_init_leds(void) |
| 112 | { |
| 113 | zylonite_debug_leds[0].gpio = gpio_debug_led1; |
| 114 | zylonite_debug_leds[1].gpio = gpio_debug_led2; |
| 115 | |
| 116 | platform_device_register(&zylonite_device_leds); |
| 117 | } |
| 118 | #else |
| 119 | static inline void zylonite_init_leds(void) {} |
| 120 | #endif |
| 121 | |
eric miao | 7a987e8 | 2008-02-27 02:00:26 +0100 | [diff] [blame] | 122 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
eric miao | 5cca914 | 2008-04-13 21:46:34 +0100 | [diff] [blame] | 123 | static struct platform_pwm_backlight_data zylonite_backlight_data = { |
| 124 | .pwm_id = 3, |
| 125 | .max_brightness = 100, |
| 126 | .dft_brightness = 100, |
| 127 | .pwm_period_ns = 10000, |
| 128 | }; |
| 129 | |
| 130 | static struct platform_device zylonite_backlight_device = { |
| 131 | .name = "pwm-backlight", |
| 132 | .dev = { |
| 133 | .parent = &pxa27x_device_pwm1.dev, |
| 134 | .platform_data = &zylonite_backlight_data, |
| 135 | }, |
| 136 | }; |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 137 | |
| 138 | static struct pxafb_mode_info toshiba_ltm035a776c_mode = { |
| 139 | .pixclock = 110000, |
| 140 | .xres = 240, |
| 141 | .yres = 320, |
| 142 | .bpp = 16, |
| 143 | .hsync_len = 4, |
| 144 | .left_margin = 6, |
| 145 | .right_margin = 4, |
| 146 | .vsync_len = 2, |
| 147 | .upper_margin = 2, |
| 148 | .lower_margin = 3, |
| 149 | .sync = FB_SYNC_VERT_HIGH_ACT, |
| 150 | }; |
| 151 | |
| 152 | static struct pxafb_mode_info toshiba_ltm04c380k_mode = { |
| 153 | .pixclock = 50000, |
| 154 | .xres = 640, |
| 155 | .yres = 480, |
| 156 | .bpp = 16, |
| 157 | .hsync_len = 1, |
| 158 | .left_margin = 0x9f, |
| 159 | .right_margin = 1, |
| 160 | .vsync_len = 44, |
| 161 | .upper_margin = 0, |
| 162 | .lower_margin = 0, |
| 163 | .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, |
| 164 | }; |
| 165 | |
| 166 | static struct pxafb_mach_info zylonite_toshiba_lcd_info = { |
| 167 | .num_modes = 1, |
eric miao | 0454bd0 | 2008-04-30 00:52:23 -0700 | [diff] [blame] | 168 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | static struct pxafb_mode_info sharp_ls037_modes[] = { |
| 172 | [0] = { |
| 173 | .pixclock = 158000, |
| 174 | .xres = 240, |
| 175 | .yres = 320, |
| 176 | .bpp = 16, |
| 177 | .hsync_len = 4, |
| 178 | .left_margin = 39, |
| 179 | .right_margin = 39, |
| 180 | .vsync_len = 1, |
| 181 | .upper_margin = 2, |
| 182 | .lower_margin = 3, |
| 183 | .sync = 0, |
| 184 | }, |
| 185 | [1] = { |
| 186 | .pixclock = 39700, |
| 187 | .xres = 480, |
| 188 | .yres = 640, |
| 189 | .bpp = 16, |
| 190 | .hsync_len = 8, |
| 191 | .left_margin = 81, |
| 192 | .right_margin = 81, |
| 193 | .vsync_len = 1, |
| 194 | .upper_margin = 2, |
| 195 | .lower_margin = 7, |
| 196 | .sync = 0, |
| 197 | }, |
| 198 | }; |
| 199 | |
| 200 | static struct pxafb_mach_info zylonite_sharp_lcd_info = { |
| 201 | .modes = sharp_ls037_modes, |
| 202 | .num_modes = 2, |
eric miao | 0454bd0 | 2008-04-30 00:52:23 -0700 | [diff] [blame] | 203 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 204 | }; |
| 205 | |
| 206 | static void __init zylonite_init_lcd(void) |
| 207 | { |
eric miao | 5cca914 | 2008-04-13 21:46:34 +0100 | [diff] [blame] | 208 | platform_device_register(&zylonite_backlight_device); |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 209 | |
| 210 | if (lcd_id & 0x20) { |
| 211 | set_pxa_fb_info(&zylonite_sharp_lcd_info); |
| 212 | return; |
| 213 | } |
| 214 | |
| 215 | /* legacy LCD panels, it would be handy here if LCD panel type can |
| 216 | * be decided at run-time |
| 217 | */ |
| 218 | if (1) |
| 219 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm035a776c_mode; |
| 220 | else |
| 221 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode; |
| 222 | |
| 223 | set_pxa_fb_info(&zylonite_toshiba_lcd_info); |
| 224 | } |
| 225 | #else |
| 226 | static inline void zylonite_init_lcd(void) {} |
| 227 | #endif |
| 228 | |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 229 | #if defined(CONFIG_MMC) |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 230 | static struct pxamci_platform_data zylonite_mci_platform_data = { |
Eric Miao | f97cab2 | 2010-04-14 07:00:42 +0800 | [diff] [blame] | 231 | .detect_delay_ms= 200, |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 232 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
Haojian Zhuang | f91e490 | 2009-12-22 07:29:40 -0500 | [diff] [blame] | 233 | .gpio_card_detect = EXT_GPIO(0), |
| 234 | .gpio_card_ro = EXT_GPIO(2), |
Robert Jarzmik | 7a64825 | 2009-07-06 22:16:42 +0200 | [diff] [blame] | 235 | .gpio_power = -1, |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 236 | }; |
| 237 | |
Bridge Wu | 8d33b05 | 2007-12-21 19:15:36 +0800 | [diff] [blame] | 238 | static struct pxamci_platform_data zylonite_mci2_platform_data = { |
Eric Miao | f97cab2 | 2010-04-14 07:00:42 +0800 | [diff] [blame] | 239 | .detect_delay_ms= 200, |
Bridge Wu | 8d33b05 | 2007-12-21 19:15:36 +0800 | [diff] [blame] | 240 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
Haojian Zhuang | f91e490 | 2009-12-22 07:29:40 -0500 | [diff] [blame] | 241 | .gpio_card_detect = EXT_GPIO(1), |
| 242 | .gpio_card_ro = EXT_GPIO(3), |
| 243 | .gpio_power = -1, |
| 244 | }; |
| 245 | |
| 246 | static struct pxamci_platform_data zylonite_mci3_platform_data = { |
Eric Miao | f97cab2 | 2010-04-14 07:00:42 +0800 | [diff] [blame] | 247 | .detect_delay_ms= 200, |
Haojian Zhuang | f91e490 | 2009-12-22 07:29:40 -0500 | [diff] [blame] | 248 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 249 | .gpio_card_detect = EXT_GPIO(30), |
| 250 | .gpio_card_ro = EXT_GPIO(31), |
| 251 | .gpio_power = -1, |
Bridge Wu | 8d33b05 | 2007-12-21 19:15:36 +0800 | [diff] [blame] | 252 | }; |
| 253 | |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 254 | static void __init zylonite_init_mmc(void) |
| 255 | { |
| 256 | pxa_set_mci_info(&zylonite_mci_platform_data); |
Bridge Wu | 8d33b05 | 2007-12-21 19:15:36 +0800 | [diff] [blame] | 257 | pxa3xx_set_mci2_info(&zylonite_mci2_platform_data); |
Bridge Wu | 5a1f21b | 2007-12-21 19:27:08 +0800 | [diff] [blame] | 258 | if (cpu_is_pxa310()) |
Haojian Zhuang | f91e490 | 2009-12-22 07:29:40 -0500 | [diff] [blame] | 259 | pxa3xx_set_mci3_info(&zylonite_mci3_platform_data); |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 260 | } |
| 261 | #else |
| 262 | static inline void zylonite_init_mmc(void) {} |
| 263 | #endif |
| 264 | |
Eric Miao | 36caeb4 | 2008-06-02 13:32:42 +0800 | [diff] [blame] | 265 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
eric miao | 468e086 | 2008-01-23 14:25:50 +0800 | [diff] [blame] | 266 | static unsigned int zylonite_matrix_key_map[] = { |
| 267 | /* KEY(row, col, key_code) */ |
| 268 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), |
| 269 | KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H), |
| 270 | KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L), |
| 271 | KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P), |
| 272 | KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T), |
| 273 | KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X), |
| 274 | KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z), |
| 275 | |
| 276 | KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3), |
| 277 | KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7), |
| 278 | KEY(4, 3, KEY_8), KEY(3, 4, KEY_9), |
| 279 | |
| 280 | KEY(4, 5, KEY_SPACE), |
| 281 | KEY(5, 3, KEY_KPASTERISK), /* * */ |
| 282 | KEY(5, 4, KEY_KPDOT), /* #" */ |
| 283 | |
| 284 | KEY(0, 7, KEY_UP), |
| 285 | KEY(1, 7, KEY_DOWN), |
| 286 | KEY(2, 7, KEY_LEFT), |
| 287 | KEY(3, 7, KEY_RIGHT), |
| 288 | KEY(2, 6, KEY_HOME), |
| 289 | KEY(3, 6, KEY_END), |
| 290 | KEY(6, 4, KEY_DELETE), |
| 291 | KEY(6, 6, KEY_BACK), |
| 292 | KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */ |
| 293 | |
| 294 | KEY(4, 6, KEY_ENTER), /* scroll push */ |
| 295 | KEY(5, 7, KEY_ENTER), /* keypad action */ |
| 296 | |
| 297 | KEY(0, 4, KEY_EMAIL), |
| 298 | KEY(5, 6, KEY_SEND), |
| 299 | KEY(4, 0, KEY_CALENDAR), |
| 300 | KEY(7, 6, KEY_RECORD), |
| 301 | KEY(6, 7, KEY_VOLUMEUP), |
| 302 | KEY(7, 7, KEY_VOLUMEDOWN), |
| 303 | |
| 304 | KEY(0, 6, KEY_F22), /* soft1 */ |
| 305 | KEY(1, 6, KEY_F23), /* soft2 */ |
| 306 | KEY(0, 3, KEY_AUX), /* contact */ |
| 307 | }; |
| 308 | |
| 309 | static struct pxa27x_keypad_platform_data zylonite_keypad_info = { |
| 310 | .matrix_key_rows = 8, |
| 311 | .matrix_key_cols = 8, |
| 312 | .matrix_key_map = zylonite_matrix_key_map, |
| 313 | .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map), |
| 314 | |
| 315 | .enable_rotary0 = 1, |
| 316 | .rotary0_up_key = KEY_UP, |
| 317 | .rotary0_down_key = KEY_DOWN, |
| 318 | |
| 319 | .debounce_interval = 30, |
| 320 | }; |
| 321 | |
| 322 | static void __init zylonite_init_keypad(void) |
| 323 | { |
| 324 | pxa_set_keypad_info(&zylonite_keypad_info); |
| 325 | } |
| 326 | #else |
| 327 | static inline void zylonite_init_keypad(void) {} |
| 328 | #endif |
| 329 | |
Eric Miao | 481b552 | 2008-06-02 15:37:20 +0800 | [diff] [blame] | 330 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) |
| 331 | static struct mtd_partition zylonite_nand_partitions[] = { |
| 332 | [0] = { |
| 333 | .name = "Bootloader", |
| 334 | .offset = 0, |
| 335 | .size = 0x060000, |
| 336 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 337 | }, |
| 338 | [1] = { |
| 339 | .name = "Kernel", |
| 340 | .offset = 0x060000, |
| 341 | .size = 0x200000, |
| 342 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 343 | }, |
| 344 | [2] = { |
| 345 | .name = "Filesystem", |
| 346 | .offset = 0x0260000, |
| 347 | .size = 0x3000000, /* 48M - rootfs */ |
| 348 | }, |
| 349 | [3] = { |
| 350 | .name = "MassStorage", |
| 351 | .offset = 0x3260000, |
| 352 | .size = 0x3d40000, |
| 353 | }, |
| 354 | [4] = { |
| 355 | .name = "BBT", |
| 356 | .offset = 0x6FA0000, |
| 357 | .size = 0x80000, |
| 358 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
| 359 | }, |
| 360 | /* NOTE: we reserve some blocks at the end of the NAND flash for |
| 361 | * bad block management, and the max number of relocation blocks |
| 362 | * differs on different platforms. Please take care with it when |
| 363 | * defining the partition table. |
| 364 | */ |
| 365 | }; |
| 366 | |
| 367 | static struct pxa3xx_nand_platform_data zylonite_nand_info = { |
| 368 | .enable_arbiter = 1, |
| 369 | .parts = zylonite_nand_partitions, |
| 370 | .nr_parts = ARRAY_SIZE(zylonite_nand_partitions), |
| 371 | }; |
| 372 | |
| 373 | static void __init zylonite_init_nand(void) |
| 374 | { |
| 375 | pxa3xx_set_nand_info(&zylonite_nand_info); |
| 376 | } |
| 377 | #else |
| 378 | static inline void zylonite_init_nand(void) {} |
| 379 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ |
| 380 | |
Eric Miao | 7ff4353 | 2008-09-27 18:05:49 +0800 | [diff] [blame] | 381 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
| 382 | static struct pxaohci_platform_data zylonite_ohci_info = { |
| 383 | .port_mode = PMM_PERPORT_MODE, |
| 384 | .flags = ENABLE_PORT1 | ENABLE_PORT2 | |
| 385 | POWER_CONTROL_LOW | POWER_SENSE_LOW, |
| 386 | }; |
| 387 | |
| 388 | static void __init zylonite_init_ohci(void) |
| 389 | { |
| 390 | pxa_set_ohci_info(&zylonite_ohci_info); |
| 391 | } |
| 392 | #else |
| 393 | static inline void zylonite_init_ohci(void) {} |
| 394 | #endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */ |
| 395 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 396 | static void __init zylonite_init(void) |
| 397 | { |
Russell King | cc155c6 | 2009-11-09 13:34:08 +0800 | [diff] [blame] | 398 | pxa_set_ffuart_info(NULL); |
| 399 | pxa_set_btuart_info(NULL); |
| 400 | pxa_set_stuart_info(NULL); |
| 401 | |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 402 | /* board-processor specific initialization */ |
| 403 | zylonite_pxa300_init(); |
| 404 | zylonite_pxa320_init(); |
| 405 | |
| 406 | /* |
| 407 | * Note: We depend that the bootloader set |
| 408 | * the correct value to MSC register for SMC91x. |
| 409 | */ |
| 410 | smc91x_resources[1].start = gpio_to_irq(gpio_eth_irq); |
| 411 | smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq); |
| 412 | platform_device_register(&smc91x_device); |
| 413 | |
Mark Brown | cabb352 | 2008-06-10 10:48:25 +0100 | [diff] [blame] | 414 | pxa_set_ac97_info(NULL); |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 415 | zylonite_init_lcd(); |
Bridge Wu | fafc9d3 | 2007-12-21 19:00:13 +0800 | [diff] [blame] | 416 | zylonite_init_mmc(); |
eric miao | 468e086 | 2008-01-23 14:25:50 +0800 | [diff] [blame] | 417 | zylonite_init_keypad(); |
Eric Miao | 481b552 | 2008-06-02 15:37:20 +0800 | [diff] [blame] | 418 | zylonite_init_nand(); |
Eric Miao | 5c9f50e | 2008-06-17 19:03:54 +0800 | [diff] [blame] | 419 | zylonite_init_leds(); |
Eric Miao | 7ff4353 | 2008-09-27 18:05:49 +0800 | [diff] [blame] | 420 | zylonite_init_ohci(); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 421 | zylonite_init_wm9713_audio(); |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 425 | .boot_params = 0xa0000100, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 426 | .map_io = pxa_map_io, |
Haojian Zhuang | 6ac6b81 | 2010-08-20 15:23:59 +0800 | [diff] [blame] | 427 | .nr_irqs = ZYLONITE_NR_IRQS, |
eric miao | 2c8086a | 2007-09-11 19:13:17 -0700 | [diff] [blame] | 428 | .init_irq = pxa3xx_init_irq, |
| 429 | .timer = &pxa_timer, |
| 430 | .init_machine = zylonite_init, |
| 431 | MACHINE_END |