at91samd: add chip IDs for SAMC20 and SAMC21 families
authorAndrey Yurovsky <yurovsky@gmail.com>
Wed, 10 Jun 2015 16:53:27 +0000 (09:53 -0700)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 6 Aug 2015 12:15:19 +0000 (13:15 +0100)
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>
src/flash/nor/at91samd.c
tcl/board/atmel_samc20_xplained_pro.cfg [new file with mode: 0644]
tcl/board/atmel_samc21_xplained_pro.cfg [new file with mode: 0644]

index ddca13755c901c16bdfd9a330d59c96145a6d88b..a4cc51d21d39019eb106296ae1cebb03f269bc49 100644 (file)
@@ -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 (file)
index 0000000..1278eb7
--- /dev/null
@@ -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 (file)
index 0000000..ac26930
--- /dev/null
@@ -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]