omap3_logic.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /*
  2. * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
  3. * Peter Barada <peter.barada@logicpd.com>
  4. *
  5. * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
  6. * reference boards.
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. #ifndef __CONFIG_H
  11. #define __CONFIG_H
  12. /* High Level Configuration Options */
  13. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  14. /*
  15. * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  16. * 64 bytes before this address should be set aside for u-boot.img's
  17. * header. That is 0x800FFFC0--0x80100000 should not be used for any
  18. * other needs. We use this rather than the inherited defines from
  19. * ti_armv7_common.h for backwards compatibility.
  20. */
  21. #define CONFIG_SYS_TEXT_BASE 0x80100000
  22. #define CONFIG_SPL_BSS_START_ADDR 0x80000000
  23. #define CONFIG_SPL_BSS_MAX_SIZE (512 << 10) /* 512 KB */
  24. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  25. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
  26. #include <configs/ti_omap3_common.h>
  27. /* Display CPU and Board information */
  28. #define CONFIG_DISPLAY_CPUINFO
  29. #define CONFIG_DISPLAY_BOARDINFO
  30. #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
  31. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  32. #define CONFIG_SETUP_MEMORY_TAGS
  33. #define CONFIG_INITRD_TAG
  34. #define CONFIG_REVISION_TAG
  35. #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
  36. #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
  37. /* Hardware drivers */
  38. /* GPIO banks */
  39. #define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
  40. #define CONFIG_USB_OMAP3
  41. /* select serial console configuration */
  42. #undef CONFIG_CONS_INDEX
  43. #define CONFIG_CONS_INDEX 1
  44. #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
  45. #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
  46. /* commands to include */
  47. #define CONFIG_CMD_NAND
  48. #define CONFIG_CMD_CACHE
  49. #define CONFIG_CMD_EXT2
  50. #define CONFIG_CMD_FAT
  51. #define CONFIG_CMD_MTDPARTS
  52. #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
  53. #define CONFIG_CMD_PING
  54. #define CONFIG_CMD_DHCP
  55. #define CONFIG_YAFFS2
  56. /* I2C */
  57. #define CONFIG_SYS_I2C_OMAP34XX
  58. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */
  59. #define EXPANSION_EEPROM_I2C_BUS 2 /* I2C Bus for AT24C64 */
  60. #define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
  61. /* USB */
  62. #define CONFIG_USB_MUSB_GADGET
  63. #define CONFIG_USB_MUSB_OMAP2PLUS
  64. #define CONFIG_USB_MUSB_PIO_ONLY
  65. #define CONFIG_USB_GADGET_DUALSPEED
  66. #define CONFIG_USB_ETHER
  67. #define CONFIG_USB_ETHER_RNDIS
  68. #define CONFIG_USB_GADGET
  69. #define CONFIG_USB_GADGET_VBUS_DRAW 0
  70. #define CONFIG_USB_GADGET_DOWNLOAD
  71. #define CONFIG_G_DNL_VENDOR_NUM 0x0451
  72. #define CONFIG_G_DNL_PRODUCT_NUM 0xd022
  73. #define CONFIG_G_DNL_MANUFACTURER "TI"
  74. #define CONFIG_USB_FUNCTION_FASTBOOT
  75. #define CONFIG_CMD_FASTBOOT
  76. #define CONFIG_ANDROID_BOOT_IMAGE
  77. #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
  78. #define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
  79. #define CONFIG_SYS_CACHELINE_SIZE 64
  80. /* TWL4030 */
  81. #define CONFIG_TWL4030_PWM
  82. #define CONFIG_TWL4030_USB
  83. /* Board NAND Info. */
  84. #ifdef CONFIG_NAND
  85. #define CONFIG_NAND_OMAP_GPMC
  86. #define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
  87. #define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
  88. #define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
  89. #define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
  90. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  91. /* to access nand */
  92. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
  93. /* NAND devices */
  94. #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
  95. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  96. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  97. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  98. #define CONFIG_SYS_NAND_OOBSIZE 64
  99. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  100. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  101. #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
  102. 13, 14, 16, 17, 18, 19, 20, 21, 22, \
  103. 23, 24, 25, 26, 27, 28, 30, 31, 32, \
  104. 33, 34, 35, 36, 37, 38, 39, 40, 41, \
  105. 42, 44, 45, 46, 47, 48, 49, 50, 51, \
  106. 52, 53, 54, 55, 56}
  107. #define CONFIG_SYS_NAND_ECCSIZE 512
  108. #define CONFIG_SYS_NAND_ECCBYTES 13
  109. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
  110. #define CONFIG_BCH
  111. #define CONFIG_SYS_NAND_MAX_OOBFREE 2
  112. #define CONFIG_SYS_NAND_MAX_ECCPOS 56
  113. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  114. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  115. #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
  116. #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
  117. #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\
  118. "1920k(u-boot),128k(u-boot-env),"\
  119. "4m(kernel),-(fs)"
  120. #endif
  121. /* Environment information */
  122. /*
  123. * PREBOOT assumes the 4.3" display is attached. User can interrupt
  124. * and modify display variable to suit their needs.
  125. */
  126. #define CONFIG_PREBOOT \
  127. "echo ======================NOTICE============================;"\
  128. "echo \"The u-boot environment is not set.\";" \
  129. "echo \"If using a display a valid display varible for your panel\";" \
  130. "echo \"needs to be set.\";" \
  131. "echo \"Valid display options are:\";" \
  132. "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
  133. "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
  134. "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
  135. "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
  136. "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
  137. "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
  138. "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
  139. "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
  140. "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
  141. "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
  142. "setenv display 15;" \
  143. "setenv preboot;" \
  144. "nand unlock;" \
  145. "saveenv;"
  146. #define CONFIG_EXTRA_ENV_SETTINGS \
  147. "loadaddr=0x81000000\0" \
  148. "uimage=uImage\0" \
  149. "zimage=zImage\0" \
  150. "mtdids=" MTDIDS_DEFAULT "\0" \
  151. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  152. "mmcdev=0\0" \
  153. "mmcroot=/dev/mmcblk0p2 rw\0" \
  154. "mmcrootfstype=ext4 rootwait\0" \
  155. "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
  156. "if run loadbootscript; then " \
  157. "run bootscript; " \
  158. "else " \
  159. "run defaultboot;" \
  160. "fi; " \
  161. "else run defaultboot; fi\0" \
  162. "defaultboot=run mmcramboot\0" \
  163. "consoledevice=ttyO0\0" \
  164. "display=15\0" \
  165. "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
  166. "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
  167. "rotation=0\0" \
  168. "vrfb_arg=if itest ${rotation} -ne 0; then " \
  169. "setenv bootargs ${bootargs} omapfb.vrfb=y " \
  170. "omapfb.rotate=${rotation}; " \
  171. "fi\0" \
  172. "optargs=ignore_loglevel early_printk no_console_suspend\0" \
  173. "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
  174. "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
  175. "${optargs};" \
  176. "run addmtdparts; " \
  177. "run vrfb_arg\0" \
  178. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  179. "bootscript=echo 'Running bootscript from mmc ...'; " \
  180. "source ${loadaddr}\0" \
  181. "loaduimage=mmc rescan; " \
  182. "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \
  183. "loadzimage=mmc rescan; " \
  184. "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \
  185. "ramdisksize=64000\0" \
  186. "ramdiskaddr=0x82000000\0" \
  187. "ramdiskimage=rootfs.ext2.gz.uboot\0" \
  188. "loadramdisk=mmc rescan; " \
  189. "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \
  190. "ramargs=run setconsole; setenv bootargs console=${console} " \
  191. "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
  192. "mmcargs=run setconsole; setenv bootargs console=${console} " \
  193. "${optargs} " \
  194. "root=${mmcroot} " \
  195. "rootfstype=${mmcrootfstype}\0" \
  196. "fdtaddr=0x86000000\0" \
  197. "loadfdtimage=mmc rescan; " \
  198. "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
  199. "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \
  200. "run mmcargs; " \
  201. "run common_bootargs; " \
  202. "run dump_bootargs; " \
  203. "run loadzimage; " \
  204. "run loadfdtimage; " \
  205. "bootz ${loadaddr} - ${fdtaddr}\0" \
  206. "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \
  207. "run ramargs; " \
  208. "run common_bootargs; " \
  209. "run dump_bootargs; " \
  210. "run loaduimage; " \
  211. "run loadramdisk; " \
  212. "bootm ${loadaddr} ${ramdiskaddr}\0" \
  213. "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \
  214. "run ramargs; " \
  215. "run common_bootargs; " \
  216. "run dump_bootargs; " \
  217. "run loadzimage; " \
  218. "run loadramdisk; " \
  219. "run loadfdtimage; " \
  220. "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \
  221. "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
  222. "run ramargs; " \
  223. "run common_bootargs; " \
  224. "run dump_bootargs; " \
  225. "tftpboot ${loadaddr} ${uimage}; " \
  226. "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \
  227. "bootm ${loadaddr} ${ramdiskaddr}\0"
  228. #define CONFIG_BOOTCOMMAND \
  229. "run autoboot"
  230. /* Miscellaneous configurable options */
  231. #define CONFIG_AUTO_COMPLETE
  232. /* memtest works on */
  233. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
  234. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  235. 0x01F00000) /* 31MB */
  236. /* FLASH and environment organization */
  237. /* **** PISMO SUPPORT *** */
  238. #if defined(CONFIG_CMD_NAND)
  239. #define CONFIG_SYS_FLASH_BASE NAND_BASE
  240. #elif defined(CONFIG_CMD_ONENAND)
  241. #define CONFIG_SYS_FLASH_BASE ONENAND_MAP
  242. #endif
  243. /* Monitor at start of flash */
  244. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  245. #define CONFIG_ENV_IS_IN_NAND 1
  246. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  247. #define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
  248. #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
  249. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  250. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  251. #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
  252. /* SMSC922x Ethernet */
  253. #if defined(CONFIG_CMD_NET)
  254. #define CONFIG_SMC911X
  255. #define CONFIG_SMC911X_16_BIT
  256. #define CONFIG_SMC911X_BASE 0x08000000
  257. #endif /* (CONFIG_CMD_NET) */
  258. /* Defines for SPL */
  259. #define CONFIG_SPL_OMAP3_ID_NAND
  260. /* NAND: SPL falcon mode configs */
  261. #ifdef CONFIG_SPL_OS_BOOT
  262. #define CONFIG_CMD_SPL_NAND_OFS 0x240000
  263. #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
  264. #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
  265. #endif
  266. #endif /* __CONFIG_H */