Skip to content

Commit 5c268bc

Browse files
committed
[nrf fromlist] drivers: flash_mspi_nor: Remove undesirable initial Quad disabling
Using a GPIO reset for a flash chip that has a dual function pin (RESET# or SIO3) and is to be used in Quad mode is rather a bad idea and so is clearing of the Quad Enable bit at every initialization of the flash driver, since this bit is usually non-volatile, so such operation means unnecessary wearing of the flash chip. Soft Reset should be use instead in such case. Upstream PR #: 93093 Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 08c5be2 commit 5c268bc

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

drivers/flash/flash_mspi_nor.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,6 @@ static int flash_chip_init(const struct device *dev)
924924
{
925925
const struct flash_mspi_nor_config *dev_config = dev->config;
926926
struct flash_mspi_nor_data *dev_data = dev->data;
927-
enum mspi_io_mode io_mode = dev_config->mspi_nor_cfg.io_mode;
928927
uint8_t id[JESD216_READ_ID_LEN] = {0};
929928
int rc;
930929

@@ -937,28 +936,6 @@ static int flash_chip_init(const struct device *dev)
937936

938937
dev_data->in_target_io_mode = false;
939938

940-
/* Some chips reuse RESET pin for data in Quad modes:
941-
* force single line mode before resetting.
942-
*/
943-
if (dev_data->switch_info.quad_enable_req != JESD216_DW15_QER_VAL_NONE &&
944-
(io_mode == MSPI_IO_MODE_SINGLE ||
945-
io_mode == MSPI_IO_MODE_QUAD_1_1_4 ||
946-
io_mode == MSPI_IO_MODE_QUAD_1_4_4)) {
947-
rc = quad_enable_set(dev, false);
948-
949-
if (rc < 0) {
950-
LOG_ERR("Failed to switch to single line mode: %d", rc);
951-
return rc;
952-
}
953-
954-
rc = wait_until_ready(dev, K_USEC(1));
955-
956-
if (rc < 0) {
957-
LOG_ERR("Failed waiting for device after switch to single line: %d", rc);
958-
return rc;
959-
}
960-
}
961-
962939
#if defined(WITH_RESET_GPIO)
963940
rc = gpio_reset(dev);
964941

0 commit comments

Comments
 (0)