board-zoom2.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * Copyright (C) 2009 Texas Instruments Inc.
  3. * Mikkel Christensen <mlc@ti.com>
  4. *
  5. * Modified from mach-omap2/board-ldp.c
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/input.h>
  15. #include <linux/gpio.h>
  16. #include <asm/mach-types.h>
  17. #include <asm/mach/arch.h>
  18. #include <plat/common.h>
  19. #include <plat/board.h>
  20. #include <mach/board-zoom.h>
  21. #include "mux.h"
  22. #include "sdram-micron-mt46h32m32lf-6.h"
  23. static void __init omap_zoom2_init_irq(void)
  24. {
  25. omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
  26. mt46h32m32lf6_sdrc_params);
  27. omap_init_irq();
  28. omap_gpio_init();
  29. }
  30. /* REVISIT: These audio entries can be removed once MFD code is merged */
  31. #if 0
  32. static struct twl4030_madc_platform_data zoom2_madc_data = {
  33. .irq_line = 1,
  34. };
  35. static struct twl4030_codec_audio_data zoom2_audio_data = {
  36. .audio_mclk = 26000000,
  37. };
  38. static struct twl4030_codec_data zoom2_codec_data = {
  39. .audio_mclk = 26000000,
  40. .audio = &zoom2_audio_data,
  41. };
  42. static struct twl4030_platform_data zoom2_twldata = {
  43. .irq_base = TWL4030_IRQ_BASE,
  44. .irq_end = TWL4030_IRQ_END,
  45. /* platform_data for children goes here */
  46. .bci = &zoom2_bci_data,
  47. .madc = &zoom2_madc_data,
  48. .usb = &zoom2_usb_data,
  49. .gpio = &zoom2_gpio_data,
  50. .keypad = &zoom2_kp_twl4030_data,
  51. .codec = &zoom2_codec_data,
  52. .vmmc1 = &zoom2_vmmc1,
  53. .vmmc2 = &zoom2_vmmc2,
  54. .vsim = &zoom2_vsim,
  55. };
  56. #endif
  57. #ifdef CONFIG_OMAP_MUX
  58. static struct omap_board_mux board_mux[] __initdata = {
  59. /* WLAN IRQ - GPIO 162 */
  60. OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
  61. /* WLAN POWER ENABLE - GPIO 101 */
  62. OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
  63. /* WLAN SDIO: MMC3 CMD */
  64. OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
  65. /* WLAN SDIO: MMC3 CLK */
  66. OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  67. /* WLAN SDIO: MMC3 DAT[0-3] */
  68. OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  69. OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  70. OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  71. OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  72. { .reg_offset = OMAP_MUX_TERMINATOR },
  73. };
  74. #else
  75. #define board_mux NULL
  76. #endif
  77. static struct mtd_partition zoom_nand_partitions[] = {
  78. /* All the partition sizes are listed in terms of NAND block size */
  79. {
  80. .name = "X-Loader-NAND",
  81. .offset = 0,
  82. .size = 4 * (64 * 2048), /* 512KB, 0x80000 */
  83. .mask_flags = MTD_WRITEABLE, /* force read-only */
  84. },
  85. {
  86. .name = "U-Boot-NAND",
  87. .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
  88. .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */
  89. .mask_flags = MTD_WRITEABLE, /* force read-only */
  90. },
  91. {
  92. .name = "Boot Env-NAND",
  93. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
  94. .size = 2 * (64 * 2048), /* 256KB, 0x40000 */
  95. },
  96. {
  97. .name = "Kernel-NAND",
  98. .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/
  99. .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */
  100. },
  101. {
  102. .name = "system",
  103. .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */
  104. .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */
  105. },
  106. {
  107. .name = "userdata",
  108. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/
  109. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  110. },
  111. {
  112. .name = "cache",
  113. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/
  114. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  115. },
  116. };
  117. static void __init omap_zoom2_init(void)
  118. {
  119. omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  120. zoom_peripherals_init();
  121. board_nand_init(zoom_nand_partitions,
  122. ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
  123. zoom_debugboard_init();
  124. }
  125. MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
  126. .phys_io = ZOOM_UART_BASE,
  127. .io_pg_offst = (ZOOM_UART_VIRT >> 18) & 0xfffc,
  128. .boot_params = 0x80000100,
  129. .map_io = omap3_map_io,
  130. .reserve = omap_reserve,
  131. .init_irq = omap_zoom2_init_irq,
  132. .init_machine = omap_zoom2_init,
  133. .timer = &omap_timer,
  134. MACHINE_END