Hi all,
I have an imx8qxpmek board developer kit and boot with sd card bootmode and the delivered sd card into U-Boot (or linux), and spi access works fine, see[1].
Now I builded the sd card image from the sources with:
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-thud -m imx-4.19.35-1.0.0.xml
$ repo sync
$ DISTRO=fsl-imx-xwayland MACHINE=imx8qxpmek source fsl-setup-release.sh -b build-xwayland
[...]
$ bitbake fsl-image-qt5-validation-imx
and boot this image, but sf probe fails, see [2]. Building the spi image (with setting UBOOT_CONFIG = "fspi") from this source code and burning this image into SPI NOR (luckily this works with the original sd card) and booting the board with bootmode SPI results in working U-Boot with SPI NOR access [3]. Also linux boots and detect the SPI NOR now.
Ok, there are different U-Boot versions, also (and I think more important) other scfw firmware verions.
The U-Boot error log shows:
lsio_fspi0 [237] not owned by curr partition
sc_pm_set_resource_power_mode: resource:237 mode:3: res:4
Error: lsio_fspi0 Power up failed! (error = 243)
which means:
resource
#define SC_R_FSPI_0 237
and errorcode 4 = SC_ERR_NOACCESS
Ok, so I think I have to adapt the scfw ... but I am totally new to imx8 ... and I just wonder why with newer source SPI access does not work from sd card boot. Any reason for disabling this?
Remark: I downloaded the scfw porting kit:
https://www.nxp.com/webapp/Download?colCode=L4.19.35_1.1.0_SCFWKIT-1.2.7.1&appType=license&location=...
builded it and added the image successfully to the yocto build, but same result.
Any ideas, help, hint, where I have to tweak the source to get SPI NOR on sd card boot working again?
Thanks!
bye,
Heiko
[1] sd card bootlog with original sd card image
U-Boot 2017.03-imx_v2017.03_4.9.88_imx8qxp_beta2+g84c4e82 (Jun 28 2018 - 09:07:20 +0800)
CPU: Freescale i.MX8QXP revB A35 at 1200 MHz at 17C
Model: Freescale i.MX8QXP MEK
Board: iMX8QXP MEK
Boot: SD1
DRAM: 3 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
[pcie_ctrlb_sata_phy_init_rc] LNK DOWN 8600000
In: serial
Out: serial
Err: serial
BuildInfo:
- SCFW 3301c1a9, SECO-FW eeb55e1e, IMX-MKIMAGE 5c18f544, ATF 00b653e
- U-Boot 2017.03-imx_v2017.03_4.9.88_imx8qxp_beta2+g84c4e82
switch to partitions #0, OK
mmc1 is current device
Net: eth0: ethernet@5b040000 [PRIME]
Warning: ethernet@5b050000 (eth1) using random MAC address - 9e:97:b2:b1:f1:c7
, eth1: ethernet@5b050000
Normal Boot
Hit any key to stop autoboot: 0
=>
=>
=> sf probe
SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB
=>
[2] sd card bootlog with thud branch builded sources:
U-Boot 2019.04-imx_v2019.04_4.19.35_1.0.0+g85bdcc7 (Dec 11 2019 - 11:59:46 +0000)
CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 19C
Model: Freescale i.MX8QXP MEK
Board: iMX8QXP MEK
Boot: SD1
DRAM: 2.8 GiB
VService: Connection is ok on MU mu@5d230000
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment
[pcie_ctrlb_sata_phy_init_rc] LNK DOWN 8600000
In: serial
Out: serial
Err: serial
BuildInfo:
- SCFW 4e91f37b, SECO-FW d7523fe8, IMX-MKIMAGE 2a3ec5e2, ATF f92d379
- U-Boot 2019.04-imx_v2019.04_4.19.35_1.0.0+g85bdcc7
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Run CMD11 1.8V switch
Net:
Warning: ethernet@5b040000 using MAC address from ROM
eth0: ethernet@5b040000 [PRIME]
Warning: ethernet@5b050000 (eth1) using random MAC address - 8e:57:bf:a1:d5:be
, eth1: ethernet@5b050000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
=> sf probe
lsio_fspi0 [237] not owned by curr partition
sc_pm_set_resource_power_mode: resource:237 mode:3: res:4
Error: lsio_fspi0 Power up failed! (error = 243)
Invalid bus 0 (err=-5)
Failed to initialize SPI flash at 0:0 (error -5)
=>
[3] spi bootmode with spi image created from imx-linux-thud -m branch
U-Boot SPL 2019.04-imx_v2019.04_4.19.35_1.0.0+g85bdcc7981 (Dec 05 2019 - 06:54:18 +0000)
Normal Boot
Trying to boot from SPI
Load image from QSPI 0x48000
U
U-Boot 2019.04-imx_v2019.04_4.19.35_1.0.0+g85bdcc7981 (Dec 05 2019 - 06:54:18 +0000)
CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 20C
Model: Freescale i.MX8QXP MEK
Board: iMX8QXP MEK
Boot: FLEXSPI
DRAM: 3 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment
[pcie_ctrlb_sata_phy_init_rc] LNK DOWN 8600000
In: serial
Out: serial
Err: serial
BuildInfo:
- SCFW cb6f758b, SECO-FW d7523fe8, IMX-MKIMAGE 2a3ec5e2, ATF f92d379
- U-Boot 2019.04-imx_v2019.04_4.19.35_1.0.0+g85bdcc7981
Run CMD11 1.8V switch
switch to partitions #0, OK
mmc1 is current device
Net:
Warning: ethernet@5b040000 using MAC address from ROM
eth0: ethernet@5b040000 [PRIME]
Warning: ethernet@5b050000 (eth1) using random MAC address - ba:99:1a:4a:4d:9d
, eth1: ethernet@5b050000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
=>