[u-boot, v2016.07-aspeed-openbmc v1] aspeed/flash: add winbond SPI support

Hongwei Zhang hongweiz at ami.com
Thu Jun 6 06:52:45 AEST 2019


Add Winbond SPI flash W25M512JV support to u-boot.

Signed-off-by: Hongwei Zhang <hongweiz at ami.com>
---
 a/arch/arm/mach-aspeed/flash.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
index db69d51..eefa6cd 100644
--- a/arch/arm/mach-aspeed/flash.c
+++ b/arch/arm/mach-aspeed/flash.c
@@ -84,6 +84,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];		/* FLASH chips info */
 #define AT25DF161		0x02461F
 #define AT25DF321		0x01471F
 #define MT25QL01GB		0x21ba20
+#define W25M512JV		0x1971ef
 
 /* SPI Define */
 #define CS0_CTRL			0x10
@@ -1156,6 +1157,20 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
 			info->address32 = 1;
 			break;
 
+		case W25M512JV:
+			info->sector_count = 512;
+			info->size = 0x2000000;
+			erase_region_size  = 0x10000;
+			info->readcmd = 0x0b;
+			info->dualport = 1;
+			info->dummybyte = 1;
+			info->buffersize = 256;
+			WriteClk = 50;
+			EraseClk = 20;
+			ReadClk  = 50;
+			info->address32 = 1;
+			break;
+
 		default:	/* use JEDEC ID */
 			printf("Unsupported SPI Flash!! 0x%08lx\n", info->flash_id);
 			erase_region_size  = 0x10000;
-- 
2.7.4



More information about the openbmc mailing list