xmc4xxx: Add XMC4700 support 36/3136/4
authorAndreas Färber <afaerber@suse.de>
Sun, 29 Nov 2015 04:26:23 +0000 (05:26 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Tue, 23 Feb 2016 19:32:01 +0000 (19:32 +0000)
Tested with EES-AA revision chips on Relax Kit for 5V Shields and
Relax Lite Kit.

Change-Id: I17d4479657bad0516d4c10c2ad7e745d59e678b7
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3136
Tested-by: jenkins
Reviewed-by: Jeff Ciesielski <jeffciesielski@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/flash/nor/xmc4xxx.c

index 9212e43..1049783 100644 (file)
 
 /* Flash controller configuration values */
 #define FLASH_ID_XMC4500        0xA2
-#define FLASH_ID_XMC4800        0x92
+#define FLASH_ID_XMC4700_4800   0x92
 #define FLASH_ID_XMC4100_4200   0x9C
 #define FLASH_ID_XMC4400        0x9F
 
@@ -381,9 +381,9 @@ static int xmc4xxx_probe(struct flash_bank *bank)
                bank->num_sectors = 12;
                LOG_DEBUG("XMC4xxx: XMC4500 detected.");
                break;
-       case FLASH_ID_XMC4800:
+       case FLASH_ID_XMC4700_4800:
                bank->num_sectors = 16;
-               LOG_DEBUG("XMC4xxx: XMC4800 detected.");
+               LOG_DEBUG("XMC4xxx: XMC4700/4800 detected.");
                break;
        default:
                LOG_ERROR("XMC4xxx: Unexpected flash ID. got %02" PRIx8,
@@ -983,6 +983,15 @@ static int xmc4xxx_get_info_command(struct flash_bank *bank, char *buf, int buf_
                        break;
                }
                break;
+       case 0x700:
+               dev_str = "XMC4700";
+
+               switch (rev_id) {
+               case 0x1:
+                       rev_str = "EES-AA";
+                       break;
+               }
+               break;
        case 0x800:
                dev_str = "XMC4800";