Hi @KeiKai
*** Warning - bad CRC, using default environment
This line is interesting and shows ROM can read flash but U-Boot cannot. I see this:
Loading Environment from SPIFlash... spinor id = EF 40 19
SF: Detected W25Q256JV-IQ with page size 256 Bytes, erase size 4 KiB, total 32 MiB
OK
@hannahKobain the PXE network boot is not suspicious, it’s because this is my branch which runs PXE boot if all else fails.
cv180x_c906# printenv bootcmd
bootcmd=cvi_update || run norboot || run nandboot || run emmcboot || run pxeboot
Symptoms indicate an issue with the quad lines. This could be anywhere from the board to the flash chip. What do you get when you run this?
cv180x_c906# sf probe
spinor id = EF 40 19
SF: Detected W25Q256JV-IQ with page size 256 Bytes, erase size 4 KiB, total 32 MiB
cv180x_c906# sf read 0x81400000 0 256
device 0 offset 0x0, size 0x256
SF: 598 bytes @ 0x0 Read: OK
sf read speed 0.119 MB/s
cv180x_c906# md.l 0x81400000 64
81400000: 4c425643 000a3130 00000000 cafe0a7e CVBL01......~...
81400010: 00000000 00000000 00000000 00000000 ................
81400020: 00000000 00000000 00000000 00000000 ................
81400030: 00000000 00000000 00000000 00000000 ................
81400040: 00000000 00000000 00000000 00000000 ................
81400050: 00000000 00000000 00000000 00000000 ................
81400060: 00000000 00000000 00000000 00000000 ................
81400070: 00000000 00000000 00000000 00000000 ................
81400080: 00000000 00000000 00000000 00000000 ................
81400090: ffffffff ffffffff ffffffff ffffffff ................
814000a0: ffffffff ffffffff ffffffff ffffffff ................
814000b0: ffffffff 00000000 00000000 000002f8 ................
814000c0: cafe0000 00000000 05200200 00000000 .......... .....
814000d0: 00000000 cafe5256 0000ba00 00000000 ....VR..........
814000e0: 0000ca00 00000000 0e00000c a0000001 ................
814000f0: 0e00000c a0000002 ffffffa0 ffffffff ................
81400100: 00000000 00000000 00000000 00000000 ................
81400110: 00000000 00000000 00000000 00000000 ................
81400120: 00000000 00000000 00000000 00000000 ................
81400150: 00000000 00000000 00000000 00000000 ................
81400160: 00000000 00000000 00000000 00000000 ................
81400170: 00000000 00000000 00000000 00000000 ................
81400180: 00000000 00000000 00000000 00000000 ................
Can you build a new FSBL with disabled quad SPI and retry? Apply this patch and rebuild the fip.bin and put on TF card. Interrupt U-Boot before it rewrites your flash and run norboot
direct from the TF card.
diff --git a/u-boot-2021.10/drivers/mtd/spi/spi-nor-core.c b/u-boot-2021.10/drivers/mtd/spi/spi-nor-core.c
index 5c8726bee..0a59cc77c 100644
--- a/u-boot-2021.10/drivers/mtd/spi/spi-nor-core.c
+++ b/u-boot-2021.10/drivers/mtd/spi/spi-nor-core.c
@@ -2353,11 +2353,11 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
params->quad_enable = spansion_no_read_cr_quad_enable;
break;
#endif
-#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
- case BFPT_DWORD15_QER_SR1_BIT6:
- params->quad_enable = quad_enable_SR_bit6;
- break;
-#endif
+//#if defined(CONFIG_SPI_FLASH_MACRONIX) || defined(CONFIG_SPI_FLASH_ISSI)
+// case BFPT_DWORD15_QER_SR1_BIT6:
+// params->quad_enable = quad_enable_SR_bit6;
+// break;
+//#endif
#if defined(CONFIG_SPI_FLASH_SPANSION) || defined(CONFIG_SPI_FLASH_WINBOND)
case BFPT_DWORD15_QER_SR2_BIT1:
params->quad_enable = spansion_read_cr_quad_enable;
@@ -2744,7 +2744,7 @@ static int spi_nor_init_params(struct spi_nor *nor,
if (params->hwcaps.mask & (SNOR_HWCAPS_READ_QUAD |
SNOR_HWCAPS_PP_QUAD)) {
switch (JEDEC_MFR(info)) {
- case SNOR_MFR_MACRONIX:
+// case SNOR_MFR_MACRONIX:
case SNOR_MFR_ISSI:
params->quad_enable = quad_enable_SR_bit6;
break;
diff --git a/u-boot-2021.10/drivers/mtd/spi/spi-nor-ids.c b/u-boot-2021.10/drivers/mtd/spi/spi-nor-ids.c
index e194e41ee..b10b1e19a 100644
--- a/u-boot-2021.10/drivers/mtd/spi/spi-nor-ids.c
+++ b/u-boot-2021.10/drivers/mtd/spi/spi-nor-ids.c
@@ -70,7 +70,7 @@ const struct flash_info spi_nor_ids[] = {
SPI_NOR_QUAD_READ | SECT_4K) },
/* Juyang 32M Nor Flash(JY25VQ256A) uses the same wafers as MXIC */
{ INFO("MX25L25645G", 0xc22019, 0x0, 64 * 1024, 512,
- SPI_NOR_QUAD_READ | SECT_4K | SPI_NOR_4B_OPCODES) },
+ 0x00 | SECT_4K | SPI_NOR_4B_OPCODES) },
{ INFO("MX25L12835F", 0xc22018, 0x0, 64 * 1024, 256,
SPI_NOR_QUAD_READ | SECT_4K) },
{ INFO("EN25QH128A", 0x1c7018, 0x0, 64 * 1024, 256,
I cannot test this myself since I do not own this IC.