Part Number: AM62A7
Hello,
I have been currently working on getting OSPI/QSPI NOR boot mode working on a AM62A-based custom board. We are using a Micron MT35XU02GCBA1G12. I have run into an issue with the SPL not being able to correctly retrieve/decode the JEDEC ID bytes during boot. Currently in SD/MMC boot mode, I am able to probe the SPI flash succesfully and report the correct JEDEC ID bytes.
I read in the AM62Ax TRM, that because our flash device is greater than 128 Mb, we need to perform a reset using the RESET signal on the device to change the addressing mode. I have included this into my pinmux (AM62AX_IOPAD(0x0038, PIN_OUTPUT_PULLUP, 1) /* (G20) OSPI0_CSn3.OSPI0_RESET_OUT0 */) to enable the reset to occur, and it seems like we receive all 0xFF bytes from reading the JEDEC ID. If I do not include this reset within my pinmuxxing, I am able to correctly read the ID bytes but fail futher into the boot process, again. Below are snippets of the trace I have done within the SPL.
Why are we able to retrieve the correct ID bytes without toggling the signal but still fail later in the process? Why does toggling the RESET signal report 0xFF ID bytes? Should I be able to get as far as I did within the boot process with no RESET?
With RESET signal enable:
U-Boot SPL 2025.01-gfe371093a62c-dirty (Dec 01 2025 - 17:02:44 +0000)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.5--v11.01.05 (Fancy Rat)')
Configuring LPDDR4 for 2GB
[TRACE] am62a_init: board_init_f done
SPL initial stack usage: 13568 bytes
[TRACE] get_primary_bootmedia: __get_primary_bootmedia: bootmode = 0x1 bootmode_cfg = 0x2
[TRACE] am62a_init: spl_boot_device: devstat = 0x10b bootmedia = 0x3 bootindex = 0
[TRACE] before boot_from_devices
Trying to boot from SPI
[TRACE] In spl_load_image
[TRACE] bootdev = 3
[TRACE] spl_spi_load_image: start
[TRACE] spl_spi_load_image: sf_bus=0 sf_cs=0
[TRACE] spl_spi_load_image: calling spi_flash_probe(bus=0, cs=0, speed=1000000, mode=0)
[TRACE] bootdev->boot_device = 3
[TRACE] CQSPI_REG_CONFIG = 0x80083881
[TRACE] CONFIG_SPI_FLASH_MT35XU is enabled
[TRACE] calling spi_flash_probe
Probing SPI flash ..
[TRACE] spi_nor_read_id(): sending nor
[TRACE] cdns-ospi: opcode=0x9f, nbytes=6, buswidth=1
[TRACE] cdns-ospi: data: 18 fe ff 81 2d 06
[TRACE] mode = 0, STIG_READ = 0, STIG_WRITE = 1, READ = 2, WRITE 3
[TRACE] ret = cadence_spi_mem_exec_op = 0
[TRACE] nor->read_reg; SPINOR_OP_RDID = 9f, SPI_NOR_MAX_ID_LEN = 06, tmp = 0, nor->info->id[0] = 18
[TRACE] info->name = n25q016a
[TRACE] spi_nor_ids addr = 43c19e54 first bytes: ac fe c1
...
[TRACE] in for loop info->name
[TRACE] in info->id_len
[TRACE] NOT in memcmp; info->name = mt35xu02g, info->id[0] = 2c, id[0] = ff
...
[TRACE} spi_nor_read_id JEDEC id bytes: ff, ff, ff
[TRACE] info: 00, 00, 00
jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ff, ff, ff
[TRACE] JEDEC read: 00 00 00
[TRACE] ret = spi_nor_scan = -2
spi_nor_scan(flash) failed
[TRACE] return ret = -2
SPI flash probe failed for spi_flash
[TRACE] spi_flash_probe result = 0, err = 0
[TRACE] spi_flash_probe failed: 0
SPI probe failed.
[TRACE] bus 0 cs 0 speed 1000000 mode 0
spl_load_image ret = -19
In spl_load_image #2
ret = -19, -ENODEV = -19
after boot_from_devices
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
With NO RESET signal enable:
U-Boot SPL 2025.01-gfe371093a62c-dirty (Dec 01 2025 - 21:02:56 +0000)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.5--v11.01.05 (Fancy Rat)')
Configuring LPDDR4 for 2GB
[TRACE] am62a_init: board_init_f done
SPL initial stack usage: 13568 bytes
[TRACE] get_primary_bootmedia: __get_primary_bootmedia: bootmode = 0x1 bootmode_cfg = 0x2
[TRACE] am62a_init: spl_boot_device: devstat = 0x10b bootmedia = 0x3 bootindex = 0
[TRACE] before boot_from_devices
Trying to boot from SPI
[TRACE] In spl_load_image
[TRACE] bootdev = 3
[TRACE] spl_spi_load_image: start
[TRACE] spl_spi_load_image: sf_bus=0 sf_cs=0
[TRACE] spl_spi_load_image: calling spi_flash_probe(bus=0, cs=0, speed=1000000, mode=0)
[TRACE] bootdev->boot_device = 3
[TRACE] CQSPI_REG_CONFIG = 0x80083881
[TRACE] CONFIG_SPI_FLASH_MT35XU is enabled
[TRACE] calling spi_flash_probe
Probing SPI flash ..
[TRACE] spi_nor_read_id(): sending nor
[TRACE] cdns-ospi: opcode=0x9f, nbytes=6, buswidth=1
[TRACE] cdns-ospi: data: 90 4b c2 43 08 2b
[TRACE] mode = 0, STIG_READ = 0, STIG_WRITE = 1, READ = 2, WRITE 3
[TRACE] ret = cadence_spi_mem_exec_op = 0
[TRACE] nor->read_reg; SPINOR_OP_RDID = 9f, SPI_NOR_MAX_ID_LEN = 06, tmp = 0, nor->info->id[0] = 18
[TRACE] info->name = n25q016a
[TRACE] spi_nor_ids addr = 43c19eb4 first bytes: 0c ff c1
[TRACE] in for loop info->name
[TRACE] in info->id_len
[TRACE] NOT in memcmp; info->name = n25q016a, info->id[0] = 20, id[0] = 2c
...
[TRACE] in for loop info->name
[TRACE] in info->id_len
[TRACE] NOT in memcmp; info->name = mt35xu02g, info->id[0] = 2c, id[0] = 2c
[TRACE] in memcmp; info->id = 2c, id = 2c
[TRACE] JEDEC read: 2c 5b 1c
[TRACE] Applying fixups
[TRACE] ret = spi_nor_scan = 0
[TRACE] ret = spi_flash_mtd_register(flash) = 0
[TRACE] return ret = 0
[TRACE] spi_flash_probe result = 81e003d8, err = -2116025384
[TRACE] after !flash; before spl_load_init()
[TRACE] after spl_load_init()
[TRACE] after CONFIG_IS_ENABLED(OS_BOOT)
[TRACE] before spl_load()
[TRACE] in _spl_load()
[TRACE] cdns-ospi: opcode=0x13, nbytes=64, buswidth=1
[TRACE] cdns-ospi: data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[TRACE] mode = 2, STIG_READ = 0, STIG_WRITE = 1, READ = 2, WRITE 3
[TRACE] err = cadence_qspi_apb_read = 0
[TRACE] ret = cadence_spi_mem_exec_op = 0
[TRACE] spl_parse_board_header() ret = 0
[TRACE] spl_parse_board_header = -22
[TRACE] returning -EINVAL = -22
[TRACE] ret = spl_parse_image_header #2 = -22
[TRACE] after spl_load(); err = -22
spl_load_image ret = -22
In spl_load_image #2
ret = -19, -ENODEV = -19
after boot_from_devices
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

