summaryrefslogtreecommitdiff
path: root/zephyr/shim/chip/stm32/include/flash_chip.h
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/shim/chip/stm32/include/flash_chip.h')
-rw-r--r--zephyr/shim/chip/stm32/include/flash_chip.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/zephyr/shim/chip/stm32/include/flash_chip.h b/zephyr/shim/chip/stm32/include/flash_chip.h
new file mode 100644
index 0000000000..cd896eca9a
--- /dev/null
+++ b/zephyr/shim/chip/stm32/include/flash_chip.h
@@ -0,0 +1,22 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __CROS_EC_FLASH_CHIP_H
+#define __CROS_EC_FLASH_CHIP_H
+
+/* Minimum write size */
+#define CONFIG_FLASH_WRITE_SIZE \
+ DT_PROP(DT_INST(0, soc_nv_flash), write_block_size)
+
+/* No page mode, so use minimum write size */
+#define CONFIG_FLASH_WRITE_IDEAL_SIZE CONFIG_FLASH_WRITE_SIZE
+
+/* RO image offset inside protected storage (RO part) */
+#define CONFIG_RO_STORAGE_OFF 0x0
+
+/* RW image offset inside writable storage (RW part) */
+#define CONFIG_RW_STORAGE_OFF 0x0
+
+#endif /* __CROS_EC_FLASH_CHIP_H */