Kongyang Liu | d5f3ef7 | 2024-01-28 15:05:26 +0800 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | Milk-V Duo |
| 4 | ========== |
| 5 | |
| 6 | CV1800B RISC-V SoC |
| 7 | ------------------ |
| 8 | The CV1800B is a high-performance, low-power 1+1 64-bit RISC-V SoC from Sophgo. |
| 9 | |
| 10 | Mainline support |
| 11 | ---------------- |
| 12 | The support for following drivers are already enabled: |
| 13 | 1. ns16550 UART Driver. |
| 14 | |
| 15 | Building |
| 16 | ~~~~~~~~ |
| 17 | 1. Add the RISC-V toolchain to your PATH. |
| 18 | 2. Setup ARCH & cross compilation environment variable: |
| 19 | |
| 20 | .. code-block:: console |
| 21 | |
| 22 | export CROSS_COMPILE=<riscv64 toolchain prefix> |
| 23 | cd <U-Boot-dir> |
| 24 | make milkv_duo_defconfig |
| 25 | make |
| 26 | |
| 27 | This will generate u-boot-dtb.bin |
| 28 | |
| 29 | Booting |
| 30 | ~~~~~~~ |
| 31 | Currently, we rely on vendor FSBL(First Stage Boot Loader) to initialize the |
| 32 | clock and load the u-boot image, then bootup from it. |
| 33 | |
| 34 | Alternatively, to run u-boot-dtb.bin on top of FSBL, follow these steps: |
| 35 | |
| 36 | 1. Use the vendor-provided tool to create a unified fip.bin file containing |
| 37 | FSBL, OpenSBI, and U-Boot. |
| 38 | |
| 39 | 2. Place the generated fip.bin file into the FAT partition of the SD card. |
| 40 | |
| 41 | 3. Insert the SD card into the board and power it on. |
| 42 | |
| 43 | The board will automatically execute the FSBL from the fip.bin file. |
| 44 | Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke |
| 45 | U-Boot. |
| 46 | |
| 47 | |
| 48 | Sample boot log from Milk-V Duo board |
| 49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 50 | .. code-block:: none |
| 51 | |
| 52 | U-Boot 2024.01-rc5-00010-g51965baa36 (Dec 28 2023 - 13:15:53 +0800)milkv_duo |
| 53 | |
| 54 | DRAM: 63.3 MiB |
| 55 | Core: 10 devices, 8 uclasses, devicetree: separate |
| 56 | Loading Environment from nowhere... OK |
| 57 | In: serial@4140000 |
| 58 | Out: serial@4140000 |
| 59 | Err: serial@4140000 |
| 60 | Net: No ethernet found. |
| 61 | milkv_duo# cpu detail |
| 62 | 0: cpu@0 rv64imafdc |
| 63 | ID = 0, freq = 0 Hz: L1 cache, MMU |
| 64 | milkv_duo# |