Adding support for QSPI flash on LS1043ARDB

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

Adding support for QSPI flash on LS1043ARDB

1,742 Views
palak_shah1
Contributor II

Hi,

We are building a customized hardware based on LS1043ARDB. We replaces IFC NOR with QSPI. 

I followed the code in LS1043AQDS and LS1046ARDB. And made changes to the u-boot code to add support for QSPI.

I have following questions - 

1) I downloaded the RCW source code from https://source.codeaurora.org/external/qoriq/qoriq-components/rcw.

I copied the LS1043AQDS/RR_FQPP_1455/rcw_1600_qspiboot.rcw to LS1043ARDB/RR_FQPP_1455/rcw_1600_qspiboot.rcw

and generated the .bin file. I see some instructions in qspi_readme to flash this image on the flash.

There is also config files in u-boot/board/freescale/ls1043ardb. For eg, ls1043_nand_rcw. cfg. I copied the ls1043aqds_rcw_qspi.cfg to LS1043ardb.

Question -What is the difference between the .bin file generated using RCW source code and the .cfg file which has the raw digits.

When you boot the first time, is there a particular order in which you need them? Do you need both .bin and .cfg or either or to boot a new QSPI flash?

2) Question - Do I need a new PBL image? How do I compile a new Preboot loader image?

Any help appreciated. 

Thanks,

Palak

Labels (1)
Tags (1)
10 Replies

1,590 Views
palak_shah1
Contributor II

Hi Yiping,

In the earlier conversation, you mentioned that 

 If using non TF-A image, It is enough to modify u-boot/board/freescale/ls1043ardb/ ls1043_qspi_rcw. cfg.

If I dont need to use the RCW source code and the RR_FPQQ_1455/rcw_qspi.bin file. 

If I am not using the source code, and only modifying .cfg file, how do I change the SERDES value?

Thanks,

Palak

0 Kudos

1,590 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please modify RCW data in u-boot/board/freescale/ls1043ardb/ ls1043_qspi_rcw. cfg to change the SERDES value.

0 Kudos

1,590 Views
palak_shah1
Contributor II

Thank you so much Yiping. 

We have changed the SERDES protocol from 1455 to 2255. Do I need to change anything in the code?

Thanks,

Palak

0 Kudos

1,590 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please modify RCW file LS1043ARDB/RR_FQPP_1455/rcw_1600_qspiboot.rcw

0 Kudos

1,590 Views
palak_shah1
Contributor II

Thank you so much Yiping for your reply.

One more question. 

What do I need to change in the code to configure it to use hard-code RCW?

I know we need to change the cfg_rcw_src value to 0x9e but is there anything else you change in the code?

Thanks,

Palak

0 Kudos

1,590 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Palak,

In CodeWarrior initialization file, you could define "USE_SAFE_RCW = True" to use hard-coded RCW on the target board.

You could refer to section 1 in Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards.

Thanks,

Yiping

0 Kudos

1,590 Views
palak_shah1
Contributor II

Hi Yiping,

Thank you for your reply. We are using LSDK 19.06 and not LSDK 20.

1) Is it necessary to use TF-A image? If not, can we continue to use PPA with LSDK 19.06? 

2) If I use non TF-A image, is modifying u-boot/board/freescale/ls1043ardb/ ls1043_qspi_rcw. cfg  enough?

Dont I need the rcw_qspiboot.rcw from rcw source code at all?

3) For non TF-A, do I still need a separate process to build PreBoot Loader (PBL image)? 

4) Modifying ls1043ardb_qspi_defconfig and rcw_qspi.cfg will generate RCW + PBI + U-boot?

4) For the first time boot, I read that you can use Hard coded RCW so it will bypass writing RCW to the flash. 

Is writing the cfg_rcw_src registers the value of 0x9e enough ? What other changes you need for first time booting from QSPI flash?

Thank you so much for answering. 

Thanks,

Palak

0 Kudos

1,590 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Palak,

1. PPA is not supported in 19.06, you could use PBL+u-boot image without TF-A.

2. If using non TF-A image, It is enough to modify u-boot/board/freescale/ls1043ardb/ ls1043_qspi_rcw. cfg.

3. For non TF-A, the generated u-boot image has included RCW+PBI, no need a separate process to build PreBoot Loader.

4. Using ls1043ardb_qspi_defconfig configuration file to generate u-boot, will generate u-boot+PBL.

5. For new custom board bringing, there is no valid RCW on the target board, you need to configure the target board as hard-coded RCW, then program image to QSPI flash with CodeWarrior tool.

Thanks,

Yiping

1,590 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Palak,

In recent released LSDK TF-A images are generated, bl2_<boot_mode>.pbl( includes RCW+PBI+BL2), TF-A fip.bin includes (BL31 + TEE (BL32) + U-Boot/ UEFI (Bl33)).

In u-boot build configuration file ls1043ardb_tfa_defconfig will be used, so ls1043aqds_rcw_qspi.cfg will not be used to generate u-boot image. 

For custom board, you only need to modify rcw_1600_qspiboot.rcw provided in rcw package.

 

If you use non TF-A image, you need to modify u-boot/board/freescale/ls1043ardb/ ls1043_qspi_rcw. cfg for your customized target board. U-boot configuration file ls1043aqds_qspi_defconfig will be used,the generated u-boot binary image includes RCW.

Thanks,

Yiping

0 Kudos

1,457 Views
jaimepereira
Contributor I

Hi Yiping,

On older boards we were booting the ls1043/ls1023 cpus with nand flash. We were flashing u-boot+PBL to offset 0, and PPA to offset 0x400000. We were using source code from lsdk 17.12.

Now we want to migrate to qspi flashes and we downloaded lsdk 20.12. We will do our required changes do the DDR profile and the rcw+pbi of our board based on the ls1043adqs u-boot board. In order to flash the qspi and boot the cpu will it boot with only the u-boot+PBL flashed to offset 0 of the qspi? Because with u-boot from lsdk17.12 and nand flashes, we are not able to boot without the PPA firmware.

0 Kudos