csb732.cfg 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # The Cogent CSB732 board has a single i.MX35 chip
  3. source [find target/imx35.cfg]
  4. # Determined by trial and error
  5. reset_config trst_and_srst combined
  6. adapter srst delay 200
  7. jtag_ntrst_delay 200
  8. $_TARGETNAME configure -event gdb-attach { reset init }
  9. $_TARGETNAME configure -event reset-init { csb732_init }
  10. # Bare-bones initialization of core clocks and SDRAM
  11. proc csb732_init { } {
  12. # Disable fast writing only for init
  13. memwrite burst disable
  14. # All delay loops are omitted.
  15. # We assume the interpreter latency is enough.
  16. # Allow access to all coprocessors
  17. arm mcr 15 0 15 1 0 0x2001
  18. # Disable MMU, caches, write buffer
  19. arm mcr 15 0 1 0 0 0x78
  20. # Grant manager access to all domains
  21. arm mcr 15 0 3 0 0 0xFFFFFFFF
  22. # Set ARM clock to 532 MHz, AHB to 133 MHz
  23. mww 0x53F80004 0x1000
  24. # Set core clock to 2 * 24 MHz * (11 + 1/12) = 532 MHz
  25. mww 0x53F8001C 0xB2C01
  26. set ESDMISC 0xB8001010
  27. set ESDCFG0 0xB8001004
  28. set ESDCTL0 0xB8001000
  29. # Enable DDR
  30. mww $ESDMISC 0x4
  31. # Timing
  32. mww $ESDCFG0 0x007fff3f
  33. # CS0
  34. mww $ESDCTL0 0x92120080
  35. # Precharge all dummy write
  36. mww 0x80000400 0
  37. # Enable CS) auto-refresh
  38. mww $ESDCTL0 0xA2120080
  39. # Refresh twice (dummy writes)
  40. mww 0x80000000 0
  41. mww 0x80000000 0
  42. # Enable CS0 load mode register
  43. mww $ESDCTL0 0xB2120080
  44. # Dummy writes
  45. mwb 0x80000033 0x01
  46. mwb 0x81000000 0x01
  47. mww $ESDCTL0 0x82226080
  48. mww 0x80000000 0
  49. # Re-enable fast writing
  50. memwrite burst enable
  51. }