README 8.2 KB

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