summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin yan <martin.yan@microchip.corp-partner.google.com>2021-04-01 07:08:51 -0400
committerCommit Bot <commit-bot@chromium.org>2021-04-05 19:21:03 +0000
commitc580c2225e055ceda79ced0fd7a08f6447ce987f (patch)
tree3090547bb01366054208f18913f70cf3b5f3ccaf
parent86a4ca10a8c74b175417ae3a38aff4e4097ed97c (diff)
downloadchrome-ec-c580c2225e055ceda79ced0fd7a08f6447ce987f.tar.gz
mchp: Move general flash definitions into chip
Move general flash definitions: CONFIG_SPI_FLASH_PORT CONFIG_SPI_FLASH into config_chip.h Redefine CONFIG_FLASH_SIZE_BYTES per MEC1727 with integrated SPI flash BRANCH=none BUG=none TEST=Build MEC170x/MEC152x boards and sklrvp_mchp172x. Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I2dc9af69b0794ec2e3ec11c45be9ff74aa19f561 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799977 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Ravin Kumar <ravin.kumar@microchip.com> Tested-by: Ravin Kumar <ravin.kumar@microchip.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--chip/mchp/config_chip.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chip/mchp/config_chip.h b/chip/mchp/config_chip.h
index cae3779c55..fb39ea7870 100644
--- a/chip/mchp/config_chip.h
+++ b/chip/mchp/config_chip.h
@@ -116,6 +116,22 @@
/************************************************************************/
/* Define our flash layout. */
+/*
+ * MEC1521H loads firmware using QMSPI controller
+ * CONFIG_SPI_FLASH_PORT is the index into
+ * spi_devices[] in board.c
+ */
+#define CONFIG_SPI_FLASH_PORT 0
+#define CONFIG_SPI_FLASH
+
+/*
+ * MEC1727 chip has integrated SPI flash with 512KB size
+ */
+#if (defined(CHIP_VARIANT_MEC1727SZ) || defined(CHIP_VARIANT_MEC1727LJ))
+/* Total size of writable flash */
+#define CONFIG_FLASH_SIZE_BYTES 524288
+#endif
+
/* Protect bank size 4K bytes */
#define CONFIG_FLASH_BANK_SIZE 0x00001000
/* Sector erase size 4K bytes */