board-zoom3.c 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /*
  2. * Copyright (C) 2009 Texas Instruments Inc.
  3. *
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #include <linux/kernel.h>
  10. #include <linux/init.h>
  11. #include <linux/platform_device.h>
  12. #include <linux/input.h>
  13. #include <linux/gpio.h>
  14. #include <asm/mach-types.h>
  15. #include <asm/mach/arch.h>
  16. #include <mach/board-zoom.h>
  17. #include <plat/common.h>
  18. #include <plat/board.h>
  19. #include <plat/usb.h>
  20. #include "mux.h"
  21. #include "sdram-hynix-h8mbx00u0mer-0em.h"
  22. static void __init omap_zoom_map_io(void)
  23. {
  24. omap2_set_globals_36xx();
  25. omap34xx_map_common_io();
  26. }
  27. static struct omap_board_config_kernel zoom_config[] __initdata = {
  28. };
  29. static struct mtd_partition zoom_nand_partitions[] = {
  30. /* All the partition sizes are listed in terms of NAND block size */
  31. {
  32. .name = "X-Loader-NAND",
  33. .offset = 0,
  34. .size = 4 * (64 * 2048), /* 512KB, 0x80000 */
  35. .mask_flags = MTD_WRITEABLE, /* force read-only */
  36. },
  37. {
  38. .name = "U-Boot-NAND",
  39. .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
  40. .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */
  41. .mask_flags = MTD_WRITEABLE, /* force read-only */
  42. },
  43. {
  44. .name = "Boot Env-NAND",
  45. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
  46. .size = 2 * (64 * 2048), /* 256KB, 0x40000 */
  47. },
  48. {
  49. .name = "Kernel-NAND",
  50. .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/
  51. .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */
  52. },
  53. {
  54. .name = "system",
  55. .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */
  56. .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */
  57. },
  58. {
  59. .name = "userdata",
  60. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/
  61. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  62. },
  63. {
  64. .name = "cache",
  65. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/
  66. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  67. },
  68. };
  69. static void __init omap_zoom_init_irq(void)
  70. {
  71. omap_board_config = zoom_config;
  72. omap_board_config_size = ARRAY_SIZE(zoom_config);
  73. omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
  74. h8mbx00u0mer0em_sdrc_params);
  75. omap_init_irq();
  76. omap_gpio_init();
  77. }
  78. #ifdef CONFIG_OMAP_MUX
  79. static struct omap_board_mux board_mux[] __initdata = {
  80. /* WLAN IRQ - GPIO 162 */
  81. OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
  82. /* WLAN POWER ENABLE - GPIO 101 */
  83. OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
  84. /* WLAN SDIO: MMC3 CMD */
  85. OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
  86. /* WLAN SDIO: MMC3 CLK */
  87. OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  88. /* WLAN SDIO: MMC3 DAT[0-3] */
  89. OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  90. OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  91. OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  92. OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  93. { .reg_offset = OMAP_MUX_TERMINATOR },
  94. };
  95. #else
  96. #define board_mux NULL
  97. #endif
  98. static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
  99. .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  100. .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
  101. .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  102. .phy_reset = true,
  103. .reset_gpio_port[0] = -EINVAL,
  104. .reset_gpio_port[1] = 64,
  105. .reset_gpio_port[2] = -EINVAL,
  106. };
  107. static void __init omap_zoom_init(void)
  108. {
  109. omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
  110. zoom_peripherals_init();
  111. board_nand_init(zoom_nand_partitions,
  112. ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
  113. zoom_debugboard_init();
  114. omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
  115. usb_ehci_init(&ehci_pdata);
  116. }
  117. MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
  118. .phys_io = ZOOM_UART_BASE,
  119. .io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
  120. .boot_params = 0x80000100,
  121. .map_io = omap_zoom_map_io,
  122. .init_irq = omap_zoom_init_irq,
  123. .init_machine = omap_zoom_init,
  124. .timer = &omap_timer,
  125. MACHINE_END