alphascale_asm9260_ek.cfg 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. source [find target/alphascale_asm9260t.cfg]
  3. reset_config trst_and_srst
  4. $_TARGETNAME configure -event reset-init {
  5. echo "Configure clock"
  6. # Enable SRAM clk
  7. mww 0x80040024 0x4
  8. # Enable IRQ clk
  9. mww 0x80040034 0x100
  10. # Enable DMA0,1 clk
  11. mww 0x80040024 0x600
  12. # Make sysre syspll is enabled
  13. mww 0x80040238 0x750
  14. #CPU = PLLCLK/2
  15. mww 0x8004017C 0x2
  16. #SYSAHBCLK = CPUCLK/2
  17. mww 0x80040180 0x2
  18. # Set PLL freq to 480MHz
  19. mww 0x80040100 480
  20. # normally we shoul waiting here until we get 0x1 (0x80040104)&0x1)==0x0)
  21. sleep 100
  22. # select PLL as main source
  23. mww 0x80040120 0x1
  24. # disable and enable main clk to update changes?
  25. mww 0x80040124 0x0
  26. mww 0x80040124 0x1
  27. echo "Configure memory"
  28. #enable EMI CLK
  29. mww 0x80040024 0x40
  30. # configure memory controller for internal SRAM
  31. mww 0x80700000 0x1188
  32. # change default emi clk delay
  33. mww 0x8004034C 0xA0503
  34. # make sure chip_select_register2_low has correct value (why?)
  35. mww 0x8070001c 0x20000000
  36. # set type to sdram and size to 32MB
  37. mww 0x8070005c 0xa
  38. # configure internal SDRAM timing
  39. mww 0x80700004 0x024996d9
  40. # configure Static Memory timing
  41. mww 0x80700094 0x00542b4f
  42. echo "Configure uart4"
  43. # enable pinctrl clk
  44. mww 0x80040024 0x2000000
  45. # mux GPIO3_0 and GPIO3_1 to UART4
  46. mww 0x80044060 0x2
  47. mww 0x80044064 0x2
  48. # configure UART4CLKDIV
  49. mww 0x800401a8 0x1
  50. # enable uart4 clk
  51. mww 0x80040024 0x8000
  52. # clear softrst and clkgate on uart4
  53. mww 0x80010008 0xC0000000
  54. # set bandrate 115200 12M
  55. mww 0x80010030 0x00062070
  56. # enable Rx&Tx
  57. mww 0x80010024 0x301
  58. # clear hw control
  59. mww 0x80010028 0xc000
  60. }
  61. $_TARGETNAME configure -work-area-phys 0x21ffe000 -work-area-virt 0xc1ffe000 -work-area-size 0x1000
  62. $_TARGETNAME arm7_9 fast_memory_access enable
  63. $_TARGETNAME arm7_9 dcc_downloads enable