器件型号: AM6421
大家好!
我在定制 FS HS-QSPI 板上从 QSPI 引导时遇到问题。
- 我们能够使用 DFU 模式成功刷写 QSPI (tiboot3.bin、tispl.bin、u-boot.img)。
- SF 探针工作正常、并且在完全 U-Boot 中正确检测到闪存 (Winbond W25Q512JVFIM)。
- 但是、从 QSPI 引导时、它在 A53 SPL (tispl.bin) 中失败、并显示错误:SPI 探测失败。
详细日志:
U-Boot SPL 2024.07 (May 23 2026 - 18:50:21 +0530)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.5--v11.01.05 (Fancy Rat)')
SPL initial stack usage: 13368 bytes
Trying to boot from SPI
Authentication passed
Authentication passed
Loading Environment from MMC... MMC Device 0 not found
*** Warning - No MMC card found, using default environment
Authentication passed
Authentication passed
Starting ATF on ARM64 core...
NOTICE: BL31: v2.11.0(release):v2.11
NOTICE: BL31: Built : 12:19:51, May 20 2026
I/TC:
I/TC: OP-TEE version: Unknown_4.9 (gcc version 14.3.0 (Buildroot 2026.05-rc1-31-gc17d110b10)) #1 Wed May 20 06:47:35 UTC 2026 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: GIC redistributor base address not provided
I/TC: Assuming default GIC group status and modifier
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.5--v11.01.05 (Fancy Rat)')
I/TC: Activated SA2UL device
I/TC: Enabled firewalls for SA2UL TRNG device
I/TC: EIP76D TRNG initialized
I/TC: SA2UL Drivers initialized
I/TC: HUK Initialized
I/TC: Disabling output console
U-Boot SPL 2024.07 (May 23 2026 - 19:33:43 +0530)
SYSFW ABI: 4.0 (firmware rev 0x000b '11.1.5--v11.01.05 (Fancy Rat)')
SPL malloc() before relocation used 0x2940 bytes (10 KB)
Inside the board init().
>>SPL: board_init_r()
Before spl_set_bd.
After spl_set_bd.
spl_init
Before the spl_board_init.
Before the spl_board_init.
Trying to boot from SPI
Before spi_flash_probe.
After spi_flash_probe.
SPI probe failed.
SPI probe failed! Bus:0 CS:0 Speed:25000000 Mode:0x0
boot_from_device ret : -19.
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
我们在 drivers/MTD/SPI/SPI-NOR-IDs.c 中添加了以下补丁来支持此闪存:
{info(“w25q512jvfim“、0xef7020、0、64 * 1,024,1024、
Sect_4K | SPI_NOR_DUAL_READ | SPI_NOR_Quad_read |
SPI_NOR_4B_opcode | SPI_NOR_HASS_LOCK | SPI_NOR_HASS_TB)}、
因此、我们将检测 QSPI 并能够刷写。
DTS 节点:
&ospi0 {
bootph-all;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
spi-max-frequency = <25000000>;
cdns,tshsl-ns = <60>;
cdns,tsd2d-ns = <60>;
cdns,tchsh-ns = <60>;
cdns,tslch-ns = <60>;
cdns,read-delay = <4>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "ospi.tiboot3";
reg = <0x0 0x100000>;
};
partition@100000 {
label = "ospi.tispl";
reg = <0x100000 0x200000>;
};
partition@300000 {
label = "ospi.u-boot";
reg = <0x300000 0x400000>;
};
partition@700000 {
label = "ospi.env";
reg = <0x700000 0x40000>;
};
partition@740000 {
label = "ospi.env.backup";
reg = <0x740000 0x40000>;
};
partition@800000 {
label = "ospi.rootfs";
reg = <0x800000 0x37c0000>;
};
partition@3fc0000 {
label = "ospi.phypattern";
reg = <0x3fc0000 0x40000>;
};
};
};
};
我们已经尝试过的方法:
- 在 drivers/MTD/SPI/SPI-NOR-IDs.c 中添加了 Winbond 闪存 ID (0xef7020)
- 使用四通道模式 (SPI-TX/Rx-BUS-WIDTH =<4>)
- 已尝试 SPI-max-frequency =<25000000>和<10000000>
- CDN、读取延迟尝试 0、2、4
- 添加了 CDN、phy 模式
- 多次重建并重新刷新 tiboot3.bin + tispl.bin
我们使用的是 U-Boot 2024.07 + BuildRoot。
关于 A53 SPL 器件树或定制电路板 QSPI 引导配置中可能缺少哪些内容的建议? 尤其是引脚多路复用、OSPI 控制器设置、或任何 FS 特定于 HS-OSPI 的要求?
提前感谢!