Commit 5911d90be07cfdf1f3a0d712edecbb95795bc3b3

Authored by Vitaly Andrianov
Committed by Lokesh Vutla
1 parent 2f7262dd5c

ARM: keystone2: add support for UART download

Currently to flash u-boot image onto NAND or SPI NOR flash, very first
time user need to use Code Composer Studio (CCS). This is cumbersome for
an user not familiar with CCS. This patch add simpler procedure using
uart boot mode for K2 EVMs.

When UART bootmode is set and board is rebooted, the ROM boot loader
transfers the image at the beginning of the internal RAM. After the
transfer is complete the boot-loader sets the PC to the first internal RAM
address 0x0c000000. The u-boot.bin is linked to the address 0x0c001000.

In order to use the u-boot.bin as an image for UART download, we need to
add 4K zeros prefix that act as 1K NOP instructions before reaching
0xc001000.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>

Showing 2 changed files with 21 additions and 0 deletions Side-by-side Diff

... ... @@ -1006,6 +1006,12 @@
1006 1006 $(call if_changed,mkimage)
1007 1007 @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@
1008 1008  
  1009 +u-boot.uart.pad:
  1010 + @dd if=/dev/zero bs=4 count=1024 2>/dev/null > $@
  1011 +
  1012 +u-boot.uart: u-boot.uart.pad u-boot.bin FORCE
  1013 + $(call if_changed,cat)
  1014 +
1009 1015 # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including
1010 1016 # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
1011 1017 # the middle.
board/ti/ks2_evm/README
... ... @@ -81,6 +81,21 @@
81 81 >make k2hk_evm_defconfig
82 82 >make u-boot-nand.gph
83 83  
  84 +To build u-boot.uart
  85 + >make k2hk_evm_defconfig
  86 + >make u-boot.uart
  87 +
  88 +Load and Run U-Boot on keystone EVMs using UART download
  89 +========================================================
  90 +
  91 +Open BMC and regular UART terminals.
  92 +
  93 +1. On the regular UART port start xmodem transfer of the u-boot.uart
  94 +2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM
  95 + BMC> bootmode #4
  96 + MBC> reboot
  97 +3. When xmodem is complete you should see the u-boot starts on the UART port
  98 +
84 99 Load and Run U-Boot on keystone EVMs using CCS
85 100 =========================================
86 101