Skip to content

Commit 1c18d65

Browse files
committed
feat(spi_flash): Add support for gd55f flash chip
1 parent 9e2d857 commit 1c18d65

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

components/spi_flash/esp32c5/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
1010
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
1111
bool
1212
default y
13+
14+
config SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
15+
bool
16+
default y

components/spi_flash/esp32c5/flash_vendor_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77

88
#define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
99
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
10+
#define SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED (1)

components/spi_flash/spi_flash_chip_gd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ spi_flash_caps_t spi_flash_chip_gd_get_caps(esp_flash_t *chip)
4040
case 0xC84016:
4141
case 0xC84017:
4242
case 0xC84018:
43+
case 0xC84319:
4344
caps_flags |= SPI_FLASH_CHIP_CAP_SUSPEND;
4445
break;
4546
default:
@@ -74,6 +75,7 @@ esp_err_t spi_flash_chip_gd_detect_size(esp_flash_t *chip, uint32_t *size)
7475
#define GD25Q_PRODUCT_ID 0x4000
7576
#define GD25LQ_PRODUCT_ID 0x6000
7677
#define GD25UF_PRODUCT_ID 0x8300
78+
#define GD55F_PRODUCT_ID 0x4300
7779

7880
#define WRSR_16B_REQUIRED(chip_id) (((chip_id) & FLASH_ID_MASK) == GD25LQ_PRODUCT_ID || \
7981
((chip_id) & FLASH_SIZE_MASK) <= 0x15)
@@ -89,7 +91,7 @@ esp_err_t spi_flash_chip_gd_probe(esp_flash_t *chip, uint32_t flash_id)
8991
}
9092

9193
uint32_t product_id = flash_id & FLASH_ID_MASK;
92-
if (product_id != GD25Q_PRODUCT_ID && product_id != GD25LQ_PRODUCT_ID && product_id != GD25UF_PRODUCT_ID) {
94+
if (product_id != GD25Q_PRODUCT_ID && product_id != GD25LQ_PRODUCT_ID && product_id != GD25UF_PRODUCT_ID && product_id != GD55F_PRODUCT_ID) {
9395
return ESP_ERR_NOT_FOUND;
9496
}
9597

0 commit comments

Comments
 (0)