dig297.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. /*
  2. * (C) Copyright 2011 Comelit Group SpA
  3. * Luca Ceresoli <luca.ceresoli@comelit.it>
  4. *
  5. * Based on omap3_beagle.h:
  6. * (C) Copyright 2006-2008
  7. * Texas Instruments.
  8. * Richard Woodruff <r-woodruff2@ti.com>
  9. * Syed Mohammed Khasim <x0khasim@ti.com>
  10. *
  11. * Configuration settings for the Comelit DIG297 board.
  12. *
  13. * See file CREDITS for list of people who contributed to this
  14. * project.
  15. *
  16. * This program is free software; you can redistribute it and/or
  17. * modify it under the terms of the GNU General Public License as
  18. * published by the Free Software Foundation; either version 2 of
  19. * the License, or (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software
  28. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  29. * MA 02111-1307 USA
  30. */
  31. #ifndef __CONFIG_H
  32. #define __CONFIG_H
  33. /*
  34. * High Level Configuration Options
  35. */
  36. #define CONFIG_OMAP /* in a TI OMAP core */
  37. #define CONFIG_OMAP34XX /* which is a 34XX */
  38. #define CONFIG_OMAP3430 /* which is in a 3430 */
  39. #define CONFIG_SYS_TEXT_BASE 0x80008000
  40. #define CONFIG_SDRC /* The chip has SDRC controller */
  41. #include <asm/arch/cpu.h> /* get chip and board defs */
  42. #include <asm/arch/omap3.h>
  43. /*
  44. * Display CPU and Board information
  45. */
  46. #define CONFIG_DISPLAY_CPUINFO
  47. #define CONFIG_DISPLAY_BOARDINFO
  48. /* Clock Defines */
  49. #define V_OSCK 26000000 /* Clock output from T2 */
  50. #define V_SCLK (V_OSCK >> 1)
  51. #undef CONFIG_USE_IRQ /* no support for IRQs */
  52. #define CONFIG_MISC_INIT_R
  53. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  54. #define CONFIG_SETUP_MEMORY_TAGS
  55. #define CONFIG_INITRD_TAG
  56. #define CONFIG_REVISION_TAG
  57. /*
  58. * Size of malloc() pool
  59. */
  60. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  61. /* Sector */
  62. #define CONFIG_SYS_MALLOC_LEN (1024 << 10) /* UBI needs >= 512 kB */
  63. /*
  64. * Hardware drivers
  65. */
  66. /*
  67. * NS16550 Configuration
  68. */
  69. #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
  70. #define CONFIG_SYS_NS16550
  71. #define CONFIG_SYS_NS16550_SERIAL
  72. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  73. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  74. /*
  75. * select serial console configuration: UART3 (ttyO2)
  76. */
  77. #define CONFIG_CONS_INDEX 3
  78. #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
  79. #define CONFIG_SERIAL3 3
  80. /* allow to overwrite serial and ethaddr */
  81. #define CONFIG_ENV_OVERWRITE
  82. #define CONFIG_BAUDRATE 115200
  83. #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  84. 115200}
  85. #define CONFIG_GENERIC_MMC 1
  86. #define CONFIG_MMC 1
  87. #define CONFIG_OMAP_HSMMC 1
  88. #define CONFIG_DOS_PARTITION
  89. /* DDR - I use Micron DDR */
  90. #define CONFIG_OMAP3_MICRON_DDR
  91. /* library portions to compile in */
  92. #define CONFIG_RBTREE
  93. #define CONFIG_MTD_PARTITIONS
  94. #define CONFIG_LZO
  95. /* commands to include */
  96. #include <config_cmd_default.h>
  97. #define CONFIG_CMD_FAT /* FAT support */
  98. #define CONFIG_CMD_UBI /* UBI Support */
  99. #define CONFIG_CMD_UBIFS /* UBIFS Support */
  100. #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
  101. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  102. #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
  103. #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:896k(uboot),"\
  104. "128k(uboot-env),3m(kernel),252m(ubi)"
  105. #define CONFIG_CMD_I2C /* I2C serial bus support */
  106. #define CONFIG_CMD_MMC /* MMC support */
  107. #define CONFIG_CMD_NAND /* NAND support */
  108. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  109. #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
  110. #undef CONFIG_CMD_IMI /* iminfo */
  111. #undef CONFIG_CMD_IMLS /* List all found images */
  112. #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
  113. #undef CONFIG_CMD_NFS /* NFS support */
  114. #define CONFIG_SYS_NO_FLASH
  115. #define CONFIG_HARD_I2C
  116. #define CONFIG_SYS_I2C_SPEED 100000
  117. #define CONFIG_SYS_I2C_SLAVE 1
  118. #define CONFIG_SYS_I2C_BUS 0
  119. #define CONFIG_SYS_I2C_BUS_SELECT 1
  120. #define CONFIG_DRIVER_OMAP34XX_I2C 1
  121. /*
  122. * TWL4030
  123. */
  124. #define CONFIG_TWL4030_POWER
  125. #define CONFIG_TWL4030_LED
  126. /*
  127. * Board NAND Info.
  128. */
  129. #define CONFIG_NAND_OMAP_GPMC
  130. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  131. /* to access nand */
  132. #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
  133. /* to access nand at */
  134. /* CS0 */
  135. #define GPMC_NAND_ECC_LP_x16_LAYOUT
  136. #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
  137. #if defined(CONFIG_CMD_NET)
  138. /*
  139. * SMSC9220 Ethernet
  140. */
  141. #define CONFIG_SMC911X
  142. #define CONFIG_SMC911X_32_BIT
  143. #define CONFIG_SMC911X_BASE 0x2C000000
  144. #endif /* (CONFIG_CMD_NET) */
  145. /* Environment information */
  146. #define CONFIG_BOOTDELAY 1
  147. #define CONFIG_EXTRA_ENV_SETTINGS \
  148. "loadaddr=0x82000000\0" \
  149. "console=ttyO2,115200n8\0" \
  150. "mtdids=" MTDIDS_DEFAULT "\0" \
  151. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  152. "partition=nand0,3\0"\
  153. "mmcroot=/dev/mmcblk0p2 rw\0" \
  154. "mmcrootfstype=ext3 rootwait\0" \
  155. "nandroot=ubi0:rootfs ro\0" \
  156. "nandrootfstype=ubifs\0" \
  157. "nfspath=/srv/nfs\0" \
  158. "tftpfilename=uImage\0" \
  159. "gatewayip=0.0.0.0\0" \
  160. "mmcargs=setenv bootargs console=${console} " \
  161. "${mtdparts} " \
  162. "root=${mmcroot} " \
  163. "rootfstype=${mmcrootfstype} " \
  164. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  165. "${netmask}:${hostname}::off\0" \
  166. "nandargs=setenv bootargs console=${console} " \
  167. "${mtdparts} " \
  168. "ubi.mtd=3 " \
  169. "root=${nandroot} " \
  170. "rootfstype=${nandrootfstype} " \
  171. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  172. "${netmask}:${hostname}::off\0" \
  173. "netargs=setenv bootargs console=${console} " \
  174. "${mtdparts} " \
  175. "root=/dev/nfs rw " \
  176. "nfsroot=${serverip}:${nfspath} " \
  177. "ip=${ipaddr}:${serverip}:${gatewayip}:" \
  178. "${netmask}:${hostname}::off\0" \
  179. "mmcboot=echo Booting from mmc ...; " \
  180. "run mmcargs; " \
  181. "bootm ${loadaddr}\0" \
  182. "nandboot=echo Booting from nand ...; " \
  183. "run nandargs; " \
  184. "nand read ${loadaddr} 100000 300000; " \
  185. "bootm ${loadaddr}\0" \
  186. "netboot=echo Booting from network ...; " \
  187. "run netargs; " \
  188. "tftp ${loadaddr} ${serverip}:${tftpfilename}; " \
  189. "bootm ${loadaddr}\0" \
  190. "resetenv=nand erase e0000 20000\0"\
  191. #define CONFIG_BOOTCOMMAND \
  192. "run nandboot"
  193. #define CONFIG_AUTO_COMPLETE
  194. /*
  195. * Miscellaneous configurable options
  196. */
  197. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  198. #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
  199. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  200. #define CONFIG_SYS_PROMPT "DIG297# "
  201. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  202. /* Print Buffer Size */
  203. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  204. sizeof(CONFIG_SYS_PROMPT) + 16)
  205. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  206. /* Boot Argument Buffer Size */
  207. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  208. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */
  209. /* works on */
  210. #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
  211. 0x01F00000) /* 31MB */
  212. #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */
  213. /* load address */
  214. /*
  215. * OMAP3 has 12 GP timers, they can be driven by the system clock
  216. * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
  217. * This rate is divided by a local divisor.
  218. */
  219. #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
  220. #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
  221. #define CONFIG_SYS_HZ 1000
  222. /*-----------------------------------------------------------------------
  223. * Stack sizes
  224. *
  225. * The stack sizes are set up in start.S using the settings below
  226. */
  227. #define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
  228. #ifdef CONFIG_USE_IRQ
  229. #define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack 4 KiB */
  230. #define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack 4 KiB */
  231. #endif
  232. /*-----------------------------------------------------------------------
  233. * Physical Memory Map
  234. */
  235. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  236. #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
  237. #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */
  238. #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
  239. /* SDRAM Bank Allocation method */
  240. #define SDRC_R_B_C 1
  241. /*-----------------------------------------------------------------------
  242. * FLASH and environment organization
  243. */
  244. /* **** PISMO SUPPORT *** */
  245. /* Configure the PISMO */
  246. #define PISMO1_NAND_SIZE GPMC_SIZE_128M
  247. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
  248. #define CONFIG_SYS_FLASH_BASE boot_flash_base
  249. /* Monitor at start of flash */
  250. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  251. #define CONFIG_ENV_IS_IN_NAND
  252. #define SMNAND_ENV_OFFSET 0x0E0000 /* environment starts here */
  253. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  254. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  255. #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
  256. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  257. #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
  258. #define CONFIG_SYS_INIT_RAM_SIZE 0x800
  259. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  260. CONFIG_SYS_INIT_RAM_SIZE - \
  261. GENERATED_GBL_DATA_SIZE)
  262. #endif /* __CONFIG_H */