board-zoom2.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 <linux/i2c/twl.h>
  17. #include <asm/mach-types.h>
  18. #include <asm/mach/arch.h>
  19. #include <plat/common.h>
  20. #include <plat/board.h>
  21. #include <mach/board-zoom.h>
  22. #include "board-flash.h"
  23. #include "mux.h"
  24. #include "sdram-micron-mt46h32m32lf-6.h"
  25. static void __init omap_zoom2_init_irq(void)
  26. {
  27. omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
  28. mt46h32m32lf6_sdrc_params);
  29. omap_init_irq();
  30. omap_gpio_init();
  31. }
  32. #ifdef CONFIG_OMAP_MUX
  33. static struct omap_board_mux board_mux[] __initdata = {
  34. /* WLAN IRQ - GPIO 162 */
  35. OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
  36. /* WLAN POWER ENABLE - GPIO 101 */
  37. OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
  38. /* WLAN SDIO: MMC3 CMD */
  39. OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
  40. /* WLAN SDIO: MMC3 CLK */
  41. OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  42. /* WLAN SDIO: MMC3 DAT[0-3] */
  43. OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  44. OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  45. OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  46. OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
  47. { .reg_offset = OMAP_MUX_TERMINATOR },
  48. };
  49. #else
  50. #define board_mux NULL
  51. #endif
  52. static struct mtd_partition zoom_nand_partitions[] = {
  53. /* All the partition sizes are listed in terms of NAND block size */
  54. {
  55. .name = "X-Loader-NAND",
  56. .offset = 0,
  57. .size = 4 * (64 * 2048), /* 512KB, 0x80000 */
  58. .mask_flags = MTD_WRITEABLE, /* force read-only */
  59. },
  60. {
  61. .name = "U-Boot-NAND",
  62. .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
  63. .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */
  64. .mask_flags = MTD_WRITEABLE, /* force read-only */
  65. },
  66. {
  67. .name = "Boot Env-NAND",
  68. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
  69. .size = 2 * (64 * 2048), /* 256KB, 0x40000 */
  70. },
  71. {
  72. .name = "Kernel-NAND",
  73. .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/
  74. .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */
  75. },
  76. {
  77. .name = "system",
  78. .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */
  79. .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */
  80. },
  81. {
  82. .name = "userdata",
  83. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/
  84. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  85. },
  86. {
  87. .name = "cache",
  88. .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/
  89. .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
  90. },
  91. };
  92. static void __init omap_zoom2_init(void)
  93. {
  94. omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  95. zoom_peripherals_init();
  96. board_nand_init(zoom_nand_partitions,
  97. ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
  98. zoom_debugboard_init();
  99. }
  100. MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
  101. .boot_params = 0x80000100,
  102. .map_io = omap3_map_io,
  103. .reserve = omap_reserve,
  104. .init_irq = omap_zoom2_init_irq,
  105. .init_machine = omap_zoom2_init,
  106. .timer = &omap_timer,
  107. MACHINE_END