diff options
author | Andre Przywara <osp@andrep.de> | 2017-09-11 01:30:19 +0300 |
---|---|---|
committer | Andre Przywara <osp@andrep.de> | 2018-07-09 11:16:25 +0300 |
commit | fbe2dee76266f3a4040482cd4b4209c41ac066e3 (patch) | |
tree | 325424999a2dece9c96289005bc185330b6cc700 | |
parent | 3c9bc29f39fbcffd02c3f0624e7064c249334951 (diff) |
fel: SPI: add Macronix support
Add the JEDEC manufacturer ID for Macronix to the list of recognized
vendors, also add the MX25L series to the list of supported chips.
Those chips are used on the OrangePi PC 2 boards, for instance.
Tag the struct definition with the member names on the way to improve
readability of the SPI flash chip description.
Signed-off-by: Andre Przywara <osp@andrep.de>
-rw-r--r-- | fel-spiflash.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/fel-spiflash.c b/fel-spiflash.c index 64e205e..4359e21 100644 --- a/fel-spiflash.c +++ b/fel-spiflash.c @@ -39,11 +39,24 @@ typedef struct { } spi_flash_info_t; spi_flash_info_t spi_flash_info[] = { - { 0xEF40, 0x6, 0xD8, 64 * 1024, 0x20, 4 * 1024, 0x02, 256, "Winbond W25Qxx" }, + { .id = 0xEF40, .write_enable_cmd = 0x6, + .large_erase_cmd = 0xD8, .large_erase_size = 64 * 1024, + .small_erase_cmd = 0x20, .small_erase_size = 4 * 1024, + .program_cmd = 0x02, .program_size = 256, + .text_description = "Winbond W25Qxx" }, + { .id = 0xC220, .write_enable_cmd = 0x6, + .large_erase_cmd = 0xD8, .large_erase_size = 64 * 1024, + .small_erase_cmd = 0x20, .small_erase_size = 4 * 1024, + .program_cmd = 0x02, .program_size = 256, + .text_description = "Macronix MX25Lxxxx" }, }; spi_flash_info_t default_spi_flash_info = { - 0x0000, 0x6, 0xD8, 64 * 1024, 0x20, 4 * 1024, 0x02, 256, "Unknown" + .id = 0x0000, .write_enable_cmd = 0x6, + .large_erase_cmd = 0xD8, .large_erase_size = 64 * 1024, + .small_erase_cmd = 0x20, .small_erase_size = 4 * 1024, + .program_cmd = 0x02, .program_size = 256, + .text_description = "Unknown", }; /*****************************************************************************/ @@ -443,6 +456,9 @@ void aw_fel_spiflash_info(feldev_handle *dev) case 0xEF: manufacturer = "Winbond"; break; + case 0xC2: + manufacturer = "Macronix"; + break; default: manufacturer = "Unknown"; break; |