omap3_logic.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. /*
  29. * High Level Configuration Options
  30. */
  31. #define CONFIG_OMAP /* in a TI OMAP core */
  32. #define CONFIG_OMAP34XX /* which is a 34XX */
  33. #define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */
  34. #define CONFIG_OMAP_GPIO
  35. #define CONFIG_SYS_TEXT_BASE 0x80400000
  36. #define CONFIG_SDRC /* The chip has SDRC controller */
  37. #include <asm/arch/cpu.h> /* get chip and board defs */
  38. #include <asm/arch/omap3.h>
  39. /*
  40. * Display CPU and Board information
  41. */
  42. #define CONFIG_DISPLAY_CPUINFO
  43. #define CONFIG_DISPLAY_BOARDINFO
  44. /* Clock Defines */
  45. #define V_OSCK 26000000 /* Clock output from T2 */
  46. #define V_SCLK (V_OSCK >> 1)
  47. #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
  48. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  49. #define CONFIG_SETUP_MEMORY_TAGS
  50. #define CONFIG_INITRD_TAG
  51. #define CONFIG_REVISION_TAG
  52. #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
  53. #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
  54. /*
  55. * Size of malloc() pool
  56. */
  57. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  58. /* Sector */
  59. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
  60. /*
  61. * Hardware drivers
  62. */
  63. /*
  64. * NS16550 Configuration
  65. */
  66. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  67. #define CONFIG_SYS_NS16550
  68. #define CONFIG_SYS_NS16550_SERIAL
  69. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  70. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  71. /*
  72. * select serial console configuration
  73. */
  74. #define CONFIG_CONS_INDEX 1
  75. #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
  76. #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
  77. /* allow to overwrite serial and ethaddr */
  78. #define CONFIG_ENV_OVERWRITE
  79. #define CONFIG_BAUDRATE 115200
  80. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  81. 115200}
  82. #define CONFIG_GENERIC_MMC
  83. #define CONFIG_MMC
  84. #define CONFIG_OMAP_HSMMC
  85. #define CONFIG_DOS_PARTITION
  86. /* commands to include */
  87. #include <config_cmd_default.h>
  88. #define CONFIG_CMD_CACHE
  89. #define CONFIG_CMD_EXT2 /* EXT2 Support */
  90. #define CONFIG_CMD_FAT /* FAT support */
  91. #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
  92. #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
  93. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  94. #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
  95. #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
  96. "1920k(u-boot),128k(u-boot-env),"\
  97. "4m(kernel),-(fs)"
  98. #define CONFIG_CMD_I2C /* I2C serial bus support */
  99. #define CONFIG_CMD_MMC /* MMC support */
  100. #define CONFIG_CMD_NAND /* NAND support */
  101. #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
  102. #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
  103. #define CONFIG_CMD_PING
  104. #define CONFIG_CMD_DHCP
  105. #define CONFIG_CMD_SETEXPR /* Evaluate expressions */
  106. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  107. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  108. #undef CONFIG_CMD_IMI /* iminfo */
  109. #undef CONFIG_CMD_IMLS /* List all found images */
  110. #define CONFIG_SYS_NO_FLASH
  111. /*
  112. * I2C
  113. */
  114. #define CONFIG_HARD_I2C
  115. #define CONFIG_DRIVER_OMAP34XX_I2C
  116. #define CONFIG_SYS_I2C_SPEED 100000
  117. #define CONFIG_SYS_I2C_SLAVE 1
  118. #define CONFIG_I2C_MULTI_BUS
  119. /*
  120. * TWL4030
  121. */
  122. #define CONFIG_TWL4030_POWER
  123. /*
  124. * Board NAND Info.
  125. */
  126. #define CONFIG_SYS_NAND_QUIET_TEST
  127. #define CONFIG_NAND_OMAP_GPMC
  128. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  129. /* to access nand */
  130. #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
  131. /* to access nand at */
  132. /* CS0 */
  133. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
  134. /* NAND devices */
  135. #define CONFIG_JFFS2_NAND
  136. /* nand device jffs2 lives on */
  137. #define CONFIG_JFFS2_DEV "nand0"
  138. /* start of jffs2 partition */
  139. #define CONFIG_JFFS2_PART_OFFSET 0x680000
  140. #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
  141. /* partition */
  142. /* Environment information */
  143. #define CONFIG_BOOTDELAY 2
  144. /*
  145. * PREBOOT assumes the 4.3" display is attached. User can interrupt
  146. * and modify display variable to suit their needs.
  147. */
  148. #define CONFIG_PREBOOT \
  149. "echo ======================NOTICE============================;"\
  150. "echo \"The u-boot environment is not set.\";" \
  151. "echo \"If using a display a valid display varible for your panel\";" \
  152. "echo \"needs to be set.\";" \
  153. "echo \"Valid display options are:\";" \
  154. "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
  155. "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
  156. "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
  157. "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
  158. "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
  159. "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
  160. "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
  161. "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
  162. "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
  163. "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
  164. "setenv display 15;" \
  165. "setenv preboot;" \
  166. "saveenv;"
  167. #define CONFIG_EXTRA_ENV_SETTINGS \
  168. "loadaddr=0x81000000\0" \
  169. "bootfile=uImage\0" \
  170. "mtdids=" MTDIDS_DEFAULT "\0" \
  171. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  172. "mmcdev=0\0" \
  173. "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
  174. "if run loadbootscript; then " \
  175. "run bootscript; " \
  176. "else " \
  177. "run defaultboot;" \
  178. "fi; " \
  179. "else run defaultboot; fi\0" \
  180. "defaultboot=run mmcramboot\0" \
  181. "consoledevice=ttyO0\0" \
  182. "display=15\0" \
  183. "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
  184. "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
  185. "rotation=0\0" \
  186. "vrfb_arg=if itest ${rotation} -ne 0; then " \
  187. "setenv bootargs ${bootargs} omapfb.vrfb=y " \
  188. "omapfb.rotate=${rotation}; " \
  189. "fi\0" \
  190. "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \
  191. "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
  192. "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
  193. "${otherbootargs};" \
  194. "run addmtdparts; " \
  195. "run vrfb_arg\0" \
  196. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  197. "bootscript=echo 'Running bootscript from mmc ...'; " \
  198. "source ${loadaddr}\0" \
  199. "loaduimage=mmc rescan ${mmcdev}; " \
  200. "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
  201. "ramdisksize=64000\0" \
  202. "ramdiskaddr=0x82000000\0" \
  203. "ramdiskimage=rootfs.ext2.gz.uboot\0" \
  204. "ramargs=run setconsole; setenv bootargs console=${console} " \
  205. "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
  206. "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \
  207. "run ramargs; " \
  208. "run common_bootargs; " \
  209. "run dump_bootargs; " \
  210. "run loaduimage; " \
  211. "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\
  212. "bootm ${loadaddr} ${ramdiskaddr}\0" \
  213. "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
  214. "run ramargs; " \
  215. "run common_bootargs; " \
  216. "run dump_bootargs; " \
  217. "tftpboot ${loadaddr} ${bootfile}; "\
  218. "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\
  219. "bootm ${loadaddr} ${ramdiskaddr}\0"
  220. #define CONFIG_BOOTCOMMAND \
  221. "run autoboot"
  222. #define CONFIG_AUTO_COMPLETE
  223. /*
  224. * Miscellaneous configurable options
  225. */
  226. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  227. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  228. #define CONFIG_SYS_PROMPT "OMAP Logic # "
  229. #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
  230. /* Print Buffer Size */
  231. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  232. sizeof(CONFIG_SYS_PROMPT) + 16)
  233. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  234. /* Boot Argument Buffer Size */
  235. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  236. /* memtest works on */
  237. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
  238. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  239. 0x01F00000) /* 31MB */
  240. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load */
  241. /* address */
  242. /*
  243. * OMAP3 has 12 GP timers, they can be driven by the system clock
  244. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  245. * This rate is divided by a local divisor.
  246. */
  247. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  248. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  249. #define CONFIG_SYS_HZ 1000
  250. /*
  251. * Physical Memory Map
  252. */
  253. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  254. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  255. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  256. /*
  257. * FLASH and environment organization
  258. */
  259. /* **** PISMO SUPPORT *** */
  260. /* Configure the PISMO */
  261. #define PISMO1_NAND_SIZE GPMC_SIZE_128M
  262. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
  263. #if defined(CONFIG_CMD_NAND)
  264. #define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE
  265. #elif defined(CONFIG_CMD_ONENAND)
  266. #define CONFIG_SYS_FLASH_BASE PISMO1_ONEN_BASE
  267. #endif
  268. /* Monitor at start of flash */
  269. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  270. #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
  271. #if defined(CONFIG_CMD_NAND)
  272. #define CONFIG_NAND_OMAP_GPMC
  273. #define GPMC_NAND_ECC_LP_x16_LAYOUT 1
  274. #define CONFIG_ENV_IS_IN_NAND
  275. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  276. #endif
  277. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  278. #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
  279. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  280. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  281. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  282. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  283. CONFIG_SYS_INIT_RAM_SIZE - \
  284. GENERATED_GBL_DATA_SIZE)
  285. /*
  286. * SMSC922x Ethernet
  287. */
  288. #if defined(CONFIG_CMD_NET)
  289. #define CONFIG_SMC911X
  290. #define CONFIG_SMC911X_16_BIT
  291. #define CONFIG_SMC911X_BASE 0x08000000
  292. #endif /* (CONFIG_CMD_NET) */
  293. /*
  294. * BOOTP fields
  295. */
  296. #define CONFIG_BOOTP_SUBNETMASK 0x00000001
  297. #define CONFIG_BOOTP_GATEWAY 0x00000002
  298. #define CONFIG_BOOTP_HOSTNAME 0x00000004
  299. #define CONFIG_BOOTP_BOOTPATH 0x00000010
  300. #endif /* __CONFIG_H */