[Question] SPL_SPI Invalid bus 0. SPI Probe failed.
dvo
dan.vo.ict at jvn.edu.vn
Wed Feb 12 16:04:35 CET 2020
Good afternoon,
I'm working on a variant of IMX6UL. I'd like to create SPL Uboot and put all
of them on QSPI. The board has only QSPI NOR and NAND flashes so it's
complicated for me since no SD card.
I've searched and read from the internet but there's no any particular guide
to show how to do that. However, I managed to configure the SPL build but
I'm stuck for a long time at *SPI probe failed* issue from SPL_SPI.
I've got the issue shown as follows:
U-Boot SPL 2019.07-00008-g68b10d7fb7-dirty (Feb 12 2020 - 15:32:55 +0100)
Trying to boot from SPI
uclass_find_device_by_seq: 0 0
- not found
uclass_find_device_by_seq: 1 0
- not found
Invalid bus 0 (err=-19)
SPI probe failed.
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
I tested all suggestions but no luck at all. I put some configurations from
the .dts file.
( I tried both dm-pre-reloc and dm-spl)
&{/aliases} {
u-boot,dm-pre-reloc;
};
&aips1 {
u-boot,dm-pre-reloc;
};
&aips2 {
u-boot,dm-pre-reloc;
};
&iomuxc {
u-boot,dm-pre-reloc;
};
&pinctrl_qspi{
u-boot,dm-pre-reloc;
};
&pinctrl_ecspi1{
u-boot,dm-pre-reloc;
};
&pinctrl_ecspi2{
u-boot,dm-pre-reloc;
};
&{/soc} {
u-boot,dm-pre-reloc;
};
&qspi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi>;
status = "okay";
ddrsmp=<0>;
flash0: s25fl512s at 0 {
u-boot,dm-pre-reloc;
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,s25fl512s";
spi-max-frequency = <66000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
num-cs = <2>;
spi-cpol;
spi-cpha;
fast-read;
m25p;
reg= <0>;
};
};
I also put the aliases in imx6ul.dtsi
aliases {
ethernet0 = &fec1;
ethernet1 = &fec2;
gpio0 = &gpio1;
gpio1 = &gpio2;
gpio2 = &gpio3;
gpio3 = &gpio4;
gpio4 = &gpio5;
i2c0 = &i2c1;
i2c1 = &i2c2;
i2c2 = &i2c3;
i2c3 = &i2c4;
mmc0 = &usdhc1;
mmc1 = &usdhc2;
serial0 = &uart1;
serial1 = &uart2;
serial2 = &uart3;
serial3 = &uart4;
serial4 = &uart5;
serial5 = &uart6;
serial6 = &uart7;
serial7 = &uart8;
sai1 = &sai1;
sai2 = &sai2;
sai3 = &sai3;
spi0 = &qspi;
spi1 = &ecspi1;
spi2 = &ecspi2;
spi3 = &ecspi3;
spi4 = &ecspi4;
usbphy0 = &usbphy1;
usbphy1 = &usbphy2;
usb0 = &usbotg1;
usb1 = &usbotg2;
};
>From the defconfig file
CONFIG_SPL_FRAMEWORK=y
CONFIG_SPL_BUILD=y
CONFIG_SPL=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
CONFIG_SPL_DM=y
CONFIG_SPL_OF_LIBFDT=y
CONFIG_SPL_MTD_SUPPORT=y
CONFIG_SPL_OPTEE=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SPL_PINCTRL=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_DMA_SUPPORT=y
With the build with uboot (without SPL), I'm able to load it directly from
qspi and use the sf probe 0 to check:
- spi0, /soc/aips-bus at 02100000/qspi at 021e0000
spi_get_bus_and_cs: Binding new device 'spi_flash at 0:0', busnum=0, cs=0,
driver=spi_flash_std
sf probe 0
SF: Detected s25fl512s_256k with page size 256 Bytes, erase size 256 KiB,
total 64 MiB
What I'm not sure is if pinctrl are enable in SPL or not. It seems that
something goes wrong and SPI doesn't see any devices.
I'd appreciate any help, suggestions or references.
Many thanks,
Dan
--
Sent from: http://u-boot.10912.n7.nabble.com/
More information about the U-Boot
mailing list