blob: 0a789037a6a8da90e443e28f4ae2affe751e5e4f [file] [log] [blame]
Neha Malcom Francisb61ad152023-09-08 15:06:16 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Neha Malcom Francis <n-francis@ti.com>
3
4Keystone II EVM Generation
5==========================
6
7Summary
8-------
9
10This README has information on the U-Boot port for K2HK, K2E, and K2L EVM boards.
11Documentation for this board can be found at:
12
13 - http://www.advantech.com/Support/TI-EVM/EVMK2HX_sd.aspx
14 - https://www.einfochips.com/index.php/partnerships/texas-instruments/k2e-evm.html
15 - https://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html
16
17The K2HK board is based on Texas Instruments Keystone2 family of SoCs: K2H, K2K.
18More details on these SoCs are available at company websites:
19
20K2K: http://www.ti.com/product/tci6638k2k
21K2H: http://www.ti.com/product/tci6638k2h
22
23The K2E SoC details are available at
24 http://www.ti.com/lit/ds/symlink/66ak2e05.pdf
25
26The K2L SoC details are available at
27 http://www.ti.com/lit/ds/symlink/tci6630k2l.pdf
28
29The K2G SoC details are available at
30 http://www.ti.com/lit/ds/symlink/66ak2g02.pdf
31
32Board Configuration
33-------------------
34
35Some of the peripherals that are configured by U-Boot
36
37.. list-table::
38 :widths: 10 10 10 10 10 10 10 10
39 :header-rows: 1
40
41 * -
42 - DDR3
43 - NAND
44 - MSM SRAM
45 - ETH Ports
46 - UART
47 - I2C
48 - SPI
49 * - K2HK
50 - 2
51 - 512MB
52 - 6MB
53 - 4(2)
54 - 2
55 - 3
56 - 3
57 * - K2E
58 - 4
59 - 512MB
60 - 2MB
61 - 8(2)
62 - 2
63 - 3
64 - 3
65 * - K2L
66 - 2
67 - 512MB
68 - 2MB
69 - 4(2)
70 - 4
71 - 3
72 - 3
73 * - K2G
74 - 2
75 - 256MB
76 - 1MB
77 - 1
78 - 1
79 - 1
80 - 1
81
82There are only 2 eth port installed on the boards.
83
84There are separate PLLs to drive clocks to Tetris ARM and Peripherals.
85To bring up SMP Linux on this board, there is a boot monitor
86code that will be installed in MSMC SRAM. There is command available
87to install this image from U-Boot.
88
89The port related files can be found at following folders:
90 - keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
91 - EVMs board files: board/ti/k2s_evm/
92
93Board configuration files:
94 - include/configs/k2hk_evm.h
95 - include/configs/k2e_evm.h
96 - include/configs/k2l_evm.h
97 - include/configs/k2g_evm.h
98
99As U-Boot is migrating to Kconfig there is also board defconfig files
100 - configs/k2e_evm_defconfig
101 - configs/k2hk_evm_defconfig
102 - configs/k2l_evm_defconfig
103 - configs/k2g_evm_defconfig
104
105Supported boot modes:
106 - SPI NOR boot
107 - AEMIF NAND boot (K2E, K2L and K2HK)
108 - UART boot
109 - MMC boot (Only on K2G)
110
111Supported image formats:
112 - u-boot.bin: for loading and running u-boot.bin through Texas Instruments Code
113 Composer Studio (CCS) and for UART boot.
114 - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
115 - MLO: gpimage for programming NAND flash for NAND boot, MMC boot.
116
117Build Instructions
118------------------
119
120Examples for k2hk, for k2e, k2l and k2g just replace k2hk prefix accordingly.
121Don't forget to add CROSS_COMPILE.
122
123To build u-boot.bin, u-boot-spi.gph, MLO:
124
125.. prompt:: bash
126 :prompts: $
127
128 make k2hk_evm_defconfig
129 make
130
131Load and Run U-Boot on Keystone EVMs using CCS
132----------------------------------------------
133
134Need Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
135on EVM? See instructions at below link for installing CCS on a Windows PC.
136
137 `<http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Getting_Started#Installing_Code_Composer_Studio>`_
138
139Use u-boot.bin from the build folder for loading and running U-Boot binary
140on EVM. Follow instructions at:
141
142 - K2HK http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup
143 - K2E http://processors.wiki.ti.com/index.php/EVMK2E_Hardware_Setup
144 - K2L http://processors.wiki.ti.com/index.php/TCIEVMK2L_Hardware_Setup
145 - K2G http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
146
147to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
148and Power ON the EVM. Follow instructions to connect serial port of EVM to
149PC and start TeraTerm or Hyper Terminal.
150
151Start CCS on a Windows machine and Launch Target configuration as instructed at
152
153 `<http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS>`_
154
155The instructions provided in the above link uses a script for
156loading the U-Boot binary on the target EVM. Instead do the following:-
157
158#. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
159 is connected: Unknown)" at the debug window (This is created once Target
160 configuration is launched) and select "Connect Target".
161#. Once target connect is successful, choose Tools->Load Memory option from the
162 top level menu. At the Load Memory window, choose the file u-boot.bin
163 through "Browse" button and click "next >" button. In the next window, enter
164 Start address as 0xc000000, choose Type-size "32 bits" and click "Finish"
165 button.
166#. Click View -> Registers from the top level menu to view registers window.
167#. From Registers, window expand "Core Registers" to view PC. Edit PC value
168 to be 0xc000000. From the "Run" top level menu, select "Free Run"
169#. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
170 below and type any key to stop autoboot as instructed.
171
172.. code-block:: bash
173
174 U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
175
176 I2C: ready
177 Detected SO-DIMM [SQR-SD3T-2G1333SED]
178 DRAM: 1.1 GiB
179 NAND: 512 MiB
180 Net: K2HK_EMAC
181 Warning: K2HK_EMAC using MAC address from net device
182 , K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
183 Hit any key to stop autoboot: 0
184
185SPI NOR Flash Programming Instructions
186--------------------------------------
187
188U-Boot image can be flashed to first 512KB of the NOR flash using following
189instructions:
190
1911. Start CCS and run U-Boot as described above.
1922. Suspend Target. Select Run -> Suspend from top level menu
193 CortexA15_1 (Free Running)"
1943. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
195 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
196 EVM using CCS", but using address 0x87000000.
1974. Free Run the target as described earlier (step 4) to get U-Boot prompt
1985. At the U-Boot console type following to setup U-Boot environment variables.
199
200.. prompt:: bash
201 :prompts: =>
202
203 setenv addr_uboot 0x87000000
204 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
205 run burn_uboot_spi
206
207Once U-Boot prompt is available, power off the EVM. Set the SW1 dip switch to
208"SPI Little Endian Boot mode" as per instruction at
209
210 `<http://processors.wiki.ti.com/index.php/*_Hardware_Setup>`_
211
2126. Power ON the EVM. The EVM now boots with U-Boot image on the NOR flash.
213
214AEMIF NAND Flash programming instructions
215-----------------------------------------
216
217U-Boot image can be flashed to first 1024KB of the NAND flash using following
218instructions:
219
2201. Start CCS and run U-Boot as described above.
2212. Suspend Target. Select Run -> Suspend from top level menu
222 CortexA15_1 (Free Running)"
2233. Load MLO binary from build folder on to DDR address 0x87000000
224 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
225 using CCS", but using address 0x87000000.
2264. Free Run the target as described earlier (step 4) to get U-Boot prompt
2275. At the U-Boot console type following to setup U-Boot environment variables.
228
229.. prompt:: bash
230 :prompts: =>
231
232 setenv filesize <size in hex of MLO rounded to hex 0x10000>
233 run burn_uboot_nand
234
235Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch to
236"ARM NAND Boot mode" as per instruction at
237
238 `<http://processors.wiki.ti.com/index.php/>`_
239
240under Hardware Setup
241
2426. Power ON the EVM. The EVM now boots with U-Boot image on the NAND flash.
243
244Load and Run U-Boot on keystone EVMs using UART download
245--------------------------------------------------------
246
247Open BMC and regular UART terminals.
248
2491. On the regular UART port start xmodem transfer of the u-boot.bin
2502. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
251
252.. prompt:: bash
253
254 BMC> bootmode #4
255 MBC> reboot
256
2573. When xmodem is complete you should see the U-Boot starts on the UART port
258
259Load and Run U-Boot on K2G EVMs using MMC
260-----------------------------------------
261
262Open BMC and regular UART terminals.
263
2641. Set the SW3 dip switch to "ARM MMC Boot mode" as per instruction at
265
266 `<http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup>`_
267
2682. Create SD card partitions as per steps given in Hardware Setup Guide.
2693. Copy MLO to Boot Partition.
2704. Insert SD card and Power on the EVM.
271 The EVM now boots with U-Boot image from SD card.
272
273Secure Boot
274-----------
275
276.. include:: am335x_evm.rst
277 :start-after: .. secure_boot_include_start_config_ti_secure_device
278 :end-before: .. secure_boot_include_end_config_ti_secure_device
279
280.. include:: am335x_evm.rst
281 :start-after: .. secure_boot_include_start_spl_boot
282 :end-before: .. secure_boot_include_end_spl_boot
283
284<IMAGE_FLAG> is currently ignored and reserved for future use.
285
286<INPUT_FILE> is the full path and filename of the public world boot
287loader binary file (only u-boot.bin is currently supported on
288Keystone2 devices, u-boot-spl.bin is not currently supported).
289
290<OUTPUT_FILE> is the full path and filename of the final secure image.
291The output binary images should be used in place of the standard
292non-secure binary images (see the platform-specific user's guides
293and releases notes for how the non-secure images are typically used)
294
295.. list-table::
296 :widths: 10 20
297 :header-rows: 0
298
299 * - u-boot_HS_MLO
300 - signed and encrypted boot image that can be used to
301 boot from all media. Secure boot from SPI NOR flash is not
302 currently supported.
303
304.. include:: am335x_evm.rst
305 :start-after: .. secure_boot_include_start_primary_u_boot
306 :end-before: .. secure_boot_include_end_primary_u_boot