tao3530.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Configuration settings for the TechNexion TAO-3530 SOM
  4. * equipped on Thunder baseboard.
  5. *
  6. * Edward Lin <linuxfae@technexion.com>
  7. * Tapani Utriainen <linuxfae@technexion.com>
  8. *
  9. * Copyright (C) 2013 Stefan Roese <sr@denx.de>
  10. */
  11. #ifndef __CONFIG_H
  12. #define __CONFIG_H
  13. /*
  14. * High Level Configuration Options
  15. */
  16. #include <asm/arch/cpu.h> /* get chip and board defs */
  17. #include <asm/arch/omap.h>
  18. /* Clock Defines */
  19. #define V_OSCK 26000000 /* Clock output from T2 */
  20. #define V_SCLK (V_OSCK >> 1)
  21. #define CONFIG_CMDLINE_TAG
  22. #define CONFIG_SETUP_MEMORY_TAGS
  23. #define CONFIG_INITRD_TAG
  24. #define CONFIG_REVISION_TAG
  25. /*
  26. * Size of malloc() pool
  27. */
  28. #define CONFIG_SYS_MALLOC_LEN (4 << 20)
  29. /*
  30. * Hardware drivers
  31. */
  32. /*
  33. * NS16550 Configuration
  34. */
  35. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  36. #define CONFIG_SYS_NS16550_SERIAL
  37. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  38. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  39. /*
  40. * select serial console configuration
  41. */
  42. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  43. /* commands to include */
  44. #define CONFIG_SYS_I2C
  45. #define CONFIG_I2C_MULTI_BUS
  46. /*
  47. * TWL4030
  48. */
  49. /*
  50. * Board NAND Info.
  51. */
  52. #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
  53. /* to access nand at */
  54. /* CS0 */
  55. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
  56. /* devices */
  57. /* Environment information */
  58. #define CONFIG_EXTRA_ENV_SETTINGS \
  59. "loadaddr=0x82000000\0" \
  60. "console=ttyO2,115200n8\0" \
  61. "mpurate=600\0" \
  62. "dvi_mode=omapfb.mode=dvi:1280x720-24@60\0" \
  63. "tv_mode=omapfb.mode=tv:ntsc\0" \
  64. "video_mode=omapdss.def_disp=lcd vram=6M omapfb.vram=0:2M,1:2M,2:2M\0" \
  65. "lcd_mode=omapfb.mode=lcd:800x480@60 \0" \
  66. "extra_options= \0" \
  67. "mmcdev=0\0" \
  68. "mmcroot=/dev/mmcblk0p2 rw\0" \
  69. "mmcrootfstype=ext3 rootwait\0" \
  70. "nandroot=ubi0:rootfs ubi.mtd=4\0" \
  71. "nandrootfstype=ubifs\0" \
  72. "mmcargs=setenv bootargs console=${console} " \
  73. "mpurate=${mpurate} " \
  74. "${video_mode} " \
  75. "root=${mmcroot} " \
  76. "rootfstype=${mmcrootfstype} " \
  77. "${extra_options}\0" \
  78. "nandargs=setenv bootargs console=${console} " \
  79. "mpurate=${mpurate} " \
  80. "${video_mode} " \
  81. "${network_setting} " \
  82. "root=${nandroot} " \
  83. "rootfstype=${nandrootfstype} "\
  84. "${extra_options}\0" \
  85. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  86. "bootscript=echo Running bootscript from mmc ...; " \
  87. "source ${loadaddr}\0" \
  88. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  89. "mmcboot=echo Booting from mmc ...; " \
  90. "run mmcargs; " \
  91. "bootm ${loadaddr}\0" \
  92. "nandboot=echo Booting from nand ...; " \
  93. "run nandargs; " \
  94. "nand read ${loadaddr} 280000 400000; " \
  95. "bootm ${loadaddr}\0" \
  96. #define CONFIG_BOOTCOMMAND \
  97. "mmc dev ${mmcdev}; if mmc rescan; then " \
  98. "if run loadbootscript; then " \
  99. "run bootscript; " \
  100. "else " \
  101. "if run loaduimage; then " \
  102. "run mmcboot; " \
  103. "else run nandboot; " \
  104. "fi; " \
  105. "fi; " \
  106. "else run nandboot; fi"
  107. /*
  108. * Miscellaneous configurable options
  109. */
  110. /* turn on command-line edit/hist/auto */
  111. /* defaults */
  112. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */
  113. /* load address */
  114. /*
  115. * OMAP3 has 12 GP timers, they can be driven by the system clock
  116. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  117. * This rate is divided by a local divisor.
  118. */
  119. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  120. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  121. /*
  122. * Physical Memory Map
  123. */
  124. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  125. #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */
  126. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  127. /*
  128. * FLASH and environment organization
  129. */
  130. /* **** PISMO SUPPORT *** */
  131. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
  132. #define CONFIG_SYS_FLASH_BASE NAND_BASE
  133. /* Monitor at start of flash */
  134. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  135. #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
  136. #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
  137. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)
  138. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  139. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  140. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  141. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  142. CONFIG_SYS_INIT_RAM_SIZE - \
  143. GENERATED_GBL_DATA_SIZE)
  144. /*
  145. * USB
  146. *
  147. * Currently only EHCI is enabled, the MUSB OTG controller
  148. * is not enabled.
  149. */
  150. /* USB EHCI */
  151. #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 162
  152. /* Defines for SPL */
  153. #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  154. /* NAND boot config */
  155. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  156. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  157. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  158. #define CONFIG_SYS_NAND_OOBSIZE 64
  159. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  160. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  161. /*
  162. * Use the ECC/OOB layout from omap_gpmc.h that matches your chip:
  163. * SP vs LP, 8bit vs 16bit: GPMC_NAND_HW_ECC_LAYOUT
  164. */
  165. #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  166. 10, 11, 12, 13 }
  167. #define CONFIG_SYS_NAND_ECCSIZE 512
  168. #define CONFIG_SYS_NAND_ECCBYTES 3
  169. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
  170. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  171. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  172. #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
  173. CONFIG_SPL_TEXT_BASE)
  174. /*
  175. * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the
  176. * older x-loader implementations. And move the BSS area so that it
  177. * doesn't overlap with TEXT_BASE.
  178. */
  179. #define CONFIG_SPL_BSS_START_ADDR 0x80100000
  180. #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
  181. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  182. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
  183. #endif /* __CONFIG_H */