Quentin Schulz | 5829cc4 | 2024-03-11 13:02:01 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | RK3399-Q7 Puma |
| 4 | ============== |
| 5 | |
| 6 | The RK3399-Q7 (Puma) is a system-on-module featuring the Rockchip |
| 7 | RK3399 in a Qseven-compatible form-factor. |
| 8 | |
| 9 | RK3399-Q7 features: |
| 10 | |
| 11 | * CPU: ARMv8 64bit Big-Little architecture, |
| 12 | |
| 13 | * Big: dual-core Cortex-A72 |
| 14 | * Little: quad-core Cortex-A53 |
| 15 | * IRAM: 200KB |
| 16 | * DRAM: 4GB-128MB dual-channel |
| 17 | |
| 18 | * eMMC: onboard eMMC |
| 19 | * SD/MMC |
| 20 | * GbE (onboard Micrel KSZ9031) Gigabit ethernet PHY |
| 21 | * USB: |
| 22 | |
| 23 | * USB3.0 dual role port |
| 24 | * 2x USB3.0 host, 1x USB2.0 host via onboard USB3.0 hub |
| 25 | |
| 26 | * Display: HDMI/eDP/MIPI |
| 27 | * Camera: 2x CSI (one on the edge connector, one on the Q7 specified CSI ZIF) |
| 28 | * NOR Flash: onboard SPI NOR |
| 29 | * Companion Controller: onboard additional Cortex-M0 microcontroller |
| 30 | * RTC |
| 31 | * fan controller |
| 32 | * CAN |
| 33 | |
| 34 | Here is the step-by-step to boot to U-Boot on RK3399-Q7 from Theobroma Systems. |
| 35 | |
| 36 | Get the Source and build ATF binary |
| 37 | ----------------------------------- |
| 38 | |
| 39 | .. prompt:: bash |
| 40 | |
| 41 | git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 42 | cd trusted-firmware-a |
| 43 | make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31 |
| 44 | export BL31=$PWD/build/rk3399/release/bl31/bl31.elf |
| 45 | |
| 46 | Compile the U-Boot |
| 47 | ------------------ |
| 48 | |
| 49 | .. prompt:: bash |
| 50 | |
| 51 | cd ../u-boot |
| 52 | make CROSS_COMPILE=aarch64-linux-gnu- puma-rk3399_defconfig all |
| 53 | |
| 54 | This will build ``u-boot-rockchip.bin`` which can be written to an MMC device |
| 55 | (eMMC or SD card), and ``u-boot-rockchip-spi.bin`` which can be written to the |
| 56 | SPI-NOR flash. |
| 57 | |
| 58 | Flash the image |
| 59 | --------------- |
| 60 | |
| 61 | Copy ``u-boot-rockchip.bin`` to offset 32k for SD/eMMC. |
| 62 | Copy ``u-boot-rockchip-spi.bin`` to offset 0 for NOR-flash. |
| 63 | |
| 64 | SD-Card |
| 65 | ~~~~~~~ |
| 66 | |
| 67 | .. prompt:: bash |
| 68 | |
| 69 | dd if=u-boot-rockchip.bin of=/dev/sdX seek=64 |
| 70 | |
| 71 | .. note:: |
| 72 | |
| 73 | Replace ``/dev/sdX`` to match your SD card kernel device. |
| 74 | |
| 75 | eMMC |
| 76 | ~~~~ |
| 77 | |
| 78 | ``rkdeveloptool`` allows to flash the on-board eMMC via the USB OTG interface |
| 79 | with help of the Rockchip loader binary. |
| 80 | |
| 81 | To enter the USB flashing mode on Haikou baseboard, remove any SD card, insert a |
| 82 | micro-USB cable in the ``Q7 USB P1`` connector (P8), move ``SW5`` switch into |
| 83 | ``BIOS Disable`` mode, power cycle or reset the board and move ``SW5`` switch |
| 84 | back to ``Normal Boot`` mode. A new USB device should have appeared on your PC |
| 85 | (check with ``lsusb -d 2207:330c``). |
| 86 | |
| 87 | To flash U-Boot on the eMMC with ``rkdeveloptool``: |
| 88 | |
| 89 | .. prompt:: bash |
| 90 | |
| 91 | git clone https://github.com/rockchip-linux/rkdeveloptool |
| 92 | cd rkdeveloptool |
| 93 | autoreconf -i && CPPFLAGS=-Wno-format-truncation ./configure && make |
| 94 | git clone https://github.com/rockchip-linux/rkbin.git |
| 95 | cd rkbin |
| 96 | ./tools/boot_merger RKBOOT/RK3399MINIALL.ini |
| 97 | cd .. |
| 98 | ./rkdeveloptool db rkbin/rk3399_loader_v1.30.130.bin |
| 99 | ./rkdeveloptool wl 64 ../u-boot-rockchip.bin |
| 100 | |
| 101 | NOR-Flash |
| 102 | ~~~~~~~~~ |
| 103 | |
| 104 | ``rkdeveloptool`` allows to flash the on-board SPI via the USB OTG interface with |
| 105 | help of the Rockchip loader binary. |
| 106 | |
| 107 | To enter the USB flashing mode on Haikou baseboard, remove any SD card, insert a |
| 108 | micro-USB cable in the ``Q7 USB P1`` connector (P8), move ``SW5`` switch into |
| 109 | ``BIOS Disable`` mode, power cycle or reset the board and move ``SW5`` switch |
| 110 | back to ``Normal Boot`` mode. A new USB device should have appeared on your PC |
| 111 | (check with ``lsusb -d 2207:330c``). |
| 112 | |
| 113 | To flash U-Boot on the SPI with ``rkdeveloptool``: |
| 114 | |
| 115 | .. prompt:: bash |
| 116 | |
| 117 | git clone https://github.com/rockchip-linux/rkdeveloptool |
| 118 | cd rkdeveloptool |
| 119 | autoreconf -i && CPPFLAGS=-Wno-format-truncation ./configure && make |
| 120 | git clone https://github.com/rockchip-linux/rkbin.git |
| 121 | cd rkbin |
| 122 | ./tools/boot_merger RKBOOT/RK3399MINIALL_SPINOR.ini |
| 123 | cd .. |
| 124 | ./rkdeveloptool db rkbin/rk3399_loader_spinor_v1.30.114.bin |
| 125 | ./rkdeveloptool ef |
| 126 | ./rkdeveloptool wl 0 ../u-boot-rockchip-spi.bin |