blob: 1e63e6951e2c5e25bf4f4fa3aabd612393e0853d [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
Chris Morgan547db7c2024-01-02 09:46:54 -06008 - Anbernic RG-ARC-D
9 - Anbernic RG-ARC-S
Chris Morgan8c4e3042023-04-21 10:59:19 -050010 - Anbernic RG353M
11 - Anbernic RG353P
Chris Morganb01ff3e2023-05-15 11:00:32 -050012 - Anbernic RG353PS
Chris Morgan8c4e3042023-04-21 10:59:19 -050013 - Anbernic RG353V
14 - Anbernic RG353VS
15 - Anbernic RG503
16
Chris Morgan547db7c2024-01-02 09:46:54 -060017Additionally, the following very similar non-Anbernic devices are also
18supported:
19
Chris Morgan4b181142024-02-05 12:58:53 -060020 - Powkiddy RGB10MAX3
Chris Morgan547db7c2024-01-02 09:46:54 -060021 - Powkiddy RGB30
22 - Powkiddy RK2023
23
Chris Morgan8c4e3042023-04-21 10:59:19 -050024The correct device is detected automatically by comparing ADC values
Chris Morganb01ff3e2023-05-15 11:00:32 -050025from ADC channel 1. In the event of an RG353V or RG353P, an attempt
26is then made to probe for an eMMC and if it fails the device is assumed
27to be an RG353VS or RG353PS. Based on the detected device, the
28environment variables "board", "board_name", and "fdtfile" are set to
29the correct values corresponding to the board which can be read by a
Chris Morgan547db7c2024-01-02 09:46:54 -060030boot script to boot with the correct device tree. If a board is defined
31as requiring panel detection, a panel detect is then performed by
32probing a "dummy" display on the DSI bus and then querying the display
33ID. The display ID is then compared to a table to get the known
34compatible string for use in Linux, and this string is saved as an
35environment variable of "panel".
Chris Morgan8c4e3042023-04-21 10:59:19 -050036
Chris Morganb01ff3e2023-05-15 11:00:32 -050037FDT fixups are performed in the event of an RG353M to change the device
38name, or in the event the panel detected does not match the devicetree.
39This allows Linux to load the correct panel driver without having to
40know exactly which panel is used (as there is no user distingushable
41way to tell).
Chris Morgan8c4e3042023-04-21 10:59:19 -050042
43Building U-Boot
44---------------
45
46.. code-block:: bash
47
Chris Morganb01ff3e2023-05-15 11:00:32 -050048 $ export CROSS_COMPILE=aarch64-linux-gnu-
Chris Morgan8c4e3042023-04-21 10:59:19 -050049 $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
50 $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1056MHz_v1.13.bin
51 $ make anbernic-rgxx3_defconfig
52 $ make
53
54This will build ``u-boot-rockchip.bin`` which can be written to an SD
55card.
56
57Image installation
58------------------
59
60Write the ``u-boot-rockchip.bin`` to an SD card offset 32kb from the
Chris Morganb01ff3e2023-05-15 11:00:32 -050061start. Please note that eMMC booting has not been tested at this time.
Chris Morgan8c4e3042023-04-21 10:59:19 -050062
63.. code-block:: bash
64
65 $ dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=512 seek=64