diff options
author | Andrey Yurovsky <yurovsky@gmail.com> | 2015-06-10 09:53:27 -0700 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2015-08-06 13:15:19 +0100 |
commit | 33d220d10a069be34095313f51ae22052a079b34 (patch) | |
tree | 5923c789278869803ffbe848c7ed9b12d2e7fb91 | |
parent | 169db31ae06627a073c8179dc33d1bce1e88f4d6 (diff) | |
download | riscv-openocd-33d220d10a069be34095313f51ae22052a079b34.zip riscv-openocd-33d220d10a069be34095313f51ae22052a079b34.tar.gz riscv-openocd-33d220d10a069be34095313f51ae22052a079b34.tar.bz2 |
at91samd: add chip IDs for SAMC20 and SAMC21 families
Add the chip IDs corresponding to the new 5V "SAMC" parts which are
otherwise identical to the SAMD and should work with this driver. Also
add the configurations for their Xplained Pro boards.
Change-Id: Ic268d4ac384a3a77d4211a94da9f9faf4d8c0f7b
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/2809
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r-- | src/flash/nor/at91samd.c | 37 | ||||
-rw-r--r-- | tcl/board/atmel_samc20_xplained_pro.cfg | 10 | ||||
-rw-r--r-- | tcl/board/atmel_samc21_xplained_pro.cfg | 11 |
3 files changed, 58 insertions, 0 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index ddca137..a4cc51d 100644 --- a/src/flash/nor/at91samd.c +++ b/src/flash/nor/at91samd.c @@ -64,6 +64,7 @@ #define SAMD_PROCESSOR_M0 0x01 #define SAMD_FAMILY_D 0x00 #define SAMD_FAMILY_L 0x01 +#define SAMD_FAMILY_C 0x02 #define SAMD_SERIES_20 0x00 #define SAMD_SERIES_21 0x01 #define SAMD_SERIES_10 0x02 @@ -164,6 +165,38 @@ static const struct samd_part saml21_parts[] = { { 0x0D, "SAML21E15A", 32, 4 }, }; +/* Known SAMC20 parts. */ +static const struct samd_part samc20_parts[] = { + { 0x00, "SAMC20J18A", 256, 32 }, + { 0x01, "SAMC20J17A", 128, 16 }, + { 0x02, "SAMC20J16A", 64, 8 }, + { 0x03, "SAMC20J15A", 32, 4 }, + { 0x05, "SAMC20G18A", 256, 32 }, + { 0x06, "SAMC20G17A", 128, 16 }, + { 0x07, "SAMC20G16A", 64, 8 }, + { 0x08, "SAMC20G15A", 32, 4 }, + { 0x0A, "SAMC20E18A", 256, 32 }, + { 0x0B, "SAMC20E17A", 128, 16 }, + { 0x0C, "SAMC20E16A", 64, 8 }, + { 0x0D, "SAMC20E15A", 32, 4 }, +}; + +/* Known SAMC21 parts. */ +static const struct samd_part samc21_parts[] = { + { 0x00, "SAMC21J18A", 256, 32 }, + { 0x01, "SAMC21J17A", 128, 16 }, + { 0x02, "SAMC21J16A", 64, 8 }, + { 0x03, "SAMC21J15A", 32, 4 }, + { 0x05, "SAMC21G18A", 256, 32 }, + { 0x06, "SAMC21G17A", 128, 16 }, + { 0x07, "SAMC21G16A", 64, 8 }, + { 0x08, "SAMC21G15A", 32, 4 }, + { 0x0A, "SAMC21E18A", 256, 32 }, + { 0x0B, "SAMC21E17A", 128, 16 }, + { 0x0C, "SAMC21E16A", 64, 8 }, + { 0x0D, "SAMC21E15A", 32, 4 }, +}; + /* Each family of parts contains a parts table in the DEVSEL field of DID. The * processor ID, family ID, and series ID are used to determine which exact * family this is and then we can use the corresponding table. */ @@ -189,6 +222,10 @@ static const struct samd_family samd_families[] = { samd11_parts, ARRAY_SIZE(samd11_parts) }, { SAMD_PROCESSOR_M0, SAMD_FAMILY_L, SAMD_SERIES_21, saml21_parts, ARRAY_SIZE(saml21_parts) }, + { SAMD_PROCESSOR_M0, SAMD_FAMILY_C, SAMD_SERIES_20, + samc20_parts, ARRAY_SIZE(samc20_parts) }, + { SAMD_PROCESSOR_M0, SAMD_FAMILY_C, SAMD_SERIES_21, + samc21_parts, ARRAY_SIZE(samc21_parts) }, }; struct samd_info { diff --git a/tcl/board/atmel_samc20_xplained_pro.cfg b/tcl/board/atmel_samc20_xplained_pro.cfg new file mode 100644 index 0000000..1278eb7 --- /dev/null +++ b/tcl/board/atmel_samc20_xplained_pro.cfg @@ -0,0 +1,10 @@ +# +# Atmel SAMC20 Xplained Pro evaluation kit. +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc20j18 + +source [find target/at91samdXX.cfg] diff --git a/tcl/board/atmel_samc21_xplained_pro.cfg b/tcl/board/atmel_samc21_xplained_pro.cfg new file mode 100644 index 0000000..ac26930 --- /dev/null +++ b/tcl/board/atmel_samc21_xplained_pro.cfg @@ -0,0 +1,11 @@ +# +# Atmel SAMC21 Xplained Pro evaluation kit. +# http://www.atmel.com/tools/ATSAMC21-XPRO.aspx +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samc21j18 + +source [find target/at91samdXX.cfg] |