blob: 2ed297a968a918d8daf06660dccfeada233d611a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
From 0039c15251a7fcf60154d59933a11d9e17b04d5c Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Thu, 6 Dec 2018 18:49:04 -0800
Subject: [PATCH] Add support for Macronix and Micron 1Gbits SPI flash
Quick fix to support Macronix and Micron 1Gbits SPI.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
arch/arm/mach-aspeed/flash.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
index dece4315d755..2a31b6503a22 100644
--- a/arch/arm/mach-aspeed/flash.c
+++ b/arch/arm/mach-aspeed/flash.c
@@ -79,6 +79,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* FLASH chips info */
#define MX25L12805D 0x1820C2
#define MX25L25635E 0x1920C2
#define MX66L51235F 0x1A20C2
+#define MX66L1G45G 0x1B20C2
#define SST25VF016B 0x4125bf
#define SST25VF064C 0x4b25bf
#define SST25VF040B 0x8d25bf
@@ -978,6 +979,35 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
#endif
break;
+ case MX66L1G45G:
+ erase_region_size = 0x10000;
+ info->readcmd = 0x0b;
+ info->dualport = 0;
+ info->dummybyte = 1;
+ info->buffersize = 256;
+ WriteClk = 50;
+ EraseClk = 20;
+ ReadClk = 50;
+#if 1
+ info->sector_count = 2048;
+ info->size = 0x4000000;
+ info->address32 = 1;
+#if defined(CONFIG_FLASH_SPIx2_Dummy)
+ info->readcmd = 0xbb;
+ info->dummybyte = 1;
+ info->dualport = 1;
+ info->iomode = IOMODEx2_dummy;
+#elif defined(CONFIG_FLASH_SPIx4_Dummy)
+ info->readcmd = 0xeb;
+ info->dummybyte = 3;
+ info->dualport = 0;
+ info->iomode = IOMODEx4_dummy;
+ info->quadport = 1;
+ info->dummydata = 0xaa;
+#endif
+#endif
+ break;
+
case MX25L12805D:
info->sector_count = 256;
info->size = 0x1000000;
@@ -1093,7 +1123,8 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
info->readcmd = 0x0b;
info->dualport = 0;
info->dummybyte = 1;
- info->buffersize = 1;
+ info->buffersize = 256;
+ info->address32 = 1;
WriteClk = 50;
EraseClk = 25;
ReadClk = 50;
--
2.7.4
|