cam_enc_4xx.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. /*
  2. * Copyright (C) 2009 Texas Instruments Incorporated
  3. *
  4. * Copyright (C) 2011
  5. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. #define CONFIG_SYS_NO_FLASH /* that is, no *NOR* flash */
  25. #define CONFIG_SYS_CONSOLE_INFO_QUIET
  26. /* SoC Configuration */
  27. #define CONFIG_ARM926EJS /* arm926ejs CPU */
  28. #define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */
  29. #define CONFIG_SYS_HZ_CLOCK 24000000 /* timer0 freq */
  30. #define CONFIG_SYS_HZ 1000
  31. #define CONFIG_SOC_DM365
  32. #define CONFIG_MACH_TYPE MACH_TYPE_DAVINCI_DM365_EVM
  33. #define CONFIG_HOSTNAME cam_enc_4xx
  34. #define CONFIG_BOARD_LATE_INIT
  35. #define CONFIG_CAM_ENC_LED_MASK 0x0fc00000
  36. /* Memory Info */
  37. #define CONFIG_NR_DRAM_BANKS 1
  38. #define PHYS_SDRAM_1 0x80000000
  39. #define PHYS_SDRAM_1_SIZE (256 << 20) /* 256 MiB */
  40. #define DDR_4BANKS /* 4-bank DDR2 (256MB) */
  41. #define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MB */
  42. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  43. /* Serial Driver info: UART0 for console */
  44. #define CONFIG_SYS_NS16550
  45. #define CONFIG_SYS_NS16550_SERIAL
  46. #define CONFIG_SYS_NS16550_REG_SIZE -4
  47. #define CONFIG_SYS_NS16550_COM1 0x01c20000
  48. #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_HZ_CLOCK
  49. #define CONFIG_CONS_INDEX 1
  50. #define CONFIG_BAUDRATE 115200
  51. /* Network Configuration */
  52. #define CONFIG_DRIVER_TI_EMAC
  53. #define CONFIG_EMAC_MDIO_PHY_NUM 0
  54. #define CONFIG_SYS_EMAC_TI_CLKDIV 0xa9 /* 1MHz */
  55. #define CONFIG_MII
  56. #define CONFIG_BOOTP_DEFAULT
  57. #define CONFIG_BOOTP_DNS
  58. #define CONFIG_BOOTP_DNS2
  59. #define CONFIG_BOOTP_SEND_HOSTNAME
  60. #define CONFIG_NET_RETRY_COUNT 10
  61. #define CONFIG_CMD_MII
  62. #define CONFIG_SYS_DCACHE_OFF
  63. #define CONFIG_RESET_PHY_R
  64. /* I2C */
  65. #define CONFIG_HARD_I2C
  66. #define CONFIG_DRIVER_DAVINCI_I2C
  67. #define CONFIG_SYS_I2C_SPEED 400000
  68. #define CONFIG_SYS_I2C_SLAVE 0x10 /* SMBus host address */
  69. /* NAND: socketed, two chipselects, normally 2 GBytes */
  70. #define CONFIG_NAND_DAVINCI
  71. #define CONFIG_SYS_NAND_CS 2
  72. #define CONFIG_SYS_NAND_USE_FLASH_BBT
  73. #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
  74. #define CONFIG_SYS_NAND_PAGE_2K
  75. #define CONFIG_SYS_NAND_LARGEPAGE
  76. #define CONFIG_SYS_NAND_BASE_LIST { 0x02000000, }
  77. /* socket has two chipselects, nCE0 gated by address BIT(14) */
  78. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  79. /* SPI support */
  80. #define CONFIG_SPI
  81. #define CONFIG_SPI_FLASH
  82. #define CONFIG_SPI_FLASH_STMICRO
  83. #define CONFIG_DAVINCI_SPI
  84. #define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
  85. #define CONFIG_SYS_SPI_CLK davinci_clk_get(SPI_PLLDIV)
  86. #define CONFIG_SF_DEFAULT_SPEED 3000000
  87. #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
  88. #define CONFIG_CMD_SF
  89. /* SD/MMC */
  90. #define CONFIG_MMC
  91. #define CONFIG_GENERIC_MMC
  92. #define CONFIG_DAVINCI_MMC
  93. #define CONFIG_MMC_MBLOCK
  94. /* U-Boot command configuration */
  95. #include <config_cmd_default.h>
  96. #define CONFIG_CMD_BDI
  97. #undef CONFIG_CMD_FLASH
  98. #undef CONFIG_CMD_FPGA
  99. #undef CONFIG_CMD_SETGETDCR
  100. #define CONFIG_CMD_ASKENV
  101. #define CONFIG_CMD_CACHE
  102. #define CONFIG_CMD_DHCP
  103. #define CONFIG_CMD_I2C
  104. #define CONFIG_CMD_PING
  105. #define CONFIG_CMD_SAVES
  106. #ifdef CONFIG_CMD_BDI
  107. #define CONFIG_CLOCKS
  108. #endif
  109. #ifdef CONFIG_MMC
  110. #define CONFIG_DOS_PARTITION
  111. #define CONFIG_CMD_EXT2
  112. #define CONFIG_CMD_FAT
  113. #define CONFIG_CMD_MMC
  114. #endif
  115. #ifdef CONFIG_NAND_DAVINCI
  116. #define CONFIG_CMD_MTDPARTS
  117. #define CONFIG_MTD_PARTITIONS
  118. #define CONFIG_MTD_DEVICE
  119. #define CONFIG_CMD_NAND
  120. #define CONFIG_CMD_UBI
  121. #define CONFIG_CMD_UBIFS
  122. #define CONFIG_RBTREE
  123. #define CONFIG_LZO
  124. #endif
  125. #define CONFIG_CRC32_VERIFY
  126. #define CONFIG_MX_CYCLIC
  127. /* U-Boot general configuration */
  128. #define CONFIG_BOOTFILE "uImage" /* Boot file name */
  129. #define CONFIG_SYS_PROMPT "cam_enc_4xx> " /* Monitor Command Prompt */
  130. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  131. #define CONFIG_SYS_PBSIZE /* Print buffer size */ \
  132. (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  133. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  134. #define CONFIG_SYS_HUSH_PARSER
  135. #define CONFIG_SYS_LONGHELP
  136. #define CONFIG_MENU
  137. #define CONFIG_MENU_SHOW
  138. #define CONFIG_FIT
  139. #define CONFIG_BOARD_IMG_ADDR_R 0x80000000
  140. #ifdef CONFIG_NAND_DAVINCI
  141. #define CONFIG_ENV_SIZE (16 << 10)
  142. #define CONFIG_ENV_IS_IN_NAND
  143. #define CONFIG_ENV_OFFSET 0x180000
  144. #define CONFIG_ENV_RANGE 0x040000
  145. #define CONFIG_ENV_OFFSET_REDUND 0x1c0000
  146. #undef CONFIG_ENV_IS_IN_FLASH
  147. #endif
  148. #if defined(CONFIG_MMC) && !defined(CONFIG_ENV_IS_IN_NAND)
  149. #define CONFIG_CMD_ENV
  150. #define CONFIG_SYS_MMC_ENV_DEV 0
  151. #define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */
  152. #define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */
  153. #define CONFIG_ENV_IS_IN_MMC
  154. #undef CONFIG_ENV_IS_IN_FLASH
  155. #endif
  156. #define CONFIG_BOOTDELAY 3
  157. /*
  158. * 24MHz InputClock / 15 prediv -> 1.6 MHz timer running
  159. * Timeout 1 second.
  160. */
  161. #define CONFIG_AIT_TIMER_TIMEOUT 0x186a00
  162. #define CONFIG_CMDLINE_EDITING
  163. #define CONFIG_VERSION_VARIABLE
  164. #define CONFIG_TIMESTAMP
  165. /* U-Boot memory configuration */
  166. #define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
  167. #define CONFIG_SYS_MEMTEST_START 0x80000000 /* physical address */
  168. #define CONFIG_SYS_MEMTEST_END 0x81000000 /* test 16MB RAM */
  169. /* Linux interfacing */
  170. #define CONFIG_CMDLINE_TAG
  171. #define CONFIG_SETUP_MEMORY_TAGS
  172. #define CONFIG_SYS_BARGSIZE 1024 /* bootarg Size */
  173. #define CONFIG_SYS_LOAD_ADDR 0x80700000 /* kernel address */
  174. #define MTDIDS_DEFAULT "nand0=davinci_nand.0"
  175. #define MTDPARTS_DEFAULT \
  176. "mtdparts=" \
  177. "davinci_nand.0:" \
  178. "128k(spl)," \
  179. "384k(UBLheader)," \
  180. "1m(u-boot)," \
  181. "512k(env)," \
  182. "-(ubi)"
  183. #define CONFIG_SYS_NAND_PAGE_SIZE 0x800
  184. #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000
  185. /* Defines for SPL */
  186. #define CONFIG_SPL
  187. #define CONFIG_SPL_FRAMEWORK
  188. #define CONFIG_SPL_BOARD_INIT
  189. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  190. #define CONFIG_SPL_NAND_SUPPORT
  191. #define CONFIG_SPL_NAND_SIMPLE
  192. #define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
  193. #define CONFIG_SPL_SERIAL_SUPPORT
  194. #define CONFIG_SPL_POST_MEM_SUPPORT
  195. #define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds"
  196. #define CONFIG_SPL_STACK (0x00010000 + 0x7f00)
  197. #define CONFIG_SPL_TEXT_BASE 0x00000020 /*CONFIG_SYS_SRAM_START*/
  198. #define CONFIG_SPL_MAX_SIZE 12320
  199. #ifndef CONFIG_SPL_BUILD
  200. #define CONFIG_SYS_TEXT_BASE 0x81080000
  201. #endif
  202. #define CONFIG_SYS_NAND_BASE 0x02000000
  203. #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
  204. CONFIG_SYS_NAND_PAGE_SIZE)
  205. #define CONFIG_SYS_NAND_ECCPOS { \
  206. 24, 25, 26, 27, 28, \
  207. 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
  208. 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
  209. 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
  210. 59, 60, 61, 62, 63 }
  211. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
  212. #define CONFIG_SYS_NAND_ECCSIZE 0x200
  213. #define CONFIG_SYS_NAND_ECCBYTES 10
  214. #define CONFIG_SYS_NAND_OOBSIZE 64
  215. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  216. /*
  217. * RBL searches from Block n (n = 1..24)
  218. * so we can define, how many UBL Headers
  219. * we can write before the real spl code
  220. */
  221. #define CONFIG_SYS_NROF_PAGES_NAND_SPL 6
  222. #define CONFIG_SYS_NAND_U_BOOT_DST 0x81080000 /* u-boot TEXT_BASE */
  223. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
  224. /*
  225. * Post tests for memory testing
  226. */
  227. #define CONFIG_POST CONFIG_SYS_POST_MEMORY
  228. #define _POST_WORD_ADDR 0x0
  229. #define CONFIG_DISPLAY_BOARDINFO
  230. #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SPL_STACK
  231. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  232. #define CONFIG_SYS_NAND_U_BOOT_SIZE 0xa0000
  233. #define CONFIG_SYS_NAND_U_BOOT_ERA_SIZE 0x100000
  234. /* for UBL header */
  235. #define CONFIG_SYS_UBL_BLOCK (CONFIG_SYS_NAND_PAGE_SIZE)
  236. #define CONFIG_SYS_DM36x_PLL1_PLLM 0x55
  237. #define CONFIG_SYS_DM36x_PLL1_PREDIV 0x8005
  238. #define CONFIG_SYS_DM36x_PLL2_PLLM 0x09
  239. #define CONFIG_SYS_DM36x_PLL2_PREDIV 0x8000
  240. #define CONFIG_SYS_DM36x_PERI_CLK_CTRL 0x243F04FC
  241. #define CONFIG_SYS_DM36x_PLL1_PLLDIV1 0x801b
  242. #define CONFIG_SYS_DM36x_PLL1_PLLDIV2 0x8001
  243. /* POST DIV 680/2 = 340Mhz -> MJCP and HDVICP bus interface clock */
  244. #define CONFIG_SYS_DM36x_PLL1_PLLDIV3 0x8001
  245. /*
  246. * POST DIV 680/4 = 170Mhz -> EDMA/Peripheral CFG0(1/2 MJCP/HDVICP bus
  247. * interface clk)
  248. */
  249. #define CONFIG_SYS_DM36x_PLL1_PLLDIV4 0x8003
  250. /* POST DIV 680/2 = 340Mhz -> VPSS */
  251. #define CONFIG_SYS_DM36x_PLL1_PLLDIV5 0x8001
  252. /* POST DIV 680/9 = 75.6 Mhz -> VENC */
  253. #define CONFIG_SYS_DM36x_PLL1_PLLDIV6 0x8008
  254. /*
  255. * POST DIV 680/1 = 680Mhz -> DDRx2(with internal divider of 2, clock boils
  256. * down to 340 Mhz)
  257. */
  258. #define CONFIG_SYS_DM36x_PLL1_PLLDIV7 0x8000
  259. /* POST DIV 680/7= 97Mhz-> MMC0/SD0 */
  260. #define CONFIG_SYS_DM36x_PLL1_PLLDIV8 0x8006
  261. /* POST DIV 680/28 = 24.3Mhz-> CLKOUT */
  262. #define CONFIG_SYS_DM36x_PLL1_PLLDIV9 0x801b
  263. #define CONFIG_SYS_DM36x_PLL2_PLLDIV1 0x8011
  264. /* POST DIV 432/1=432 Mhz -> ARM926/(HDVICP block) clk */
  265. #define CONFIG_SYS_DM36x_PLL2_PLLDIV2 0x8000
  266. #define CONFIG_SYS_DM36x_PLL2_PLLDIV3 0x8001
  267. /* POST DIV 432/21= 20.5714 Mhz->VOICE Codec clk */
  268. #define CONFIG_SYS_DM36x_PLL2_PLLDIV4 0x8014
  269. /* POST DIV 432/16=27 Mhz -> VENC(For SD modes, requires) */
  270. #define CONFIG_SYS_DM36x_PLL2_PLLDIV5 0x800f
  271. /*
  272. * READ LATENCY 7 (CL + 2)
  273. * CONFIG_PWRDNEN = 1
  274. * CONFIG_EXT_STRBEN = 1
  275. */
  276. #define CONFIG_SYS_DM36x_DDR2_DDRPHYCR (0 \
  277. | DV_DDR_PHY_EXT_STRBEN \
  278. | DV_DDR_PHY_PWRDNEN \
  279. | (7 << DV_DDR_PHY_RD_LATENCY_SHIFT))
  280. /*
  281. * T_RFC = (trfc/DDR_CLK) - 1 = (195 / 2.941) - 1
  282. * T_RP = (trp/DDR_CLK) - 1 = (12.5 / 2.941) - 1
  283. * T_RCD = (trcd/DDR_CLK) - 1 = (12.5 / 2.941) - 1
  284. * T_WR = (twr/DDR_CLK) - 1 = (15 / 2.941) - 1
  285. * T_RAS = (tras/DDR_CLK) - 1 = (45 / 2.941) - 1
  286. * T_RC = (trc/DDR_CLK) - 1 = (57.5 / 2.941) - 1
  287. * T_RRD = (trrd/DDR_CLK) - 1 = (7.5 / 2.941) - 1
  288. * T_WTR = (twtr/DDR_CLK) - 1 = (7.5 / 2.941) - 1
  289. */
  290. #define CONFIG_SYS_DM36x_DDR2_SDTIMR (0 \
  291. | (66 << DV_DDR_SDTMR1_RFC_SHIFT) \
  292. | (4 << DV_DDR_SDTMR1_RP_SHIFT) \
  293. | (4 << DV_DDR_SDTMR1_RCD_SHIFT) \
  294. | (5 << DV_DDR_SDTMR1_WR_SHIFT) \
  295. | (14 << DV_DDR_SDTMR1_RAS_SHIFT) \
  296. | (19 << DV_DDR_SDTMR1_RC_SHIFT) \
  297. | (2 << DV_DDR_SDTMR1_RRD_SHIFT) \
  298. | (2 << DV_DDR_SDTMR1_WTR_SHIFT))
  299. /*
  300. * T_RASMAX = (trasmax/refresh_rate) - 1 = (70K / 7812.6) - 1
  301. * T_XP = tCKE - 1 = 3 - 2
  302. * T_XSNR= ((trfc + 10)/DDR_CLK) - 1 = (205 / 2.941) - 1
  303. * T_XSRD = txsrd - 1 = 200 - 1
  304. * T_RTP = (trtp/DDR_CLK) - 1 = (7.5 / 2.941) - 1
  305. * T_CKE = tcke - 1 = 3 - 1
  306. */
  307. #define CONFIG_SYS_DM36x_DDR2_SDTIMR2 (0 \
  308. | (8 << DV_DDR_SDTMR2_RASMAX_SHIFT) \
  309. | (2 << DV_DDR_SDTMR2_XP_SHIFT) \
  310. | (69 << DV_DDR_SDTMR2_XSNR_SHIFT) \
  311. | (199 << DV_DDR_SDTMR2_XSRD_SHIFT) \
  312. | (2 << DV_DDR_SDTMR2_RTP_SHIFT) \
  313. | (2 << DV_DDR_SDTMR2_CKE_SHIFT))
  314. /* PR_OLD_COUNT = 0xfe */
  315. #define CONFIG_SYS_DM36x_DDR2_PBBPR 0x000000FE
  316. /* refresh rate = 0x768 */
  317. #define CONFIG_SYS_DM36x_DDR2_SDRCR 0x00000768
  318. #define CONFIG_SYS_DM36x_DDR2_SDBCR (0 \
  319. | (2 << DV_DDR_SDCR_PAGESIZE_SHIFT) \
  320. | (3 << DV_DDR_SDCR_IBANK_SHIFT) \
  321. | (5 << DV_DDR_SDCR_CL_SHIFT) \
  322. | (1 << DV_DDR_SDCR_BUS_WIDTH_SHIFT) \
  323. | (1 << DV_DDR_SDCR_TIMUNLOCK_SHIFT) \
  324. | (1 << DV_DDR_SDCR_DDREN_SHIFT) \
  325. | (0 << DV_DDR_SDCR_DDRDRIVE0_SHIFT) \
  326. | (1 << DV_DDR_SDCR_DDR2EN_SHIFT) \
  327. | (1 << DV_DDR_SDCR_DDR_DDQS_SHIFT) \
  328. | (1 << DV_DDR_SDCR_BOOTUNLOCK_SHIFT))
  329. #define CONFIG_SYS_DM36x_AWCCR 0xff
  330. #define CONFIG_SYS_DM36x_AB1CR 0x40400204
  331. #define CONFIG_SYS_DM36x_AB2CR 0x04ca2650
  332. /* All Video Inputs */
  333. #define CONFIG_SYS_DM36x_PINMUX0 0x00000000
  334. /*
  335. * All Video Outputs,
  336. * GPIO 86, 87 + 90 0x0000f030
  337. */
  338. #define CONFIG_SYS_DM36x_PINMUX1 0x00530002
  339. #define CONFIG_SYS_DM36x_PINMUX2 0x00001815
  340. /*
  341. * SPI1, UART1, I2C, SD0, SD1, McBSP0, CLKOUTs
  342. * GPIO 25 0x60000000
  343. */
  344. #define CONFIG_SYS_DM36x_PINMUX3 0x9b5affff
  345. /*
  346. * MMC/SD0 instead of MS, SPI0
  347. * GPIO 34 0x0000c000
  348. */
  349. #define CONFIG_SYS_DM36x_PINMUX4 0x00002655
  350. /*
  351. * Default environment settings
  352. */
  353. #define xstr(s) str(s)
  354. #define str(s) #s
  355. #define DVN4XX_UBOOT_ADDR_R_RAM 0x80000000
  356. /* (DVN4XX_UBOOT_ADDR_R_RAM + CONFIG_SYS_NAND_PAGE_SIZE) */
  357. #define DVN4XX_UBOOT_ADDR_R_NAND_SPL 0x80000800
  358. /*
  359. * (DVN4XX_UBOOT_ADDR_R_NAND_SPL + (CONFIG_SYS_NROF_PAGES_NAND_SPL * \
  360. * CONFIG_SYS_NAND_PAGE_SIZE))
  361. */
  362. #define DVN4XX_UBOOT_ADDR_R_UBOOT 0x80003800
  363. #define CONFIG_EXTRA_ENV_SETTINGS \
  364. "u_boot_addr_r=" xstr(DVN4XX_UBOOT_ADDR_R_RAM) "\0" \
  365. "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.ubl\0" \
  366. "load=tftp ${u_boot_addr_r} ${u-boot}\0" \
  367. "pagesz=" xstr(CONFIG_SYS_NAND_PAGE_SIZE) "\0" \
  368. "writeheader=nandrbl rbl;nand erase 20000 ${pagesz};" \
  369. "nand write ${u_boot_addr_r} 20000 ${pagesz};" \
  370. "nandrbl uboot\0" \
  371. "writenand_spl=nandrbl rbl;nand erase 0 3000;" \
  372. "nand write " xstr(DVN4XX_UBOOT_ADDR_R_NAND_SPL) \
  373. " 0 3000;nandrbl uboot\0" \
  374. "writeuboot=nandrbl uboot;" \
  375. "nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " " \
  376. xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE) \
  377. ";nand write " xstr(DVN4XX_UBOOT_ADDR_R_UBOOT) \
  378. " " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " " \
  379. xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0" \
  380. "update=run load writenand_spl writeuboot\0" \
  381. "bootcmd=run net_nfs\0" \
  382. "rootpath=/opt/eldk-arm/arm\0" \
  383. "mtdids=" MTDIDS_DEFAULT "\0" \
  384. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  385. "netdev=eth0\0" \
  386. "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
  387. "addmisc=setenv bootargs ${bootargs} app_reset=${app_reset}\0" \
  388. "addcon=setenv bootargs ${bootargs} console=ttyS0," \
  389. "${baudrate}n8\0" \
  390. "addip=setenv bootargs ${bootargs} " \
  391. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  392. ":${hostname}:${netdev}:off eth=${ethaddr} panic=1\0" \
  393. "rootpath=/opt/eldk-arm/arm\0" \
  394. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  395. "nfsroot=${serverip}:${rootpath}\0" \
  396. "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage \0" \
  397. "kernel_addr_r=80600000\0" \
  398. "load_kernel=tftp ${kernel_addr_r} ${bootfile}\0" \
  399. "ubi_load_kernel=ubi part ubi 2048;ubifsmount ${img_volume};" \
  400. "ubifsload ${kernel_addr_r} boot/uImage\0" \
  401. "fit_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0" \
  402. "img_addr_r=" xstr(CONFIG_BOARD_IMG_ADDR_R) "\0" \
  403. "img_file=" xstr(CONFIG_HOSTNAME) "/ait.itb\0" \
  404. "header_addr=20000\0" \
  405. "img_writeheader=nandrbl rbl;" \
  406. "nand erase ${header_addr} ${pagesz};" \
  407. "nand write ${img_addr_r} ${header_addr} ${pagesz};" \
  408. "nandrbl uboot\0" \
  409. "img_writespl=nandrbl rbl;nand erase 0 3000;" \
  410. "nand write ${img_addr_r} 0 3000;nandrbl uboot\0" \
  411. "img_writeuboot=nandrbl uboot;" \
  412. "nand erase " xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " " \
  413. xstr(CONFIG_SYS_NAND_U_BOOT_ERA_SIZE) \
  414. ";nand write ${img_addr_r} " \
  415. xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) " " \
  416. xstr(CONFIG_SYS_NAND_U_BOOT_SIZE) "\0" \
  417. "img_writedfenv=ubi part ubi 2048;" \
  418. "ubi write ${img_addr_r} default ${filesize}\0" \
  419. "img_volume=rootfs1\0" \
  420. "img_writeramdisk=ubi part ubi 2048;" \
  421. "ubi write ${img_addr_r} ${img_volume} ${filesize}\0" \
  422. "load_img=tftp ${fit_addr_r} ${img_file}\0" \
  423. "net_nfs=run load_kernel; " \
  424. "run nfsargs addip addcon addmtd addmisc;" \
  425. "bootm ${kernel_addr_r}\0" \
  426. "ubi_ubi=run ubi_load_kernel; " \
  427. "run ubiargs addip addcon addmtd addmisc;" \
  428. "bootm ${kernel_addr_r}\0" \
  429. "ubiargs=setenv bootargs ubi.mtd=4,2048" \
  430. " root=ubi0:${img_volume} rw rootfstype=ubifs\0" \
  431. "app_reset=no\0" \
  432. "dvn_app_vers=void\0" \
  433. "dvn_boot_vers=void\0" \
  434. "savenewvers=run savetmpparms restoreparms; saveenv;" \
  435. "run restoretmpparms\0" \
  436. "savetmpparms=setenv y_ipaddr ${ipaddr};" \
  437. "setenv y_netmask ${netmask};" \
  438. "setenv y_serverip ${serverip};" \
  439. "setenv y_gatewayip ${gatewayip}\0" \
  440. "saveparms=setenv x_ipaddr ${ipaddr};" \
  441. "setenv x_netmask ${netmask};" \
  442. "setenv x_serverip ${serverip};" \
  443. "setenv x_gatewayip ${gatewayip}\0" \
  444. "restoreparms=setenv ipaddr ${x_ipaddr};" \
  445. "setenv netmask ${x_netmask};" \
  446. "setenv serverip ${x_serverip};" \
  447. "setenv gatewayip ${x_gatewayip}\0" \
  448. "restoretmpparms=setenv ipaddr ${y_ipaddr};" \
  449. "setenv netmask ${y_netmask};" \
  450. "setenv serverip ${y_serverip};" \
  451. "setenv gatewayip ${y_gatewayip}\0" \
  452. "\0"
  453. /* USB Configuration */
  454. #define CONFIG_USB_DAVINCI
  455. #define CONFIG_MUSB_HCD
  456. #define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \
  457. USBPHY_PHY24MHZ)
  458. #define CONFIG_CMD_USB /* include support for usb cmd */
  459. #define CONFIG_USB_STORAGE /* MSC class support */
  460. #define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */
  461. #define CONFIG_CMD_FAT /* inclue support for FAT/storage */
  462. #define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */
  463. #undef DAVINCI_DM365EVM
  464. #define PINMUX4_USBDRVBUS_BITCLEAR 0x3000
  465. #define PINMUX4_USBDRVBUS_BITSET 0x2000
  466. #endif /* __CONFIG_H */