blob: 05baff6e33cbb845bf8f732e6ccc1bbba2d165d1 [file] [log] [blame]
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +03001U-Boot port for Texas Instruments Keystone II EVM boards
2========================================================
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -04003
4Author: Murali Karicheri <m-karicheri2@ti.com>
5
Bin Meng75574052016-02-05 19:30:11 -08006This README has information on the U-Boot port for K2HK, K2E, and K2L EVM boards.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -04007Documentation for this board can be found at
Khoronzhuk, Ivan98e6c252014-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, Ivanff16d0b2014-10-29 13:21:22 +020010https://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040011
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030012The K2HK board is based on Texas Instruments Keystone2 family of SoCs: K2H, K2K.
Vitaly Andrianov7bcf4d62014-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, Ivan98e6c252014-10-09 22:21:14 +030017The K2E SoC details are available at
Khoronzhuk, Ivanff16d0b2014-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, Ivan98e6c252014-10-09 22:21:14 +030022
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040023Board configuration:
24====================
25
Bin Meng75574052016-02-05 19:30:11 -080026Some of the peripherals that are configured by U-Boot
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030027+------+-------+-------+-----------+-----------+-------+-------+----+
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, Ivanff16d0b2014-10-29 13:21:22 +020032|K2L |2 |512MB |2MB |4(2) |4 |3 |3 |
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030033+------+-------+-------+-----------+-----------+-------+-------+----+
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040034
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030035There are only 2 eth port installed on the boards.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040036
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030037There are separate PLLs to drive clocks to Tetris ARM and Peripherals.
Vitaly Andrianov7bcf4d62014-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
Bin Meng75574052016-02-05 19:30:11 -080040to install this image from U-Boot.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040041
42The port related files can be found at following folders
43 keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030044 EVMs board files: board/ti/k2s_evm/
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040045
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030046Board configuration files:
47include/configs/k2hk_evm.h
48include/configs/k2e_evm.h
Khoronzhuk, Ivanff16d0b2014-10-29 13:21:22 +020049include/configs/k2l_evm.h
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030050
Bin Meng75574052016-02-05 19:30:11 -080051As U-Boot is migrating to Kconfig there is also board defconfig files
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030052configs/k2e_evm_defconfig
53configs/k2hk_evm_defconfig
Khoronzhuk, Ivanff16d0b2014-10-29 13:21:22 +020054configs/k2l_evm_defconfig
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040055
56Supported boot modes:
57 - SPI NOR boot
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +030058 - AEMIF NAND boot
Lokesh Vutla5e67bf02015-08-17 19:54:52 +053059 - UART boot
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040060
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030061Supported image formats:
Lokesh Vutlab91d3b02015-09-19 15:00:23 +053062 - u-boot-dtb.bin: for loading and running u-boot-dtb.bin through
63 Texas Instruments code composure studio (CCS) and for UART boot.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040064 - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
Lokesh Vutla0afbe872015-08-17 19:54:50 +053065 - MLO: gpimage for programming AEMIF NAND flash for NAND boot
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040066
67Build instructions:
68===================
Khoronzhuk, Ivanff16d0b2014-10-29 13:21:22 +020069Examples for k2hk, for k2e and k2l just replace k2hk prefix accordingly.
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030070Don't forget to add ARCH=arm and CROSS_COMPILE.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040071
Lokesh Vutlab91d3b02015-09-19 15:00:23 +053072To build u-boot-dtb.bin, u-boot-spi.gph, MLO:
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030073 >make k2hk_evm_defconfig
Lokesh Vutla5e67bf02015-08-17 19:54:52 +053074 >make
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +030075
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +030076Load and Run U-Boot on keystone EVMs using CCS
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040077=========================================
78
Lokesh Vutlab91d3b02015-09-19 15:00:23 +053079Need Code Composer Studio (CCS) installed on a PC to load and run u-boot-dtb.bin
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040080on 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
Bin Meng75574052016-02-05 19:30:11 -080083Use u-boot-dtb.bin from the build folder for loading and running U-Boot binary
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040084on EVM. Follow instructions at
Khoronzhuk, Ivan98e6c252014-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
Khoronzhuk, Ivanff16d0b2014-10-29 13:21:22 +020087K2L http://processors.wiki.ti.com/index.php/TCIEVMK2L_Hardware_Setup
88
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040089to configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
90and Power ON the EVM. Follow instructions to connect serial port of EVM to
91PC and start TeraTerm or Hyper Terminal.
92
93Start CCS on a Windows machine and Launch Target
94configuration as instructed at http://processors.wiki.ti.com/index.php/
95MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS.
96The instructions provided in the above link uses a script for
Bin Meng75574052016-02-05 19:30:11 -080097loading the U-Boot binary on the target EVM. Instead do the following:-
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040098
991. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +0300100 is connected: Unknown)" at the debug window (This is created once Target
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -0400101 configuration is launched) and select "Connect Target".
1022. Once target connect is successful, choose Tools->Load Memory option from the
Lokesh Vutlab91d3b02015-09-19 15:00:23 +0530103 top level menu. At the Load Memory window, choose the file u-boot-dtb.bin
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -0400104 through "Browse" button and click "next >" button. In the next window, enter
105 Start address as 0xc001000, choose Type-size "32 bits" and click "Finish"
106 button.
1073. Click View -> Registers from the top level menu to view registers window.
1084. From Registers, window expand "Core Registers" to view PC. Edit PC value
109 to be 0xc001000. From the "Run" top level menu, select "Free Run"
1105. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
111 below and type any key to stop autoboot as instructed :=
112
113U-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
114
115I2C: ready
116Detected SO-DIMM [SQR-SD3T-2G1333SED]
117DRAM: 1.1 GiB
118NAND: 512 MiB
119Net: K2HK_EMAC
120Warning: K2HK_EMAC using MAC address from net device
121, K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
122Hit any key to stop autoboot: 0
123
124SPI NOR Flash programming instructions
125======================================
126U-Boot image can be flashed to first 512KB of the NOR flash using following
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +0300127instructions:
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -0400128
Bin Meng75574052016-02-05 19:30:11 -08001291. Start CCS and run U-Boot as described above.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -04001302. Suspend Target. Select Run -> Suspend from top level menu
131 CortexA15_1 (Free Running)"
1323. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivanff16d0b2014-10-29 13:21:22 +0200133 through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
134 EVM using CCS", but using address 0x87000000.
Bin Meng75574052016-02-05 19:30:11 -08001354. Free Run the target as described earlier (step 4) to get U-Boot prompt
1365. At the U-Boot console type following to setup U-Boot environment variables.
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -0400137 setenv addr_uboot 0x87000000
138 setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300139 run burn_uboot_spi
Bin Meng75574052016-02-05 19:30:11 -0800140 Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -0400141 to "SPI Little Endian Boot mode" as per instruction at
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +0300142 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Bin Meng75574052016-02-05 19:30:11 -08001436. Power ON the EVM. The EVM now boots with U-Boot image on the NOR flash.
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300144
145AEMIF NAND Flash programming instructions
146======================================
147U-Boot image can be flashed to first 1024KB of the NAND flash using following
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +0300148instructions:
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300149
Bin Meng75574052016-02-05 19:30:11 -08001501. Start CCS and run U-Boot as described above.
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +03001512. Suspend Target. Select Run -> Suspend from top level menu
152 CortexA15_1 (Free Running)"
Lokesh Vutla0afbe872015-08-17 19:54:50 +05301533. Load MLO binary from build folder on to DDR address 0x87000000
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300154 through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
155 using CCS", but using address 0x87000000.
Bin Meng75574052016-02-05 19:30:11 -08001564. Free Run the target as described earlier (step 4) to get U-Boot prompt
1575. At the U-Boot console type following to setup U-Boot environment variables.
Lokesh Vutla0afbe872015-08-17 19:54:50 +0530158 setenv filesize <size in hex of MLO rounded to hex 0x10000>
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300159 run burn_uboot_nand
Bin Meng75574052016-02-05 19:30:11 -0800160 Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
Khoronzhuk, Ivan0d5a4952014-07-04 15:03:27 +0300161 to "ARM NAND Boot mode" as per instruction at
Khoronzhuk, Ivan98e6c252014-10-09 22:21:14 +0300162 http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
Bin Meng75574052016-02-05 19:30:11 -08001636. Power ON the EVM. The EVM now boots with U-Boot image on the NAND flash.
Lokesh Vutla5e67bf02015-08-17 19:54:52 +0530164
165Load and Run U-Boot on keystone EVMs using UART download
166========================================================
167
168Open BMC and regular UART terminals.
169
Lokesh Vutlab91d3b02015-09-19 15:00:23 +05301701. On the regular UART port start xmodem transfer of the u-boot-dtb.bin
Lokesh Vutla5e67bf02015-08-17 19:54:52 +05301712. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
172 BMC> bootmode #4
173 MBC> reboot
Bin Meng75574052016-02-05 19:30:11 -08001743. When xmodem is complete you should see the U-Boot starts on the UART port