diff --git a/recipes-bsp/u-boot/files/0012-qspi-iot2050-Add-temporary-workaround-for-the-QSPI-i.patch b/recipes-bsp/u-boot/files/0012-qspi-iot2050-Add-temporary-workaround-for-the-QSPI-i.patch new file mode 100644 index 000000000..245378872 --- /dev/null +++ b/recipes-bsp/u-boot/files/0012-qspi-iot2050-Add-temporary-workaround-for-the-QSPI-i.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Li Hua Qian +Date: Thu, 17 Oct 2024 11:31:38 +0800 +Subject: [PATCH] qspi: iot2050: Add temporary workaround for the QSPI issue + +After approximately 2 months of operation, the device may fail to check +the QSPI idle status. Here is the strange phenomenon: The QSPI remains +busy when checking the idle status, becoming idle once stop checking. +This commit provides a temporary workaround to bypass the QSPI idle +checking. + +TODO: Implement a permanent solution for QSPI idle checking issue. + +Signed-off-by: Li Hua Qian +--- + drivers/spi/cadence_qspi_apb.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c +index 9ce2c0f254f3..2c32c4fc6b10 100644 +--- a/drivers/spi/cadence_qspi_apb.c ++++ b/drivers/spi/cadence_qspi_apb.c +@@ -173,7 +173,20 @@ static unsigned int cadence_qspi_wait_idle(void *reg_base) + /* Timeout, still in busy mode. */ + printf("QSPI: QSPI is still busy after poll for %d times.\n", + CQSPI_REG_RETRY); +- return 0; ++ ++ /* ++ * TODO: Implement a permanent solution for QSPI idle checking issue. ++ * After approximately 2 months of operation, the device may fail to check ++ * the QSPI idle status. Here is the strange phenomenon: The QSPI remains ++ * busy when checking the idle status, becoming idle once stop checking. ++ * Providing a temporary workaround to bypass the QSPI idle checking. ++ */ ++ if (CQSPI_REG_IS_IDLE(reg_base)) { ++ printf("QSPI: Idle state is %d, continue boot.\n", ++ CQSPI_REG_IS_IDLE(reg_base)); ++ } ++ ++ return 1; + } + + void cadence_qspi_apb_readdata_capture(void *reg_base, diff --git a/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb b/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb index 71676b5bb..c5c00a465 100644 --- a/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb +++ b/recipes-bsp/u-boot/u-boot-iot2050_2023.10.bb @@ -23,6 +23,7 @@ SRC_URI += " \ file://0009-dts-iot2050-Sync-kernel-dts-to-u-boot.patch \ file://0010-dts-iot2050-Support-new-IOT2050-SM-variant.patch \ file://0011-arm-dts-iot2050-Disable-lock-step-mode-for-all-iot20.patch \ + file://0012-qspi-iot2050-Add-temporary-workaround-for-the-QSPI-i.patch \ " SRC_URI[sha256sum] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900"