omap3_logic.h 11 KB

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