blob: 35465d006121276ff26fb84f3533c084baf463a5 [file] [log] [blame]
Sean Anderson71230cd2022-03-22 16:59:10 -04001.. SPDX-License-Identifier: GPL-2.0+
2
3LS1046ARDB
4==========
5
6The LS1046A Reference Design Board (RDB) is a high-performance computing,
7evaluation, and development platform that supports the QorIQ LS1046A
8LayerScape Architecture processor. The LS1046ARDB provides SW development
9platform for the Freescale LS1046A processor series, with a complete
10debugging environment. The LS1046A RDB is lead-free and RoHS-compliant.
11
12LS1046A SoC Overview
13--------------------
14Please refer arch/arm/cpu/armv8/fsl-layerscape/doc/README.soc for LS1046A
15SoC overview.
16
17LS1046ARDB board Overview
18-------------------------
19- SERDES1 Connections, 4 lanes supporting:
20
21 - Lane0: 10GBase-R with x1 RJ45 connector
22 - Lane1: 10GBase-R Cage
23 - Lane2: SGMII.5
24 - Lane3: SGMII.6
25
26- SERDES2 Connections, 4 lanes supporting:
27
28 - Lane0: PCIe1 with miniPCIe slot
29 - Lane1: PCIe2 with PCIe x2 slot
30 - Lane2: PCIe3 with PCIe x4 slot
31 - Lane3: SATA
32
33- DDR Controller
34
35 - 8GB 64bits DDR4 SDRAM. Support rates of up to 2133MT/s
36
37- IFC/Local Bus
38
39 - One 512 MB NAND flash with ECC support
40 - CPLD connection
41
42- USB 3.0
43
44 - one Type A port, one Micro-AB port
45
46- SDHC: connects directly to a full SD/MMC slot
47- DSPI: 64 MB high-speed flash Memory for boot code and storage (up to 108MHz)
48- 4 I2C controllers
49- UART
50
51 - Two 4-pin serial ports at up to 115.2 Kbit/s
52 - Two DB9 D-Type connectors supporting one Serial port each
53
54- ARM JTAG support
55
56Memory map from core's view
57----------------------------
58
59================== ================== ================ =====
60Start Address End Address Description Size
61================== ================== ================ =====
62``0x00_0000_0000`` ``0x00_000F_FFFF`` Secure Boot ROM 1M
63``0x00_0100_0000`` ``0x00_0FFF_FFFF`` CCSRBAR 240M
64``0x00_1000_0000`` ``0x00_1000_FFFF`` OCRAM0 64K
65``0x00_1001_0000`` ``0x00_1001_FFFF`` OCRAM1 64K
66``0x00_2000_0000`` ``0x00_20FF_FFFF`` DCSR 16M
67``0x00_7E80_0000`` ``0x00_7E80_FFFF`` IFC - NAND Flash 64K
68``0x00_7FB0_0000`` ``0x00_7FB0_0FFF`` IFC - CPLD 4K
69``0x00_8000_0000`` ``0x00_FFFF_FFFF`` DRAM1 2G
70``0x05_0000_0000`` ``0x05_07FF_FFFF`` QMAN S/W Portal 128M
71``0x05_0800_0000`` ``0x05_0FFF_FFFF`` BMAN S/W Portal 128M
72``0x08_8000_0000`` ``0x09_FFFF_FFFF`` DRAM2 6G
73``0x40_0000_0000`` ``0x47_FFFF_FFFF`` PCI Express1 32G
74``0x48_0000_0000`` ``0x4F_FFFF_FFFF`` PCI Express2 32G
75``0x50_0000_0000`` ``0x57_FFFF_FFFF`` PCI Express3 32G
76================== ================== ================ =====
77
78QSPI flash map
79--------------
80
81================== ================== ================== =====
82Start Address End Address Description Size
83================== ================== ================== =====
84``0x00_4000_0000`` ``0x00_400F_FFFF`` RCW + PBI 1M
85``0x00_4010_0000`` ``0x00_402F_FFFF`` U-Boot 2M
86``0x00_4030_0000`` ``0x00_403F_FFFF`` U-Boot Env 1M
87``0x00_4040_0000`` ``0x00_405F_FFFF`` PPA 2M
88``0x00_4060_0000`` ``0x00_408F_FFFF`` Secure boot header 3M
89 + bootscript
90``0x00_4090_0000`` ``0x00_4093_FFFF`` FMan ucode 256K
91``0x00_4094_0000`` ``0x00_4097_FFFF`` QE/uQE firmware 256K
92``0x00_4098_0000`` ``0x00_40FF_FFFF`` Reserved 6M
93``0x00_4100_0000`` ``0x00_43FF_FFFF`` FIT Image 48M
94================== ================== ================== =====
95
96Booting Options
97---------------
Sean Andersonb5ec4172022-03-22 16:59:11 -040098
99NB: The reference manual documents the RCW source with the *least-significant
100bit first*.
101
102QSPI boot
103^^^^^^^^^
104
105This is the default. ``{ SW5[0:8], SW4[0] }`` should be ``0010_0010_0``.
106
107SD boot and eMMC boot
108^^^^^^^^^^^^^^^^^^^^^
109
110``{ SW5[0:8], SW4[0] }`` should be ``0010_0000_0``. eMMC is selected only if
111there is no SD card in the slot.
Sean Andersone5e982c2022-03-22 16:59:12 -0400112
Sean Anderson93c3d322022-03-22 17:16:05 -0400113.. _ls1046ardb_jtag:
114
115JTAG boot
116^^^^^^^^^
117
118To recover a bricked board, or to perform initial programming, the ls1046
119supports using two hard-coded Reset Configuration Words (RCWs). Unfortunately,
120this configuration disables most functionality, including the uarts and ethernet.
121However, the SD/MMC and flash controllers are still functional. To get around
122the lack of a serial console, we will use ARM semihosting instead. When
123enabled, OpenOCD will interpret certain instructions as calls to the host
124operating system. This allows U-Boot to use the console, read/write files, or
125run arbitrary commands (!).
126
127When configuring U-Boot, ensure that ``CONFIG_SEMIHOSTING``,
128``CONFIG_SPL_SEMIHOSTING``, and ``CONFIG_SEMIHOSTING_SERIAL`` are enabled.
129``{ SW5[0:8], SW4[0] }`` should be ``0100_1111_0``. Additionally, ``SW4[7]``
130should be set to ``0``. Connect to the "console" USB connector on the front of
131the enclosure.
132
133Create a new file called ``u-boot.tcl`` (or whatever you choose) with the
134following contents::
135
136 # Load the configuration for the LS1046ARDB
137 source [find board/nxp_rdb-ls1046a.cfg]
138 # Initialize the scan chain
139 init
140 # Stop the processor
141 halt
142 # Enable semihosting
143 arm semihosting enable
144 # Load U-Boot SPL
145 load_image spl/u-boot-spl 0 elf
146 # Start executing SPL at the beginning of OCRAM
147 resume 0x10000000
148
149Then, launch openocd like::
150
151 openocd -f u-boot.tcl
152
153You should see the U-boot SPL banner followed by the banner for U-Boot proper
154in the output of openocd. The CMSIS-DAP adapter is slow, so this can take a
155long time. If you don't see it, something has gone wrong. After a while, you
156should see the prompt. You can load an image using semihosting by running::
157
158 => load hostfs - $loadaddr <name of file>
159
160Note that openocd's terminal is "cooked," so commands will only be sent to
161U-Boot when you press enter, and all commands will be echoed twice.
162Additionally, openocd will block when waiting for input, ignoring gdb, JTAG
163events, and Ctrl-Cs. To make openocd process these events, just hit enter.
164
165Using an external JTAG adapter
166""""""""""""""""""""""""""""""
167
168The CMSIS-DAP adapter can be rather slow. To speed up booting, use an external
169JTAG adapter. The following examples assume you are using a J-Link, though any
170adapter supported by OpenOCD will do. Ensure that ``SW4[7]`` is ``1``. Attach
171your jtag adapter to J22. Modify ``u-boot.tcl`` and replace the first two lines
172with the following::
173
174 # Load the J-Link configuration (or whatever your adapter is)
175 source [find interface/jlink.cfg]
176 # Use JTAG, since the J-Link also supports SWD
177 transport select jtag
178 # The reset pin resets the whole CPU
179 reset_config srst_only
180 # Load the LS1046A config
181 source [find target/ls1046a.cfg]
182
183You can proceed as normal through the rest of the steps above. I got a speedup
184of around 100x by using a J-Link.
185
Sean Andersone5e982c2022-03-22 16:59:12 -0400186Debug UART
187----------
188
189To enable the debug UART, enable the following config options::
190
191 CONFIG_DEBUG_UART_NS16550=y
192 CONFIG_DEBUG_UART_BASE=0x21c0500
193 CONFIG_DEBUG_UART_CLOCK=300000000