This is an automated email from Gerrit.

"Fedi Bouzazi <fedi.bouz...@st.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/8087

-- gerrit

commit 1270440b4e95a16d9eb97a3f1e472f482943c97a
Author: Fedi Bouzazi <fedi.bouz...@st.com>
Date:   Tue Apr 2 12:22:23 2024 +0100

    flash/stm32l4x: support STM32 U03xx and U07/U08xx devices
    
    This patch is a support for STM32U03 with flash size
    equal to 64 Kb and a support for STM32U07/U08xx with
    flash size equal to 256 Kb.
    
    Signed-off-by: fedi BOUZAZI <fedi.bouz...@st.com>
    Change-Id: I8dcbfb7a3b6ed054335f5cd1ba090fb1cdc1ace6

diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c
index 039938512b..cde1c0478c 100644
--- a/src/flash/nor/stm32l4x.c
+++ b/src/flash/nor/stm32l4x.c
@@ -272,12 +272,20 @@ struct stm32l4_wrp {
 };
 
 /* human readable list of families this drivers supports (sorted 
alphabetically) */
-static const char *device_families = "STM32C0/G0/G4/L4/L4+/L5/U5/WB/WL";
+static const char *device_families = "STM32C0/G0/G4/L4/L4+/L5/U0/U5/WB/WL";
 
 static const struct stm32l4_rev stm32l47_l48xx_revs[] = {
        { 0x1000, "1" }, { 0x1001, "2" }, { 0x1003, "3" }, { 0x1007, "4" }
 };
 
+static const struct stm32l4_rev stm32u03xx_revs[] = {
+       { 0x1000, "A" },
+};
+
+static const struct stm32l4_rev stm32u07_u08xx_revs[] = {
+       { 0x1000, "A" },
+};
+
 static const struct stm32l4_rev stm32l43_l44xx_revs[] = {
        { 0x1000, "A" }, { 0x1001, "Z" }, { 0x2001, "Y" },
 };
@@ -646,6 +654,43 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
          .otp_base              = 0x1FFF7000,
          .otp_size              = 1024,
        },
+
+       {
+         .id                    = DEVID_STM32U53_U54XX,
+         .revs                  = stm32u53_u54xx_revs,
+         .num_revs              = ARRAY_SIZE(stm32u53_u54xx_revs),
+         .device_str            = "STM32U53/U54xx",
+         .max_flash_size_kb     = 512,
+         .flags                 = F_HAS_DUAL_BANK | F_QUAD_WORD_PROG | 
F_HAS_TZ | F_HAS_L5_FLASH_REGS,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x0BFA07A0,
+         .otp_base              = 0x0BFA0000,
+         .otp_size              = 512,
+       },
+       {
+         .id                    = DEVID_STM32U03XX,
+         .revs                  = stm32u03xx_revs,
+         .num_revs              = ARRAY_SIZE(stm32u03xx_revs),
+         .device_str            = "STM32U03xx",
+         .max_flash_size_kb     = 64,
+         .flags                 = F_NONE,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x1FFF6EA0,
+         .otp_base              = 0x1FFF6800,
+         .otp_size              = 1024,
+       },
+       {
+         .id                    = DEVID_STM32U07_U08XX,
+         .revs                  = stm32u07_u08xx_revs,
+         .num_revs              = ARRAY_SIZE(stm32u07_u08xx_revs),
+         .device_str            = "STM32U07/U08xx",
+         .max_flash_size_kb     = 256,
+         .flags                 = F_NONE,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x1FFF6EA0,
+         .otp_base              = 0x1FFF6800,
+         .otp_size              = 1024,
+       },
 };
 
 /* flash bank stm32l4x <base> <size> 0 0 <target#> */
@@ -1918,6 +1963,8 @@ static int stm32l4_probe(struct flash_bank *bank)
        case DEVID_STM32C03XX:
        case DEVID_STM32G05_G06XX:
        case DEVID_STM32G07_G08XX:
+       case DEVID_STM32U03XX:
+       case DEVID_STM32U07_U08XX:
        case DEVID_STM32L45_L46XX:
        case DEVID_STM32L41_L42XX:
        case DEVID_STM32G03_G04XX:
diff --git a/src/flash/nor/stm32l4x.h b/src/flash/nor/stm32l4x.h
index 3dc0909554..e2f8917010 100644
--- a/src/flash/nor/stm32l4x.h
+++ b/src/flash/nor/stm32l4x.h
@@ -89,7 +89,9 @@
 #define DEVID_STM32L43_L44XX   0x435
 #define DEVID_STM32C01XX               0x443
 #define DEVID_STM32C03XX               0x453
+#define DEVID_STM32U53_U54XX   0x455
 #define DEVID_STM32G05_G06XX   0x456
+#define DEVID_STM32U03XX               0x459
 #define DEVID_STM32G07_G08XX   0x460
 #define DEVID_STM32L49_L4AXX   0x461
 #define DEVID_STM32L45_L46XX   0x462
@@ -103,7 +105,8 @@
 #define DEVID_STM32L55_L56XX   0x472
 #define DEVID_STM32G49_G4AXX   0x479
 #define DEVID_STM32U57_U58XX   0x482
-#define DEVID_STM32WBA5X               0x492
+#define DEVID_STM32U07_U08XX   0x489
+#define DEVID_STM32WBAXX               0x492
 #define DEVID_STM32WB1XX               0x494
 #define DEVID_STM32WB5XX               0x495
 #define DEVID_STM32WB3XX               0x496

-- 

Reply via email to