blob: afa7538282f305bb295da43ef94673e76f392b66 [file] [log] [blame]
Chris Morgan8c4e3042023-04-21 10:59:19 -05001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for Anbernic RGxx3 Devices
4=================================
5
6This allows U-Boot to boot the following Anbernic devices:
7
8 - Anbernic RG353M
9 - Anbernic RG353P
10 - Anbernic RG353V
11 - Anbernic RG353VS
12 - Anbernic RG503
13
14The correct device is detected automatically by comparing ADC values
15from ADC channel 1. In the event of an RG353V, an attempt is then made
16to probe for an eMMC and if it fails the device is assumed to be an
17RG353VS. Based on the detected device, the environment variables
18"board", "board_name", and "fdtfile" are set to the correct values
19corresponding to the board which can be read by a boot script to boot
20with the correct device tree.
21
22Please note that there are some versions of the RG353 devices with
23different panels. Panel auto-detection is planned for a later date.
24
25Building U-Boot
26---------------
27
28.. code-block:: bash
29
30 $ export CROSS_COMPILE=aarch64-none-elf-
31 $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
32 $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1056MHz_v1.13.bin
33 $ make anbernic-rgxx3_defconfig
34 $ make
35
36This will build ``u-boot-rockchip.bin`` which can be written to an SD
37card.
38
39Image installation
40------------------
41
42Write the ``u-boot-rockchip.bin`` to an SD card offset 32kb from the
43start.
44
45.. code-block:: bash
46
47 $ dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=512 seek=64