omap3_logic.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
  4. * Peter Barada <peter.barada@logicpd.com>
  5. *
  6. * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
  7. * reference boards.
  8. */
  9. #ifndef __CONFIG_H
  10. #define __CONFIG_H
  11. /* High Level Configuration Options */
  12. #include <configs/ti_omap3_common.h>
  13. /*
  14. * We are only ever GP parts and will utilize all of the "downloaded image"
  15. * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
  16. * order to allow for BCH8 to fit in.
  17. */
  18. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  19. #define CONFIG_SETUP_MEMORY_TAGS
  20. #define CONFIG_INITRD_TAG
  21. #define CONFIG_REVISION_TAG
  22. /* Hardware drivers */
  23. /* I2C */
  24. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */
  25. #ifdef CONFIG_SPL_BUILD
  26. #undef CONFIG_USB_EHCI_OMAP
  27. #endif
  28. #ifdef CONFIG_USB_EHCI_OMAP
  29. #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 4
  30. #endif
  31. /* Board NAND Info. */
  32. #ifdef CONFIG_MTD_RAW_NAND
  33. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
  34. /* NAND devices */
  35. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  36. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  37. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  38. #define CONFIG_SYS_NAND_OOBSIZE 64
  39. #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
  40. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  41. #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
  42. 13, 14, 16, 17, 18, 19, 20, 21, 22, \
  43. 23, 24, 25, 26, 27, 28, 30, 31, 32, \
  44. 33, 34, 35, 36, 37, 38, 39, 40, 41, \
  45. 42, 44, 45, 46, 47, 48, 49, 50, 51, \
  46. 52, 53, 54, 55, 56}
  47. #define CONFIG_SYS_NAND_ECCSIZE 512
  48. #define CONFIG_SYS_NAND_ECCBYTES 13
  49. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
  50. #define CONFIG_SYS_NAND_MAX_OOBFREE 2
  51. #define CONFIG_SYS_NAND_MAX_ECCPOS 56
  52. #endif
  53. /* Environment information */
  54. #define CONFIG_EXTRA_ENV_SETTINGS \
  55. DEFAULT_LINUX_BOOT_ENV \
  56. "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
  57. "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
  58. "mmcdev=0\0" \
  59. "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
  60. "mmcrootfstype=ext4 rootwait\0" \
  61. "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
  62. "nandrootfstype=ubifs rootwait\0" \
  63. "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
  64. "if run loadbootscript; then " \
  65. "run bootscript; " \
  66. "else " \
  67. "run defaultboot;" \
  68. "fi; " \
  69. "else run defaultboot; fi\0" \
  70. "defaultboot=run mmcramboot\0" \
  71. "consoledevice=ttyS0\0" \
  72. "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
  73. "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
  74. "rotation=0\0" \
  75. "vrfb_arg=if itest ${rotation} -ne 0; then " \
  76. "setenv bootargs ${bootargs} omapfb.vrfb=y " \
  77. "omapfb.rotate=${rotation}; " \
  78. "fi\0" \
  79. "optargs=ignore_loglevel early_printk no_console_suspend\0" \
  80. "common_bootargs=run setconsole; setenv bootargs " \
  81. "${bootargs} "\
  82. "console=${console} " \
  83. "${mtdparts} "\
  84. "${optargs}; " \
  85. "run vrfb_arg\0" \
  86. "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  87. "bootscript=echo 'Running bootscript from mmc ...'; " \
  88. "source ${loadaddr}\0" \
  89. "loadimage=mmc rescan; " \
  90. "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
  91. "ramdisksize=64000\0" \
  92. "ramdiskimage=rootfs.ext2.gz.uboot\0" \
  93. "loadramdisk=mmc rescan; " \
  94. "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \
  95. "ramargs=setenv bootargs "\
  96. "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
  97. "mmcargs=setenv bootargs "\
  98. "root=PARTUUID=${uuid} " \
  99. "rootfstype=${mmcrootfstype} rw\0" \
  100. "nandargs=setenv bootargs "\
  101. "root=${nandroot} " \
  102. "rootfstype=${nandrootfstype}\0" \
  103. "nfsargs=setenv serverip ${tftpserver}; " \
  104. "setenv bootargs root=/dev/nfs " \
  105. "nfsroot=${nfsrootpath} " \
  106. "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
  107. "nfsrootpath=/opt/nfs-exports/omap\0" \
  108. "autoload=no\0" \
  109. "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
  110. "loadfdt=mmc rescan; " \
  111. "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
  112. "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
  113. "run finduuid; "\
  114. "run mmcargs; " \
  115. "run common_bootargs; " \
  116. "run dump_bootargs; " \
  117. "run loadimage; " \
  118. "run loadfdt;\0 " \
  119. "mmcbootz=setenv bootfile zImage; " \
  120. "run mmcbootcommon; "\
  121. "bootz ${loadaddr} - ${fdtaddr}\0" \
  122. "mmcboot=setenv bootfile uImage; "\
  123. "run mmcbootcommon; "\
  124. "bootm ${loadaddr} - ${fdtaddr}\0" \
  125. "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \
  126. "run ramargs; " \
  127. "run common_bootargs; " \
  128. "run dump_bootargs; " \
  129. "run loadimage; " \
  130. "run loadfdt; " \
  131. "run loadramdisk\0" \
  132. "mmcramboot=setenv bootfile uImage; " \
  133. "run mmcrambootcommon; " \
  134. "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
  135. "mmcrambootz=setenv bootfile zImage; " \
  136. "run mmcrambootcommon; " \
  137. "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
  138. "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
  139. "run ramargs; " \
  140. "run common_bootargs; " \
  141. "run dump_bootargs; " \
  142. "tftpboot ${loadaddr} ${zimage}; " \
  143. "tftpboot ${rdaddr} ${ramdiskimage}; " \
  144. "bootm ${loadaddr} ${rdaddr}\0" \
  145. "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \
  146. "dhcp;" \
  147. "run nfsargs;" \
  148. "run common_bootargs;" \
  149. "run dump_bootargs;" \
  150. "tftpboot $loadaddr zImage;" \
  151. "bootz $loadaddr\0" \
  152. "nandbootcommon=echo 'Booting kernel from NAND...';" \
  153. "run nandargs;" \
  154. "run common_bootargs;" \
  155. "run dump_bootargs;" \
  156. "nand read ${loadaddr} kernel;" \
  157. "nand read ${fdtaddr} spl-os;\0" \
  158. "nandbootz=run nandbootcommon; "\
  159. "bootz ${loadaddr} - ${fdtaddr}\0"\
  160. "nandboot=run nandbootcommon; "\
  161. "bootm ${loadaddr} - ${fdtaddr}\0"\
  162. #define CONFIG_BOOTCOMMAND \
  163. "run autoboot"
  164. /* Miscellaneous configurable options */
  165. /* memtest works on */
  166. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
  167. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  168. 0x01F00000) /* 31MB */
  169. /* FLASH and environment organization */
  170. /* **** PISMO SUPPORT *** */
  171. #if defined(CONFIG_CMD_NAND)
  172. #define CONFIG_SYS_FLASH_BASE 0x10000000
  173. #endif
  174. #define CONFIG_SYS_MAX_FLASH_SECT 256
  175. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  176. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  177. #define CONFIG_SYS_FLASH_SIZE 0x4000000
  178. /* Monitor at start of flash */
  179. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  180. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  181. /* Defines for SPL */
  182. /* NAND: SPL falcon mode configs */
  183. #ifdef CONFIG_SPL_OS_BOOT
  184. #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
  185. #endif
  186. #endif /* __CONFIG_H */