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