z2.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. /*
  2. * linux/arch/arm/mach-pxa/z2.c
  3. *
  4. * Support for the Zipit Z2 Handheld device.
  5. *
  6. * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com>
  7. *
  8. * Based on research and code by: Ken McGuire
  9. * Based on mainstone.c as modified for the Zipit Z2.
  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. #include <linux/platform_device.h>
  16. #include <linux/mtd/mtd.h>
  17. #include <linux/mtd/partitions.h>
  18. #include <linux/pwm_backlight.h>
  19. #include <linux/z2_battery.h>
  20. #include <linux/dma-mapping.h>
  21. #include <linux/spi/spi.h>
  22. #include <linux/spi/libertas_spi.h>
  23. #include <linux/spi/lms283gf05.h>
  24. #include <linux/power_supply.h>
  25. #include <linux/mtd/physmap.h>
  26. #include <linux/gpio.h>
  27. #include <linux/gpio_keys.h>
  28. #include <linux/delay.h>
  29. #include <asm/mach-types.h>
  30. #include <asm/mach/arch.h>
  31. #include <mach/pxa27x.h>
  32. #include <mach/mfp-pxa27x.h>
  33. #include <mach/z2.h>
  34. #include <mach/pxafb.h>
  35. #include <mach/mmc.h>
  36. #include <mach/pxa27x_keypad.h>
  37. #include <mach/pxa2xx_spi.h>
  38. #include <plat/i2c.h>
  39. #include "generic.h"
  40. #include "devices.h"
  41. /******************************************************************************
  42. * Pin configuration
  43. ******************************************************************************/
  44. static unsigned long z2_pin_config[] = {
  45. /* LCD - 16bpp Active TFT */
  46. GPIO58_LCD_LDD_0,
  47. GPIO59_LCD_LDD_1,
  48. GPIO60_LCD_LDD_2,
  49. GPIO61_LCD_LDD_3,
  50. GPIO62_LCD_LDD_4,
  51. GPIO63_LCD_LDD_5,
  52. GPIO64_LCD_LDD_6,
  53. GPIO65_LCD_LDD_7,
  54. GPIO66_LCD_LDD_8,
  55. GPIO67_LCD_LDD_9,
  56. GPIO68_LCD_LDD_10,
  57. GPIO69_LCD_LDD_11,
  58. GPIO70_LCD_LDD_12,
  59. GPIO71_LCD_LDD_13,
  60. GPIO72_LCD_LDD_14,
  61. GPIO73_LCD_LDD_15,
  62. GPIO74_LCD_FCLK,
  63. GPIO75_LCD_LCLK,
  64. GPIO76_LCD_PCLK,
  65. GPIO77_LCD_BIAS,
  66. GPIO19_GPIO, /* LCD reset */
  67. GPIO88_GPIO, /* LCD chipselect */
  68. /* PWM */
  69. GPIO115_PWM1_OUT, /* Keypad Backlight */
  70. GPIO11_PWM2_OUT, /* LCD Backlight */
  71. /* MMC */
  72. GPIO32_MMC_CLK,
  73. GPIO112_MMC_CMD,
  74. GPIO92_MMC_DAT_0,
  75. GPIO109_MMC_DAT_1,
  76. GPIO110_MMC_DAT_2,
  77. GPIO111_MMC_DAT_3,
  78. GPIO96_GPIO, /* SD detect */
  79. /* STUART */
  80. GPIO46_STUART_RXD,
  81. GPIO47_STUART_TXD,
  82. /* Keypad */
  83. GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
  84. GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
  85. GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
  86. GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
  87. GPIO38_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
  88. GPIO16_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
  89. GPIO17_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH,
  90. GPIO103_KP_MKOUT_0,
  91. GPIO104_KP_MKOUT_1,
  92. GPIO105_KP_MKOUT_2,
  93. GPIO106_KP_MKOUT_3,
  94. GPIO107_KP_MKOUT_4,
  95. GPIO108_KP_MKOUT_5,
  96. GPIO35_KP_MKOUT_6,
  97. GPIO41_KP_MKOUT_7,
  98. /* I2C */
  99. GPIO117_I2C_SCL,
  100. GPIO118_I2C_SDA,
  101. /* SSP1 */
  102. GPIO23_SSP1_SCLK, /* SSP1_SCK */
  103. GPIO25_SSP1_TXD, /* SSP1_TXD */
  104. GPIO26_SSP1_RXD, /* SSP1_RXD */
  105. /* SSP2 */
  106. GPIO22_SSP2_SCLK, /* SSP2_SCK */
  107. GPIO13_SSP2_TXD, /* SSP2_TXD */
  108. GPIO40_SSP2_RXD, /* SSP2_RXD */
  109. /* LEDs */
  110. GPIO10_GPIO, /* WiFi LED */
  111. GPIO83_GPIO, /* Charging LED */
  112. GPIO85_GPIO, /* Charged LED */
  113. /* I2S */
  114. GPIO28_I2S_BITCLK_OUT,
  115. GPIO29_I2S_SDATA_IN,
  116. GPIO30_I2S_SDATA_OUT,
  117. GPIO31_I2S_SYNC,
  118. GPIO113_I2S_SYSCLK,
  119. /* MISC */
  120. GPIO0_GPIO, /* AC power detect */
  121. GPIO1_GPIO, /* Power button */
  122. GPIO37_GPIO, /* Headphone detect */
  123. GPIO98_GPIO, /* Lid switch */
  124. GPIO14_GPIO, /* WiFi Reset */
  125. GPIO15_GPIO, /* WiFi Power */
  126. GPIO24_GPIO, /* WiFi CS */
  127. GPIO36_GPIO, /* WiFi IRQ */
  128. GPIO88_GPIO, /* LCD CS */
  129. };
  130. /******************************************************************************
  131. * NOR Flash
  132. ******************************************************************************/
  133. #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
  134. static struct resource z2_flash_resource = {
  135. .start = PXA_CS0_PHYS,
  136. .end = PXA_CS0_PHYS + SZ_8M - 1,
  137. .flags = IORESOURCE_MEM,
  138. };
  139. static struct mtd_partition z2_flash_parts[] = {
  140. {
  141. .name = "U-Boot Bootloader",
  142. .offset = 0x0,
  143. .size = 0x40000,
  144. }, {
  145. .name = "U-Boot Environment",
  146. .offset = 0x40000,
  147. .size = 0x60000,
  148. }, {
  149. .name = "Flash",
  150. .offset = 0x60000,
  151. .size = MTDPART_SIZ_FULL,
  152. },
  153. };
  154. static struct physmap_flash_data z2_flash_data = {
  155. .width = 2,
  156. .parts = z2_flash_parts,
  157. .nr_parts = ARRAY_SIZE(z2_flash_parts),
  158. };
  159. static struct platform_device z2_flash = {
  160. .name = "physmap-flash",
  161. .id = -1,
  162. .resource = &z2_flash_resource,
  163. .num_resources = 1,
  164. .dev = {
  165. .platform_data = &z2_flash_data,
  166. },
  167. };
  168. static void __init z2_nor_init(void)
  169. {
  170. platform_device_register(&z2_flash);
  171. }
  172. #else
  173. static inline void z2_nor_init(void) {}
  174. #endif
  175. /******************************************************************************
  176. * Backlight
  177. ******************************************************************************/
  178. #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
  179. static struct platform_pwm_backlight_data z2_backlight_data[] = {
  180. [0] = {
  181. /* Keypad Backlight */
  182. .pwm_id = 1,
  183. .max_brightness = 1023,
  184. .dft_brightness = 512,
  185. .pwm_period_ns = 1260320,
  186. },
  187. [1] = {
  188. /* LCD Backlight */
  189. .pwm_id = 2,
  190. .max_brightness = 1023,
  191. .dft_brightness = 512,
  192. .pwm_period_ns = 1260320,
  193. },
  194. };
  195. static struct platform_device z2_backlight_devices[2] = {
  196. {
  197. .name = "pwm-backlight",
  198. .id = 0,
  199. .dev = {
  200. .platform_data = &z2_backlight_data[1],
  201. },
  202. },
  203. {
  204. .name = "pwm-backlight",
  205. .id = 1,
  206. .dev = {
  207. .platform_data = &z2_backlight_data[0],
  208. },
  209. },
  210. };
  211. static void __init z2_pwm_init(void)
  212. {
  213. platform_device_register(&z2_backlight_devices[0]);
  214. platform_device_register(&z2_backlight_devices[1]);
  215. }
  216. #else
  217. static inline void z2_pwm_init(void) {}
  218. #endif
  219. /******************************************************************************
  220. * Framebuffer
  221. ******************************************************************************/
  222. #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
  223. static struct pxafb_mode_info z2_lcd_modes[] = {
  224. {
  225. .pixclock = 192000,
  226. .xres = 240,
  227. .yres = 320,
  228. .bpp = 16,
  229. .left_margin = 4,
  230. .right_margin = 8,
  231. .upper_margin = 4,
  232. .lower_margin = 8,
  233. .hsync_len = 4,
  234. .vsync_len = 4,
  235. },
  236. };
  237. static struct pxafb_mach_info z2_lcd_screen = {
  238. .modes = z2_lcd_modes,
  239. .num_modes = ARRAY_SIZE(z2_lcd_modes),
  240. .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_BIAS_ACTIVE_LOW |
  241. LCD_ALTERNATE_MAPPING,
  242. };
  243. static void __init z2_lcd_init(void)
  244. {
  245. set_pxa_fb_info(&z2_lcd_screen);
  246. }
  247. #else
  248. static inline void z2_lcd_init(void) {}
  249. #endif
  250. /******************************************************************************
  251. * SD/MMC card controller
  252. ******************************************************************************/
  253. #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
  254. static struct pxamci_platform_data z2_mci_platform_data = {
  255. .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
  256. .gpio_card_detect = GPIO96_ZIPITZ2_SD_DETECT,
  257. .gpio_power = -1,
  258. .gpio_card_ro = -1,
  259. .detect_delay_ms = 200,
  260. };
  261. static void __init z2_mmc_init(void)
  262. {
  263. pxa_set_mci_info(&z2_mci_platform_data);
  264. }
  265. #else
  266. static inline void z2_mmc_init(void) {}
  267. #endif
  268. /******************************************************************************
  269. * LEDs
  270. ******************************************************************************/
  271. #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
  272. struct gpio_led z2_gpio_leds[] = {
  273. {
  274. .name = "z2:green:wifi",
  275. .default_trigger = "none",
  276. .gpio = GPIO10_ZIPITZ2_LED_WIFI,
  277. .active_low = 1,
  278. }, {
  279. .name = "z2:green:charged",
  280. .default_trigger = "none",
  281. .gpio = GPIO85_ZIPITZ2_LED_CHARGED,
  282. .active_low = 1,
  283. }, {
  284. .name = "z2:amber:charging",
  285. .default_trigger = "none",
  286. .gpio = GPIO83_ZIPITZ2_LED_CHARGING,
  287. .active_low = 1,
  288. },
  289. };
  290. static struct gpio_led_platform_data z2_gpio_led_info = {
  291. .leds = z2_gpio_leds,
  292. .num_leds = ARRAY_SIZE(z2_gpio_leds),
  293. };
  294. static struct platform_device z2_leds = {
  295. .name = "leds-gpio",
  296. .id = -1,
  297. .dev = {
  298. .platform_data = &z2_gpio_led_info,
  299. }
  300. };
  301. static void __init z2_leds_init(void)
  302. {
  303. platform_device_register(&z2_leds);
  304. }
  305. #else
  306. static inline void z2_leds_init(void) {}
  307. #endif
  308. /******************************************************************************
  309. * GPIO keyboard
  310. ******************************************************************************/
  311. #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
  312. static unsigned int z2_matrix_keys[] = {
  313. KEY(0, 0, KEY_OPTION),
  314. KEY(1, 0, KEY_UP),
  315. KEY(2, 0, KEY_DOWN),
  316. KEY(3, 0, KEY_LEFT),
  317. KEY(4, 0, KEY_RIGHT),
  318. KEY(5, 0, KEY_END),
  319. KEY(6, 0, KEY_KPPLUS),
  320. KEY(0, 1, KEY_HOME),
  321. KEY(1, 1, KEY_Q),
  322. KEY(2, 1, KEY_I),
  323. KEY(3, 1, KEY_G),
  324. KEY(4, 1, KEY_X),
  325. KEY(5, 1, KEY_ENTER),
  326. KEY(6, 1, KEY_KPMINUS),
  327. KEY(0, 2, KEY_PAGEUP),
  328. KEY(1, 2, KEY_W),
  329. KEY(2, 2, KEY_O),
  330. KEY(3, 2, KEY_H),
  331. KEY(4, 2, KEY_C),
  332. KEY(5, 2, KEY_LEFTALT),
  333. KEY(0, 3, KEY_PAGEDOWN),
  334. KEY(1, 3, KEY_E),
  335. KEY(2, 3, KEY_P),
  336. KEY(3, 3, KEY_J),
  337. KEY(4, 3, KEY_V),
  338. KEY(5, 3, KEY_LEFTSHIFT),
  339. KEY(0, 4, KEY_ESC),
  340. KEY(1, 4, KEY_R),
  341. KEY(2, 4, KEY_A),
  342. KEY(3, 4, KEY_K),
  343. KEY(4, 4, KEY_B),
  344. KEY(5, 4, KEY_LEFTCTRL),
  345. KEY(0, 5, KEY_TAB),
  346. KEY(1, 5, KEY_T),
  347. KEY(2, 5, KEY_S),
  348. KEY(3, 5, KEY_L),
  349. KEY(4, 5, KEY_N),
  350. KEY(5, 5, KEY_SPACE),
  351. KEY(0, 6, KEY_STOPCD),
  352. KEY(1, 6, KEY_Y),
  353. KEY(2, 6, KEY_D),
  354. KEY(3, 6, KEY_BACKSPACE),
  355. KEY(4, 6, KEY_M),
  356. KEY(5, 6, KEY_COMMA),
  357. KEY(0, 7, KEY_PLAYCD),
  358. KEY(1, 7, KEY_U),
  359. KEY(2, 7, KEY_F),
  360. KEY(3, 7, KEY_Z),
  361. KEY(4, 7, KEY_SEMICOLON),
  362. KEY(5, 7, KEY_DOT),
  363. };
  364. static struct pxa27x_keypad_platform_data z2_keypad_platform_data = {
  365. .matrix_key_rows = 7,
  366. .matrix_key_cols = 8,
  367. .matrix_key_map = z2_matrix_keys,
  368. .matrix_key_map_size = ARRAY_SIZE(z2_matrix_keys),
  369. .debounce_interval = 30,
  370. };
  371. static void __init z2_mkp_init(void)
  372. {
  373. pxa_set_keypad_info(&z2_keypad_platform_data);
  374. }
  375. #else
  376. static inline void z2_mkp_init(void) {}
  377. #endif
  378. /******************************************************************************
  379. * GPIO keys
  380. ******************************************************************************/
  381. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  382. static struct gpio_keys_button z2_pxa_buttons[] = {
  383. {KEY_POWER, GPIO1_ZIPITZ2_POWER_BUTTON, 0, "Power Button" },
  384. {KEY_CLOSE, GPIO98_ZIPITZ2_LID_BUTTON, 0, "Lid Button" },
  385. };
  386. static struct gpio_keys_platform_data z2_pxa_keys_data = {
  387. .buttons = z2_pxa_buttons,
  388. .nbuttons = ARRAY_SIZE(z2_pxa_buttons),
  389. };
  390. static struct platform_device z2_pxa_keys = {
  391. .name = "gpio-keys",
  392. .id = -1,
  393. .dev = {
  394. .platform_data = &z2_pxa_keys_data,
  395. },
  396. };
  397. static void __init z2_keys_init(void)
  398. {
  399. platform_device_register(&z2_pxa_keys);
  400. }
  401. #else
  402. static inline void z2_keys_init(void) {}
  403. #endif
  404. /******************************************************************************
  405. * Battery
  406. ******************************************************************************/
  407. #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
  408. static struct z2_battery_info batt_chip_info = {
  409. .batt_I2C_bus = 0,
  410. .batt_I2C_addr = 0x55,
  411. .batt_I2C_reg = 2,
  412. .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT,
  413. .min_voltage = 2400000,
  414. .max_voltage = 3700000,
  415. .batt_div = 69,
  416. .batt_mult = 1000000,
  417. .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION,
  418. .batt_name = "Z2",
  419. };
  420. static struct i2c_board_info __initdata z2_i2c_board_info[] = {
  421. {
  422. I2C_BOARD_INFO("aer915", 0x55),
  423. .platform_data = &batt_chip_info,
  424. }, {
  425. I2C_BOARD_INFO("wm8750", 0x1b),
  426. },
  427. };
  428. static void __init z2_i2c_init(void)
  429. {
  430. pxa_set_i2c_info(NULL);
  431. i2c_register_board_info(0, ARRAY_AND_SIZE(z2_i2c_board_info));
  432. }
  433. #else
  434. static inline void z2_i2c_init(void) {}
  435. #endif
  436. /******************************************************************************
  437. * SSP Devices - WiFi and LCD control
  438. ******************************************************************************/
  439. #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
  440. /* WiFi */
  441. static int z2_lbs_spi_setup(struct spi_device *spi)
  442. {
  443. int ret = 0;
  444. ret = gpio_request(GPIO15_ZIPITZ2_WIFI_POWER, "WiFi Power");
  445. if (ret)
  446. goto err;
  447. ret = gpio_direction_output(GPIO15_ZIPITZ2_WIFI_POWER, 1);
  448. if (ret)
  449. goto err2;
  450. ret = gpio_request(GPIO14_ZIPITZ2_WIFI_RESET, "WiFi Reset");
  451. if (ret)
  452. goto err2;
  453. ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_RESET, 0);
  454. if (ret)
  455. goto err3;
  456. /* Reset the card */
  457. mdelay(180);
  458. gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 1);
  459. mdelay(20);
  460. spi->bits_per_word = 16;
  461. spi->mode = SPI_MODE_2,
  462. spi_setup(spi);
  463. return 0;
  464. err3:
  465. gpio_free(GPIO14_ZIPITZ2_WIFI_RESET);
  466. err2:
  467. gpio_free(GPIO15_ZIPITZ2_WIFI_POWER);
  468. err:
  469. return ret;
  470. };
  471. static int z2_lbs_spi_teardown(struct spi_device *spi)
  472. {
  473. gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 0);
  474. gpio_set_value(GPIO15_ZIPITZ2_WIFI_POWER, 0);
  475. gpio_free(GPIO14_ZIPITZ2_WIFI_RESET);
  476. gpio_free(GPIO15_ZIPITZ2_WIFI_POWER);
  477. return 0;
  478. };
  479. static struct pxa2xx_spi_chip z2_lbs_chip_info = {
  480. .rx_threshold = 8,
  481. .tx_threshold = 8,
  482. .timeout = 1000,
  483. .gpio_cs = GPIO24_ZIPITZ2_WIFI_CS,
  484. };
  485. static struct libertas_spi_platform_data z2_lbs_pdata = {
  486. .use_dummy_writes = 1,
  487. .setup = z2_lbs_spi_setup,
  488. .teardown = z2_lbs_spi_teardown,
  489. };
  490. /* LCD */
  491. static struct pxa2xx_spi_chip lms283_chip_info = {
  492. .rx_threshold = 1,
  493. .tx_threshold = 1,
  494. .timeout = 64,
  495. .gpio_cs = GPIO88_ZIPITZ2_LCD_CS,
  496. };
  497. static const struct lms283gf05_pdata lms283_pdata = {
  498. .reset_gpio = GPIO19_ZIPITZ2_LCD_RESET,
  499. };
  500. static struct spi_board_info spi_board_info[] __initdata = {
  501. {
  502. .modalias = "libertas_spi",
  503. .platform_data = &z2_lbs_pdata,
  504. .controller_data = &z2_lbs_chip_info,
  505. .irq = gpio_to_irq(GPIO36_ZIPITZ2_WIFI_IRQ),
  506. .max_speed_hz = 13000000,
  507. .bus_num = 1,
  508. .chip_select = 0,
  509. },
  510. {
  511. .modalias = "lms283gf05",
  512. .controller_data = &lms283_chip_info,
  513. .platform_data = &lms283_pdata,
  514. .max_speed_hz = 400000,
  515. .bus_num = 2,
  516. .chip_select = 0,
  517. },
  518. };
  519. static struct pxa2xx_spi_master pxa_ssp1_master_info = {
  520. .clock_enable = CKEN_SSP,
  521. .num_chipselect = 1,
  522. .enable_dma = 1,
  523. };
  524. static struct pxa2xx_spi_master pxa_ssp2_master_info = {
  525. .clock_enable = CKEN_SSP2,
  526. .num_chipselect = 1,
  527. };
  528. static void __init z2_spi_init(void)
  529. {
  530. pxa2xx_set_spi_info(1, &pxa_ssp1_master_info);
  531. pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
  532. spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
  533. }
  534. #else
  535. static inline void z2_spi_init(void) {}
  536. #endif
  537. /******************************************************************************
  538. * Machine init
  539. ******************************************************************************/
  540. static void __init z2_init(void)
  541. {
  542. pxa2xx_mfp_config(ARRAY_AND_SIZE(z2_pin_config));
  543. pxa_set_ffuart_info(NULL);
  544. pxa_set_btuart_info(NULL);
  545. pxa_set_stuart_info(NULL);
  546. z2_lcd_init();
  547. z2_mmc_init();
  548. z2_mkp_init();
  549. z2_i2c_init();
  550. z2_spi_init();
  551. z2_nor_init();
  552. z2_pwm_init();
  553. z2_leds_init();
  554. z2_keys_init();
  555. }
  556. MACHINE_START(ZIPIT2, "Zipit Z2")
  557. .phys_io = 0x40000000,
  558. .boot_params = 0xa0000100,
  559. .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
  560. .map_io = pxa_map_io,
  561. .init_irq = pxa27x_init_irq,
  562. .timer = &pxa_timer,
  563. .init_machine = z2_init,
  564. MACHINE_END