Follow these steps to update the DPAA2 MC firmware, DPC, and DPL images for the LX2160ARDB on the SD/eMMC card.
Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions.
Compiling MC firmware
Clone the qoriq-mc-binary repository.
$ git clone https://github.com/NXP/qoriq-mc-binary.git
$ cd qoriq-mc-binary/lx2160a/
$ git checkout LSDK-<LSDK version>. For example, $ git checkout LSDK-20.04
The prebuilt MC firmware image, mc_10.20.4_lx2160a.itb, is available at qoriq-mc-binary/lx2160a/.
Note: The exact name of the MC firmware image may vary depending on the LSDK release version used.
Compiling DPC and DPL images
Clone the mc-utils repository and compile the DPC and DPL images.
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils
$ cd mc-utils/
$ git checkout LSDK-<LSDK version>. For example, $ git checkout LSDK-20.04
If required, make changes to the DPC and DPL files.
$ make -C config/
The compiled dpc-usxgmii.dtb and dpl-eth.19.dtb images are available at /mc-utils/config/lx2160a/RDB/.
Note: The exact name of the DPL and DPC images may vary depending on the LSDK release version used.
SD/eMMC card start block number for MC, DPL, and DPC images
Image
SD/eMMC card start block number
DPAA2 MC firmware
0x05000 = 20480
DPAA2 DPL
0x06800 = 26624
DPAA2 DPC
0x07000 = 28672
Refer the LSDK firmware and SD card start block number for complete listing of the SD card start block numbers for all LSDK firmware images.
Programming MC, DPC, and DPL images to SD/eMMC card
Boot LX2160ARDB from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI.
SW1[1:8] = 1111 1000
SW2[1:8] = 0000 0110
SW3[1:8] = 1111 1100
SW4[1:8] = 1011 1000
Boot from FlexSPI NOR flash0: => qixis_reset
For example:
For LX2160ARDB, in U-Boot log, you’ll see:
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0
Set up Ethernet connection
When board boots up, U-Boot prints a list of enabled Ethernet interfaces.
DPMAC2@xlaui4, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id
Set server IP address to the IP address of the host machine on which you have configured the TFTP server.
=> setenv serverip <ipaddress1>
Set ethact and ethprime as the ethernet interface connected to the TFTP server.
NOTE: See LX2160ARDB Ethernet Port Mapping for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux.
=> setenv ethprime <name of interface connected to TFTP server>
For example:
=> setenv ethprime DPMAC3@xgmii
=> setenv ethact <name of interface connected to TFTP server>
For example:
=> setenv ethact DPMAC3@xgmii
Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the dhcp command.
Static IP address assignment: => setenv ipaddr <ipaddress2> => setenv netmask <subnet mask>
Dynamic IP address assignment: => dhcp
Save the settings.
=> saveenv
Check the connection between the board and the TFTP server.
=> ping $serverip
Using DPMAC3@xgmii device
host 192.168.2.1 is alive
Load images from TFTP server
Flash MC firmware (mc_10.20.4_lx2160a.itb):
=> tftp 82000000 mc_10.20.4_lx2160a.itb
Flash MC firmware to SD card:
=> mmc dev 0; mmc write 8200000 5000 <blk_cnt>
Flash MC firmware to eMMC card:
=> mmc dev 1; mmc write 8200000 5000 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD/eMMC card that need to be written as per the file size.
For example, when you load mc_10.20.4_lx2160a.itb from the TFTP server, if the bytes transferred is 1092272 (10aab0 hex), then blk_cnt is calculated as "1092272 /512 = 2133 (855 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 5000 85F
Flash DPAA2 DPL image.
=> tftp 82000000 dpl-eth.19.dtb
Flash DPL image to SD card:
=> mmc dev 0; mmc write 8200000 6800 <blk_cnt>
Flash DPL image to eMMC card:
=> mmc dev 1; mmc write 8200000 6800 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD/eMMC card that need to be written as per the file size.
For example, when you load dpl-eth.19.dtb from the TFTP server, if the bytes transferred is 4583 (11e7 hex), then blk_cnt is calculated as "4583/512 = 8 (8 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 18 (12 hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 6800 12
Flash DPAA2 DPC image.
=> tftp 82000000 dpc-usxgmii.dtb
Flash DPC image to SD card:
=> mmc dev 0; mmc write 8200000 7000 <blk_cnt>
Flash DPC image to eMMC card:
=> mmc dev 1; mmc write 8200000 7000 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size.
For example, when you load dpc-usxgmii.dtb from the TFTP server, if the bytes transferred is 736 (2e0 hex), then blk_cnt is calculated as "736/512 = 1 (1 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 11 (B hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 7000 B
Boot the board.
Boot from SD card: => qixis_reset sd
Boot from eMMC card: => qixis_reset emmc
LX2160ARDB will boot with updated MC firmware and DPC and DPL images. In the U-Boot log, you will see:
Model: NXP Layerscape LX2160ARDB Board
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from SD
...
...
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1)
Hit any key to stop autoboot: 0
=>
OR
Model: NXP Layerscape LX2160ARDB Board
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from eMMC
...
...
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1)
Hit any key to stop autoboot: 0
=>
View full article