]> Git Repo - u-boot.git/blob - doc/board/sophgo/licheerv_nano.rst
doc: add LicheeRV Nano and SG2002 SoC
[u-boot.git] / doc / board / sophgo / licheerv_nano.rst
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 LicheeRV Nano
4 =============
5
6 SG2002 RISC-V SoC
7 -----------------
8 The SG2002 is a high-performance, low-power 64-bit RISC-V/ARM SoC from Sophgo.
9
10 Mainline support
11 ----------------
12 The support for following drivers are already enabled:
13 1. ns16550 UART Driver.
14 2. Synopsys Designware MSHC Driver
15
16 Building
17 ~~~~~~~~
18 1. Add the RISC-V toolchain to your PATH.
19 2. Setup ARCH & cross compilation environment variable:
20
21 .. code-block:: console
22
23    export CROSS_COMPILE=<riscv64 toolchain prefix>
24    cd <U-Boot-dir>
25    make sipeed_licheerv_nano_defconfig
26    make
27
28 This will generate u-boot.bin
29
30 Booting
31 ~~~~~~~
32 Currently, we rely on vendor FSBL (First Stage Boot Loader) to initialize the
33 clock and load the u-boot image, then bootup from it.
34
35 To run u-boot.bin on top of FSBL, follow these steps:
36
37 1. Use mainline OpenSBI with a newer version than 1.5 to generate fw_dynamic.
38
39 2. Generate a compatible u-boot.bin using U-Boot with the LicheeRV Nano default
40    configuration.
41
42 3. Use the vendor-provided tool [1] to create a unified fip.bin file containing
43    FSBL, OpenSBI, and U-Boot.
44    Note that you will have to use the file cv181x.bin as the FSBL.
45
46 2. Place the generated fip.bin file into the FAT partition of the SD card.
47
48 3. Insert the SD card into the board and power it on.
49
50 The board will automatically execute the FSBL from the fip.bin file.
51 Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke
52 U-Boot.
53
54 [1]: https://github.com/sophgo/fiptool
55
56
57 Sample boot log from LicheeRV Nano board
58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 .. code-block:: none
60
61    U-Boot 2024.10 (Oct 24 2024 - 15:00:20 +0200)licheerv_nano
62
63    DRAM:  256 MiB
64    Core:  19 devices, 11 uclasses, devicetree: separate
65    MMC:   mmc@4310000: 0
66    Loading Environment from nowhere... OK
67    In:    serial@4140000
68    Out:   serial@4140000
69    Err:   serial@4140000
70    Net:   No ethernet found.
71    Hit any key to stop autoboot:  0
72    licheerv_nano#
This page took 0.028833 seconds and 4 git commands to generate.