cam_enc_4xx.h 16 KB

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