board-zoom3.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 struct omap_board_config_kernel zoom_config[] __initdata = {
  23. };
  24. static struct mtd_partition zoom_nand_partitions[] = {
  25. /* All the partition sizes are listed in terms of NAND block size */
  26. {
  27. .name = "X-Loader-NAND",
  28. .offset = 0,
  29. .size = 4 * (64 * 2048), /* 512KB, 0x80000 */
  30. .mask_flags = MTD_WRITEABLE, /* force read-only */
  31. },
  32. {
  33. .name = "U-Boot-NAND",
  34. .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
  35. .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */
  36. .mask_flags = MTD_WRITEABLE, /* force read-only */
  37. },
  38. {
  39. .name = "Boot Env-NAND",
  40. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
  41. .size = 2 * (64 * 2048), /* 256KB, 0x40000 */
  42. },
  43. {
  44. .name = "Kernel-NAND",
  45. .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/
  46. .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */
  47. },
  48. {
  49. .name = "system",
  50. .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */
  51. .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */
  52. },
  53. {
  54. .name = "userdata",
  55. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/
  56. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  57. },
  58. {
  59. .name = "cache",
  60. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/
  61. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  62. },
  63. };
  64. static void __init omap_zoom_init_irq(void)
  65. {
  66. omap_board_config = zoom_config;
  67. omap_board_config_size = ARRAY_SIZE(zoom_config);
  68. omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
  69. h8mbx00u0mer0em_sdrc_params);
  70. omap_init_irq();
  71. omap_gpio_init();
  72. }
  73. #ifdef CONFIG_OMAP_MUX
  74. static struct omap_board_mux board_mux[] __initdata = {
  75. /* WLAN IRQ - GPIO 162 */
  76. OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
  77. /* WLAN POWER ENABLE - GPIO 101 */
  78. OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
  79. /* WLAN SDIO: MMC3 CMD */
  80. OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
  81. /* WLAN SDIO: MMC3 CLK */
  82. OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  83. /* WLAN SDIO: MMC3 DAT[0-3] */
  84. OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  85. OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  86. OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  87. OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  88. { .reg_offset = OMAP_MUX_TERMINATOR },
  89. };
  90. #else
  91. #define board_mux NULL
  92. #endif
  93. static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
  94. .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  95. .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
  96. .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  97. .phy_reset = true,
  98. .reset_gpio_port[0] = -EINVAL,
  99. .reset_gpio_port[1] = 64,
  100. .reset_gpio_port[2] = -EINVAL,
  101. };
  102. static void __init omap_zoom_init(void)
  103. {
  104. omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
  105. zoom_peripherals_init();
  106. board_nand_init(zoom_nand_partitions,
  107. ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
  108. zoom_debugboard_init();
  109. omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
  110. usb_ehci_init(&ehci_pdata);
  111. }
  112. MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
  113. .phys_io = ZOOM_UART_BASE,
  114. .io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
  115. .boot_params = 0x80000100,
  116. .map_io = omap3_map_io,
  117. .reserve = omap_reserve,
  118. .init_irq = omap_zoom_init_irq,
  119. .init_machine = omap_zoom_init,
  120. .timer = &omap_timer,
  121. MACHINE_END