diff mbox series

[v4,3/3] doc: sophgo: milkv_duo: document Milk-V Duo board

Message ID 20240128070614.7702-4-seashell11234455@gmail.com
State Accepted
Commit 36278b70512be5ae0deb6c7df3edc1e0efce39f7
Delegated to: Andes
Headers show
Series riscv: sophgo: milkv_duo: add support for Milk-V Duo board | expand

Commit Message

Kongyang Liu Jan. 28, 2024, 7:05 a.m. UTC
Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>

---

(no changes since v3)

Changes in v3:
- Add brief description of the procedure to run u-boot-dtb.bin

 doc/board/index.rst            |  1 +
 doc/board/sophgo/index.rst     |  8 +++++
 doc/board/sophgo/milkv_duo.rst | 64 ++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100644 doc/board/sophgo/index.rst
 create mode 100644 doc/board/sophgo/milkv_duo.rst

Comments

Kongyang Liu Jan. 28, 2024, 2:09 p.m. UTC | #1
Heinrich Schuchardt <xypron.glpk@gmx.de> 于2024年1月28日周日 17:16写道:
>
> On 1/28/24 08:05, Kongyang Liu wrote:
> > Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC.
> >
> > Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> >
> > ---
> >
> > (no changes since v3)
> >
> > Changes in v3:
> > - Add brief description of the procedure to run u-boot-dtb.bin
> >
> >   doc/board/index.rst            |  1 +
> >   doc/board/sophgo/index.rst     |  8 +++++
> >   doc/board/sophgo/milkv_duo.rst | 64 ++++++++++++++++++++++++++++++++++
> >   3 files changed, 73 insertions(+)
> >   create mode 100644 doc/board/sophgo/index.rst
> >   create mode 100644 doc/board/sophgo/milkv_duo.rst
> >
> > diff --git a/doc/board/index.rst b/doc/board/index.rst
> > index c96e5fda28..d0f9f355d2 100644
> > --- a/doc/board/index.rst
> > +++ b/doc/board/index.rst
> > @@ -46,6 +46,7 @@ Board-specific doc
> >      sifive/index
> >      sipeed/index
> >      socionext/index
> > +   sophgo/index
> >      st/index
> >      starfive/index
> >      ste/index
> > diff --git a/doc/board/sophgo/index.rst b/doc/board/sophgo/index.rst
> > new file mode 100644
> > index 0000000000..e097afdac6
> > --- /dev/null
> > +++ b/doc/board/sophgo/index.rst
> > @@ -0,0 +1,8 @@
> > +.. SPDX-License-Identifier: GPL-2.0+
> > +
> > +Sophgo
> > +======
> > +.. toctree::
> > +   :maxdepth: 1
> > +
> > +   milkv_duo
> > diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
> > new file mode 100644
> > index 0000000000..cb2ed1ad98
> > --- /dev/null
> > +++ b/doc/board/sophgo/milkv_duo.rst
> > @@ -0,0 +1,64 @@
> > +.. SPDX-License-Identifier: GPL-2.0+
> > +
> > +Milk-V Duo
> > +==========
> > +
> > +CV1800B RISC-V SoC
> > +------------------
> > +The CV1800B is a high-performance, low-power 1+1 64-bit RISC-V SoC from Sophgo.
> > +
> > +Mainline support
> > +----------------
> > +The support for following drivers are already enabled:
> > +1. ns16550 UART Driver.
> > +
> > +Building
> > +~~~~~~~~
> > +1. Add the RISC-V toolchain to your PATH.
> > +2. Setup ARCH & cross compilation environment variable:
> > +
> > +.. code-block:: console
> > +
> > +   export CROSS_COMPILE=<riscv64 toolchain prefix>
> > +   cd <U-Boot-dir>
> > +   make milkv_duo_defconfig
> > +   make
> > +
> > +This will generate u-boot-dtb.bin
> > +
> > +Booting
> > +~~~~~~~
> > +Currently, we rely on vendor FSBL(First Stage Boot Loader) to initialize the
> > +clock and load the u-boot image, then bootup from it.
> > +
> > +Alternatively, to run u-boot-dtb.bin on top of FSBL, follow these steps:
> > +
> > +1. Use the vendor-provided tool to create a unified fip.bin file containing
> > +   FSBL, OpenSBI, and U-Boot.
>
> Hello Kongyang,
>
> thank you for providing a documentation for the board.
>
> Concerning the usage of fip.bin it would be helpful to add more detail:
>
> * From where can the vendor code be downloaded?
> * Which are the commands to execute?
>

