xref: /OK3568_Linux_fs/u-boot/board/ti/ks2_evm/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunU-Boot port for Texas Instruments Keystone II EVM boards
2*4882a593Smuzhiyun========================================================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunAuthor: Murali Karicheri <m-karicheri2@ti.com>
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThis README has information on the U-Boot port for K2HK, K2E, and K2L EVM boards.
7*4882a593SmuzhiyunDocumentation for this board can be found at
8*4882a593Smuzhiyunhttp://www.advantech.com/Support/TI-EVM/EVMK2HX_sd.aspx
9*4882a593Smuzhiyunhttps://www.einfochips.com/index.php/partnerships/texas-instruments/k2e-evm.html
10*4882a593Smuzhiyunhttps://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunThe K2HK board is based on Texas Instruments Keystone2 family of SoCs: K2H, K2K.
13*4882a593SmuzhiyunMore details on these SoCs are available at company websites
14*4882a593Smuzhiyun K2K: http://www.ti.com/product/tci6638k2k
15*4882a593Smuzhiyun K2H: http://www.ti.com/product/tci6638k2h
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunThe K2E SoC details are available at
18*4882a593Smuzhiyun http://www.ti.com/lit/ds/symlink/66ak2e05.pdf
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunThe K2L SoC details are available at
21*4882a593Smuzhiyun http://www.ti.com/lit/ds/symlink/tci6630k2l.pdf
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunThe K2G SoC details are available at
24*4882a593Smuzhiyun http://www.ti.com/lit/ds/symlink/66ak2g02.pdf
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunBoard configuration:
27*4882a593Smuzhiyun====================
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunSome of the peripherals that are configured by U-Boot
30*4882a593Smuzhiyun+------+-------+-------+-----------+-----------+-------+-------+----+
31*4882a593Smuzhiyun|      |DDR3   |NAND   |MSM SRAM   |ETH ports  |UART   |I2C    |SPI |
32*4882a593Smuzhiyun+------+-------+-------+-----------+-----------+-------+-------+----+
33*4882a593Smuzhiyun|K2HK  |2      |512MB  |6MB	   |4(2)       |2      |3      |3   |
34*4882a593Smuzhiyun|K2E   |4      |512MB  |2MB	   |8(2)       |2      |3      |3   |
35*4882a593Smuzhiyun|K2L   |2      |512MB  |2MB	   |4(2)       |4      |3      |3   |
36*4882a593Smuzhiyun|K2G   |2      |256MB  |1MB	   |1          |1      |1      |1   |
37*4882a593Smuzhiyun+------+-------+-------+-----------+-----------+-------+-------+----+
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunThere are only 2 eth port installed on the boards.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunThere are separate PLLs to drive clocks to Tetris ARM and Peripherals.
42*4882a593SmuzhiyunTo bring up SMP Linux on this board, there is a boot monitor
43*4882a593Smuzhiyuncode that will be installed in MSMC SRAM. There is command available
44*4882a593Smuzhiyunto install this image from U-Boot.
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunThe port related files can be found at following folders
47*4882a593Smuzhiyun keystone2 SoC related files: arch/arm/cpu/armv7/keystone/
48*4882a593Smuzhiyun EVMs board files: board/ti/k2s_evm/
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunBoard configuration files:
51*4882a593Smuzhiyuninclude/configs/k2hk_evm.h
52*4882a593Smuzhiyuninclude/configs/k2e_evm.h
53*4882a593Smuzhiyuninclude/configs/k2l_evm.h
54*4882a593Smuzhiyuninclude/configs/k2g_evm.h
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunAs U-Boot is migrating to Kconfig there is also board defconfig files
57*4882a593Smuzhiyunconfigs/k2e_evm_defconfig
58*4882a593Smuzhiyunconfigs/k2hk_evm_defconfig
59*4882a593Smuzhiyunconfigs/k2l_evm_defconfig
60*4882a593Smuzhiyunconfigs/k2g_evm_defconfig
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunSupported boot modes:
63*4882a593Smuzhiyun - SPI NOR boot
64*4882a593Smuzhiyun - AEMIF NAND boot (K2E, K2L and K2HK)
65*4882a593Smuzhiyun - UART boot
66*4882a593Smuzhiyun - MMC boot (Only on K2G)
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunSupported image formats:
69*4882a593Smuzhiyun - u-boot.bin: for loading and running u-boot.bin through
70*4882a593Smuzhiyun		Texas Instruments code composure studio (CCS) and for UART boot.
71*4882a593Smuzhiyun - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot
72*4882a593Smuzhiyun - MLO: gpimage for programming NAND flash for NAND boot, MMC boot.
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunBuild instructions:
75*4882a593Smuzhiyun===================
76*4882a593SmuzhiyunExamples for k2hk, for k2e, k2l and k2g just replace k2hk prefix accordingly.
77*4882a593SmuzhiyunDon't forget to add ARCH=arm and CROSS_COMPILE.
78*4882a593Smuzhiyun
79*4882a593SmuzhiyunTo build u-boot.bin, u-boot-spi.gph, MLO:
80*4882a593Smuzhiyun  >make k2hk_evm_defconfig
81*4882a593Smuzhiyun  >make
82*4882a593Smuzhiyun
83*4882a593SmuzhiyunLoad and Run U-Boot on keystone EVMs using CCS
84*4882a593Smuzhiyun=========================================
85*4882a593Smuzhiyun
86*4882a593SmuzhiyunNeed Code Composer Studio (CCS) installed on a PC to load and run u-boot.bin
87*4882a593Smuzhiyunon EVM. See instructions at below link for installing CCS on a Windows PC.
88*4882a593Smuzhiyunhttp://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Getting_Started#
89*4882a593SmuzhiyunInstalling_Code_Composer_Studio
90*4882a593SmuzhiyunUse u-boot.bin from the build folder for loading and running U-Boot binary
91*4882a593Smuzhiyunon EVM. Follow instructions at
92*4882a593SmuzhiyunK2HK http://processors.wiki.ti.com/index.php/EVMK2H_Hardware_Setup
93*4882a593SmuzhiyunK2E  http://processors.wiki.ti.com/index.php/EVMK2E_Hardware_Setup
94*4882a593SmuzhiyunK2L  http://processors.wiki.ti.com/index.php/TCIEVMK2L_Hardware_Setup
95*4882a593SmuzhiyunK2G  http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
96*4882a593Smuzhiyun
97*4882a593Smuzhiyunto configure SW1 dip switch to use "No Boot/JTAG DSP Little Endian Boot Mode"
98*4882a593Smuzhiyunand Power ON the EVM.  Follow instructions to connect serial port of EVM to
99*4882a593SmuzhiyunPC and start TeraTerm or Hyper Terminal.
100*4882a593Smuzhiyun
101*4882a593SmuzhiyunStart CCS on a Windows machine and Launch Target
102*4882a593Smuzhiyunconfiguration as instructed at http://processors.wiki.ti.com/index.php/
103*4882a593SmuzhiyunMCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS.
104*4882a593SmuzhiyunThe instructions provided in the above link uses a script for
105*4882a593Smuzhiyunloading the U-Boot binary on the target EVM. Instead do the following:-
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun1. Right click to "Texas Instruments XDS2xx USB Emulator_0/CortexA15_1 core (D
108*4882a593Smuzhiyun   is connected: Unknown)" at the debug window (This is created once Target
109*4882a593Smuzhiyun   configuration is launched) and select "Connect Target".
110*4882a593Smuzhiyun2. Once target connect is successful, choose Tools->Load Memory option from the
111*4882a593Smuzhiyun   top level menu. At the Load Memory window, choose the file u-boot.bin
112*4882a593Smuzhiyun   through "Browse" button and click "next >" button. In the next window, enter
113*4882a593Smuzhiyun   Start address as 0xc000000, choose Type-size "32 bits" and click "Finish"
114*4882a593Smuzhiyun   button.
115*4882a593Smuzhiyun3. Click View -> Registers from the top level menu to view registers window.
116*4882a593Smuzhiyun4. From Registers, window expand "Core Registers" to view PC. Edit PC value
117*4882a593Smuzhiyun   to be 0xc000000. From the "Run" top level menu, select "Free Run"
118*4882a593Smuzhiyun5. The U-Boot prompt is shown at the Tera Term/ Hyper terminal console as
119*4882a593Smuzhiyun   below and type any key to stop autoboot as instructed :=
120*4882a593Smuzhiyun
121*4882a593SmuzhiyunU-Boot 2014.04-rc1-00201-gc215b5a (Mar 21 2014 - 12:47:59)
122*4882a593Smuzhiyun
123*4882a593SmuzhiyunI2C:   ready
124*4882a593SmuzhiyunDetected SO-DIMM [SQR-SD3T-2G1333SED]
125*4882a593SmuzhiyunDRAM:  1.1 GiB
126*4882a593SmuzhiyunNAND:  512 MiB
127*4882a593SmuzhiyunNet:   K2HK_EMAC
128*4882a593SmuzhiyunWarning: K2HK_EMAC using MAC address from net device
129*4882a593Smuzhiyun, K2HK_EMAC1, K2HK_EMAC2, K2HK_EMAC3
130*4882a593SmuzhiyunHit any key to stop autoboot:  0
131*4882a593Smuzhiyun
132*4882a593SmuzhiyunSPI NOR Flash programming instructions
133*4882a593Smuzhiyun======================================
134*4882a593SmuzhiyunU-Boot image can be flashed to first 512KB of the NOR flash using following
135*4882a593Smuzhiyuninstructions:
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun1. Start CCS and run U-Boot as described above.
138*4882a593Smuzhiyun2. Suspend Target. Select Run -> Suspend from top level menu
139*4882a593Smuzhiyun   CortexA15_1 (Free Running)"
140*4882a593Smuzhiyun3. Load u-boot-spi.gph binary from build folder on to DDR address 0x87000000
141*4882a593Smuzhiyun   through CCS as described in step 2 of "Load and Run U-Boot on K2HK/K2E/K2L
142*4882a593Smuzhiyun   EVM using CCS", but using address 0x87000000.
143*4882a593Smuzhiyun4. Free Run the target as described earlier (step 4) to get U-Boot prompt
144*4882a593Smuzhiyun5. At the U-Boot console type following to setup U-Boot environment variables.
145*4882a593Smuzhiyun   setenv addr_uboot 0x87000000
146*4882a593Smuzhiyun   setenv filesize <size in hex of u-boot-spi.gph rounded to hex 0x10000>
147*4882a593Smuzhiyun   run burn_uboot_spi
148*4882a593Smuzhiyun   Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
149*4882a593Smuzhiyun   to "SPI Little Endian Boot mode" as per instruction at
150*4882a593Smuzhiyun   http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
151*4882a593Smuzhiyun6. Power ON the EVM. The EVM now boots with U-Boot image on the NOR flash.
152*4882a593Smuzhiyun
153*4882a593SmuzhiyunAEMIF NAND Flash programming instructions
154*4882a593Smuzhiyun======================================
155*4882a593SmuzhiyunU-Boot image can be flashed to first 1024KB of the NAND flash using following
156*4882a593Smuzhiyuninstructions:
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun1. Start CCS and run U-Boot as described above.
159*4882a593Smuzhiyun2. Suspend Target. Select Run -> Suspend from top level menu
160*4882a593Smuzhiyun   CortexA15_1 (Free Running)"
161*4882a593Smuzhiyun3. Load MLO binary from build folder on to DDR address 0x87000000
162*4882a593Smuzhiyun   through CCS as described in step 2 of "Load and Run U-Boot on K2HK EVM
163*4882a593Smuzhiyun   using CCS", but using address 0x87000000.
164*4882a593Smuzhiyun4. Free Run the target as described earlier (step 4) to get U-Boot prompt
165*4882a593Smuzhiyun5. At the U-Boot console type following to setup U-Boot environment variables.
166*4882a593Smuzhiyun   setenv filesize <size in hex of MLO rounded to hex 0x10000>
167*4882a593Smuzhiyun   run burn_uboot_nand
168*4882a593Smuzhiyun   Once U-Boot prompt is available, Power OFF the EVM. Set the SW1 dip switch
169*4882a593Smuzhiyun   to "ARM NAND Boot mode" as per instruction at
170*4882a593Smuzhiyun   http://processors.wiki.ti.com/index.php/*_Hardware_Setup.
171*4882a593Smuzhiyun6. Power ON the EVM. The EVM now boots with U-Boot image on the NAND flash.
172*4882a593Smuzhiyun
173*4882a593SmuzhiyunLoad and Run U-Boot on keystone EVMs using UART download
174*4882a593Smuzhiyun========================================================
175*4882a593Smuzhiyun
176*4882a593SmuzhiyunOpen BMC and regular UART terminals.
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun1. On the regular UART port start xmodem transfer of the u-boot.bin
179*4882a593Smuzhiyun2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
180*4882a593Smuzhiyun   BMC> bootmode #4
181*4882a593Smuzhiyun   MBC> reboot
182*4882a593Smuzhiyun3. When xmodem is complete you should see the U-Boot starts on the UART port
183*4882a593Smuzhiyun
184*4882a593SmuzhiyunLoad and Run U-Boot on K2G EVMs using MMC
185*4882a593Smuzhiyun========================================================
186*4882a593Smuzhiyun
187*4882a593SmuzhiyunOpen BMC and regular UART terminals.
188*4882a593Smuzhiyun
189*4882a593Smuzhiyun1. Set the SW3 dip switch to "ARM MMC Boot mode" as per instruction at
190*4882a593Smuzhiyun   http://processors.wiki.ti.com/index.php/66AK2G02_GP_EVM_Hardware_Setup
191*4882a593Smuzhiyun2. Create SD card partitions as per steps given in Hardware Setup Guide.
192*4882a593Smuzhiyun3. Copy MLO to Boot Partition.
193*4882a593Smuzhiyun4. Insert SD card and Power on the EVM.
194*4882a593Smuzhiyun   The EVM now boots with U-Boot image from SD card.
195