Understanding the layerscape 1012a qspi flash layout?

Showing results for 
Search instead for 
Did you mean: 

Understanding the layerscape 1012a qspi flash layout?

Contributor III

The qoriq_memory_layout.txt file I found in the LSDK flexbuild/docs/ directory shows the 64Mbyte layout “on all QorIQ platforms”. However, the FRDM-LS1012AGSG.pdf document (LS1012A Freedom board Getting Started Guide) shows a much different layout (and also seems to have incorrect start and end addresses?).

Working with my LS1012A-Freedom board, I have successfully written

  • a PBL image (RCW & PBI) to offset 0x00000000
  • a U-Boot image to offset 0x00100000
  • a U-Boot Environment image to offset 0x00300000
  • kernel/dtb/initramd ITB image to offset 0x01000000

So I feel confident those are correct. They match the entries in the flexbuild doc (but only the first two match what is in the Getting Started Guide).

Based on the Getting Started Guide, I initially wrote my kernel/dtb/initramd ITB file to 0x00500000. After writing my kernel/dtb/initramd ITB to the proper offset, it appeared that the write to 0x00500000 had “broken” the PFE firmware:

PFE Firmware: Bad firmware image (not a FIT image)

I was a bit frustrated at that point and chose to just program a complete firmware image from flexbuild into the QSPI flash to recover the board. So I have not confirmed the 0x00400000 offset in the flexbuild doc as being correct for the PPA firmware.

In addition to the proper offsets, I would also like to confirm that the PFE Firmware error I saw would be fixed by writing the proper PPA firmware image to the proper address. The Getting Started Guide flash layout says that the PFE binary is in the same 1Mbyte block as the U-Boot boot loader binary. But the flexbuild text file does not call out the PFE binary as a separate entity.

When I build using the Yocto-based distribution (based on YP 2.5), there is a file created in the tmp/deploy/images/{board}/ directory: ppa-{board}-{timestamp}.itb.
Is this the correct file to write to the PPA firmware address in the QSPI flash?

I have learned that the RCW/PBI file needs to be byte-swapped before being written into the QSPI flash. Is there a reason why this step has not been included in the Yocto recipe that builds it?
Do any of the other components also need to be byte-swapped? I do not think the U-Boot binary or environment need it, as I have successfully written them. I have also successfully written a kernel image without swapping. However, since I have not been successful with the PPA, I would like to confirm the requirement for it.

Finally, is there any way to modify the placement of the U-Boot binary, U-Boot environment, and PPA FIT image in the QSPI? If we will never need the currently allocated amount of space for each item, I could shift everything down and have more memory for a small kernel/dtb/rootfs image, or use a smaller QSPI flash part.
I have looked through the PBL configuration documents I have found, but I do not see anything that indicates it is possible. The PBI data used to create the PBL image does have a file uboot_address.rcw with commands to write some values:

write 0x570604, 0x40100000
write 0x57015c, 0x50100000
write 0x570600, 0x00000000

Based on the file name, I thought it might be what I was looking for, but the values do not make sense with either layout I have seen. Nor do the addresses to which the values are witten make much sense- according to the LS1012A reference manual (assuming these addresses are in the SCFG memory map), address 0x604 and 0x600 are in the scratch read/write registers, and 0x15c is the register for the QSPI clock source/enable/disable. Perhaps the PBL code uses these locations differently, but I have not found anything that helps me understand that. And I have found nothing about the PPA firmware location.

I appreciate any and all help with these questions.

Labels (1)
0 Kudos
3 Replies

NXP TechSupport
NXP TechSupport

Please refer to the LSDK documentation:

Submit Form 

Table 1. Flash layout
DefinitionMax Size


Flash Offset

SD Card

Start Block No.

Boot firmware (U-Boot or UEFI)2MB0x001000000x00800
Boot firmware Environment1MB0x003000000x01800
PPA firmware2MB0x004000000x02000
Secure boot headers3MB0x006000000x03000
DPAA1 FMAN ucode256KB0x009000000x04800
QE/uQE firmware256KB0x009400000x04A00
Ethernet PHY firmware256KB0x009800000x04C00
DPAA2 MC or PFE firmware3MB0x00A000000x05000
DPAA2 DPL1MB0x00D000000x06800
DPAA2 DPC1MB0x00E000000x07000
Device tree (needed by UEFI)1MB0x00F000000x07800
Ramdisk RFS32MB0x020000000x10000
0 Kudos

Contributor III

ufedor‌ -

Thank you for the response. Does this mean that the information in the LS1012A Freedom board Getting Started Guide is incorrect? Is there other information in that guide that I should question?


0 Kudos

NXP TechSupport
NXP TechSupport

The information in the LS1012A GSG is correct for the previous version of the Linux SDK.

Please refer to the LSDK documentation.