board-zoom3.c 3.7 KB

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