fix(spi_flash): Make GD chip to be linked as default, also optimization the log information

This commit is contained in:
C.S.M
2025-05-15 15:40:09 +08:00
parent 5133b89183
commit 0f1dbcc6a5
26 changed files with 139 additions and 102 deletions

View File

@@ -374,7 +374,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_ISSI_CHIP config SPI_FLASH_SUPPORT_ISSI_CHIP
bool "ISSI" bool "ISSI"
default y if SPI_FLASH_VENDOR_ISSI_SUPPORTED default y if SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of ISSI chips if chip vendor not directly Enable this to support auto detection of ISSI chips if chip vendor not directly
@@ -383,7 +383,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_MXIC_CHIP config SPI_FLASH_SUPPORT_MXIC_CHIP
bool "MXIC" bool "MXIC"
default y if SPI_FLASH_VENDOR_MXIC_SUPPORTED default y if SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of MXIC chips if chip vendor not directly Enable this to support auto detection of MXIC chips if chip vendor not directly
@@ -392,7 +392,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_GD_CHIP config SPI_FLASH_SUPPORT_GD_CHIP
bool "GigaDevice" bool "GigaDevice"
default y if SPI_FLASH_VENDOR_GD_SUPPORTED default y if SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of GD (GigaDevice) chips if chip vendor not Enable this to support auto detection of GD (GigaDevice) chips if chip vendor not
@@ -406,7 +406,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_WINBOND_CHIP config SPI_FLASH_SUPPORT_WINBOND_CHIP
bool "Winbond" bool "Winbond"
default y if SPI_FLASH_VENDOR_WINBOND_SUPPORTED default y if SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of Winbond chips if chip vendor not directly Enable this to support auto detection of Winbond chips if chip vendor not directly
@@ -416,7 +416,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_BOYA_CHIP config SPI_FLASH_SUPPORT_BOYA_CHIP
bool "BOYA" bool "BOYA"
# ESP32 doesn't usually use this chip, default n to save iram. # ESP32 doesn't usually use this chip, default n to save iram.
default y if SPI_FLASH_VENDOR_BOYA_SUPPORTED default y if SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of BOYA chips if chip vendor not directly Enable this to support auto detection of BOYA chips if chip vendor not directly
@@ -426,7 +426,7 @@ menu "SPI Flash driver"
config SPI_FLASH_SUPPORT_TH_CHIP config SPI_FLASH_SUPPORT_TH_CHIP
bool "TH" bool "TH"
# ESP32 doesn't usually use this chip, default n to save iram. # ESP32 doesn't usually use this chip, default n to save iram.
default y if SPI_FLASH_VENDOR_TH_SUPPORTED default y if SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED
default n default n
help help
Enable this to support auto detection of TH chips if chip vendor not directly Enable this to support auto detection of TH chips if chip vendor not directly

View File