We have leveraged the BuildSDK from the Milk-V Duo project
(https://github.com/milkv-duo/duo-buildroot-sdk) and made slight modifications
to ensure compatibility with the mainline OpenSBI and U-Boot. After the
repository reaches a stable state, we will publish it on GitHub.

Best regards
Kongyang Liu

> Best regards
>
> Heinrich
>
> > +
> > +2. Place the generated fip.bin file into the FAT partition of the SD card.
> > +
> > +3. Insert the SD card into the board and power it on.
> > +
> > +The board will automatically execute the FSBL from the fip.bin file.
> > +Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke
> > +U-Boot.
> > +
> > +
> > +Sample boot log from Milk-V Duo board
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +.. code-block:: none
> > +
> > +   U-Boot 2024.01-rc5-00010-g51965baa36 (Dec 28 2023 - 13:15:53 +0800)milkv_duo
> > +
> > +   DRAM:  63.3 MiB
> > +   Core:  10 devices, 8 uclasses, devicetree: separate
> > +   Loading Environment from nowhere... OK
> > +   In:    serial@4140000
> > +   Out:   serial@4140000
> > +   Err:   serial@4140000
> > +   Net:   No ethernet found.
> > +   milkv_duo# cpu detail
> > +     0: cpu@0      rv64imafdc
> > +      ID = 0, freq = 0 Hz: L1 cache, MMU
> > +   milkv_duo#
>
Yixun Lan Jan. 28, 2024, 3:05 p.m. UTC | #2
Hi Heinrich S


On 10:16 Sun 28 Jan     , Heinrich Schuchardt wrote:
> On 1/28/24 08:05, Kongyang Liu wrote:
> > Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC.
> >
> > Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> >
> > ---
> >
> > (no changes since v3)
> >
> > Changes in v3:
> > - Add brief description of the procedure to run u-boot-dtb.bin
> >
> >   doc/board/index.rst            |  1 +
> >   doc/board/sophgo/index.rst     |  8 +++++
> >   doc/board/sophgo/milkv_duo.rst | 64 ++++++++++++++++++++++++++++++++++
> >   3 files changed, 73 insertions(+)
> >   create mode 100644 doc/board/sophgo/index.rst
> >   create mode 100644 doc/board/sophgo/milkv_duo.rst
> >
> > diff --git a/doc/board/index.rst b/doc/board/index.rst
> > index c96e5fda28..d0f9f355d2 100644
> > --- a/doc/board/index.rst
> > +++ b/doc/board/index.rst
> > @@ -46,6 +46,7 @@ Board-specific doc
> >      sifive/index
> >      sipeed/index
> >      socionext/index
> > +   sophgo/index
> >      st/index
> >      starfive/index
> >      ste/index
> > diff --git a/doc/board/sophgo/index.rst b/doc/board/sophgo/index.rst
> > new file mode 100644
> > index 0000000000..e097afdac6
> > --- /dev/null
> > +++ b/doc/board/sophgo/index.rst
> > @@ -0,0 +1,8 @@
> > +.. SPDX-License-Identifier: GPL-2.0+
> > +
> > +Sophgo
> > +======
> > +.. toctree::
> > +   :maxdepth: 1
> > +
> > +   milkv_duo
> > diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
> > new file mode 100644
> > index 0000000000..cb2ed1ad98
> > --- /dev/null
> > +++ b/doc/board/sophgo/milkv_duo.rst
> > @@ -0,0 +1,64 @@
> > +.. SPDX-License-Identifier: GPL-2.0+
> > +
> > +Milk-V Duo
> > +==========
> > +
> > +CV1800B RISC-V SoC
> > +------------------
> > +The CV1800B is a high-performance, low-power 1+1 64-bit RISC-V SoC from Sophgo.
> > +
> > +Mainline support
> > +----------------
> > +The support for following drivers are already enabled:
> > +1. ns16550 UART Driver.
> > +
> > +Building
> > +~~~~~~~~
> > +1. Add the RISC-V toolchain to your PATH.
> > +2. Setup ARCH & cross compilation environment variable:
> > +
> > +.. code-block:: console
> > +
> > +   export CROSS_COMPILE=<riscv64 toolchain prefix>
> > +   cd <U-Boot-dir>
> > +   make milkv_duo_defconfig
> > +   make
> > +
> > +This will generate u-boot-dtb.bin
> > +
> > +Booting
> > +~~~~~~~
> > +Currently, we rely on vendor FSBL(First Stage Boot Loader) to initialize the
> > +clock and load the u-boot image, then bootup from it.
> > +
> > +Alternatively, to run u-boot-dtb.bin on top of FSBL, follow these steps:
> > +
> > +1. Use the vendor-provided tool to create a unified fip.bin file containing
> > +   FSBL, OpenSBI, and U-Boot.
> 
> Hello Kongyang,
> 
> thank you for providing a documentation for the board.
> 
> Concerning the usage of fip.bin it would be helpful to add more detail:
> 
> * From where can the vendor code be downloaded?
..

> * Which are the commands to execute?
for fip.bin, which is located inside the first vfat partition of SD card, it will
be parsed & loaded & excuted by ROM after power on (haven't looked too deep into this)

also the fip.bin image is a combination of FSBL+DDR param+ATF?/OpenSBI+U-boot
please see the link below if you're interested
 https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/fsbl/plat/cv180x/fiptool.py#L201

> 
> Best regards
> 
> Heinrich
> 
> > +
> > +2. Place the generated fip.bin file into the FAT partition of the SD card.
> > +
> > +3. Insert the SD card into the board and power it on.
> > +
> > +The board will automatically execute the FSBL from the fip.bin file.
> > +Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke
> > +U-Boot.
> > +
> > +
> > +Sample boot log from Milk-V Duo board
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +.. code-block:: none
> > +
> > +   U-Boot 2024.01-rc5-00010-g51965baa36 (Dec 28 2023 - 13:15:53 +0800)milkv_duo
> > +
> > +   DRAM:  63.3 MiB
> > +   Core:  10 devices, 8 uclasses, devicetree: separate
> > +   Loading Environment from nowhere... OK
> > +   In:    serial@4140000
> > +   Out:   serial@4140000
> > +   Err:   serial@4140000
> > +   Net:   No ethernet found.
> > +   milkv_duo# cpu detail
> > +     0: cpu@0      rv64imafdc
> > +      ID = 0, freq = 0 Hz: L1 cache, MMU
> > +   milkv_duo#
Leo Liang Jan. 31, 2024, 8:25 a.m. UTC | #3
On Sun, Jan 28, 2024 at 03:05:26PM +0800, Kongyang Liu wrote:
> Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC.
> 
> Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
> ---
> 
> (no changes since v3)
> 
> Changes in v3:
> - Add brief description of the procedure to run u-boot-dtb.bin
> 
>  doc/board/index.rst            |  1 +
>  doc/board/sophgo/index.rst     |  8 +++++
>  doc/board/sophgo/milkv_duo.rst | 64 ++++++++++++++++++++++++++++++++++
>  3 files changed, 73 insertions(+)
>  create mode 100644 doc/board/sophgo/index.rst
>  create mode 100644 doc/board/sophgo/milkv_duo.rst

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
diff mbox series

Patch

diff --git a/doc/board/index.rst b/doc/board/index.rst
index c96e5fda28..d0f9f355d2 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -46,6 +46,7 @@  Board-specific doc
    sifive/index
    sipeed/index
    socionext/index
+   sophgo/index
    st/index
    starfive/index
    ste/index
diff --git a/doc/board/sophgo/index.rst b/doc/board/sophgo/index.rst
new file mode 100644
index 0000000000..e097afdac6
--- /dev/null
+++ b/doc/board/sophgo/index.rst
@@ -0,0 +1,8 @@ 
+.. SPDX-License-Identifier: GPL-2.0+
+
+Sophgo
+======
+.. toctree::
+   :maxdepth: 1
+
+   milkv_duo
diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
new file mode 100644
index 0000000000..cb2ed1ad98
--- /dev/null
+++ b/doc/board/sophgo/milkv_duo.rst
@@ -0,0 +1,64 @@ 
+.. SPDX-License-Identifier: GPL-2.0+
+
+Milk-V Duo
+==========
+
+CV1800B RISC-V SoC
+------------------
+The CV1800B is a high-performance, low-power 1+1 64-bit RISC-V SoC from Sophgo.
+
+Mainline support
+----------------
+The support for following drivers are already enabled:
+1. ns16550 UART Driver.
+
+Building
+~~~~~~~~
+1. Add the RISC-V toolchain to your PATH.
+2. Setup ARCH & cross compilation environment variable:
+
+.. code-block:: console
+
+   export CROSS_COMPILE=<riscv64 toolchain prefix>
+   cd <U-Boot-dir>
+   make milkv_duo_defconfig
+   make
+
+This will generate u-boot-dtb.bin
+
+Booting
+~~~~~~~
+Currently, we rely on vendor FSBL(First Stage Boot Loader) to initialize the
+clock and load the u-boot image, then bootup from it.
+
+Alternatively, to run u-boot-dtb.bin on top of FSBL, follow these steps:
+
+1. Use the vendor-provided tool to create a unified fip.bin file containing
+   FSBL, OpenSBI, and U-Boot.
+
+2. Place the generated fip.bin file into the FAT partition of the SD card.
+
+3. Insert the SD card into the board and power it on.
+
+The board will automatically execute the FSBL from the fip.bin file.
+Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke
+U-Boot.
+
+
+Sample boot log from Milk-V Duo board
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. code-block:: none
+
+   U-Boot 2024.01-rc5-00010-g51965baa36 (Dec 28 2023 - 13:15:53 +0800)milkv_duo
+
+   DRAM:  63.3 MiB
+   Core:  10 devices, 8 uclasses, devicetree: separate
+   Loading Environment from nowhere... OK
+   In:    serial@4140000
+   Out:   serial@4140000
+   Err:   serial@4140000
+   Net:   No ethernet found.
+   milkv_duo# cpu detail
+     0: cpu@0      rv64imafdc
+      ID = 0, freq = 0 Hz: L1 cache, MMU
+   milkv_duo#