blob: a551e2869a3858f17111cb8f5614522c1b24ec97 [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, Ivana79c9112014-10-09 22:21:14 +03006This README has information on the u-boot port for K2HK, K2E 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
Vitaly Andrianovef509b92014-04-04 13:16:53 -040010
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030011The K2HK board is based on Texas Instruments Keystone2 family of SoCs: K2H, K2K.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040012More details on these SoCs are available at company websites
13 K2K: http://www.ti.com/product/tci6638k2k
14 K2H: http://www.ti.com/product/tci6638k2h
15
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030016The K2E SoC details are available at
17 K2E http://www.ti.com/lit/ds/symlink/66ak2e05.pdf
18
Vitaly Andrianovef509b92014-04-04 13:16:53 -040019Board configuration:
20====================
21
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030022Some of the peripherals that are configured by u-boot
23+------+-------+-------+-----------+-----------+-------+-------+----+
24| |DDR3 |NAND |MSM SRAM |ETH ports |UART |I2C |SPI |
25+------+-------+-------+-----------+-----------+-------+-------+----+
26|K2HK |2 |512MB |6MB |4(2) |2 |3 |3 |
27|K2E |4 |512MB |2MB |8(2) |2 |3 |3 |
28+------+-------+-------+-----------+-----------+-------+-------+----+
Vitaly Andrianovef509b92014-04-04 13:16:53 -040029
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030030There are only 2 eth port installed on the boards.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040031
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030032There are separate PLLs to drive clocks to Tetris ARM and Peripherals.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040033To bring up SMP Linux on this board, there is a boot monitor
34code that will be installed in MSMC SRAM. There is command available
35to install this image from u-boot.
36
37The port related files can be found at following folders
38 keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030039 EVMs board files: board/ti/k2s_evm/
Vitaly Andrianovef509b92014-04-04 13:16:53 -040040
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030041Board configuration files:
42include/configs/k2hk_evm.h
43include/configs/k2e_evm.h
44
45As u-boot is migrating to Kconfig there is also board defconfig files
46configs/k2e_evm_defconfig
47configs/k2hk_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040048
49Supported boot modes:
50 - SPI NOR boot
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030051 - AEMIF NAND boot
Vitaly Andrianovef509b92014-04-04 13:16:53 -040052
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030053Supported image formats:
Vitaly Andrianovef509b92014-04-04 13:16:53 -040054 - u-boot.bin: for loading and running u-boot.bin through Texas instruments
55 code composure studio (CCS)
56 - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030057 - u-boot-nand.gph: gpimage for programming AEMIF NAND flash for NAND boot
Vitaly Andrianovef509b92014-04-04 13:16:53 -040058
59Build instructions:
60===================
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030061Examples for k2hk, for k2e just replace k2hk prefix accordingly.
62Don't forget to add ARCH=arm and CROSS_COMPILE.
Vitaly Andrianovef509b92014-04-04 13:16:53 -040063
64To build u-boot.bin
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030065 >make k2hk_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040066 >make u-boot-spi.gph
67
68To build u-boot-spi.gph
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030069 >make k2hk_evm_defconfig
Vitaly Andrianovef509b92014-04-04 13:16:53 -040070 >make u-boot-spi.gph
71
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030072To build u-boot-nand.gph
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030073 >make k2hk_evm_defconfig
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +030074 >make u-boot-nand.gph
75
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030076Load and Run U-Boot on keystone EVMs using CCS
Vitaly Andrianovef509b92014-04-04 13:16:53 -040077=========================================
78
79Need Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
80on EVM. See instructions at below link for installing CCS on a Windows PC.
81http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Getting_Started#
82Installing_Code_Composer_Studio
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030083Use u-boot.bin from the build folder for loading and running u-boot binary
Vitaly Andrianovef509b92014-04-04 13:16:53 -040084on EVM. Follow instructions at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030085K2HK http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup
86K2E http://processors.wiki.ti.com/index.php/EVMK2E_Hardware_Setup
Vitaly Andrianovef509b92014-04-04 13:16:53 -040087to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
88and Power ON the EVM. Follow instructions to connect serial port of EVM to
89PC and start TeraTerm or Hyper Terminal.
90
91Start CCS on a Windows machine and Launch Target
92configuration as instructed at http://processors.wiki.ti.com/index.php/
93MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS.
94The instructions provided in the above link uses a script for
95loading the u-boot binary on the target EVM. Instead do the following:-
96
971. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +030098 is connected: Unknown)" at the debug window (This is created once Target
Vitaly Andrianovef509b92014-04-04 13:16:53 -040099 configuration is launched) and select "Connect Target".
1002. Once target connect is successful, choose Tools->Load Memory option from the
101 top level menu. At the Load Memory window, choose the file u-boot.bin
102 through "Browse" button and click "next >" button. In the next window, enter
103 Start address as 0xc001000, choose Type-size "32 bits" and click "Finish"
104 button.
1053. Click View -> Registers from the top level menu to view registers window.
1064. From Registers, window expand "Core Registers" to view PC. Edit PC value
107 to be 0xc001000. From the "Run" top level menu, select "Free Run"
1085. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
109 below and type any key to stop autoboot as instructed :=
110
111U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
112
113I2C: ready
114Detected SO-DIMM [SQR-SD3T-2G1333SED]
115DRAM: 1.1 GiB
116NAND: 512 MiB
117Net: K2HK_EMAC
118Warning: K2HK_EMAC using MAC address from net device
119, K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
120Hit any key to stop autoboot: 0
121
122SPI NOR Flash programming instructions
123======================================
124U-Boot image can be flashed to first 512KB of the NOR flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300125instructions:
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400126
1271. Start CCS and run U-boot as described above.
1282. Suspend Target. Select Run -> Suspend from top level menu
129 CortexA15_1 (Free Running)"
1303. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300131 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E EVM
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400132 using CCS", but using address 0x87000000.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03001334. Free Run the target as described earlier (step 4) to get u-boot prompt
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001345. At the U-Boot console type following to setup u-boot environment variables.
135 setenv addr_uboot 0x87000000
136 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300137 run burn_uboot_spi
Vitaly Andrianovef509b92014-04-04 13:16:53 -0400138 Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
139 to "SPI Little Endian Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300140 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Vitaly Andrianovef509b92014-04-04 13:16:53 -04001416. Power ON the EVM. The EVM now boots with u-boot image on the NOR flash.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300142
143AEMIF NAND Flash programming instructions
144======================================
145U-Boot image can be flashed to first 1024KB of the NAND flash using following
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300146instructions:
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +0300147
1481. Start CCS and run U-boot as described above.
1492. Suspend Target. Select Run -> Suspend from top level menu
150 CortexA15_1 (Free Running)"
1513. Load u-boot-nand.gph binary from build folder on to DDR address 0x87000000
152 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
153 using CCS", but using address 0x87000000.
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +03001544. Free Run the target as described earlier (step 4) to get u-boot prompt
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +03001555. At the U-Boot console type following to setup u-boot environment variables.
156 setenv filesize <size in hex of u-boot-nand.gph rounded to hex 0x10000>
157 run burn_uboot_nand
158 Once u-boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
159 to "ARM NAND Boot mode" as per instruction at
Khoronzhuk, Ivana79c9112014-10-09 22:21:14 +0300160 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Khoronzhuk, Ivanc6ac7e32014-07-04 15:03:27 +03001616. Power ON the EVM. The EVM now boots with u-boot image on the NAND flash.