blob: 5430c7daf2e95491f6337371b31c80e1fe1d056e [file] [log] [blame]
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03001U-Boot port for Texas Instruments Keystone II EVM boards
2========================================================
Vitaly Andrianovef509b92014-04-04 13:16:53 -04003
4Author: Murali Karicheri <m-karicheri2@ti.com>
5
Bin Menga1875592016-02-05 19:30:11 -08006This README has information on the U-Boot port for K2HK, K2E, and K2L EVM boards.
Vitaly Andrianovef509b92014-04-04 13:16:53 -04007Documentation for this board can be found at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03008http://www.advantech.com/Support/TI-EVM/EVMK2HX_sd.aspx
9https://www.einfochips.com/index.php/partnerships/texas-instruments/k2e-evm.html
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020010https://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html
Vitaly Andrianovef509b92014-04-04 13:16:53 -040011
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030012The K2HK board is based on Texas Instruments Keystone2 family of SoCs: K2H, K2K.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040013More details on these SoCs are available at company websites
14 K2K: http://www.ti.com/product/tci6638k2k
15 K2H: http://www.ti.com/product/tci6638k2h
16
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030017The K2E SoC details are available at
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020018 http://www.ti.com/lit/ds/symlink/66ak2e05.pdf
19
20The K2L SoC details are available at
21 http://www.ti.com/lit/ds/symlink/tci6630k2l.pdf
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030022
Lokesh Vutla01c50752016-09-06 09:10:37 +053023The K2G SoC details are available at
24 http://www.ti.com/lit/ds/symlink/66ak2g02.pdf
25
Vitaly Andrianovef509b92014-04-04 13:16:53 -040026Board configuration:
27====================
28
Bin Menga1875592016-02-05 19:30:11 -080029Some of the peripherals that are configured by U-Boot
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030030+------+-------+-------+-----------+-----------+-------+-------+----+
31| |DDR3 |NAND |MSM SRAM |ETH ports |UART |I2C |SPI |
32+------+-------+-------+-----------+-----------+-------+-------+----+
33|K2HK |2 |512MB |6MB |4(2) |2 |3 |3 |
34|K2E |4 |512MB |2MB |8(2) |2 |3 |3 |
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020035|K2L |2 |512MB |2MB |4(2) |4 |3 |3 |
Lokesh Vutla01c50752016-09-06 09:10:37 +053036|K2G |2 |256MB |1MB |1 |1 |1 |1 |
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030037+------+-------+-------+-----------+-----------+-------+-------+----+
Vitaly Andrianovef509b92014-04-04 13:16:53 -040038
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030039There are only 2 eth port installed on the boards.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040040
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030041There are separate PLLs to drive clocks to Tetris ARM and Peripherals.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040042To bring up SMP Linux on this board, there is a boot monitor
43code that will be installed in MSMC SRAM. There is command available
Bin Menga1875592016-02-05 19:30:11 -080044to install this image from U-Boot.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040045
46The port related files can be found at following folders
47 keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030048 EVMs board files: board/ti/k2s_evm/
Vitaly Andrianovef509b92014-04-04 13:16:53 -040049
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030050Board configuration files:
51include/configs/k2hk_evm.h
52include/configs/k2e_evm.h
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020053include/configs/k2l_evm.h
Lokesh Vutla01c50752016-09-06 09:10:37 +053054include/configs/k2g_evm.h
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030055
Bin Menga1875592016-02-05 19:30:11 -080056As U-Boot is migrating to Kconfig there is also board defconfig files
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030057configs/k2e_evm_defconfig
58configs/k2hk_evm_defconfig
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020059configs/k2l_evm_defconfig
Lokesh Vutla01c50752016-09-06 09:10:37 +053060configs/k2g_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040061
62Supported boot modes:
63 - SPI NOR boot
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030064 - AEMIF NAND boot
Lokesh Vutlabe8ce702015-08-17 19:54:52 +053065 - UART boot
Lokesh Vutla01c50752016-09-06 09:10:37 +053066 - MMC boot (Only on K2G)
Vitaly Andrianovef509b92014-04-04 13:16:53 -040067
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030068Supported image formats:
Lokesh Vutla01c50752016-09-06 09:10:37 +053069 - u-boot.bin: for loading and running u-boot.bin through
Lokesh Vutla1985abe2015-09-19 15:00:23 +053070 Texas Instruments code composure studio (CCS) and for UART boot.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040071 - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
Lokesh Vutla01c50752016-09-06 09:10:37 +053072 - MLO: gpimage for programming AEMIF NAND flash for NAND boot, MMC boot.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040073
74Build instructions:
75===================
Lokesh Vutla01c50752016-09-06 09:10:37 +053076Examples for k2hk, for k2e, k2l and k2g just replace k2hk prefix accordingly.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030077Don't forget to add ARCH=arm and CROSS_COMPILE.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040078
Lokesh Vutla01c50752016-09-06 09:10:37 +053079To build u-boot.bin, u-boot-spi.gph, MLO:
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030080 >make k2hk_evm_defconfig
Lokesh Vutlabe8ce702015-08-17 19:54:52 +053081 >make
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030082
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030083Load and Run U-Boot on keystone EVMs using CCS
Vitaly Andrianovef509b92014-04-04 13:16:53 -040084=========================================
85
Lokesh Vutla01c50752016-09-06 09:10:37 +053086Need Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
Vitaly Andrianovef509b92014-04-04 13:16:53 -040087on EVM. See instructions at below link for installing CCS on a Windows PC.
88http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Getting_Started#
89Installing_Code_Composer_Studio
Lokesh Vutla01c50752016-09-06 09:10:37 +053090Use u-boot.bin from the build folder for loading and running U-Boot binary
Vitaly Andrianovef509b92014-04-04 13:16:53 -040091on EVM. Follow instructions at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030092K2HK http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup
93K2E http://processors.wiki.ti.com/index.php/EVMK2E_Hardware_Setup
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020094K2L http://processors.wiki.ti.com/index.php/TCIEVMK2L_Hardware_Setup
Lokesh Vutla01c50752016-09-06 09:10:37 +053095K2G http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020096
Vitaly Andrianovef509b92014-04-04 13:16:53 -040097to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
98and Power ON the EVM. Follow instructions to connect serial port of EVM to
99PC and start TeraTerm or Hyper Terminal.
100
101Start CCS on a Windows machine and Launch Target
102configuration as instructed at http://processors.wiki.ti.com/index.php/
103MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS.
104The instructions provided in the above link uses a script for
Bin Menga1875592016-02-05 19:30:11 -0800105loading the U-Boot binary on the target EVM. Instead do the following:-
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400106
1071. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300108 is connected: Unknown)" at the debug window (This is created once Target
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400109 configuration is launched) and select "Connect Target".
1102. Once target connect is successful, choose Tools->Load Memory option from the
Lokesh Vutla01c50752016-09-06 09:10:37 +0530111 top level menu. At the Load Memory window, choose the file u-boot.bin
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400112 through "Browse" button and click "next >" button. In the next window, enter
Lokesh Vutla01c50752016-09-06 09:10:37 +0530113 Start address as 0xc000000, choose Type-size "32 bits" and click "Finish"
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400114 button.
1153. Click View -> Registers from the top level menu to view registers window.
1164. From Registers, window expand "Core Registers" to view PC. Edit PC value
Lokesh Vutla01c50752016-09-06 09:10:37 +0530117 to be 0xc000000. From the "Run" top level menu, select "Free Run"
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001185. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
119 below and type any key to stop autoboot as instructed :=
120
121U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
122
123I2C: ready
124Detected SO-DIMM [SQR-SD3T-2G1333SED]
125DRAM: 1.1 GiB
126NAND: 512 MiB
127Net: K2HK_EMAC
128Warning: K2HK_EMAC using MAC address from net device
129, K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
130Hit any key to stop autoboot: 0
131
132SPI NOR Flash programming instructions
133======================================
134U-Boot image can be flashed to first 512KB of the NOR flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300135instructions:
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400136
Bin Menga1875592016-02-05 19:30:11 -08001371. Start CCS and run U-Boot as described above.
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001382. Suspend Target. Select Run -> Suspend from top level menu
139 CortexA15_1 (Free Running)"
1403. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +0200141 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
142 EVM using CCS", but using address 0x87000000.
Bin Menga1875592016-02-05 19:30:11 -08001434. Free Run the target as described earlier (step 4) to get U-Boot prompt
1445. At the U-Boot console type following to setup U-Boot environment variables.
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400145 setenv addr_uboot 0x87000000
146 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300147 run burn_uboot_spi
Bin Menga1875592016-02-05 19:30:11 -0800148 Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400149 to "SPI Little Endian Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300150 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Bin Menga1875592016-02-05 19:30:11 -08001516. Power ON the EVM. The EVM now boots with U-Boot image on the NOR flash.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300152
153AEMIF NAND Flash programming instructions
154======================================
155U-Boot image can be flashed to first 1024KB of the NAND flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300156instructions:
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300157
Bin Menga1875592016-02-05 19:30:11 -08001581. Start CCS and run U-Boot as described above.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +03001592. Suspend Target. Select Run -> Suspend from top level menu
160 CortexA15_1 (Free Running)"
Lokesh Vutla5f586e92015-08-17 19:54:50 +05301613. Load MLO binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300162 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
163 using CCS", but using address 0x87000000.
Bin Menga1875592016-02-05 19:30:11 -08001644. Free Run the target as described earlier (step 4) to get U-Boot prompt
1655. At the U-Boot console type following to setup U-Boot environment variables.
Lokesh Vutla5f586e92015-08-17 19:54:50 +0530166 setenv filesize <size in hex of MLO rounded to hex 0x10000>
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300167 run burn_uboot_nand
Bin Menga1875592016-02-05 19:30:11 -0800168 Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300169 to "ARM NAND Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300170 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Bin Menga1875592016-02-05 19:30:11 -08001716. Power ON the EVM. The EVM now boots with U-Boot image on the NAND flash.
Lokesh Vutlabe8ce702015-08-17 19:54:52 +0530172
173Load and Run U-Boot on keystone EVMs using UART download
174========================================================
175
176Open BMC and regular UART terminals.
177
Lokesh Vutla01c50752016-09-06 09:10:37 +05301781. On the regular UART port start xmodem transfer of the u-boot.bin
Lokesh Vutlabe8ce702015-08-17 19:54:52 +05301792. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
180 BMC> bootmode #4
181 MBC> reboot
Bin Menga1875592016-02-05 19:30:11 -08001823. When xmodem is complete you should see the U-Boot starts on the UART port
Lokesh Vutla01c50752016-09-06 09:10:37 +0530183
184Load and Run U-Boot on K2G EVMs using MMC
185========================================================
186
187Open BMC and regular UART terminals.
188
1891. Set the SW3 dip switch to "ARM MMC Boot mode" as per instruction at
190 http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
1912. Create SD card partitions as per steps given in Hardware Setup Guide.
1923. Copy MLO to Boot Partition.
1934. Insert SD card and Power on the EVM.
194 The EVM now boots with U-Boot image from SD card.