You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
2.2 KiB

  1. # DM6446 EVM board
  2. # http://focus.ti.com/docs/toolsw/folders/print/tmdsevm6446.html
  3. # http://c6000.spectrumdigital.com/davincievm/
  4. # EVM is just the board; buy that at Spectrum.
  5. # The "kit" from TI also has: video camera, LCD video monitor, more.
  6. source [find target/ti_dm6446.cfg]
  7. # J4 controls what CS2 hooks up to, usually NOR or NAND flash.
  8. # S3.1/S3.2 controls boot mode, which may force J4 and S3.3 settings.
  9. # S3.3 controls AEMIF bus width.
  10. if { [info exists J4_OPTION] } {
  11. # NOR, NAND, SRAM, ...
  12. set CS2_MODE $J4_OPTION
  13. } else {
  14. set CS2_MODE ""
  15. }
  16. # ARM boot:
  17. # S3.1 = 0, S3.2 = 0 ==> ROM/UBL boot via NAND (J4 == NAND)
  18. # S3.1 = 1, S3.2 = 0 ==> AEMIF boot (J4 == NOR or SRAM)
  19. # S3.1 = 0, S3.2 = 1 ==> ROM/UBL boot via HPI
  20. # S3.1 = 1, S3.2 = 1 ==> ROM/UBL boot via UART (J4 == don't care)
  21. # AEMIF bus width:
  22. # S3.3 = 0 ==> 8 bit bus width
  23. # S3.3 = 1 ==> 16 bit bus width
  24. # DSP boot:
  25. # S3.4 = 0 ==> controlled by ARM
  26. if { $CS2_MODE == "NOR" } {
  27. # 16 Mbytes address space; 16 bit bus width
  28. # (older boards used 32MB parts, with upper 16 MB unusable)
  29. set _FLASHNAME $_CHIPNAME.flash
  30. flash bank $_FLASHNAME cfi 0x02000000 0x01000000 2 2 $_TARGETNAME
  31. proc flashprobe {} { flash probe 0 }
  32. } elseif { $CS2_MODE == "NAND" } {
  33. # 64 Mbyte small page; 8 bit bus width
  34. nand device davinci $_TARGETNAME 0x02000000 hwecc1 0x01e00000
  35. proc flashprobe {} { nand probe 0 }
  36. } elseif { $CS2_MODE == "SRAM" } {
  37. # 4 Mbyte address space; 16 bit bus width
  38. # loaded via JTAG or HPI
  39. proc flashprobe {} {}
  40. } else {
  41. # maybe it's HPI boot? can't tell...
  42. echo "WARNING: CS2/flash configuration not recognized"
  43. proc flashprobe {} {}
  44. }
  45. # NOTE: disable or replace this call to dm6446evm_init if you're
  46. # debugging new UBL code from SRAM (for NAND boot).
  47. $_TARGETNAME configure -event reset-init { dm6446evm_init }
  48. #
  49. # This post-reset init is called when the MMU isn't active, all IRQs
  50. # are disabled, etc. It should do most of what a UBL does, except for
  51. # loading code (like U-Boot) into DRAM and running it.
  52. #
  53. proc dm6446evm_init {} {
  54. echo "Initialize DM6446 EVM board"
  55. # FIXME initialize everything:
  56. # - PLL1
  57. # - PLL2
  58. # - PINMUX
  59. # - PSC
  60. # - DDR
  61. # - AEMIF
  62. # - UART0
  63. # - icache
  64. flashprobe
  65. }