summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Klinke <jbk@google.com>2019-06-04 09:38:29 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-15 04:56:34 +0000
commit70e9e80590d05bad7dbd44fc4d2613633e7b98eb (patch)
tree00a8e289a2123831897b8a693fb69c497cc7906f
parenta2139727d703e3b2f5ca9fed4a9bafe503e30fbd (diff)
downloadchrome-ec-70e9e80590d05bad7dbd44fc4d2613633e7b98eb.tar.gz
stm32mon: Added declarations for stm32g0 series
Bug: 132247842 Change-Id: Ib1defbabd6e2835d8ce8485c80f22254d2b49db7 Signed-off-by: jbk@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1620789 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: James Deng <jaamesd@chromium.org>
-rw-r--r--util/stm32mon.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/util/stm32mon.c b/util/stm32mon.c
index aa218a02a8..d89f97ef47 100644
--- a/util/stm32mon.c
+++ b/util/stm32mon.c
@@ -200,6 +200,50 @@ struct stm32_def {
},
{0x450, "STM32H74x", 0x200000, 131768, {13, 19}, { { 0 } }, { 0 } },
{0x451, "STM32F76x", 0x200000, 32768, {13, 19}, { { 0 } }, { 0 } },
+ {
+ .id = 0x460,
+ .name = "STM32G071xx",
+ .flash_size = 0x20000,
+ .page_size = 2048,
+ .cmds_len = {13, 13},
+ /*
+ * STM32G0x1:
+ * See https://www.st.com/resource/en/reference_manual/dm00371828.pdf
+ * Section 3.3.1 Table 6 Flash module organization
+ */
+ .memory_layout = {
+ .main_memory = {
+ .addr = STM32_MAIN_MEMORY_ADDR,
+ .size_bytes = 0, /* set by flash reg read */
+ },
+ .system_memory = {
+ .addr = STM32_SYSTEM_MEMORY_ADDR,
+ .size_bytes = 28 * KBYTES_TO_BYTES,
+ },
+ .otp_area = {
+ .addr = 0x1FFF7000,
+ .size_bytes = 1024,
+ },
+ .option_bytes = {
+ .addr = 0x1FFF7800,
+ .size_bytes = 128,
+ }
+ },
+ /*
+ * STM32G0x1:
+ * See https://www.st.com/resource/en/reference_manual/dm00371828.pdf
+ * Section 38 Device electronic signature
+ */
+ .device_signature = {
+ .unique_device_id_addr = 0x1FFF7590,
+ .flash_size_addr = 0x1FFF75E0,
+ /*
+ * Datasheet litst as same address as e.g. STM32F412,
+ * hence declaring as zero as for that other chip.
+ */
+ .package_data_addr = 0, /* 0x1FFF7500 */
+ }
+ },
{ 0 }
};