tcl: add SPDX tag
[fw/openocd] / tcl / board / netgear-wg102.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 source [find target/atheros_ar2313.cfg]
4
5 reset_config trst_and_srst
6
7 $_TARGETNAME configure -event reset-init {
8         mips32 cp0 12 0 0x10400000
9
10         # configure sdram controller
11         mww 0xb8300004 0x0e03
12         sleep 100
13         mww 0xb8300004 0x0e01
14         mww 0xb8300008 0x10
15         sleep 500
16         mww 0xb8300004 0x0e02
17
18         mww 0xb8300000 0x6c0088
19         mww 0xb8300008 0x57e
20         mww 0xb8300004 0x0e00
21         mww 0xb8300004 0xb00
22
23         # configure flash
24         #                 0x00000001 - 0x01 << FLASHCTL_IDCY_S
25         #                 0x000000e0 - 0x07 << FLASHCTL_WST1_S
26         # FLASHCTL_RBLE   0x00000400 - Read byte lane enable
27         #                 0x00003800 - 0x07 << FLASHCTL_WST2_S
28         # FLASHCTL_AC_8M  0x00060000 - Size of flash
29         # FLASHCTL_E      0x00080000 - Flash bank enable (added)
30         # FLASHCTL_WP     0x04000000 - write protect. If used, CFI mode wont work!!
31         # FLASHCTL_MWx16  0x10000000 - 16bit mode. Do not use it!!
32         # FLASHCTL_MWx8   0x00000000 - 8bit mode.
33         mww 0xb8400000 0x000d3ce1
34 }
35
36 set _FLASHNAME $_CHIPNAME.flash
37 flash bank $_FLASHNAME cfi 0xbe000000 0x00400000 1 1 $_TARGETNAME x16_as_x8