xref: /rk3399_ARM-atf/docs/plat/nxp/nxp-layerscape.rst (revision 2ea18c7df31f8239e1052f39cf26f1bb8c9d0c25)
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
96a3aeb4c8SJiafei Pan4. LS1046A
97a3aeb4c8SJiafei Pan
98a3aeb4c8SJiafei Pan- SoC Overview:
99a3aeb4c8SJiafei Pan
100a3aeb4c8SJiafei PanThe LS1046A is a cost-effective, power-efficient, and highly integrated
101a3aeb4c8SJiafei Pansystem-on-chip (SoC) design that extends the reach of the NXP value-performance
102a3aeb4c8SJiafei Panline of QorIQ communications processors. Featuring power-efficient 64-bit
103a3aeb4c8SJiafei PanArm Cortex-A72 cores with ECC-protected L1 and L2 cache memories for high
104a3aeb4c8SJiafei Panreliability, running up to 1.8 GHz.
105a3aeb4c8SJiafei Pan
106*6e4e294aSJiafei PanDetails about LS1046A can be found at `ls1046a`_.
107a3aeb4c8SJiafei Pan
108a3aeb4c8SJiafei Pan- LS1046ARDB Board:
109a3aeb4c8SJiafei Pan
110a3aeb4c8SJiafei PanThe LS1046A reference design board (RDB) is a high-performance computing,
111a3aeb4c8SJiafei Panevaluation, and development platform that supports the Layerscape LS1046A
112a3aeb4c8SJiafei Panarchitecture processor. The LS1046ARDB board supports the Layerscape LS1046A
113a3aeb4c8SJiafei Panprocessor and is optimized to support the DDR4 memory and a full complement
114a3aeb4c8SJiafei Panof high-speed SerDes ports.
115a3aeb4c8SJiafei Pan
116*6e4e294aSJiafei PanDetails about LS1046A RDB board can be found at `ls1046ardb`_.
117a3aeb4c8SJiafei Pan
118a3aeb4c8SJiafei Pan- LS1046AFRWY Board:
119a3aeb4c8SJiafei Pan
120a3aeb4c8SJiafei PanThe LS1046A Freeway board (FRWY) is a high-performance computing, evaluation,
121a3aeb4c8SJiafei Panand development platform that supports the LS1046A architecture processor
122a3aeb4c8SJiafei Pancapable of support more than 32,000 CoreMark performance. The FRWY-LS1046A
123a3aeb4c8SJiafei Panboard supports the LS1046A processor, onboard DDR4 memory, multiple Gigabit
124a3aeb4c8SJiafei PanEthernet, USB3.0 and M2_Type_E interfaces for Wi-Fi, FRWY-LS1046A-AC includes
125a3aeb4c8SJiafei Panthe Wi-Fi card.
126a3aeb4c8SJiafei Pan
127*6e4e294aSJiafei PanDetails about LS1046A FRWY board can be found at `ls1046afrwy`_.
128*6e4e294aSJiafei Pan
129*6e4e294aSJiafei Pan5. LS1088A
130*6e4e294aSJiafei Pan
131*6e4e294aSJiafei Pan- SoC Overview:
132*6e4e294aSJiafei Pan
133*6e4e294aSJiafei PanThe LS1088A family of multicore communications processors combines up to and eight
134*6e4e294aSJiafei PanArm Cortex-A53 cores with the advanced, high-performance data path and network
135*6e4e294aSJiafei Panperipheral interfaces required for wireless access points, networking infrastructure,
136*6e4e294aSJiafei Panintelligent edge access, including virtual customer premise equipment (vCPE) and
137*6e4e294aSJiafei Panhigh-performance industrial applications.
138*6e4e294aSJiafei Pan
139*6e4e294aSJiafei PanDetails about LS1088A can be found at `ls1088a`_.
140*6e4e294aSJiafei Pan
141*6e4e294aSJiafei Pan- LS1088ARDB Board:
142*6e4e294aSJiafei Pan
143*6e4e294aSJiafei PanThe LS1088A reference design board provides a comprehensive platform that
144*6e4e294aSJiafei Panenables design and evaluation of the product (LS1088A processor). This RDB
145*6e4e294aSJiafei Pancomes pre-loaded with a board support package (BSP) based on a standard
146*6e4e294aSJiafei PanLinux kernel.
147*6e4e294aSJiafei Pan
148*6e4e294aSJiafei PanDetails about LS1088A RDB board can be found at `ls1088ardb`_.
149a3aeb4c8SJiafei Pan
1507c78e4f7SPankaj GuptaTable of supported boot-modes by each platform & platform that needs FIP-DDR:
1517c78e4f7SPankaj Gupta-----------------------------------------------------------------------------
1527c78e4f7SPankaj Gupta
15352a1e9ffSJiafei Pan+---------------------+---------------------------------------------------------------------+-----------------+
15452a1e9ffSJiafei Pan|                     |                            BOOT_MODE                                |                 |
15552a1e9ffSJiafei Pan|       PLAT          +-------+--------+-------+-------+-------+-------------+--------------+ fip_ddr_needed  |
15652a1e9ffSJiafei Pan|                     |  sd   |  qspi  |  nor  | nand  | emmc  | flexspi_nor | flexspi_nand |                 |
15752a1e9ffSJiafei Pan+=====================+=======+========+=======+=======+=======+=============+==============+=================+
15852a1e9ffSJiafei Pan|     lx2160ardb      |  yes  |        |       |       |  yes  |   yes       |              |       yes       |
15952a1e9ffSJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
16052a1e9ffSJiafei Pan|     ls1028ardb      |  yes  |        |       |       |  yes  |   yes       |              |       no        |
16152a1e9ffSJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
162168a2012SJiafei Pan|     ls1043ardb      |  yes  |        |  yes  |  yes  |       |             |              |       no        |
163168a2012SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
164a3aeb4c8SJiafei Pan|     ls1046ardb      |  yes  |  yes   |       |       |  yes  |             |              |       no        |
165a3aeb4c8SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
166a3aeb4c8SJiafei Pan|     ls1046afrwy     |  yes  |  yes   |       |       |       |             |              |       no        |
167a3aeb4c8SJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
168*6e4e294aSJiafei Pan|     ls1088ardb      |  yes  |  yes   |       |       |       |             |              |       no        |
169*6e4e294aSJiafei Pan+---------------------+-------+--------+-------+-------+-------+-------------+--------------+-----------------+
17052a1e9ffSJiafei Pan
1717c78e4f7SPankaj Gupta
1727c78e4f7SPankaj GuptaBoot Sequence
1737c78e4f7SPankaj Gupta-------------
1747c78e4f7SPankaj Gupta::
1757c78e4f7SPankaj Gupta
1767c78e4f7SPankaj Gupta+                           Secure World        |     Normal World
1777c78e4f7SPankaj Gupta+ EL0                                           |
1787c78e4f7SPankaj Gupta+                                               |
1797c78e4f7SPankaj Gupta+ EL1                           BL32(Tee OS)    |     kernel
1807c78e4f7SPankaj Gupta+                                ^ |            |       ^
1817c78e4f7SPankaj Gupta+                                | |            |       |
1827c78e4f7SPankaj Gupta+ EL2                            | |            |     BL33(u-boot)
1837c78e4f7SPankaj Gupta+                                | |            |      ^
1847c78e4f7SPankaj Gupta+                                | v            |     /
1857c78e4f7SPankaj Gupta+ EL3        BootROM --> BL2 --> BL31 ---------------/
1867c78e4f7SPankaj Gupta+
1877c78e4f7SPankaj Gupta
1887c78e4f7SPankaj GuptaBoot Sequence with FIP-DDR
1897c78e4f7SPankaj Gupta--------------------------
1907c78e4f7SPankaj Gupta::
1917c78e4f7SPankaj Gupta
1927c78e4f7SPankaj Gupta+                           Secure World        |     Normal World
1937c78e4f7SPankaj Gupta+ EL0                                           |
1947c78e4f7SPankaj Gupta+                                               |
1957c78e4f7SPankaj Gupta+ EL1               fip-ddr     BL32(Tee OS)    |     kernel
1967c78e4f7SPankaj Gupta+                     ^ |         ^ |           |       ^
1977c78e4f7SPankaj Gupta+                     | |         | |           |       |
1987c78e4f7SPankaj Gupta+ EL2                 | |         | |           |     BL33(u-boot)
1997c78e4f7SPankaj Gupta+                     | |         | |           |      ^
2007c78e4f7SPankaj Gupta+                     | v         | v           |     /
2017c78e4f7SPankaj Gupta+ EL3     BootROM --> BL2 -----> BL31 ---------------/
2027c78e4f7SPankaj Gupta+
2037c78e4f7SPankaj Gupta
20452a1e9ffSJiafei PanDDR Memory Layout
20552a1e9ffSJiafei Pan--------------------------
20652a1e9ffSJiafei Pan
20752a1e9ffSJiafei PanNXP Platforms divide DRAM into banks:
20852a1e9ffSJiafei Pan
20952a1e9ffSJiafei 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.
21052a1e9ffSJiafei Pan
21152a1e9ffSJiafei Pan- DRAM1 ~ DRAMn Bank:  Greater than 2GB belongs to DRAM1 and following banks, and size of DRAMn Bank varies for one platform to others.
21252a1e9ffSJiafei Pan
21352a1e9ffSJiafei PanThe following diagram is default DRAM0 memory layout in which secure memory is at top of DRAM0.
21452a1e9ffSJiafei Pan
21552a1e9ffSJiafei Pan::
21652a1e9ffSJiafei Pan
21752a1e9ffSJiafei Pan  high  +---------------------------------------------+
21852a1e9ffSJiafei Pan        |                                             |
21952a1e9ffSJiafei Pan        |   Secure EL1 Payload Shared Memory (2 MB)   |
22052a1e9ffSJiafei Pan        |                                             |
22152a1e9ffSJiafei Pan        +---------------------------------------------+
22252a1e9ffSJiafei Pan        |                                             |
22352a1e9ffSJiafei Pan        |            Secure Memory (64 MB)            |
22452a1e9ffSJiafei Pan        |                                             |
22552a1e9ffSJiafei Pan        +---------------------------------------------+
22652a1e9ffSJiafei Pan        |                                             |
22752a1e9ffSJiafei Pan        |             Non Secure Memory               |
22852a1e9ffSJiafei Pan        |                                             |
22952a1e9ffSJiafei Pan  low   +---------------------------------------------+
2307c78e4f7SPankaj Gupta
2317c78e4f7SPankaj GuptaHow to build
2327c78e4f7SPankaj Gupta=============
2337c78e4f7SPankaj Gupta
2347c78e4f7SPankaj GuptaCode Locations
2357c78e4f7SPankaj Gupta--------------
2367c78e4f7SPankaj Gupta
2377c78e4f7SPankaj Gupta-  OP-TEE:
2387c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/optee_os>`__
2397c78e4f7SPankaj Gupta
2407c78e4f7SPankaj Gupta-  U-Boot:
2417c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot>`__
2427c78e4f7SPankaj Gupta
2437c78e4f7SPankaj Gupta-  RCW:
2447c78e4f7SPankaj Gupta   `link <https://source.codeaurora.org/external/qoriq/qoriq-components/rcw>`__
2457c78e4f7SPankaj Gupta
2467c78e4f7SPankaj Gupta-  ddr-phy-binary: Required by platforms that need fip-ddr.
2477c78e4f7SPankaj Gupta   `link <https:://github.com/NXP/ddr-phy-binary>`__
2487c78e4f7SPankaj Gupta
2497c78e4f7SPankaj Gupta-  cst: Required for TBBR.
2507c78e4f7SPankaj Gupta   `link <https:://source.codeaurora.org/external/qoriq/qoriq-components/cst>`__
2517c78e4f7SPankaj Gupta
2527c78e4f7SPankaj GuptaBuild Procedure
2537c78e4f7SPankaj Gupta---------------
2547c78e4f7SPankaj Gupta
2557c78e4f7SPankaj Gupta-  Fetch all the above repositories into local host.
2567c78e4f7SPankaj Gupta
2577c78e4f7SPankaj Gupta-  Prepare AARCH64 toolchain and set the environment variable "CROSS_COMPILE".
2587c78e4f7SPankaj Gupta
2597c78e4f7SPankaj Gupta   .. code:: shell
2607c78e4f7SPankaj Gupta
2617c78e4f7SPankaj Gupta       export CROSS_COMPILE=.../bin/aarch64-linux-gnu-
2627c78e4f7SPankaj Gupta
2637c78e4f7SPankaj Gupta-  Build RCW. Refer README from the respective cloned folder for more details.
2647c78e4f7SPankaj Gupta
2657c78e4f7SPankaj Gupta-  Build u-boot and OPTee firstly, and get binary images: u-boot.bin and tee.bin.
2667c78e4f7SPankaj Gupta   For u-boot you can use the <platform>_tfa_defconfig for build.
2677c78e4f7SPankaj Gupta
2687c78e4f7SPankaj Gupta-  Copy/clone the repo "ddr-phy-binary" to the tfa directory for platform needing ddr-fip.
2697c78e4f7SPankaj Gupta
2707c78e4f7SPankaj Gupta-  Below are the steps to build TF-A images for the supported platforms.
2717c78e4f7SPankaj Gupta
2727c78e4f7SPankaj GuptaCompilation steps without BL32
2737c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2747c78e4f7SPankaj Gupta
2757c78e4f7SPankaj GuptaBUILD BL2:
2767c78e4f7SPankaj Gupta
2777c78e4f7SPankaj Gupta-To compile
2787c78e4f7SPankaj Gupta   .. code:: shell
2797c78e4f7SPankaj Gupta
2807c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2817c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2827c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2837c78e4f7SPankaj Gupta       pbl
2847c78e4f7SPankaj Gupta
2857c78e4f7SPankaj GuptaBUILD FIP:
2867c78e4f7SPankaj Gupta
2877c78e4f7SPankaj Gupta   .. code:: shell
2887c78e4f7SPankaj Gupta
2897c78e4f7SPankaj Gupta       make PLAT=$PLAT \
2907c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
2917c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
2927c78e4f7SPankaj Gupta       BL33=$UBOOT_SECURE_BIN \
2937c78e4f7SPankaj Gupta       pbl \
2947c78e4f7SPankaj Gupta       fip
2957c78e4f7SPankaj Gupta
2967c78e4f7SPankaj GuptaCompilation steps with BL32
2977c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2987c78e4f7SPankaj Gupta
2997c78e4f7SPankaj GuptaBUILD BL2:
3007c78e4f7SPankaj Gupta
3017c78e4f7SPankaj Gupta-To compile
3027c78e4f7SPankaj Gupta   .. code:: shell
3037c78e4f7SPankaj Gupta
3047c78e4f7SPankaj Gupta       make PLAT=$PLAT \
3057c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
3067c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
3077c78e4f7SPankaj Gupta       BL32=$TEE_BIN SPD=opteed\
3087c78e4f7SPankaj Gupta       pbl
3097c78e4f7SPankaj Gupta
3107c78e4f7SPankaj GuptaBUILD FIP:
3117c78e4f7SPankaj Gupta
3127c78e4f7SPankaj Gupta   .. code:: shell
3137c78e4f7SPankaj Gupta
3147c78e4f7SPankaj Gupta       make PLAT=$PLAT \
3157c78e4f7SPankaj Gupta       BOOT_MODE=<platform_supported_boot_mode> \
3167c78e4f7SPankaj Gupta       RCW=$RCW_BIN \
3177c78e4f7SPankaj Gupta       BL32=$TEE_BIN SPD=opteed\
3187c78e4f7SPankaj Gupta       BL33=$UBOOT_SECURE_BIN \
3197c78e4f7SPankaj Gupta       pbl \
3207c78e4f7SPankaj Gupta       fip
3217c78e4f7SPankaj Gupta
3227c78e4f7SPankaj Gupta
3237c78e4f7SPankaj GuptaBUILD fip-ddr (Mandatory for certain platforms, refer table above):
3247c78e4f7SPankaj Gupta~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3257c78e4f7SPankaj Gupta
3267c78e4f7SPankaj Gupta-To compile additional fip-ddr for selected platforms(Refer above table if the platform needs fip-ddr).
3277c78e4f7SPankaj Gupta   .. code:: shell
3287c78e4f7SPankaj Gupta
3297c78e4f7SPankaj Gupta	make PLAT=<platform_name> fip-ddr
3307c78e4f7SPankaj Gupta
3317c78e4f7SPankaj Gupta
3327c78e4f7SPankaj GuptaDeploy ATF Images
3337c78e4f7SPankaj Gupta=================
3347c78e4f7SPankaj Gupta
3357c78e4f7SPankaj GuptaNote: The size in the standard uboot commands for copy to nor, qspi, nand or sd
3367c78e4f7SPankaj Guptashould be modified based on the binary size of the image to be copied.
3377c78e4f7SPankaj Gupta
338a3aeb4c8SJiafei Pan-  Deploy ATF images on flexspi-Nor or QSPI flash Alt Bank from U-Boot prompt.
339a3aeb4c8SJiafei Pan
340a3aeb4c8SJiafei Pan   --  Commands to flash images for bl2_xxx.pbl and fip.bin
341a3aeb4c8SJiafei Pan
342a3aeb4c8SJiafei Pan   Notes: ls1028ardb has no flexspi-Nor Alt Bank, so use "sf probe 0:0" for current bank.
3437c78e4f7SPankaj Gupta
3447c78e4f7SPankaj Gupta   .. code:: shell
3457c78e4f7SPankaj Gupta
346a3aeb4c8SJiafei Pan        tftp 82000000  $path/bl2_xxx.pbl;
347a3aeb4c8SJiafei Pan
348a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0 +$filesize; sf write 0x82000000 0x0 $filesize;
3497c78e4f7SPankaj Gupta
3507c78e4f7SPankaj Gupta        tftp 82000000  $path/fip.bin;
351a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0x100000 +$filesize; sf write 0x82000000 0x100000 $filesize;
3527c78e4f7SPankaj Gupta
3537c78e4f7SPankaj Gupta   --  Next step is valid for platform where FIP-DDR is needed.
3547c78e4f7SPankaj Gupta
3557c78e4f7SPankaj Gupta   .. code:: shell
3567c78e4f7SPankaj Gupta
3577c78e4f7SPankaj Gupta        tftp 82000000  $path/ddr_fip.bin;
358a3aeb4c8SJiafei Pan        i2c mw 66 50 20;sf probe 0:1; sf erase 0x800000 +$filesize; sf write 0x82000000 0x800000 $filesize;
3597c78e4f7SPankaj Gupta
3607c78e4f7SPankaj Gupta   --  Then reset to alternate bank to boot up ATF.
3617c78e4f7SPankaj Gupta
362*6e4e294aSJiafei Pan   Command for lx2160a, ls1088a and ls1028a platforms:
363168a2012SJiafei Pan
3647c78e4f7SPankaj Gupta   .. code:: shell
3657c78e4f7SPankaj Gupta
3667c78e4f7SPankaj Gupta        qixisreset altbank;
3677c78e4f7SPankaj Gupta
368a3aeb4c8SJiafei Pan   Command for ls1046a platforms:
369a3aeb4c8SJiafei Pan
370a3aeb4c8SJiafei Pan   .. code:: shell
371a3aeb4c8SJiafei Pan
372a3aeb4c8SJiafei Pan        cpld reset altbank;
373a3aeb4c8SJiafei Pan
3747c78e4f7SPankaj Gupta-  Deploy ATF images on SD/eMMC from U-Boot prompt.
3757c78e4f7SPankaj Gupta   -- file_size_in_block_sizeof_512 = (Size_of_bytes_tftp / 512)
3767c78e4f7SPankaj Gupta
3777c78e4f7SPankaj Gupta   .. code:: shell
3787c78e4f7SPankaj Gupta
3797c78e4f7SPankaj Gupta        mmc dev <idx>; (idx = 1 for eMMC; idx = 0 for SD)
3807c78e4f7SPankaj Gupta
3817c78e4f7SPankaj Gupta        tftp 82000000  $path/bl2_<sd>_or_<emmc>.pbl;
3827c78e4f7SPankaj Gupta        mmc write 82000000 8 <file_size_in_block_sizeof_512>;
3837c78e4f7SPankaj Gupta
3847c78e4f7SPankaj Gupta        tftp 82000000  $path/fip.bin;
3857c78e4f7SPankaj Gupta        mmc write 82000000 0x800 <file_size_in_block_sizeof_512>;
3867c78e4f7SPankaj Gupta
3877c78e4f7SPankaj Gupta    --  Next step is valid for platform that needs FIP-DDR.
3887c78e4f7SPankaj Gupta
3897c78e4f7SPankaj Gupta   .. code:: shell
3907c78e4f7SPankaj Gupta
3917c78e4f7SPankaj Gupta        tftp 82000000  $path/ddr_fip.bin;
3927c78e4f7SPankaj Gupta        mmc write 82000000 0x4000 <file_size_in_block_sizeof_512>;
3937c78e4f7SPankaj Gupta
3947c78e4f7SPankaj Gupta   --  Then reset to sd/emmc to boot up ATF from sd/emmc as boot-source.
3957c78e4f7SPankaj Gupta
396*6e4e294aSJiafei Pan   Command for lx2160A, ls1088a and ls1028a platforms:
397168a2012SJiafei Pan
3987c78e4f7SPankaj Gupta   .. code:: shell
3997c78e4f7SPankaj Gupta
4007c78e4f7SPankaj Gupta        qixisreset <sd or emmc>;
4017c78e4f7SPankaj Gupta
402a3aeb4c8SJiafei Pan   Command for ls1043a and ls1046a platform:
403168a2012SJiafei Pan
404168a2012SJiafei Pan   .. code:: shell
405168a2012SJiafei Pan
406168a2012SJiafei Pan        cpld reset <sd or emmc>;
407168a2012SJiafei Pan
408168a2012SJiafei Pan-  Deploy ATF images on IFC nor flash from U-Boot prompt.
409168a2012SJiafei Pan
410168a2012SJiafei Pan   .. code:: shell
411168a2012SJiafei Pan
412168a2012SJiafei Pan        tftp 82000000  $path/bl2_nor.pbl;
413168a2012SJiafei Pan	protect off 64000000 +$filesize; erase 64000000 +$filesize; cp.b 82000000 64000000 $filesize;
414168a2012SJiafei Pan
415168a2012SJiafei Pan        tftp 82000000  $path/fip.bin;
416168a2012SJiafei Pan	protect off 64100000 +$filesize; erase 64100000 +$filesize; cp.b 82000000 64100000 $filesize;
417168a2012SJiafei Pan
418168a2012SJiafei Pan   --  Then reset to alternate bank to boot up ATF.
419168a2012SJiafei Pan
420168a2012SJiafei Pan   Command for ls1043a platform:
421168a2012SJiafei Pan
422168a2012SJiafei Pan   .. code:: shell
423168a2012SJiafei Pan
424168a2012SJiafei Pan        cpld reset altbank;
425168a2012SJiafei Pan
426168a2012SJiafei Pan-  Deploy ATF images on IFC nand flash from U-Boot prompt.
427168a2012SJiafei Pan
428168a2012SJiafei Pan   .. code:: shell
429168a2012SJiafei Pan
430168a2012SJiafei Pan        tftp 82000000  $path/bl2_nand.pbl;
431168a2012SJiafei Pan	nand erase 0x0 $filesize; nand write 82000000 0x0 $filesize;
432168a2012SJiafei Pan
433168a2012SJiafei Pan        tftp 82000000  $path/fip.bin;
434168a2012SJiafei Pan	nand erase 0x100000 $filesize;nand write 82000000 0x100000 $filesize;
435168a2012SJiafei Pan
436168a2012SJiafei Pan   --  Then reset to nand flash to boot up ATF.
437168a2012SJiafei Pan
438168a2012SJiafei Pan   Command for ls1043a platform:
439168a2012SJiafei Pan
440168a2012SJiafei Pan   .. code:: shell
441168a2012SJiafei Pan
442168a2012SJiafei Pan        cpld reset nand;
443168a2012SJiafei Pan
444168a2012SJiafei Pan
445168a2012SJiafei Pan
4467c78e4f7SPankaj GuptaTrusted Board Boot:
4477c78e4f7SPankaj Gupta===================
4487c78e4f7SPankaj Gupta
4497c78e4f7SPankaj GuptaFor TBBR, the binary name changes:
4507c78e4f7SPankaj Gupta
4517c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4527c78e4f7SPankaj Gupta|  Boot Type  |           BL2            |   FIP   |      FIP-DDR      |
4537c78e4f7SPankaj Gupta+=============+==========================+=========+===================+
4547c78e4f7SPankaj Gupta| Normal Boot |  bl2_<boot_mode>.pbl     | fip.bin | ddr_fip.bin       |
4557c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4567c78e4f7SPankaj Gupta| TBBR Boot   |  bl2_<boot_mode>_sec.pbl | fip.bin | ddr_fip_sec.bin   |
4577c78e4f7SPankaj Gupta+-------------+--------------------------+---------+-------------------+
4587c78e4f7SPankaj Gupta
4597c78e4f7SPankaj GuptaRefer `nxp-ls-tbbr.rst`_ for detailed user steps.
4607c78e4f7SPankaj Gupta
4617c78e4f7SPankaj Gupta
46252a1e9ffSJiafei Pan.. _lx2160a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-lx2160a-lx2120a-lx2080a-processors:LX2160A
4637c78e4f7SPankaj Gupta.. _lx2160ardb: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-communication-process/layerscape-lx2160a-multicore-communications-processor:LX2160A
46452a1e9ffSJiafei Pan.. _ls1028a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1028a-applications-processor:LS1028A
46552a1e9ffSJiafei Pan.. _ls1028ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1028a-reference-design-board:LS1028ARDB
466168a2012SJiafei Pan.. _ls1043a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1043a-and-1023a-processors:LS1043A
467168a2012SJiafei Pan.. _ls1043ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1043a-reference-design-board:LS1043A-RDB
468a3aeb4c8SJiafei Pan.. _ls1046a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1046a-and-1026a-processors:LS1046A
469a3aeb4c8SJiafei Pan.. _ls1046ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1046a-reference-design-board:LS1046A-RDB
470a3aeb4c8SJiafei Pan.. _ls1046afrwy: https://www.nxp.com/design/qoriq-developer-resources/ls1046a-freeway-board:FRWY-LS1046A
471*6e4e294aSJiafei Pan.. _ls1088a: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-1088a-and-1048a-processor:LS1088A
472*6e4e294aSJiafei Pan.. _ls1088ardb: https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1088a-reference-design-board:LS1088A-RDB
4737c78e4f7SPankaj Gupta.. _nxp-ls-tbbr.rst: ./nxp-ls-tbbr.rst
474