diff mbox

[U-Boot,v4,5/5] board/ti/am335x/README: update for NAND boot

Message ID 1378187792-16820-6-git-send-email-pekon@ti.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

pekon gupta Sept. 3, 2013, 5:56 a.m. UTC
NAND boot mode on AM335x EVM has been verified, and steps
to use it has been documented and update in this README

Signed-off-by: Pekon Gupta <pekon@ti.com>
---
 board/ti/am335x/README | 59 +++++++++++++++++++++++++++++++++++---------------
 1 file changed, 42 insertions(+), 17 deletions(-)

Comments

Peter Korsgaard Sept. 3, 2013, 7:18 a.m. UTC | #1
>>>>> "Pekon" == Pekon Gupta <pekon@ti.com> writes:

 Pekon> NAND boot mode on AM335x EVM has been verified, and steps
 Pekon> to use it has been documented and update in this README

 Pekon> Signed-off-by: Pekon Gupta <pekon@ti.com>
 Pekon> ---
 Pekon>  board/ti/am335x/README | 59 +++++++++++++++++++++++++++++++++++---------------
 Pekon>  1 file changed, 42 insertions(+), 17 deletions(-)

 Pekon> diff --git a/board/ti/am335x/README b/board/ti/am335x/README
 Pekon> index 67b5246..d34cbab 100644
 Pekon> --- a/board/ti/am335x/README
 Pekon> +++ b/board/ti/am335x/README
 Pekon> @@ -20,23 +20,48 @@ NAND
 Pekon>  The AM335x GP EVM ships with a 256MiB NAND available in most profiles.  In
 Pekon>  this example to program the NAND we assume that an SD card has been
 Pekon>  inserted with the files to write in the first SD slot and that mtdparts
 Pekon> -have been configured correctly for the board.  As a time saving measure we
 Pekon> -load MLO into memory in one location, copy it into the three locatations
 Pekon> -that the ROM checks for additional valid copies, then load U-Boot into
 Pekon> -memory.  We then write that whole section of memory to NAND.
 Pekon> -
 Pekon> -U-Boot # mmc rescan
 Pekon> -U-Boot # env default -f -a
 Pekon> -U-Boot # nand erase.chip
 Pekon> -U-Boot # saveenv
 Pekon> -U-Boot # load mmc 0 81000000 MLO
 Pekon> -U-Boot # cp.b 81000000 81020000 20000
 Pekon> -U-Boot # cp.b 81000000 81040000 20000
 Pekon> -U-Boot # cp.b 81000000 81060000 20000
 Pekon> -U-Boot # load mmc 0 81080000 u-boot.img
 Pekon> -U-Boot # nand write 81000000 0 260000
 Pekon> -U-Boot # load mmc 0 ${loadaddr} uImage
 Pekon> -U-Boot # nand write ${loadaddr} kernel 500000
 Pekon> +have been configured correctly for the board. All images are firstl loaded

s/firstl/first/

 Pekon> +into memory, then written to NAND.
 Pekon> +
 Pekon> +Step-1: Building u-boot for NAND boot
 Pekon> +	Set following CONFIGxx options for NAND device.
 Pekon> +	CONFIG_SYS_NAND_PAGE_SIZE	number of main bytes in NAND page
 Pekon> +	CONFIG_SYS_NAND_OOBSIZE		number of OOB bytes in NAND page
 Pekon> +	CONFIG_SYS_NAND_BLOCK_SIZE	number of bytes in NAND erase-block
 Pekon> +	CONFIG_SYS_NAND_ECCPOS		ECC map for NAND page
 Pekon> +	CONFIG_SYS_NAND_ECCSCHEME	ECC scheme used by NAND
 Pekon> +					0 - HAM1_SW
 Pekon> +					1 - HAM1_HW
 Pekon> +					2 - BCH4_SW  (unsupported)
 Pekon> +					3 - BCH4_HW  (unsupported)
 Pekon> +					4 - BCH8_SW
 Pekon> +					5 - BCH8_HW
 Pekon> +
 Pekon> +Step-2: Flashing NAND via MMC/SD
 Pekon> +	# select BOOTSEL to MMC/SD boot and boot from MMC/SD card
 Pekon> +	U-Boot # mmc rescan
 Pekon> +	# erase flash
 Pekon> +	U-Boot # nand erase.chip
 Pekon> +	U-Boot # env default -f -a
 Pekon> +	U-Boot # saveenv
 Pekon> +	# flash MLO. redundant copies of MLO are kept for backup

