blob: 16c2e57d09dee91d21c79bc70e1e2af04703d742 [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
Nishanth Menoneaa39c62023-11-01 15:56:03 -050020K2K: https://www.ti.com/product/tci6638k2k
21K2H: https://www.ti.com/product/tci6638k2h
Neha Malcom Francisb61ad152023-09-08 15:06:16 +053022
23The K2E SoC details are available at
Nishanth Menoneaa39c62023-11-01 15:56:03 -050024 https://www.ti.com/lit/ds/symlink/66ak2e05.pdf
Neha Malcom Francisb61ad152023-09-08 15:06:16 +053025
26The K2L SoC details are available at
Nishanth Menoneaa39c62023-11-01 15:56:03 -050027 https://www.ti.com/lit/ds/symlink/tci6630k2l.pdf
Neha Malcom Francisb61ad152023-09-08 15:06:16 +053028
29The K2G SoC details are available at
Nishanth Menoneaa39c62023-11-01 15:56:03 -050030 https://www.ti.com/lit/ds/symlink/66ak2g02.pdf
Neha Malcom Francisb61ad152023-09-08 15:06:16 +053031
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
Nishanth Menon740c41c2023-11-02 23:40:25 -0500125.. prompt:: bash $
Neha Malcom Francisb61ad152023-09-08 15:06:16 +0530126
127 make k2hk_evm_defconfig
128 make
129
130Load and Run U-Boot on Keystone EVMs using CCS
131----------------------------------------------
132
133Need Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
134on EVM? See instructions at below link for installing CCS on a Windows PC.
135
136 `<http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Getting_Started#Installing_Code_Composer_Studio>`_
137
138Use u-boot.bin from the build folder for loading and running U-Boot binary
139on EVM. Follow instructions at:
140
141 - K2HK http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup
142 - K2E http://processors.wiki.ti.com/index.php/EVMK2E_Hardware_Setup
143 - K2L http://processors.wiki.ti.com/index.php/TCIEVMK2L_Hardware_Setup
144 - K2G http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
145
146to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
147and Power ON the EVM. Follow instructions to connect serial port of EVM to
148PC and start TeraTerm or Hyper Terminal.
149
150Start CCS on a Windows machine and Launch Target configuration as instructed at
151
152 `<http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS>`_
153
154The instructions provided in the above link uses a script for
155loading the U-Boot binary on the target EVM. Instead do the following:-
156
157#. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
158 is connected: Unknown)" at the debug window (This is created once Target
159 configuration is launched) and select "Connect Target".
160#. Once target connect is successful, choose Tools->Load Memory option from the
161 top level menu. At the Load Memory window, choose the file u-boot.bin
162 through "Browse" button and click "next >" button. In the next window, enter
163 Start address as 0xc000000, choose Type-size "32 bits" and click "Finish"
164 button.
165#. Click View -> Registers from the top level menu to view registers window.
166#. From Registers, window expand "Core Registers" to view PC. Edit PC value
167 to be 0xc000000. From the "Run" top level menu, select "Free Run"
168#. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
169 below and type any key to stop autoboot as instructed.
170
171.. code-block:: bash
172
173 U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
174
175 I2C: ready
176 Detected SO-DIMM [SQR-SD3T-2G1333SED]
177 DRAM: 1.1 GiB
178 NAND: 512 MiB
179 Net: K2HK_EMAC
180 Warning: K2HK_EMAC using MAC address from net device
181 , K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
182 Hit any key to stop autoboot: 0
183
184SPI NOR Flash Programming Instructions
185--------------------------------------
186
187U-Boot image can be flashed to first 512KB of the NOR flash using following
188instructions:
189
1901. Start CCS and run U-Boot as described above.
1912. Suspend Target. Select Run -> Suspend from top level menu
192 CortexA15_1 (Free Running)"
1933. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
194 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
195 EVM using CCS", but using address 0x87000000.
1964. Free Run the target as described earlier (step 4) to get U-Boot prompt
1975. At the U-Boot console type following to setup U-Boot environment variables.
198
Nishanth Menon740c41c2023-11-02 23:40:25 -0500199.. prompt:: bash =>
Neha Malcom Francisb61ad152023-09-08 15:06:16 +0530200
201 setenv addr_uboot 0x87000000
202 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
203 run burn_uboot_spi
204
205Once U-Boot prompt is available, power off the EVM. Set the SW1 dip switch to
206"SPI Little Endian Boot mode" as per instruction at
207
208 `<http://processors.wiki.ti.com/index.php/*_Hardware_Setup>`_
209
2106. Power ON the EVM. The EVM now boots with U-Boot image on the NOR flash.
211
212AEMIF NAND Flash programming instructions
213-----------------------------------------
214
215U-Boot image can be flashed to first 1024KB of the NAND flash using following
216instructions:
217
2181. Start CCS and run U-Boot as described above.
2192. Suspend Target. Select Run -> Suspend from top level menu
220 CortexA15_1 (Free Running)"
2213. Load MLO binary from build folder on to DDR address 0x87000000
222 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
223 using CCS", but using address 0x87000000.
2244. Free Run the target as described earlier (step 4) to get U-Boot prompt
2255. At the U-Boot console type following to setup U-Boot environment variables.
226
Nishanth Menon740c41c2023-11-02 23:40:25 -0500227.. prompt:: bash =>
Neha Malcom Francisb61ad152023-09-08 15:06:16 +0530228
229 setenv filesize <size in hex of MLO rounded to hex 0x10000>
230 run burn_uboot_nand
231
232Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch to
233"ARM NAND Boot mode" as per instruction at
234
235 `<http://processors.wiki.ti.com/index.php/>`_
236
237under Hardware Setup
238
2396. Power ON the EVM. The EVM now boots with U-Boot image on the NAND flash.
240
241Load and Run U-Boot on keystone EVMs using UART download
242--------------------------------------------------------
243
244Open BMC and regular UART terminals.
245
2461. On the regular UART port start xmodem transfer of the u-boot.bin
2472. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
248
Nishanth Menon740c41c2023-11-02 23:40:25 -0500249.. prompt:: bash BMC>
Neha Malcom Francisb61ad152023-09-08 15:06:16 +0530250
Nishanth Menon740c41c2023-11-02 23:40:25 -0500251 bootmode #4
252 reboot
Neha Malcom Francisb61ad152023-09-08 15:06:16 +0530253
2543. When xmodem is complete you should see the U-Boot starts on the UART port
255
256Load and Run U-Boot on K2G EVMs using MMC
257-----------------------------------------
258
259Open BMC and regular UART terminals.
260
2611. Set the SW3 dip switch to "ARM MMC Boot mode" as per instruction at
262
263 `<http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup>`_
264
2652. Create SD card partitions as per steps given in Hardware Setup Guide.
2663. Copy MLO to Boot Partition.
2674. Insert SD card and Power on the EVM.
268 The EVM now boots with U-Boot image from SD card.
269
270Secure Boot
271-----------
272
273.. include:: am335x_evm.rst
274 :start-after: .. secure_boot_include_start_config_ti_secure_device
275 :end-before: .. secure_boot_include_end_config_ti_secure_device
276
277.. include:: am335x_evm.rst
278 :start-after: .. secure_boot_include_start_spl_boot
279 :end-before: .. secure_boot_include_end_spl_boot
280
281<IMAGE_FLAG> is currently ignored and reserved for future use.
282
283<INPUT_FILE> is the full path and filename of the public world boot
284loader binary file (only u-boot.bin is currently supported on
285Keystone2 devices, u-boot-spl.bin is not currently supported).
286
287<OUTPUT_FILE> is the full path and filename of the final secure image.
288The output binary images should be used in place of the standard
289non-secure binary images (see the platform-specific user's guides
290and releases notes for how the non-secure images are typically used)
291
292.. list-table::
293 :widths: 10 20
294 :header-rows: 0
295
296 * - u-boot_HS_MLO
297 - signed and encrypted boot image that can be used to
298 boot from all media. Secure boot from SPI NOR flash is not
299 currently supported.
300
301.. include:: am335x_evm.rst
302 :start-after: .. secure_boot_include_start_primary_u_boot
303 :end-before: .. secure_boot_include_end_primary_u_boot