blob: 7d1beb423ce6297a8e28d57970459529c7889c21 [file] [log] [blame]
Chris Morgan6cf6fe22023-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
Chris Morgan182d0ba2023-05-15 11:00:32 -050010 - Anbernic RG353PS
Chris Morgan6cf6fe22023-04-21 10:59:19 -050011 - Anbernic RG353V
12 - Anbernic RG353VS
13 - Anbernic RG503
14
15The correct device is detected automatically by comparing ADC values
Chris Morgan182d0ba2023-05-15 11:00:32 -050016from ADC channel 1. In the event of an RG353V or RG353P, an attempt
17is then made to probe for an eMMC and if it fails the device is assumed
18to be an RG353VS or RG353PS. Based on the detected device, the
19environment variables "board", "board_name", and "fdtfile" are set to
20the correct values corresponding to the board which can be read by a
21boot script to boot with the correct device tree. If the board detected
22is not of type RG503 (which currently has only 1 panel revision) a
23panel detect is then performed by probing a "dummy" display on the DSI
24bus and then querying the display ID. The display ID is then compared
25to a table to get the known compatible string for use in Linux, and
26this string is saved as an environment variable of "panel".
Chris Morgan6cf6fe22023-04-21 10:59:19 -050027
Chris Morgan182d0ba2023-05-15 11:00:32 -050028FDT fixups are performed in the event of an RG353M to change the device
29name, or in the event the panel detected does not match the devicetree.
30This allows Linux to load the correct panel driver without having to
31know exactly which panel is used (as there is no user distingushable
32way to tell).
Chris Morgan6cf6fe22023-04-21 10:59:19 -050033
34Building U-Boot
35---------------
36
37.. code-block:: bash
38
Chris Morgan182d0ba2023-05-15 11:00:32 -050039 $ export CROSS_COMPILE=aarch64-linux-gnu-
Chris Morgan6cf6fe22023-04-21 10:59:19 -050040 $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf
41 $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1056MHz_v1.13.bin
42 $ make anbernic-rgxx3_defconfig
43 $ make
44
45This will build ``u-boot-rockchip.bin`` which can be written to an SD
46card.
47
48Image installation
49------------------
50
51Write the ``u-boot-rockchip.bin`` to an SD card offset 32kb from the
Chris Morgan182d0ba2023-05-15 11:00:32 -050052start. Please note that eMMC booting has not been tested at this time.
Chris Morgan6cf6fe22023-04-21 10:59:19 -050053
54.. code-block:: bash
55
56 $ dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=512 seek=64