summaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-02-21 18:59:50 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-02-23 08:13:59 +0100
commitf26cd967406d98e3cccf61b314e3eb544241364b (patch)
tree27c5b2f19db6a06f969c35d6be92d87e3b3770ca /tcl
parent05abfbadf12ec6167d5d6137705a7631ff8cb5eb (diff)
downloadopenocd+libswd-f26cd967406d98e3cccf61b314e3eb544241364b.tar.gz
openocd+libswd-f26cd967406d98e3cccf61b314e3eb544241364b.tar.bz2
openocd+libswd-f26cd967406d98e3cccf61b314e3eb544241364b.tar.xz
openocd+libswd-f26cd967406d98e3cccf61b314e3eb544241364b.zip
add at91rm9200-ek board support
tested with jlink sam-ice v5 while loading barebox (gdb) load Loading section .text, size 0x2f190 lma 0x21f00000 Loading section .rodata, size 0x931c lma 0x21f2f190 Loading section .data, size 0x29e8 lma 0x21f384ac Loading section .barebox_cmd, size 0x78c lma 0x21f3ae94 Loading section .barebox_initcalls, size 0x80 lma 0x21f3b620 Start address 0x21f00000, load size 243360 Transfer rate: 26 KB/sec, 13520 bytes/write. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/at91rm9200-ek.cfg112
1 files changed, 112 insertions, 0 deletions
diff --git a/tcl/board/at91rm9200-ek.cfg b/tcl/board/at91rm9200-ek.cfg
new file mode 100644
index 00000000..07a006b0
--- /dev/null
+++ b/tcl/board/at91rm9200-ek.cfg
@@ -0,0 +1,112 @@
+#
+# Copyright 2010 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+#
+# under GPLv2 Only
+#
+# This is for the "at91rm9200-ek" eval board.
+#
+#
+# It has atmel at91rm9200 chip.
+source [find target/at91rm9200.cfg]
+
+reset_config trst_and_srst
+
+$_TARGETNAME configure -event gdb-attach { reset init }
+$_TARGETNAME configure -event reset-init { at91rm9200_ek_init }
+
+## flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target>
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x10000000 0x00800000 2 2 $_TARGETNAME
+
+
+proc at91rm9200_ek_init { } {
+ # Try to run at 1khz... Yea, that slow!
+ # Chip is really running @ 32khz
+ adapter_khz 8
+
+ mww 0xfffffc64 0xffffffff
+ ## disable all clocks but system clock
+ mww 0xfffffc04 0xfffffffe
+ ## disable all clocks to pioa and piob
+ mww 0xfffffc14 0xffffffc3
+ ## master clock = slow cpu = slow
+ ## (means the CPU is running at 32khz!)
+ mww 0xfffffc30 0
+ ## main osc enable
+ mww 0xfffffc20 0x0000ff01
+ ## MC_PUP
+ mww 0xFFFFFF50 0x00000000
+ ## MC_PUER: Memory controller protection unit disable
+ mww 0xFFFFFF54 0x00000000
+ ## EBI_CFGR
+ mww 0xFFFFFF64 0x00000000
+ ## SMC2_CSR[0]: 16bit, 2 TDF, 4 WS
+ mww 0xFFFFFF70 0x00003284
+
+ ## Init Clocks
+ ## CKGR_PLLAR
+ mww 0xFFFFFC28 0x2000BF05
+ ## PLLAR: 179,712000 MHz for PCK
+ mww 0xFFFFFC28 0x20263E04
+ sleep 100
+ ## PMC_MCKR
+ mww 0xFFFFFC30 0x00000100
+ sleep 100
+ ## ;MCKR : PCK/3 = MCK Master Clock = 59,904000MHz from PLLA
+ mww 0xFFFFFC30 0x00000202
+ sleep 100
+
+ #========================================
+ # CPU now runs at 180mhz
+ # SYS runs at 60mhz.
+ adapter_khz 40000
+ #========================================
+
+ ## Init SDRAM
+ ## PIOC_ASR: Configure PIOC as peripheral (D16/D31)
+ mww 0xFFFFF870 0xFFFF0000
+ ## PIOC_BSR:
+ mww 0xFFFFF874 0x00000000
+ ## PIOC_PDR:
+ mww 0xFFFFF804 0xFFFF0000
+ ## EBI_CSA : CS1=SDRAM
+ mww 0xFFFFFF60 0x00000002
+ ## EBI_CFGR:
+ mww 0xFFFFFF64 0x00000000
+ ## SDRC_CR :
+ mww 0xFFFFFF98 0x2188c155
+ ## SDRC_MR : Precharge All
+ mww 0xFFFFFF90 0x00000002
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## SDRC_MR : Refresh
+ mww 0xFFFFFF90 0x00000004
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## SDRC_MR : Load Mode Register
+ mww 0xFFFFFF90 0x00000003
+ ## access SDRAM
+ mww 0x20000080 0x00000000
+ ## SDRC_TR : Write refresh rate
+ mww 0xFFFFFF94 0x000002E0
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+ ## SDRC_MR : Normal Mode
+ mww 0xFFFFFF90 0x00000000
+ ## access SDRAM
+ mww 0x20000000 0x00000000
+}