@@ -3,22 +3,22 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_GD_SUPPORTED config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_ISSI_SUPPORTED config SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_MXIC_SUPPORTED config SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_WINBOND_SUPPORTED config SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -1,29 +1,29 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
/** /**
* This file records the flash vendor that we offically supported. * This file records the flash vendor that we officially supported.
* we have many chip-specific files, like ``spi_flash_chip_gd.c``, * we have many chip-specific files, like ``spi_flash_chip_gd.c``,
* which means that this file is used for GD flash chips. * which means that this file is used for GD flash chips.
* *
* The following definations illustrate what flash vendor is officially * The following definitions illustrate what flash vendor is officially
* supported by ESP chips. If a flash vendor is officially supported, the chip * supported by ESP chips. If a flash vendor is officially supported, the chip
* specific file will be linked by default, vice versa. You can also adjust this * specific file will be linked by default, vice versa. You can also adjust this
* manually in Kconfig options. * manually in Kconfig options.
* *
* For example: * For example:
* Following `SPI_FLASH_VENDOR_ISSI_SUPPORTED` is (1), which means file `spi_flash_chip_issi.c` * Following `SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED` is (1), which means file `spi_flash_chip_issi.c`
* will be linked. * will be linked.
* *
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORTED (1) #define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_ISSI_SUPPORTED (1) #define SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_MXIC_SUPPORTED (1) #define SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_WINBOND_SUPPORTED (1) #define SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED (1)

View File

@@ -3,30 +3,30 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_GD_SUPPORTED config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_ISSI_SUPPORTED config SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_MXIC_SUPPORTED config SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_WINBOND_SUPPORTED config SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_BOYA_SUPPORTED config SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_TH_SUPPORTED config SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -1,14 +1,14 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORTED (1) #define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_ISSI_SUPPORTED (1) #define SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_MXIC_SUPPORTED (1) #define SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_WINBOND_SUPPORTED (1) #define SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_BOYA_SUPPORTED (1) #define SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_TH_SUPPORTED (1) #define SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED (1)

View File

@@ -3,30 +3,30 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_GD_SUPPORTED config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_ISSI_SUPPORTED config SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_MXIC_SUPPORTED config SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_WINBOND_SUPPORTED config SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_BOYA_SUPPORTED config SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_TH_SUPPORTED config SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -1,14 +1,14 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORTED (1) #define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_ISSI_SUPPORTED (1) #define SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_MXIC_SUPPORTED (1) #define SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_WINBOND_SUPPORTED (1) #define SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_BOYA_SUPPORTED (1) #define SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_TH_SUPPORTED (1) #define SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,6 +3,10 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool
default y
config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -5,4 +5,5 @@
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)

View File

@@ -3,30 +3,30 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_GD_SUPPORTED config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_ISSI_SUPPORTED config SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_MXIC_SUPPORTED config SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_WINBOND_SUPPORTED config SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_BOYA_SUPPORTED config SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_TH_SUPPORTED config SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -1,14 +1,14 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORTED (1) #define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_ISSI_SUPPORTED (1) #define SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_MXIC_SUPPORTED (1) #define SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_WINBOND_SUPPORTED (1) #define SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_BOYA_SUPPORTED (1) #define SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_TH_SUPPORTED (1) #define SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED (1)

View File

@@ -3,30 +3,30 @@
# using gen_soc_caps_kconfig.py, do not edit manually # using gen_soc_caps_kconfig.py, do not edit manually
##################################################### #####################################################
config SPI_FLASH_VENDOR_XMC_SUPPORTED config SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_GD_SUPPORTED config SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_ISSI_SUPPORTED config SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_MXIC_SUPPORTED config SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_WINBOND_SUPPORTED config SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_BOYA_SUPPORTED config SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED
bool bool
default y default y
config SPI_FLASH_VENDOR_TH_SUPPORTED config SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED
bool bool
default y default y

View File

@@ -1,15 +1,15 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#pragma once #pragma once
#define SPI_FLASH_VENDOR_XMC_SUPPORTED (1) #define SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_GD_SUPPORTED (1) #define SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_ISSI_SUPPORTED (1) #define SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_MXIC_SUPPORTED (1) #define SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_WINBOND_SUPPORTED (1) #define SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_BOYA_SUPPORTED (1) #define SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED (1)
#define SPI_FLASH_VENDOR_TH_SUPPORTED (1) #define SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED (1)

View File

@@ -17,7 +17,9 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_log.h" #include "esp_log.h"
#define TAG "spi_flash" __attribute__((unused)) static const char *TAG = "spi_flash";
#define FORMAT_STR "Detected %s flash chip but using generic driver. For optimal functionality, enable `SPI_FLASH_SUPPORT_%s_CHIP` in menuconfig"
#if !CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST #if !CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST
/* /*
@@ -65,39 +67,39 @@ void spi_flash_chip_list_check(esp_flash_t *chip, uint32_t device_id) {
{ {
case SPI_FLASH_GD: case SPI_FLASH_GD:
if (&esp_flash_chip_gd == NULL) { if (&esp_flash_chip_gd == NULL) {
ESP_EARLY_LOGW(TAG, "GigaDevice detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_GD_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "GigaDevice", "GD");
} }
break; break;
case SPI_FLASH_ISSI: case SPI_FLASH_ISSI:
if (&esp_flash_chip_issi == NULL) { if (&esp_flash_chip_issi == NULL) {
ESP_EARLY_LOGW(TAG, "ISSI detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_ISSI_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "ISSI", "ISSI");
} }
break; break;
case SPI_FLASH_TH: case SPI_FLASH_TH:
if (&esp_flash_chip_th == NULL) { if (&esp_flash_chip_th == NULL) {
ESP_EARLY_LOGW(TAG, "TH detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_TH_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "TH", "TH");
} }
break; break;
case SPI_FLASH_WINBOND: case SPI_FLASH_WINBOND:
if (&esp_flash_chip_winbond == NULL) { if (&esp_flash_chip_winbond == NULL) {
ESP_EARLY_LOGW(TAG, "winbond detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_WINBOND_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "winbond", "WINBOND");
} }
break; break;
case SPI_FLASH_MXIC: case SPI_FLASH_MXIC:
// Need to tell the difference between octal and quad flash. // Need to tell the difference between octal and quad flash.
if (chip->read_mode < SPI_FLASH_OPI_FLAG) { if (chip->read_mode < SPI_FLASH_OPI_FLAG) {
if (&esp_flash_chip_mxic == NULL) { if (&esp_flash_chip_mxic == NULL) {
ESP_EARLY_LOGW(TAG, "MXIC detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_MXIC_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "MXIC", "MXIC");
} }
} else { } else {
if (&esp_flash_chip_mxic_opi == NULL) { if (&esp_flash_chip_mxic_opi == NULL) {
ESP_EARLY_LOGW(TAG, "MXIC detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_MXIC_OPI_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "MXIC", "MXIC_OPI");
} }
} }
break; break;
case SPI_FLASH_BY: case SPI_FLASH_BY:
if (&esp_flash_chip_boya == NULL) { if (&esp_flash_chip_boya == NULL) {
ESP_EARLY_LOGW(TAG, "boya detected but related driver is not linked, please check option `SPI_FLASH_SUPPORT_BOYA_CHIP`"); ESP_EARLY_LOGW(TAG, FORMAT_STR, "boya", "BOYA");
} }
break; break;
default: default: