blob: b8247256e91229231e74a7c32fefb827d82c4f61 [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
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +02006This 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
Vitaly Andrianovef509b92014-04-04 13:16:53 -040023Board configuration:
24====================
25
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030026Some of the peripherals that are configured by u-boot
27+------+-------+-------+-----------+-----------+-------+-------+----+
28| |DDR3 |NAND |MSM SRAM |ETH ports |UART |I2C |SPI |
29+------+-------+-------+-----------+-----------+-------+-------+----+
30|K2HK |2 |512MB |6MB |4(2) |2 |3 |3 |
31|K2E |4 |512MB |2MB |8(2) |2 |3 |3 |
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020032|K2L |2 |512MB |2MB |4(2) |4 |3 |3 |
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030033+------+-------+-------+-----------+-----------+-------+-------+----+
Vitaly Andrianovef509b92014-04-04 13:16:53 -040034
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030035There are only 2 eth port installed on the boards.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040036
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030037There are separate PLLs to drive clocks to Tetris ARM and Peripherals.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040038To bring up SMP Linux on this board, there is a boot monitor
39code that will be installed in MSMC SRAM. There is command available
40to install this image from u-boot.
41
42The port related files can be found at following folders
43 keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030044 EVMs board files: board/ti/k2s_evm/
Vitaly Andrianovef509b92014-04-04 13:16:53 -040045
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030046Board configuration files:
47include/configs/k2hk_evm.h
48include/configs/k2e_evm.h
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020049include/configs/k2l_evm.h
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030050
51As u-boot is migrating to Kconfig there is also board defconfig files
52configs/k2e_evm_defconfig
53configs/k2hk_evm_defconfig
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020054configs/k2l_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040055
56Supported boot modes:
57 - SPI NOR boot
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030058 - AEMIF NAND boot
Vitaly Andrianovef509b92014-04-04 13:16:53 -040059
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030060Supported image formats:
Vitaly Andrianovef509b92014-04-04 13:16:53 -040061 - u-boot.bin: for loading and running u-boot.bin through Texas instruments
62 code composure studio (CCS)
63 - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
Lokesh Vutla5f586e92015-08-17 19:54:50 +053064 - MLO: gpimage for programming AEMIF NAND flash for NAND boot
Vitaly Andrianovef509b92014-04-04 13:16:53 -040065
66Build instructions:
67===================
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +020068Examples for k2hk, for k2e and k2l just replace k2hk prefix accordingly.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030069Don't forget to add ARCH=arm and CROSS_COMPILE.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040070
71To build u-boot.bin
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030072 >make k2hk_evm_defconfig
Nishanth Menon3c963d22015-07-16 10:14:49 -050073 >make u-boot.bin
Vitaly Andrianovef509b92014-04-04 13:16:53 -040074
75To build u-boot-spi.gph
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030076 >make k2hk_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040077 >make u-boot-spi.gph
78
Lokesh Vutla5f586e92015-08-17 19:54:50 +053079To build MLO
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030080 >make k2hk_evm_defconfig
Lokesh Vutla5f586e92015-08-17 19:54:50 +053081 >make MLO
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
86Need Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
87on 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
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030090Use 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
95
Vitaly Andrianovef509b92014-04-04 13:16:53 -040096to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
97and Power ON the EVM. Follow instructions to connect serial port of EVM to
98PC and start TeraTerm or Hyper Terminal.
99
100Start CCS on a Windows machine and Launch Target
101configuration as instructed at http://processors.wiki.ti.com/index.php/
102MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS.
103The instructions provided in the above link uses a script for
104loading the u-boot binary on the target EVM. Instead do the following:-
105
1061. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300107 is connected: Unknown)" at the debug window (This is created once Target
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400108 configuration is launched) and select "Connect Target".
1092. Once target connect is successful, choose Tools->Load Memory option from the
110 top level menu. At the Load Memory window, choose the file u-boot.bin
111 through "Browse" button and click "next >" button. In the next window, enter
112 Start address as 0xc001000, choose Type-size "32 bits" and click "Finish"
113 button.
1143. Click View -> Registers from the top level menu to view registers window.
1154. From Registers, window expand "Core Registers" to view PC. Edit PC value
116 to be 0xc001000. From the "Run" top level menu, select "Free Run"
1175. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
118 below and type any key to stop autoboot as instructed :=
119
120U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
121
122I2C: ready
123Detected SO-DIMM [SQR-SD3T-2G1333SED]
124DRAM: 1.1 GiB
125NAND: 512 MiB
126Net: K2HK_EMAC
127Warning: K2HK_EMAC using MAC address from net device
128, K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
129Hit any key to stop autoboot: 0
130
131SPI NOR Flash programming instructions
132======================================
133U-Boot image can be flashed to first 512KB of the NOR flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300134instructions:
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400135
1361. Start CCS and run U-boot as described above.
1372. Suspend Target. Select Run -> Suspend from top level menu
138 CortexA15_1 (Free Running)"
1393. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivan4de96c72014-10-29 13:21:22 +0200140 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
141 EVM using CCS", but using address 0x87000000.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03001424. Free Run the target as described earlier (step 4) to get u-boot prompt
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001435. At the U-Boot console type following to setup u-boot environment variables.
144 setenv addr_uboot 0x87000000
145 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300146 run burn_uboot_spi
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400147 Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
148 to "SPI Little Endian Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300149 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001506. Power ON the EVM. The EVM now boots with u-boot image on the NOR flash.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300151
152AEMIF NAND Flash programming instructions
153======================================
154U-Boot image can be flashed to first 1024KB of the NAND flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300155instructions:
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300156
1571. Start CCS and run U-boot as described above.
1582. Suspend Target. Select Run -> Suspend from top level menu
159 CortexA15_1 (Free Running)"
Lokesh Vutla5f586e92015-08-17 19:54:50 +05301603. Load MLO binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300161 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
162 using CCS", but using address 0x87000000.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03001634. Free Run the target as described earlier (step 4) to get u-boot prompt
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +03001645. At the U-Boot console type following to setup u-boot environment variables.
Lokesh Vutla5f586e92015-08-17 19:54:50 +0530165 setenv filesize <size in hex of MLO rounded to hex 0x10000>
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300166 run burn_uboot_nand
167 Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
168 to "ARM NAND Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300169 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +03001706. Power ON the EVM. The EVM now boots with u-boot image on the NAND flash.