tao3530.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. /*
  2. * Configuration settings for the TechNexion TAO-3530 SOM
  3. * equipped on Thunder baseboard.
  4. *
  5. * Edward Lin <linuxfae@technexion.com>
  6. * Tapani Utriainen <linuxfae@technexion.com>
  7. *
  8. * Copyright (C) 2013 Stefan Roese <sr@denx.de>
  9. *
  10. * SPDX-License-Identifier: GPL-2.0+
  11. */
  12. #ifndef __CONFIG_H
  13. #define __CONFIG_H
  14. /*
  15. * High Level Configuration Options
  16. */
  17. #define CONFIG_OMAP /* in a TI OMAP core */
  18. #define CONFIG_OMAP_GPIO
  19. #define CONFIG_OMAP_COMMON
  20. #define CONFIG_SYS_GENERIC_BOARD
  21. /* Common ARM Erratas */
  22. #define CONFIG_ARM_ERRATA_454179
  23. #define CONFIG_ARM_ERRATA_430973
  24. #define CONFIG_ARM_ERRATA_621766
  25. #define MACH_TYPE_OMAP3_TAO3530 2836
  26. #define CONFIG_SDRC /* Has an SDRC controller */
  27. #include <asm/arch/cpu.h> /* get chip and board defs */
  28. #include <asm/arch/omap.h>
  29. /*
  30. * Display CPU and Board information
  31. */
  32. #define CONFIG_DISPLAY_CPUINFO
  33. #define CONFIG_DISPLAY_BOARDINFO
  34. /* Clock Defines */
  35. #define V_OSCK 26000000 /* Clock output from T2 */
  36. #define V_SCLK (V_OSCK >> 1)
  37. #define CONFIG_MISC_INIT_R
  38. #define CONFIG_OF_LIBFDT
  39. #define CONFIG_CMDLINE_TAG
  40. #define CONFIG_SETUP_MEMORY_TAGS
  41. #define CONFIG_INITRD_TAG
  42. #define CONFIG_REVISION_TAG
  43. /*
  44. * Size of malloc() pool
  45. */
  46. #define CONFIG_SYS_MALLOC_LEN (4 << 20)
  47. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
  48. /*
  49. * Hardware drivers
  50. */
  51. /*
  52. * NS16550 Configuration
  53. */
  54. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  55. #define CONFIG_SYS_NS16550
  56. #define CONFIG_SYS_NS16550_SERIAL
  57. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  58. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  59. /*
  60. * select serial console configuration
  61. */
  62. #define CONFIG_CONS_INDEX 3
  63. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  64. /* allow to overwrite serial and ethaddr */
  65. #define CONFIG_ENV_OVERWRITE
  66. #define CONFIG_BAUDRATE 115200
  67. #define CONFIG_GENERIC_MMC
  68. #define CONFIG_MMC
  69. #define CONFIG_OMAP_HSMMC
  70. #define CONFIG_DOS_PARTITION
  71. /* GPIO banks */
  72. #define CONFIG_OMAP3_GPIO_2 /* GPIO32 ..63 is in GPIO bank 2 */
  73. #define CONFIG_OMAP3_GPIO_3 /* GPIO64 ..95 is in GPIO bank 3 */
  74. #define CONFIG_OMAP3_GPIO_4 /* GPIO96 ..127 is in GPIO bank 4 */
  75. #define CONFIG_OMAP3_GPIO_5 /* GPIO128..159 is in GPIO bank 5 */
  76. #define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
  77. /* commands to include */
  78. #include <config_cmd_default.h>
  79. #define CONFIG_CMD_CACHE
  80. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  81. #define CONFIG_CMD_FAT /* FAT support */
  82. #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
  83. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  84. #define MTDIDS_DEFAULT "nand0=nand"
  85. #define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\
  86. "1920k(u-boot),128k(u-boot-env),"\
  87. "4m(kernel),-(fs)"
  88. #define CONFIG_CMD_I2C /* I2C serial bus support */
  89. #define CONFIG_CMD_MMC /* MMC support */
  90. #define CONFIG_CMD_NAND /* NAND support */
  91. #define CONFIG_CMD_DHCP
  92. #define CONFIG_CMD_PING
  93. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  94. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  95. #undef CONFIG_CMD_IMI /* iminfo */
  96. #undef CONFIG_CMD_IMLS /* List all found images */
  97. #define CONFIG_SYS_NO_FLASH
  98. #define CONFIG_SYS_I2C
  99. #define CONFIG_SYS_I2C_OMAP34XX
  100. #define CONFIG_SYS_OMAP24_I2C_SPEED 100000
  101. #define CONFIG_SYS_OMAP24_I2C_SLAVE 1
  102. #define CONFIG_I2C_MULTI_BUS
  103. /*
  104. * TWL4030
  105. */
  106. #define CONFIG_TWL4030_POWER
  107. #define CONFIG_TWL4030_LED
  108. /*
  109. * Board NAND Info.
  110. */
  111. #define CONFIG_SYS_NAND_QUIET_TEST
  112. #define CONFIG_NAND_OMAP_GPMC
  113. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  114. /* to access nand */
  115. #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
  116. /* to access nand at */
  117. /* CS0 */
  118. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
  119. /* devices */
  120. #define CONFIG_SYS_NAND_BUSWIDTH_16BIT 16
  121. /* Environment information */
  122. #define CONFIG_BOOTDELAY 3
  123. #define CONFIG_EXTRA_ENV_SETTINGS \
  124. "loadaddr=0x82000000\0" \
  125. "console=ttyO2,115200n8\0" \
  126. "mpurate=600\0" \
  127. "dvi_mode=omapfb.mode=dvi:1280x720-24@60\0" \
  128. "tv_mode=omapfb.mode=tv:ntsc\0" \
  129. "video_mode=omapdss.def_disp=lcd vram=6M omapfb.vram=0:2M,1:2M,2:2M\0" \
  130. "lcd_mode=omapfb.mode=lcd:800x480@60 \0" \
  131. "extra_options= \0" \
  132. "mmcdev=0\0" \
  133. "mmcroot=/dev/mmcblk0p2 rw\0" \
  134. "mmcrootfstype=ext3 rootwait\0" \
  135. "nandroot=ubi0:rootfs ubi.mtd=4\0" \
  136. "nandrootfstype=ubifs\0" \
  137. "mmcargs=setenv bootargs console=${console} " \
  138. "mpurate=${mpurate} " \
  139. "${video_mode} " \
  140. "root=${mmcroot} " \
  141. "rootfstype=${mmcrootfstype} " \
  142. "${extra_options}\0" \
  143. "nandargs=setenv bootargs console=${console} " \
  144. "mpurate=${mpurate} " \
  145. "${video_mode} " \
  146. "${network_setting} " \
  147. "root=${nandroot} " \
  148. "rootfstype=${nandrootfstype} "\
  149. "${extra_options}\0" \
  150. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  151. "bootscript=echo Running bootscript from mmc ...; " \
  152. "source ${loadaddr}\0" \
  153. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  154. "mmcboot=echo Booting from mmc ...; " \
  155. "run mmcargs; " \
  156. "bootm ${loadaddr}\0" \
  157. "nandboot=echo Booting from nand ...; " \
  158. "run nandargs; " \
  159. "nand read ${loadaddr} 280000 400000; " \
  160. "bootm ${loadaddr}\0" \
  161. #define CONFIG_BOOTCOMMAND \
  162. "if mmc rescan ${mmcdev}; then " \
  163. "if run loadbootscript; then " \
  164. "run bootscript; " \
  165. "else " \
  166. "if run loaduimage; then " \
  167. "run mmcboot; " \
  168. "else run nandboot; " \
  169. "fi; " \
  170. "fi; " \
  171. "else run nandboot; fi"
  172. /*
  173. * Miscellaneous configurable options
  174. */
  175. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  176. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  177. #define CONFIG_SYS_PROMPT "TAO-3530 # "
  178. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  179. /* turn on command-line edit/hist/auto */
  180. #define CONFIG_CMDLINE_EDITING
  181. #define CONFIG_COMMAND_HISTORY
  182. #define CONFIG_AUTO_COMPLETE
  183. /* Print Buffer Size */
  184. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  185. sizeof(CONFIG_SYS_PROMPT) + 16)
  186. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  187. /* Boot Argument Buffer Size */
  188. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  189. #define CONFIG_SYS_ALT_MEMTEST 1
  190. #define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */
  191. /* defaults */
  192. #define CONFIG_SYS_MEMTEST_END (0x83FFFFFF) /* 64MB */
  193. #define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */
  194. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */
  195. /* load address */
  196. #define CONFIG_SYS_TEXT_BASE 0x80008000
  197. /*
  198. * OMAP3 has 12 GP timers, they can be driven by the system clock
  199. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  200. * This rate is divided by a local divisor.
  201. */
  202. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  203. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  204. /*
  205. * Stack sizes
  206. *
  207. * The stack sizes are set up in start.S using the settings below
  208. */
  209. #define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
  210. /*
  211. * Physical Memory Map
  212. */
  213. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  214. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  215. #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */
  216. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  217. /*
  218. * FLASH and environment organization
  219. */
  220. /* **** PISMO SUPPORT *** */
  221. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
  222. #define CONFIG_SYS_FLASH_BASE NAND_BASE
  223. /* Monitor at start of flash */
  224. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  225. #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
  226. #define CONFIG_ENV_IS_IN_NAND 1
  227. #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
  228. #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
  229. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)
  230. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  231. #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
  232. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  233. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  234. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  235. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  236. CONFIG_SYS_INIT_RAM_SIZE - \
  237. GENERATED_GBL_DATA_SIZE)
  238. #define CONFIG_OMAP3_SPI
  239. /*
  240. * USB
  241. *
  242. * Currently only EHCI is enabled, the MUSB OTG controller
  243. * is not enabled.
  244. */
  245. /* USB EHCI */
  246. #define CONFIG_CMD_USB
  247. #define CONFIG_USB_EHCI
  248. #define CONFIG_USB_EHCI_OMAP
  249. #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 162
  250. #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
  251. #define CONFIG_USB_HOST_ETHER
  252. #define CONFIG_USB_ETHER_SMSC95XX
  253. #define CONFIG_USB_ETHER
  254. #define CONFIG_USB_ETHER_RNDIS
  255. #define CONFIG_USB_STORAGE
  256. #define CONGIG_CMD_STORAGE
  257. /* Defines for SPL */
  258. #define CONFIG_SPL_FRAMEWORK
  259. #define CONFIG_SPL_NAND_SIMPLE
  260. #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
  261. #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
  262. #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  263. #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  264. #define CONFIG_SPL_BOARD_INIT
  265. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  266. #define CONFIG_SPL_LIBDISK_SUPPORT
  267. #define CONFIG_SPL_I2C_SUPPORT
  268. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  269. #define CONFIG_SPL_MMC_SUPPORT
  270. #define CONFIG_SPL_FAT_SUPPORT
  271. #define CONFIG_SPL_SERIAL_SUPPORT
  272. #define CONFIG_SPL_NAND_SUPPORT
  273. #define CONFIG_SPL_NAND_BASE
  274. #define CONFIG_SPL_NAND_DRIVERS
  275. #define CONFIG_SPL_NAND_ECC
  276. #define CONFIG_SPL_GPIO_SUPPORT
  277. #define CONFIG_SPL_POWER_SUPPORT
  278. #define CONFIG_SPL_OMAP3_ID_NAND
  279. #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
  280. /* NAND boot config */
  281. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  282. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  283. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  284. #define CONFIG_SYS_NAND_OOBSIZE 64
  285. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  286. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  287. /*
  288. * Use the ECC/OOB layout from omap_gpmc.h that matches your chip:
  289. * SP vs LP, 8bit vs 16bit: GPMC_NAND_HW_ECC_LAYOUT
  290. */
  291. #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  292. 10, 11, 12, 13 }
  293. #define CONFIG_SYS_NAND_ECCSIZE 512
  294. #define CONFIG_SYS_NAND_ECCBYTES 3
  295. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
  296. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  297. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  298. #define CONFIG_SPL_TEXT_BASE 0x40200800
  299. #define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
  300. /*
  301. * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the
  302. * older x-loader implementations. And move the BSS area so that it
  303. * doesn't overlap with TEXT_BASE.
  304. */
  305. #define CONFIG_SYS_TEXT_BASE 0x80008000
  306. #define CONFIG_SPL_BSS_START_ADDR 0x80100000
  307. #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
  308. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  309. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
  310. #endif /* __CONFIG_H */