1*4882a593SmuzhiyunIntroduction 2*4882a593Smuzhiyun============ 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunRK3328 key features we might use in U-Boot: 5*4882a593Smuzhiyun* CPU: ARMv8 64bit quad-core Cortex-A53 6*4882a593Smuzhiyun* IRAM: 36KB 7*4882a593Smuzhiyun* DRAM: 4GB-16MB dual-channel 8*4882a593Smuzhiyun* eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50 9*4882a593Smuzhiyun* SD/MMC: support SD 3.0, MMC 4.51 10*4882a593Smuzhiyun* USB: USB2.0 EHCI host port *2 11*4882a593Smuzhiyun* Display: RGB/HDMI/DP/MIPI/EDP 12*4882a593Smuzhiyun 13*4882a593Smuzhiyunevb key features: 14*4882a593Smuzhiyun* regulator: pwm regulator for CPU B/L 15*4882a593Smuzhiyun* PMIC: rk808 16*4882a593Smuzhiyun* debug console: UART2 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunIn order to support Arm Trust Firmware(ATF), we need to use the 19*4882a593Smuzhiyunminiloader from rockchip which: 20*4882a593Smuzhiyun* do DRAM init 21*4882a593Smuzhiyun* load and verify ATF image 22*4882a593Smuzhiyun* load and verify U-Boot image 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunHere is the step-by-step to boot to U-Boot on rk3328. 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunGet the Source and prebuild binary 27*4882a593Smuzhiyun================================== 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun > mkdir ~/evb_rk3328 30*4882a593Smuzhiyun > cd ~/evb_rk3328 31*4882a593Smuzhiyun > git clone https://github.com/ARM-software/arm-trusted-firmware.git 32*4882a593Smuzhiyun > git clone https://github.com/rockchip-linux/rkbin 33*4882a593Smuzhiyun > git clone https://github.com/rockchip-linux/rkflashtool 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunCompile ATF 36*4882a593Smuzhiyun=============== 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun > cd arm-trusted-firmware 39*4882a593Smuzhiyun > make realclean 40*4882a593Smuzhiyun > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 bl31 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunCompile U-Boot 43*4882a593Smuzhiyun================== 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun > cd ../u-boot 46*4882a593Smuzhiyun > make CROSS_COMPILE=aarch64-linux-gnu- evb-rk3328_defconfig all 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunCompile rkflashtool 49*4882a593Smuzhiyun======================= 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun > cd ../rkflashtool 52*4882a593Smuzhiyun > make 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunPackage image for miniloader 55*4882a593Smuzhiyun================================ 56*4882a593Smuzhiyun > cd .. 57*4882a593Smuzhiyun > cp arm-trusted-firmware/build/rk3328/release/bl31.bin rkbin/rk33 58*4882a593Smuzhiyun > ./rkbin/tools/trust_merger rkbin/tools/RK3328TRUST.ini 59*4882a593Smuzhiyun > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img 60*4882a593Smuzhiyun > mkdir image 61*4882a593Smuzhiyun > mv trust.img ./image/ 62*4882a593Smuzhiyun > mv uboot.img ./image/rk3328evb-uboot.bin 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunFlash image 65*4882a593Smuzhiyun=============== 66*4882a593SmuzhiyunPower on(or reset with RESET KEY) with MASKROM KEY preesed, and then: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun > ./rkflashtool/rkflashloader rk3328evb 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunYou should be able to get U-Boot log message in console/UART2 now. 71