1*4882a593Smuzhiyun----------------------------- 2*4882a593SmuzhiyunNAND boot on PPC440 platforms 3*4882a593Smuzhiyun----------------------------- 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThis document describes the U-Boot NAND boot feature as it 6*4882a593Smuzhiyunis implemented for the AMCC Sequoia (PPC440EPx) board. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunThe PPC440EP(x)/GR(x) cpu's can boot directly from NAND FLASH, 9*4882a593Smuzhiyuncompletely without NOR FLASH. This can be done by using the NAND 10*4882a593Smuzhiyunboot feature of the 440 NAND flash controller (NDFC). 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunHere a short description of the different boot stages: 13*4882a593Smuzhiyun 14*4882a593Smuzhiyuna) IPL (Initial Program Loader, integrated inside CPU) 15*4882a593Smuzhiyun------------------------------------------------------ 16*4882a593SmuzhiyunWill load first 4k from NAND (SPL) into cache and execute it from there. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyunb) SPL (Secondary Program Loader) 19*4882a593Smuzhiyun--------------------------------- 20*4882a593SmuzhiyunWill load special U-Boot version (NUB) from NAND and execute it. This SPL 21*4882a593Smuzhiyunhas to fit into 4kByte. It sets up the CPU and configures the SDRAM 22*4882a593Smuzhiyuncontroller and the NAND controller so that the special U-Boot image can be 23*4882a593Smuzhiyunloaded from NAND to SDRAM. 24*4882a593SmuzhiyunThis special image is build in the directory "nand_spl". 25*4882a593Smuzhiyun 26*4882a593Smuzhiyunc) NUB (NAND U-Boot) 27*4882a593Smuzhiyun-------------------- 28*4882a593SmuzhiyunThis NAND U-Boot (NUB) is a special U-Boot version which can be started 29*4882a593Smuzhiyunfrom RAM. Therefore it mustn't (re-)configure the SDRAM controller. 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunOn 440EPx the SPL is copied to internal SRAM before the NAND controller 32*4882a593Smuzhiyunis set up. While still running from cache, I experienced problems accessing 33*4882a593Smuzhiyunthe NAND controller. 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunExample: Build and install NAND boot image for Sequoia (440EPx): 37*4882a593Smuzhiyun 38*4882a593Smuzhiyuna) Configure for sequoia with NAND boot support: 39*4882a593Smuzhiyun# make sequoia_nand_config 40*4882a593Smuzhiyun 41*4882a593Smuzhiyunb) Build image(s) 42*4882a593Smuzhiyun# make 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunThis will generate the SPL image in the "nand_spl" directory: 45*4882a593Smuzhiyunnand_spl/u-boot-spl.bin 46*4882a593SmuzhiyunAlso another image is created spanning a whole NAND block (16kBytes): 47*4882a593Smuzhiyunnand_spl/u-boot-spl-16k.bin 48*4882a593SmuzhiyunThe main NAND U-Boot image is generated in the toplevel directory: 49*4882a593Smuzhiyunu-boot.bin 50*4882a593SmuzhiyunA combined image of u-boot-spl-16k.bin and u-boot.bin is also created: 51*4882a593Smuzhiyunu-boot-nand.bin 52*4882a593Smuzhiyun 53*4882a593SmuzhiyunThis image should be programmed at offset 0 in the NAND flash: 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun# tftp 100000 /tftpboot/sequoia/u-boot-nand.bin 56*4882a593Smuzhiyun# nand erase 0 60000 57*4882a593Smuzhiyun# nand write 100000 0 60000 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunSeptember 07 2006, Stefan Roese <sr@denx.de> 61