Skip to contentSkip to conversation

aspeed/flash: add winbond SPI support

PATCH In review Hongwei Zhang 2 participants 2 messages Jun 5, 2019 – Jun 14, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aspeed/flash: add winbond SPI support

Add Winbond SPI flash W25M512JV support to u-boot.

---
 a/arch/arm/mach-aspeed/flash.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/mach-aspeed/flash.c +15 -0
index db69d51..eefa6cd 100644
@@ -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;
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw

Hello,

Quoted 1 line · Hongwei Zhang

Add Winbond SPI flash W25M512JV support to u-boot.

For which board do you need this support ?

Thanks,

C.

Quoted 39 lines
---
 a/arch/arm/mach-aspeed/flash.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/mach-aspeed/flash.c +15 -0
index db69d51..eefa6cd 100644
@@ -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;