1a13110a9SKlaus GogerIntroduction 2a13110a9SKlaus Goger============ 3a13110a9SKlaus Goger 4a13110a9SKlaus GogerThe RK3399-Q7 (Puma) is a system-on-module featuring the Rockchip 5a13110a9SKlaus GogerRK3399 in a Qseven-compatible form-factor. 6a13110a9SKlaus Goger 7a13110a9SKlaus GogerRK3399-Q7 features: 8a13110a9SKlaus Goger * CPU: ARMv8 64bit Big-Little architecture, 9a13110a9SKlaus Goger * Big: dual-core Cortex-A72 10a13110a9SKlaus Goger * Little: quad-core Cortex-A53 11a13110a9SKlaus Goger * IRAM: 200KB 12a13110a9SKlaus Goger * DRAM: 4GB-128MB dual-channel 13a13110a9SKlaus Goger * eMMC: onboard eMMC 14a13110a9SKlaus Goger * SD/MMC 15a13110a9SKlaus Goger * GbE (onboard Micrel KSZ9031) Gigabit ethernet PHY 16a13110a9SKlaus Goger * USB: 17a13110a9SKlaus Goger * USB3.0 dual role port 18a13110a9SKlaus Goger * 2x USB3.0 host, 1x USB2.0 host via onboard USB3.0 hub 19a13110a9SKlaus Goger * Display: HDMI/eDP/MIPI 20a13110a9SKlaus Goger * Camera: 2x CSI (one on the edge connector, one on the Q7 specified CSI ZIF) 21a13110a9SKlaus Goger * NOR Flash: onboard SPI NOR 22a13110a9SKlaus Goger * Companion Controller: onboard additional Cortex-M0 microcontroller 23a13110a9SKlaus Goger * RTC 24a13110a9SKlaus Goger * fan controller 25a13110a9SKlaus Goger * CAN 26a13110a9SKlaus Goger 27a13110a9SKlaus GogerHere is the step-by-step to boot to U-Boot on rk3399. 28a13110a9SKlaus Goger 29a13110a9SKlaus GogerGet the Source and build ATF/Cortex-M0 binaries 30a13110a9SKlaus Goger=============================================== 31a13110a9SKlaus Goger 32a13110a9SKlaus Goger > git clone git://git.theobroma-systems.com/arm-trusted-firmware.git 33a13110a9SKlaus Goger > git clone git://git.theobroma-systems.com/rk3399-cortex-m0.git 34a13110a9SKlaus Goger 35a13110a9SKlaus GogerCompile the ATF 36a13110a9SKlaus Goger=============== 37a13110a9SKlaus Goger 38a13110a9SKlaus Goger > cd arm-trusted-firmware 39a13110a9SKlaus Goger > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31 40*4ce8b4d6SKlaus Goger > cp build/rk3399/release/bl31.bin ../u-boot/bl31-rk3399.bin 41a13110a9SKlaus Goger 42a13110a9SKlaus GogerCompile the M0 firmware 43a13110a9SKlaus Goger======================= 44a13110a9SKlaus Goger 45a13110a9SKlaus Goger > cd ../rk3399-cortex-m0 46a13110a9SKlaus Goger > make CROSS_COMPILE=arm-cortex_m0-eabi- 47a13110a9SKlaus Goger > cp rk3399m0.bin ../u-boot 48a13110a9SKlaus Goger 49a13110a9SKlaus GogerCompile the U-Boot 50a13110a9SKlaus Goger================== 51a13110a9SKlaus Goger 52a13110a9SKlaus Goger > cd ../u-boot 53a13110a9SKlaus Goger > make CROSS_COMPILE=aarch64-linux-gnu- puma-rk3399_defconfig all 54a13110a9SKlaus Goger 55a13110a9SKlaus GogerPackage the image 56a13110a9SKlaus Goger================= 57a13110a9SKlaus Goger 58a13110a9SKlaus Goger > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin spl.img 59f8e3b083SPhilipp Tomsich > make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb 60a13110a9SKlaus Goger 61a13110a9SKlaus GogerFlash the image 62a13110a9SKlaus Goger=============== 63a13110a9SKlaus Goger 64a13110a9SKlaus GogerCopy the SPL to offset 32k and the FIT image containing the payloads 65a13110a9SKlaus Goger(U-Boot proper, ATF, M0 Firmware, devicetree) to offset 256k on a SD 66a13110a9SKlaus Gogercard. 67a13110a9SKlaus Goger 68a13110a9SKlaus Goger > dd if=spl.img of=/dev/sdb seek=64 69f8e3b083SPhilipp Tomsich > dd if=u-boot.itb of=/dev/sdb seek=512 70a13110a9SKlaus Goger 71a13110a9SKlaus GogerAfter powering up the board (with the inserted SD card), you should see 72a13110a9SKlaus Gogera U-Boot console on UART0 (115200n8). 73