flash/nor: add support of STM32L41/L42xx 34/4934/6
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>
Mon, 6 Jan 2020 14:47:09 +0000 (15:47 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 16 Jan 2020 09:36:33 +0000 (09:36 +0000)
tested using STM32L412KB

Change-Id: I1e2ae93d8c740db219f0fb579940de7f2fffac15
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/4934
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/stm32l4x.c

index 6aed773..9057872 100644 (file)
@@ -161,6 +161,10 @@ static const struct stm32l4_rev stm32_462_revs[] = {
                { 0x1000, "A" }, { 0x1001, "Z" }, { 0x2001, "Y" },
 };
 
+static const struct stm32l4_rev stm32_464_revs[] = {
+       { 0x1000, "A" },
+};
+
 static const struct stm32l4_rev stm32_470_revs[] = {
        { 0x1000, "A" }, { 0x1001, "Z" }, { 0x1003, "Y" }, { 0x100F, "W" },
 };
@@ -207,6 +211,16 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
          .fsize_addr            = 0x1FFF75E0,
        },
        {
+         .id                    = 0x464,
+         .revs                  = stm32_464_revs,
+         .num_revs              = ARRAY_SIZE(stm32_464_revs),
+         .device_str            = "STM32L41/L42xx",
+         .max_flash_size_kb     = 128,
+         .has_dual_bank         = false,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x1FFF75E0,
+       },
+       {
          .id                    = 0x470,
          .revs                  = stm32_470_revs,
          .num_revs              = ARRAY_SIZE(stm32_470_revs),
@@ -766,6 +780,7 @@ static int stm32l4_probe(struct flash_bank *bank)
                break;
        case 0x435:
        case 0x462:
+       case 0x464:
                /* single bank flash */
                page_size = 2048;
                num_pages = flash_size_in_kb / 2;