xref: /rk3399_ARM-atf/docs/plat/nxp/nxp-layerscape.rst (revision a3aeb4c86517f9cee20d1078486917a315f7f6c9)
17c78e4f7SPankaj GuptaNXP SoCs - Overview
27c78e4f7SPankaj Gupta=====================
37c78e4f7SPankaj Gupta.. section-numbering::
47c78e4f7SPankaj Gupta    :suffix: .
57c78e4f7SPankaj Gupta
67c78e4f7SPankaj GuptaThe QorIQ family of ARM based SoCs that are supported on TF-A are:
77c78e4f7SPankaj Gupta
852a1e9ffSJiafei Pan1. LX2160A
97c78e4f7SPankaj Gupta
1052a1e9ffSJiafei Pan- SoC Overview:
117c78e4f7SPankaj Gupta
1252a1e9ffSJiafei PanThe LX2160A multicore processor, the highest-performance member of the
1352a1e9ffSJiafei PanLayerscape family, combines FinFET process technology's low power and
1452a1e9ffSJiafei Pansixteen Arm® Cortex®-A72 cores with datapath acceleration optimized for
1552a1e9ffSJiafei PanL2/3 packet processing, together with security offload, robust traffic
1652a1e9ffSJiafei Panmanagement and quality of service.
1752a1e9ffSJiafei Pan
1852a1e9ffSJiafei PanDetails about LX2160A can be found at `lx2160a`_.
1952a1e9ffSJiafei Pan
2052a1e9ffSJiafei Pan- LX2160ARDB Board:
2152a1e9ffSJiafei Pan
2252a1e9ffSJiafei PanThe LX2160A reference design board provides a comprehensive platform
2352a1e9ffSJiafei Panthat enables design and evaluation of the LX2160A or LX2162A processors. It
2452a1e9ffSJiafei Pancomes preloaded with a board support package (BSP) based on a standard Linux
2552a1e9ffSJiafei Pankernel.
2652a1e9ffSJiafei Pan
2752a1e9ffSJiafei PanBoard details can be fetched from the link: `lx2160ardb`_.
2852a1e9ffSJiafei Pan
2952a1e9ffSJiafei Pan2. LS1028A
3052a1e9ffSJiafei Pan
3152a1e9ffSJiafei Pan- SoC Overview:
3252a1e9ffSJiafei Pan
3352a1e9ffSJiafei PanThe Layerscape LS1028A applications processor for industrial and
3452a1e9ffSJiafei Panautomotive includes a time-sensitive networking (TSN) -enabled Ethernet
3552a1e9ffSJiafei Panswitch and Ethernet controllers to support converged IT and OT networks.
3652a1e9ffSJiafei PanTwo powerful 64-bit Arm®v8 cores support real-time processing for
3752a1e9ffSJiafei Panindustrial control and virtual machines for edge computing in the IoT.
3852a1e9ffSJiafei PanThe integrated GPU and LCD controller enable Human-Machine Interface
3952a1e9ffSJiafei Pan(HMI) systems with next-generation interfaces.
4052a1e9ffSJiafei Pan
4152a1e9ffSJiafei PanDetails about LS1028A can be found at `ls1028a`_.
4252a1e9ffSJiafei Pan
43168a2012SJiafei Pan- LS1028ARDB Board:
4452a1e9ffSJiafei Pan
4552a1e9ffSJiafei PanThe LS1028A reference design board (RDB) is a computing, evaluation,
4652a1e9ffSJiafei Panand development platform that supports industrial IoT applications, human
4752a1e9ffSJiafei Panmachine interface solutions, and industrial networking.
4852a1e9ffSJiafei Pan
4952a1e9ffSJiafei PanDetails about LS1028A RDB board can be found at `ls1028ardb`_.
507c78e4f7SPankaj Gupta
51168a2012SJiafei Pan3. LS1043A
52168a2012SJiafei Pan
53168a2012SJiafei Pan- SoC Overview:
54168a2012SJiafei Pan
55168a2012SJiafei PanThe Layerscape LS1043A processor is NXP's first quad-core, 64-bit Arm®-based
56168a2012SJiafei Panprocessor for embedded networking. The LS1023A (two core version) and the
57168a2012SJiafei PanLS1043A (four core version) deliver greater than 10 Gbps of performance
58168a2012SJiafei Panin a flexible I/O package supporting fanless designs. This SoC is a
59168a2012SJiafei Panpurpose-built solution for small-form-factor networking and industrial
60168a2012SJiafei Panapplications with BOM optimizations for economic low layer PCB, lower cost
61168a2012SJiafei Panpower supply and single clock design. The new 0.9V versions of the LS1043A
62168a2012SJiafei Panand LS1023A deliver addition power savings for applications such as Wireless
63168a2012SJiafei PanLAN and to Power over Ethernet systems.
64168a2012SJiafei Pan
65168a2012SJiafei PanDetails about LS1043A can be found at `ls1043a`_.
66168a2012SJiafei Pan
67168a2012SJiafei Pan- LS1043ARDB Board:
68168a2012SJiafei Pan
69168a2012SJiafei PanThe LS1043A reference design board (RDB) is a computing, evaluation, and
70168a2012SJiafei Pandevelopment platform that supports the Layerscape LS1043A architecture
71168a2012SJiafei Panprocessor. The LS1043A-RDB can help shorten your time to market by providing
72168a2012SJiafei Panthe following features:
73168a2012SJiafei Pan
74168a2012SJiafei PanMemory subsystem:
75168a2012SJiafei Pan	* 2GByte DDR4 SDRAM (32bit bus)
76168a2012SJiafei Pan	* 128 Mbyte NOR flash single-chip memory
77168a2012SJiafei Pan	* 512 Mbyte NAND flash
78168a2012SJiafei Pan	* 16 Mbyte high-speed SPI flash
79168a2012SJiafei Pan	* SD connector to interface with the SD memory card
80168a2012SJiafei Pan
81168a2012SJiafei PanEthernet:
82168a2012SJiafei Pan	* XFI 10G port
83168a2012SJiafei Pan	* QSGMII with 4x 1G ports
84168a2012SJiafei Pan	* Two RGMII ports
85168a2012SJiafei Pan
86168a2012SJiafei PanPCIe:
87168a2012SJiafei Pan	* PCIe2 (Lanes C) to mini-PCIe slot
88168a2012SJiafei Pan	* PCIe3 (Lanes D) to PCIe slot
89168a2012SJiafei Pan
90168a2012SJiafei PanUSB 3.0: two super speed USB 3.0 type A ports
91168a2012SJiafei Pan
92168a2012SJiafei PanUART: supports two UARTs up to 115200 bps for console
93168a2012SJiafei Pan
94168a2012SJiafei PanDetails about LS1043A RDB board can be found at `ls1043ardb`_.
95168a2012SJiafei Pan
96*a3aeb4c8SJiafei Pan4. LS1046A
97*a3aeb4c8SJiafei Pan
98*a3aeb4c8SJiafei Pan- SoC Overview:
99*a3aeb4c8SJiafei Pan
100*a3aeb4c8SJiafei PanThe LS1046A is a cost-effective, power-efficient, and highly integrated
101*a3aeb4c8SJiafei Pansystem-on-chip (SoC) design that extends the reach of the NXP value-performance
102*a3aeb4c8SJiafei Panline of QorIQ communications processors. Featuring power-efficient 64-bit
103*a3aeb4c8SJiafei PanArm Cortex-A72 cores with ECC-protected L1 and L2 cache memories for high
104*a3aeb4c8SJiafei Panreliability, running up to 1.8 GHz.
105*a3aeb4c8SJiafei Pan
106*a3aeb4c8SJiafei PanDetails about LS1043A can be found at `ls1046a`_.
107*a3aeb4c8SJiafei Pan
108*a3aeb4c8SJiafei Pan- LS1046ARDB Board:
109*a3aeb4c8SJiafei Pan
110*a3aeb4c8SJiafei PanThe LS1046A reference design board (RDB) is a high-performance computing,
111*a3aeb4c8SJiafei Panevaluation, and development platform that supports the Layerscape LS1046A
112*a3aeb4c8SJiafei Panarchitecture processor. The LS1046ARDB board supports the Layerscape LS1046A
113*a3aeb4c8SJiafei Panprocessor and is optimized to support the DDR4 memory and a full complement
114*a3aeb4c8SJiafei Panof high-speed SerDes ports.
115*a3aeb4c8SJiafei Pan
116*a3aeb4c8SJiafei PanDetails about LS1043A RDB board can be found at `ls1046ardb`_.
117*a3aeb4c8SJiafei Pan
118*a3aeb4c8SJiafei Pan- LS1046AFRWY Board:
119*a3aeb4c8SJiafei Pan
120*a3aeb4c8SJiafei PanThe LS1046A Freeway board (FRWY) is a high-performance computing, evaluation,
121*a3aeb4c8SJiafei Panand development platform that supports the LS1046A architecture processor
122*a3aeb4c8SJiafei Pancapable of support more than 32,000 CoreMark performance. The FRWY-LS1046A
123*a3aeb4c8SJiafei Panboard supports the LS1046A processor, onboard DDR4 memory, multiple Gigabit
124*a3aeb4c8SJiafei PanEthernet, USB3.0 and M2_Type_E interfaces for Wi-Fi, FRWY-LS1046A-AC includes
125*a3aeb4c8SJiafei Panthe Wi-Fi card.
126*a3aeb4c8SJiafei Pan
127*a3aeb4c8SJiafei PanDetails about LS1043A RDB board can be found at `ls1046afrwy`_.
128*a3aeb4c8SJiafei Pan
1297c78e4f7SPankaj GuptaTable of supported boot-modes by each platform & platform that needs FIP-DDR:
1307c78e4f7SPankaj Gupta-----------------------------------------------------------------------------
1317c78e4f7SPankaj Gupta
13252a1e9ffSJiafei Pan+---------------------+---------------------------------------------------------------------+-----------------+
13352a1e9ffSJiafei Pan|                     |                            BOOT_MODE                                |                 |
13452a1e9ffSJiafei Pan|       PLAT          +-------+--------+-------+-------+-------+-------------+--------------+ fip_ddr_needed  |
13552a1e9ffSJiafei Pan|                     |  sd   |  qspi  |  nor  | nand  | emmc  | flexspi_nor | flexspi_nand |                 |
13652a1e9ffSJiafei Pan+=====================+=======+========+=======+=======+=======+=============+==============+=================+
13752a1e9ffSJiafei Pan|     lx2160ardb      |  yes  |        |       |       |  yes  |   yes       |              |       yes       |
13852a1e9ffSJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
13952a1e9ffSJiafei Pan|     ls1028ardb      |  yes  |        |       |       |  yes  |   yes       |              |       no        |
14052a1e9ffSJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
141168a2012SJiafei Pan|     ls1043ardb      |  yes  |        |  yes  |  yes  |       |             |              |       no        |
142168a2012SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
143*a3aeb4c8SJiafei Pan|     ls1046ardb      |  yes  |  yes   |       |       |  yes  |             |              |       no        |
144*a3aeb4c8SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
145*a3aeb4c8SJiafei Pan|     ls1046afrwy     |  yes  |  yes   |       |       |       |             |              |       no        |
146*a3aeb4c8SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
14752a1e9ffSJiafei Pan
1487c78e4f7SPankaj Gupta
1497c78e4f7SPankaj GuptaBoot Sequence
1507c78e4f7SPankaj Gupta-------------
1517c78e4f7SPankaj Gupta::
1527c78e4f7SPankaj Gupta
1537c78e4f7SPankaj Gupta+                           Secure World        |     Normal World
1547c78e4f7SPankaj Gupta+ EL0                                           |
1557c78e4f7SPankaj Gupta+                                               |
1567c78e4f7SPankaj Gupta+ EL1                           BL32(Tee OS)    |     kernel
1577c78e4f7SPankaj Gupta+                                ^ |            |       ^
1587c78e4f7SPankaj Gupta+                                | |            |       |
1597c78e4f7SPankaj Gupta+ EL2                            | |            |     BL33(u-boot)
1607c78e4f7SPankaj Gupta+                                | |            |      ^
1617c78e4f7SPankaj Gupta+                                | v            |     /
1627c78e4f7SPankaj Gupta+ EL3        BootROM --> BL2 --> BL31 ---------------/
1637c78e4f7SPankaj Gupta+
1647c78e4f7SPankaj Gupta
1657c78e4f7SPankaj GuptaBoot Sequence with FIP-DDR
1667c78e4f7SPankaj Gupta--------------------------
1677c78e4f7SPankaj Gupta::
1687c78e4f7SPankaj Gupta
1697c78e4f7SPankaj Gupta+                           Secure World        |     Normal World
1707c78e4f7SPankaj Gupta+ EL0                                           |
1717c78e4f7SPankaj Gupta+                                               |
1727c78e4f7SPankaj Gupta+ EL1               fip-ddr     BL32(Tee OS)    |     kernel
1737c78e4f7SPankaj Gupta+                     ^ |         ^ |           |       ^
1747c78e4f7SPankaj Gupta+                     | |         | |           |       |
1757c78e4f7SPankaj Gupta+ EL2                 | |         | |           |     BL33(u-boot)
1767c78e4f7SPankaj Gupta+                     | |         | |           |      ^
1777c78e4f7SPankaj Gupta+                     | v         | v           |     /
1787c78e4f7SPankaj Gupta+ EL3     BootROM --> BL2 -----> BL31 ---------------/
1797c78e4f7SPankaj Gupta+
1807c78e4f7SPankaj Gupta
18152a1e9ffSJiafei PanDDR Memory Layout
18252a1e9ffSJiafei Pan--------------------------
18352a1e9ffSJiafei Pan
18452a1e9ffSJiafei PanNXP Platforms divide DRAM into banks:
18552a1e9ffSJiafei Pan
18652a1e9ffSJiafei Pan- DRAM0 Bank:  Maximum size of this bank is fixed to 2GB, DRAM0 size is defined in platform_def.h if it is less than 2GB.
18752a1e9ffSJiafei Pan
18852a1e9ffSJiafei Pan- DRAM1 ~ DRAMn Bank:  Greater than 2GB belongs to DRAM1 and following banks, and size of DRAMn Bank varies for one platform to others.
18952a1e9ffSJiafei Pan
19052a1e9ffSJiafei PanThe following diagram is default DRAM0 memory layout in which secure memory is at top of DRAM0.
19152a1e9ffSJiafei Pan
19252a1e9ffSJiafei Pan::
19352a1e9ffSJiafei Pan
19452a1e9ffSJiafei Pan  high  +---------------------------------------------+
19552a1e9ffSJiafei Pan        |                                             |
19652a1e9ffSJiafei Pan        |   Secure EL1 Payload Shared Memory (2 MB)   |
19752a1e9ffSJiafei Pan        |                                             |
19852a1e9ffSJiafei Pan        +---------------------------------------------+
19952a1e9ffSJiafei Pan        |                                             |
20052a1e9ffSJiafei Pan        |            Secure Memory (64 MB)            |
20152a1e9ffSJiafei Pan        |                                             |
20252a1e9ffSJiafei Pan        +---------------------------------------------+
20352a1e9ffSJiafei Pan        |                                             |
20452a1e9ffSJiafei Pan        |             Non Secure Memory               |
20552a1e9ffSJiafei Pan        |                                             |
20652a1e9ffSJiafei Pan  low   +---------------------------------------------+
2077c78e4f7SPankaj Gupta
2087c78e4f7SPankaj GuptaHow to build
2097c78e4f7SPankaj Gupta=============
2107c78e4f7SPankaj Gupta
2117c78e4f7SPankaj GuptaCode Locations
2127c78e4f7SPankaj Gupta--------------
2137c78e4f7SPankaj Gupta
2147c78e4f7SPankaj Gupta-  OP-TEE:
2157c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/optee_os>`__
2167c78e4f7SPankaj Gupta
2177c78e4f7SPankaj Gupta-  U-Boot:
2187c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot>`__
2197c78e4f7SPankaj Gupta
2207c78e4f7SPankaj Gupta-  RCW:
2217c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/rcw>`__
2227c78e4f7SPankaj Gupta
2237c78e4f7SPankaj Gupta-  ddr-phy-binary: Required by platforms that need fip-ddr.
2247c78e4f7SPankaj Gupta   `link <https:://github.com/NXP/ddr-phy-binary>`__
2257c78e4f7SPankaj Gupta
2267c78e4f7SPankaj Gupta-  cst: Required for TBBR.
2277c78e4f7SPankaj Gupta   `link <https:://source.codeaurora.org/external/qoriq/qoriq-components/cst>`__
2287c78e4f7SPankaj Gupta
2297c78e4f7SPankaj GuptaBuild Procedure
2307c78e4f7SPankaj Gupta---------------
2317c78e4f7SPankaj Gupta
2327c78e4f7SPankaj Gupta-  Fetch all the above repositories into local host.
2337c78e4f7SPankaj Gupta
2347c78e4f7SPankaj Gupta-  Prepare AARCH64 toolchain and set the environment variable "CROSS_COMPILE".
2357c78e4f7SPankaj Gupta
2367c78e4f7SPankaj Gupta   .. code:: shell
2377c78e4f7SPankaj Gupta
2387c78e4f7SPankaj Gupta       export CROSS_COMPILE=.../bin/aarch64-linux-gnu-
2397c78e4f7SPankaj Gupta
2407c78e4f7SPankaj Gupta-  Build RCW. Refer README from the respective cloned folder for more details.
2417c78e4f7SPankaj Gupta
2427c78e4f7SPankaj Gupta-  Build u-boot and OPTee firstly, and get binary images: u-boot.bin and tee.bin.
2437c78e4f7SPankaj Gupta   For u-boot you can use the <platform>_tfa_defconfig for build.
2447c78e4f7SPankaj Gupta
2457c78e4f7SPankaj Gupta-  Copy/clone the repo "ddr-phy-binary" to the tfa directory for platform needing ddr-fip.
2467c78e4f7SPankaj Gupta
2477c78e4f7SPankaj Gupta-  Below are the steps to build TF-A images for the supported platforms.
2487c78e4f7SPankaj Gupta
2497c78e4f7SPankaj GuptaCompilation steps without BL32
2507c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2517c78e4f7SPankaj Gupta
2527c78e4f7SPankaj GuptaBUILD BL2:
2537c78e4f7SPankaj Gupta
2547c78e4f7SPankaj Gupta-To compile
2557c78e4f7SPankaj Gupta   .. code:: shell
2567c78e4f7SPankaj Gupta
2577c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2587c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2597c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2607c78e4f7SPankaj Gupta       pbl
2617c78e4f7SPankaj Gupta
2627c78e4f7SPankaj GuptaBUILD FIP:
2637c78e4f7SPankaj Gupta
2647c78e4f7SPankaj Gupta   .. code:: shell
2657c78e4f7SPankaj Gupta
2667c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2677c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2687c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2697c78e4f7SPankaj Gupta       BL33=$UBOOT_SECURE_BIN \
2707c78e4f7SPankaj Gupta       pbl \
2717c78e4f7SPankaj Gupta       fip
2727c78e4f7SPankaj Gupta
2737c78e4f7SPankaj GuptaCompilation steps with BL32
2747c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2757c78e4f7SPankaj Gupta
2767c78e4f7SPankaj GuptaBUILD BL2:
2777c78e4f7SPankaj Gupta
2787c78e4f7SPankaj Gupta-To compile
2797c78e4f7SPankaj Gupta   .. code:: shell
2807c78e4f7SPankaj Gupta
2817c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2827c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2837c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2847c78e4f7SPankaj Gupta       BL32=$TEE_BIN SPD=opteed\
2857c78e4f7SPankaj Gupta       pbl
2867c78e4f7SPankaj Gupta
2877c78e4f7SPankaj GuptaBUILD FIP:
2887c78e4f7SPankaj Gupta
2897c78e4f7SPankaj Gupta   .. code:: shell
2907c78e4f7SPankaj Gupta
2917c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2927c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2937c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2947c78e4f7SPankaj Gupta       BL32=$TEE_BIN SPD=opteed\
2957c78e4f7SPankaj Gupta       BL33=$UBOOT_SECURE_BIN \
2967c78e4f7SPankaj Gupta       pbl \
2977c78e4f7SPankaj Gupta       fip
2987c78e4f7SPankaj Gupta
2997c78e4f7SPankaj Gupta
3007c78e4f7SPankaj GuptaBUILD fip-ddr (Mandatory for certain platforms, refer table above):
3017c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3027c78e4f7SPankaj Gupta
3037c78e4f7SPankaj Gupta-To compile additional fip-ddr for selected platforms(Refer above table if the platform needs fip-ddr).
3047c78e4f7SPankaj Gupta   .. code:: shell
3057c78e4f7SPankaj Gupta
3067c78e4f7SPankaj Gupta	make PLAT=<platform_name> fip-ddr
3077c78e4f7SPankaj Gupta
3087c78e4f7SPankaj Gupta
3097c78e4f7SPankaj GuptaDeploy ATF Images
3107c78e4f7SPankaj Gupta=================
3117c78e4f7SPankaj Gupta
3127c78e4f7SPankaj GuptaNote: The size in the standard uboot commands for copy to nor, qspi, nand or sd
3137c78e4f7SPankaj Guptashould be modified based on the binary size of the image to be copied.
3147c78e4f7SPankaj Gupta
315*a3aeb4c8SJiafei Pan-  Deploy ATF images on flexspi-Nor or QSPI flash Alt Bank from U-Boot prompt.
316*a3aeb4c8SJiafei Pan
317*a3aeb4c8SJiafei Pan   --  Commands to flash images for bl2_xxx.pbl and fip.bin
318*a3aeb4c8SJiafei Pan
319*a3aeb4c8SJiafei Pan   Notes: ls1028ardb has no flexspi-Nor Alt Bank, so use "sf probe 0:0" for current bank.
3207c78e4f7SPankaj Gupta
3217c78e4f7SPankaj Gupta   .. code:: shell
3227c78e4f7SPankaj Gupta
323*a3aeb4c8SJiafei Pan        tftp 82000000  $path/bl2_xxx.pbl;
324*a3aeb4c8SJiafei Pan
325*a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0 +$filesize; sf write 0x82000000 0x0 $filesize;
3267c78e4f7SPankaj Gupta
3277c78e4f7SPankaj Gupta        tftp 82000000  $path/fip.bin;
328*a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0x100000 +$filesize; sf write 0x82000000 0x100000 $filesize;
3297c78e4f7SPankaj Gupta
3307c78e4f7SPankaj Gupta   --  Next step is valid for platform where FIP-DDR is needed.
3317c78e4f7SPankaj Gupta
3327c78e4f7SPankaj Gupta   .. code:: shell
3337c78e4f7SPankaj Gupta
3347c78e4f7SPankaj Gupta        tftp 82000000  $path/ddr_fip.bin;
335*a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0x800000 +$filesize; sf write 0x82000000 0x800000 $filesize;
3367c78e4f7SPankaj Gupta
3377c78e4f7SPankaj Gupta   --  Then reset to alternate bank to boot up ATF.
3387c78e4f7SPankaj Gupta
339*a3aeb4c8SJiafei Pan   Command for lx2160a and ls1028a platforms:
340168a2012SJiafei Pan
3417c78e4f7SPankaj Gupta   .. code:: shell
3427c78e4f7SPankaj Gupta
3437c78e4f7SPankaj Gupta        qixisreset altbank;
3447c78e4f7SPankaj Gupta
345*a3aeb4c8SJiafei Pan   Command for ls1046a platforms:
346*a3aeb4c8SJiafei Pan
347*a3aeb4c8SJiafei Pan   .. code:: shell
348*a3aeb4c8SJiafei Pan
349*a3aeb4c8SJiafei Pan        cpld reset altbank;
350*a3aeb4c8SJiafei Pan
3517c78e4f7SPankaj Gupta-  Deploy ATF images on SD/eMMC from U-Boot prompt.
3527c78e4f7SPankaj Gupta   -- file_size_in_block_sizeof_512 = (Size_of_bytes_tftp / 512)
3537c78e4f7SPankaj Gupta
3547c78e4f7SPankaj Gupta   .. code:: shell
3557c78e4f7SPankaj Gupta
3567c78e4f7SPankaj Gupta        mmc dev <idx>; (idx = 1 for eMMC; idx = 0 for SD)
3577c78e4f7SPankaj Gupta
3587c78e4f7SPankaj Gupta        tftp 82000000  $path/bl2_<sd>_or_<emmc>.pbl;
3597c78e4f7SPankaj Gupta        mmc write 82000000 8 <file_size_in_block_sizeof_512>;
3607c78e4f7SPankaj Gupta
3617c78e4f7SPankaj Gupta        tftp 82000000  $path/fip.bin;
3627c78e4f7SPankaj Gupta        mmc write 82000000 0x800 <file_size_in_block_sizeof_512>;
3637c78e4f7SPankaj Gupta
3647c78e4f7SPankaj Gupta    --  Next step is valid for platform that needs FIP-DDR.
3657c78e4f7SPankaj Gupta
3667c78e4f7SPankaj Gupta   .. code:: shell
3677c78e4f7SPankaj Gupta
3687c78e4f7SPankaj Gupta        tftp 82000000  $path/ddr_fip.bin;
3697c78e4f7SPankaj Gupta        mmc write 82000000 0x4000 <file_size_in_block_sizeof_512>;
3707c78e4f7SPankaj Gupta
3717c78e4f7SPankaj Gupta   --  Then reset to sd/emmc to boot up ATF from sd/emmc as boot-source.
3727c78e4f7SPankaj Gupta
373168a2012SJiafei Pan   Command for lx2160A and ls1028a platforms:
374168a2012SJiafei Pan
3757c78e4f7SPankaj Gupta   .. code:: shell
3767c78e4f7SPankaj Gupta
3777c78e4f7SPankaj Gupta        qixisreset <sd or emmc>;
3787c78e4f7SPankaj Gupta
379*a3aeb4c8SJiafei Pan   Command for ls1043a and ls1046a platform:
380168a2012SJiafei Pan
381168a2012SJiafei Pan   .. code:: shell
382168a2012SJiafei Pan
383168a2012SJiafei Pan        cpld reset <sd or emmc>;
384168a2012SJiafei Pan
385168a2012SJiafei Pan-  Deploy ATF images on IFC nor flash from U-Boot prompt.
386168a2012SJiafei Pan
387168a2012SJiafei Pan   .. code:: shell
388168a2012SJiafei Pan
389168a2012SJiafei Pan        tftp 82000000  $path/bl2_nor.pbl;
390168a2012SJiafei Pan	protect off 64000000 +$filesize; erase 64000000 +$filesize; cp.b 82000000 64000000 $filesize;
391168a2012SJiafei Pan
392168a2012SJiafei Pan        tftp 82000000  $path/fip.bin;
393168a2012SJiafei Pan	protect off 64100000 +$filesize; erase 64100000 +$filesize; cp.b 82000000 64100000 $filesize;
394168a2012SJiafei Pan
395168a2012SJiafei Pan   --  Then reset to alternate bank to boot up ATF.
396168a2012SJiafei Pan
397168a2012SJiafei Pan   Command for ls1043a platform:
398168a2012SJiafei Pan
399168a2012SJiafei Pan   .. code:: shell
400168a2012SJiafei Pan
401168a2012SJiafei Pan        cpld reset altbank;
402168a2012SJiafei Pan
403168a2012SJiafei Pan-  Deploy ATF images on IFC nand flash from U-Boot prompt.
404168a2012SJiafei Pan
405168a2012SJiafei Pan   .. code:: shell
406168a2012SJiafei Pan
407168a2012SJiafei Pan        tftp 82000000  $path/bl2_nand.pbl;
408168a2012SJiafei Pan	nand erase 0x0 $filesize; nand write 82000000 0x0 $filesize;
409168a2012SJiafei Pan
410168a2012SJiafei Pan        tftp 82000000  $path/fip.bin;
411168a2012SJiafei Pan	nand erase 0x100000 $filesize;nand write 82000000 0x100000 $filesize;
412168a2012SJiafei Pan
413168a2012SJiafei Pan   --  Then reset to nand flash to boot up ATF.
414168a2012SJiafei Pan
415168a2012SJiafei Pan   Command for ls1043a platform:
416168a2012SJiafei Pan
417168a2012SJiafei Pan   .. code:: shell
418168a2012SJiafei Pan
419168a2012SJiafei Pan        cpld reset nand;
420168a2012SJiafei Pan
421168a2012SJiafei Pan
422168a2012SJiafei Pan
4237c78e4f7SPankaj GuptaTrusted Board Boot:
4247c78e4f7SPankaj Gupta===================
4257c78e4f7SPankaj Gupta
4267c78e4f7SPankaj GuptaFor TBBR, the binary name changes:
4277c78e4f7SPankaj Gupta
4287c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4297c78e4f7SPankaj Gupta|  Boot Type  |           BL2            |   FIP   |      FIP-DDR      |
4307c78e4f7SPankaj Gupta+=============+==========================+=========+===================+
4317c78e4f7SPankaj Gupta| Normal Boot |  bl2_<boot_mode>.pbl     | fip.bin | ddr_fip.bin       |
4327c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4337c78e4f7SPankaj Gupta| TBBR Boot   |  bl2_<boot_mode>_sec.pbl | fip.bin | ddr_fip_sec.bin   |
4347c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4357c78e4f7SPankaj Gupta
4367c78e4f7SPankaj GuptaRefer `nxp-ls-tbbr.rst`_ for detailed user steps.
4377c78e4f7SPankaj Gupta
4387c78e4f7SPankaj Gupta
43952a1e9ffSJiafei Pan.. _lx2160a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-lx2160a-lx2120a-lx2080a-processors:LX2160A
4407c78e4f7SPankaj Gupta.. _lx2160ardb: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-communication-process/layerscape-lx2160a-multicore-communications-processor:LX2160A
44152a1e9ffSJiafei Pan.. _ls1028a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1028a-applications-processor:LS1028A
44252a1e9ffSJiafei Pan.. _ls1028ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1028a-reference-design-board:LS1028ARDB
443168a2012SJiafei Pan.. _ls1043a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1043a-and-1023a-processors:LS1043A
444168a2012SJiafei Pan.. _ls1043ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1043a-reference-design-board:LS1043A-RDB
445*a3aeb4c8SJiafei Pan.. _ls1046a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1046a-and-1026a-processors:LS1046A
446*a3aeb4c8SJiafei Pan.. _ls1046ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1046a-reference-design-board:LS1046A-RDB
447*a3aeb4c8SJiafei Pan.. _ls1046afrwy: https://www.nxp.com/design/qoriq-developer-resources/ls1046a-freeway-board:FRWY-LS1046A
4487c78e4f7SPankaj Gupta.. _nxp-ls-tbbr.rst: ./nxp-ls-tbbr.rst
449