From a80603c05b2d5742610b529f0b2681c2457cee54 Mon Sep 17 00:00:00 2001 From: laokaiyao Date: Thu, 12 Sep 2024 17:26:31 +0800 Subject: [PATCH] fix(gpio_reserve): reserve the mspi pin regarding line mode --- components/spi_flash/flash_ops.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/spi_flash/flash_ops.c b/components/spi_flash/flash_ops.c index 45c060f7e4..9bf28ce34d 100644 --- a/components/spi_flash/flash_ops.c +++ b/components/spi_flash/flash_ops.c @@ -159,6 +159,12 @@ void esp_mspi_pin_reserve(void) uint64_t reserve_pin_mask = 0; uint8_t mspi_io; for (esp_mspi_io_t i = 0; i < ESP_MSPI_IO_MAX; i++) { +#if SOC_SPI_MEM_SUPPORT_OPI_MODE + if (!bootloader_flash_is_octal_mode_enabled() + && i >= ESP_MSPI_IO_DQS && i <= ESP_MSPI_IO_D7) { + continue; + } +#endif mspi_io = esp_mspi_get_io(i); if (mspi_io < 64) { // 'reserve_pin_mask' have 64 bits length reserve_pin_mask |= BIT64(mspi_io);