s/redundant/Redundant/
s/backup/failsafe/

Otherwise it looks good.

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
diff mbox

Patch

diff --git a/board/ti/am335x/README b/board/ti/am335x/README
index 67b5246..d34cbab 100644
--- a/board/ti/am335x/README
+++ b/board/ti/am335x/README
@@ -20,23 +20,48 @@  NAND
 The AM335x GP EVM ships with a 256MiB NAND available in most profiles.  In
 this example to program the NAND we assume that an SD card has been
 inserted with the files to write in the first SD slot and that mtdparts
-have been configured correctly for the board.  As a time saving measure we
-load MLO into memory in one location, copy it into the three locatations
-that the ROM checks for additional valid copies, then load U-Boot into
-memory.  We then write that whole section of memory to NAND.
-
-U-Boot # mmc rescan
-U-Boot # env default -f -a
-U-Boot # nand erase.chip
-U-Boot # saveenv
-U-Boot # load mmc 0 81000000 MLO
-U-Boot # cp.b 81000000 81020000 20000
-U-Boot # cp.b 81000000 81040000 20000
-U-Boot # cp.b 81000000 81060000 20000
-U-Boot # load mmc 0 81080000 u-boot.img
-U-Boot # nand write 81000000 0 260000
-U-Boot # load mmc 0 ${loadaddr} uImage
-U-Boot # nand write ${loadaddr} kernel 500000
+have been configured correctly for the board. All images are firstl loaded
+into memory, then written to NAND.
+
+Step-1: Building u-boot for NAND boot
+	Set following CONFIGxx options for NAND device.
+	CONFIG_SYS_NAND_PAGE_SIZE	number of main bytes in NAND page
+	CONFIG_SYS_NAND_OOBSIZE		number of OOB bytes in NAND page
+	CONFIG_SYS_NAND_BLOCK_SIZE	number of bytes in NAND erase-block
+	CONFIG_SYS_NAND_ECCPOS		ECC map for NAND page
+	CONFIG_SYS_NAND_ECCSCHEME	ECC scheme used by NAND
+					0 - HAM1_SW
+					1 - HAM1_HW
+					2 - BCH4_SW  (unsupported)
+					3 - BCH4_HW  (unsupported)
+					4 - BCH8_SW
+					5 - BCH8_HW
+
+Step-2: Flashing NAND via MMC/SD
+	# select BOOTSEL to MMC/SD boot and boot from MMC/SD card
+	U-Boot # mmc rescan
+	# erase flash
+	U-Boot # nand erase.chip
+	U-Boot # env default -f -a
+	U-Boot # saveenv
+	# flash MLO. redundant copies of MLO are kept for backup
+	U-Boot # load mmc 0 0x82000000 MLO
+	U-Boot # nand write 0x82000000 0x00000 0x20000
+	U-Boot # nand write 0x82000000 0x20000 0x20000
+	U-Boot # nand write 0x82000000 0x40000 0x20000
+	U-Boot # nand write 0x82000000 0x60000 0x20000
+	# flash u-boot.img
+	U-Boot # load mmc 0 0x82000000 u-boot.img
+	U-Boot # nand write 0x82000000 0x80000 0x60000
+	# flash kernel image
+	U-Boot # load mmc 0 0x82000000 uImage
+	U-Boot # nand write 0x82000000 ${nandsrcaddr} ${nandimgsize}
+	# flash filesystem image
+	U-Boot # load mmc 0 0x82000000 filesystem.img
+	U-Boot # nand write 0x82000000 {loadaddress} 0x300000
+
+Step-3: Set BOOTSEL pin to select NAND boot, and POR the device.
+	The device should boot from images flashed on NAND device.
 
 NOR
 ===