LS1021A-TWR boot from QSPI (and NVME system)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1021A-TWR boot from QSPI (and NVME system)

1,651 Views
Kensou
Contributor III

Dear Sirs,

I have got a LS021A-TWR board, which I am using with SD Card for RCW, U-Boot and Linux Kernel.

My goal is to remove SD card and:

- Booting from QSPI

- Linux in QSPI or NVME

- Linux user space in NVME

Is there an easy manner to do this?

I saw a thread concerning QSPI boot, can I use this or have I to go with LSDK 2.0?

I refer to this one: https://community.nxp.com/t5/Layerscape/ask-for-a-whole-qspi-boot-image-for-ls1021a/m-p/608874

Thank you in advance

 

Tags (3)
0 Kudos
11 Replies

1,217 Views
Kensou
Contributor III

I wrote the images/firmware_ls1021atwr_qspiboot.img in QSPI. Starting booting QSPI, u-boot stuck after the following messages:
----------------------------------------------------------------------------------------------------------------------------------------------------------
U-Boot 2021.04 (Jan 31 2023 - 08:44:54 +0100)

CPU:   Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)
Clock Configuration:
       CPU0(ARMV7):1200 MHz,
       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),
Reset Configuration Word (RCW):
       00000000: 0608000c 00000000 00000000 00000000
       00000010: 30000000 00007900 40025a00 21046000
       00000020: 00000000 00000000 00000000 20000000
       00000030: 20024800 881b7540 00000000 00000000
Model: LS1021A TWR Board
Board: LS1021ATWR
DRAM:  1 GiB
Using SERDES1 Protocol: 48 (0x30)
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=2
i2c_init_transfer: give up i2c_regs=0x2190000
ls1twr_program_regulator: Cannot find udev for a bus 1
MMC:   FSL_SDHC: 0
Loading Environment from SPIFlash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

EEPROM: wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=2
i2c_init_transfer: give up i2c_regs=0x2190000
Read failed.
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:  

Error: ethernet@2d10000 address not set.
----------------------------------------------------------------------------------------------------------------------------------------------------------
After the messages, the system hang forever.
 
Switch configuration is:
 
SW2 00010000
SW3 01100001
 
Is this correct?
0 Kudos

1,212 Views
Chavira
NXP TechSupport
NXP TechSupport

Here are the stepts to follow to install LSDK 2108 on QSPI of the ls1021atwr
1-Download the file called "firmware_ls1046afrwy_qspiboot.img"

If are you using Linux, you can use the next command line on the directory in which you want to save the file.
"wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1021atwr_qspiboot.img"

2-Format one USB on "FAT32".

3-Put firmware_ls1021atwr_qspiboot.img file on a USB.

Note: For that procedure please boot your board from SD or NOR flash if you can't boot from QSPI

4-Under U-Boot send the next commands

usb start

fatload usb 0:1 $load_addr firmware_ls1021atwr_qspiboot.img

Program the firmware to QSPI NOR flash

sf probe 0:0

sf erase 0 +$filesize && sf write $load_addr 0 $filesize

after that you can boot from QSPI changing the configuration of the SW2 and SW3


For your application, I recommend using the NOR Flash because it's better documented, and we have an image with Linux available for that board.

0 Kudos

1,205 Views
Kensou
Contributor III

This does not work.

U-boot exactly hangs at the same point:

I wrote the images/firmware_ls1021atwr_qspiboot.img in QSPI. Starting booting QSPI, u-boot stuck after the following messages:
----------------------------------------------------------------------------------------------------------------------------------------------------------
U-Boot 2021.04 (Jan 31 2023 - 08:44:54 +0100)

CPU: Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)
Clock Configuration:
CPU0(ARMV7):1200 MHz,
Bus:300 MHz, DDR:800 MHz (1600 MT/s data rate),
Reset Configuration Word (RCW):
00000000: 0608000c 00000000 00000000 00000000
00000010: 30000000 00007900 40025a00 21046000
00000020: 00000000 00000000 00000000 20000000
00000030: 20024800 881b7540 00000000 00000000
Model: LS1021A TWR Board
Board: LS1021ATWR
DRAM: 1 GiB
Using SERDES1 Protocol: 48 (0x30)
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x8 retry=2
i2c_init_transfer: give up i2c_regs=0x2190000
ls1twr_program_regulator: Cannot find udev for a bus 1
MMC: FSL_SDHC: 0
Loading Environment from SPIFlash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

EEPROM: wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x53 retry=2
i2c_init_transfer: give up i2c_regs=0x2190000
Read failed.
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
Net:
Error: ethernet@2d10000 address not set.
----------------------------------------------------------------------------------------------------------------------------------------------------------
After the messages, the system hangs forever.

0 Kudos

1,466 Views
Kensou
Contributor III

Could anybody help me?

0 Kudos

1,518 Views
Kensou
Contributor III

I tried several ways but this is what I achieved:
Using this https://community.nxp.com/t5/Layerscape/ask-for-a-whole-qspi-boot-image-for-ls1021a/m-p/608874 guide I am able to generate QSPI uboot-with-spl.bin. Unfortunately the u-boot version of Qoriq SD 2.0 does not support NVME as it is older than NVME uboot support date.

I tried via LSDK 21.08, and I correctly generated these:

firmware/rcw/ls1021atwr/SSR_PNS_30/rcw_1200_qspiboot.bin.swapped
firmware/u-boot/ls1021atwr/uboot_ls1021atwr_qspi.bin
firmware/qe_ucode/iram_Type_A_LS1021a_r1.0.bin
images/flash_images.scr
linux/kernel/arm32/LS/ls1021a-twr.dtb
images/firmware_ls1021atwr_qspiboot.img

questions are:

- How and what have I to write in QSPI flash? I have to write directly the firmware_ls1021atwr_qspiboot.img in qspi? Is there a step-by-step procedure?

Moreover, is there a way for configuring the u-boot via LSDK 21.08 in order to enable the PCI and NVME?

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I tried via Codeaurora Yocto LSDK v20.04 dunfel: https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/tree/readme?h=dunfell

Here what I found is:
- u-boot-ls1021atwr.bin-qspi

As previous I have to write the binary directly in qspi? Is there a step-by-step procedure?

Moreover, is there a way for configuring the u-boot via LSDK 21.08 in order to enable the PCI and NVME?

Thank you in advance.

0 Kudos

1,597 Views
LFGP
NXP TechSupport
NXP TechSupport

The thread concerning QSPI boot that you shared in the description has the rights steps, so, you can follow the suggested on it.

Unfortunately the LS1021A-TWR doesn't have support for NVME media

 

best regards 

0 Kudos

1,594 Views
Kensou
Contributor III

Thank you for you reply.

 

Concerning the NVME, I am using NVME M2 PCIe adapter, so the LS1021A TWR is actually able to mount a formatted NVME using OpenIL and/or Real Time Edge.

So I am pretty sure that the LS1021-TWR supports NVME media with the adapter.

0 Kudos

1,591 Views
Kensou
Contributor III
I am actually trying OpenIL, OpenWRT and Real Time Edge with such adapters and NVME, they are actually working
0 Kudos

1,340 Views
LFGP
NXP TechSupport
NXP TechSupport

you have right, the ls1021TWR has support for the NVME ( u-boot drivers/nvme/nvme.c) via PCIe adapter with the LSDK 21.08 actually.

0 Kudos

1,292 Views
Kensou
Contributor III

So how can I generate QSPI boot firmware with LSDK 21.08?

0 Kudos

1,622 Views
Kensou
Contributor III

Nobody?

0 Kudos