Quentin Schulz | 220800a | 2024-06-10 15:13:38 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | SOM-RK3588-Q7 Tiger |
| 4 | =================== |
| 5 | |
| 6 | The RK3588-Q7 SoM is a Qseven-compatible (70mm x 70mm, MXM-230 |
| 7 | connector) system-on-module from Theobroma Systems, featuring the |
| 8 | Rockchip RK3588. |
| 9 | |
| 10 | It provides the following feature set: |
| 11 | * up to 16GB LPDDR4x |
| 12 | * on-module eMMC |
| 13 | * SD card (on a baseboard) via edge connector |
| 14 | * Gigabit Ethernet with on-module GbE PHY |
| 15 | * HDMI/eDP |
| 16 | * MIPI-DSI |
| 17 | * 4x MIPI-CSI (3x on FPC connectors, 1x over Q7) |
| 18 | * HDMI input over FPC connector |
| 19 | * CAN |
| 20 | * USB |
| 21 | - 1x USB 3.0 dual-role (direct connection) |
| 22 | - 2x USB 3.0 host + 1x USB 2.0 host |
| 23 | * PCIe |
| 24 | - 1x PCIe 2.1 Gen3, 4 lanes |
| 25 | - 2xSATA / 2x PCIe 2.1 Gen1, 2 lanes |
| 26 | * on-module ATtiny816 companion controller, implementing: |
| 27 | - low-power RTC functionality (ISL1208 emulation) |
| 28 | - fan controller (AMC6821 emulation) |
| 29 | * on-module Secure Element with Global Platform 2.2.1 compliant |
| 30 | JavaCard environment |
| 31 | |
| 32 | Here is the step-by-step to boot to U-Boot on SOM-RK3588-Q7 Tiger from Theobroma |
| 33 | Systems. |
| 34 | |
| 35 | Get the TF-A and DDR init (TPL) binaries |
| 36 | ---------------------------------------- |
| 37 | |
| 38 | .. prompt:: bash |
| 39 | |
| 40 | git clone https://github.com/rockchip-linux/rkbin |
| 41 | cd rkbin |
| 42 | export RKBIN=$(pwd) |
| 43 | export BL31=$RKBIN/bin/rk35/rk3588_bl31_v1.38.elf |
| 44 | export ROCKCHIP_TPL=$RKBIN/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin |
| 45 | sed -i 's/^uart baudrate=.*$/uart baudrate=115200/' tools/ddrbin_param.txt |
| 46 | sed -i 's/^uart iomux=.*$/uart iomux=2/' tools/ddrbin_param.txt |
| 47 | ./tools/ddrbin_tool tools/ddrbin_param.txt "$ROCKCHIP_TPL" |
| 48 | ./tools/boot_merger RKBOOT/RK3588MINIALL.ini |
| 49 | export RKDB=$RKBIN/rk3588_spl_loader_v1.11.112.bin |
| 50 | |
| 51 | This will setup all required external dependencies for compiling U-Boot. This will |
| 52 | be updated in the future once upstream Trusted-Firmware-A supports RK3588 or U-Boot |
| 53 | gains support for open-source DRAM initialization in TPL. |
| 54 | |
| 55 | Build U-Boot |
| 56 | ------------ |
| 57 | |
| 58 | .. prompt:: bash |
| 59 | |
| 60 | cd ../u-boot |
| 61 | make CROSS_COMPILE=aarch64-linux-gnu- tiger-rk3588_defconfig all |
| 62 | |
| 63 | This will build ``u-boot-rockchip.bin`` which can be written to an MMC device |
| 64 | (eMMC or SD card). |
| 65 | |
| 66 | Flash the image |
| 67 | --------------- |
| 68 | |
| 69 | Copy ``u-boot-rockchip.bin`` to offset 32k for SD/eMMC. |
| 70 | |
| 71 | SD-Card |
| 72 | ~~~~~~~ |
| 73 | |
| 74 | .. prompt:: bash |
| 75 | |
| 76 | dd if=u-boot-rockchip.bin of=/dev/sdX seek=64 |
| 77 | |
| 78 | .. note:: |
| 79 | |
| 80 | Replace ``/dev/sdX`` to match your SD card kernel device. |
| 81 | |
| 82 | eMMC |
| 83 | ~~~~ |
| 84 | |
| 85 | ``rkdeveloptool`` allows to flash the on-board eMMC via the USB OTG interface |
| 86 | with help of the Rockchip loader binary. |
| 87 | |
| 88 | To enter the USB flashing mode on Haikou baseboard, remove any SD card, insert a |
| 89 | micro-USB cable in the ``Q7 USB P1`` connector (P8), move ``SW5`` switch into |
| 90 | ``BIOS Disable`` mode, power cycle or reset the board and move ``SW5`` switch |
| 91 | back to ``Normal Boot`` mode. A new USB device should have appeared on your PC |
| 92 | (check with ``lsusb -d 2207:350b``). |
| 93 | |
| 94 | To flash U-Boot on the eMMC with ``rkdeveloptool``: |
| 95 | |
| 96 | .. prompt:: bash |
| 97 | |
| 98 | git clone https://github.com/rockchip-linux/rkdeveloptool |
| 99 | cd rkdeveloptool |
| 100 | autoreconf -i && CPPFLAGS=-Wno-format-truncation ./configure && make |
| 101 | ./rkdeveloptool db "$RKDB" |
| 102 | ./rkdeveloptool wl 64 ../u-boot-rockchip.bin |