dm6446evm.cfg 2.2 KB

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