From: Yao Zi <me@ziyao.cc>
To: "João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>,
u-boot@lists.u-boot-project.org, "Yao Zi" <me@ziyao.cc>
Cc: Tom Rini <trini@konsulko.com>, Sumit Garg <sumit.garg@kernel.org>,
Gui-Dong Han <hanguidong02@gmail.com>,
Joshua Milas <josh.milas@gmail.com>,
Chen Wang <chen.wang@linux.dev>,
Inochi Amaoto <inochiama@gmail.com>,
Lukasz Majewski <lukma@nabladev.com>, Peng Fan <peng.fan@nxp.com>,
Tim Ouyang <tim609@andestech.com>,
Leo Liang <leo.liang@sifive.com>,
Hiago De Franco <hfranco@baylibre.com>,
Raymond Mao <raymond.mao@riscstar.com>,
Michal Simek <michal.simek@amd.com>, Yixun Lan <dlan@kernel.org>,
Andrei Lalaev <andrey.lalaev@gmail.com>,
E Shattow <e@freeshell.de>, Zhuxu Ran <zhuxu_ran@zohomail.com>
Subject: Re: [PATCH v2 2/2] board: sophgo: Add support for Milk-V Duo S
Date: Wed, 4 Nov 2026 04:31:57 +0000 [thread overview]
Message-ID: <auq1Pf0xDMoxRpXR@pie> (raw)
In-Reply-To: <20261025-upstream-v1-milk-duo-s-v2-2-192b68915c92@gmail.com>
On Sun, Oct 25, 2026 at 11:30:24AM -0300, João Paulo Gonçalves wrote:
> Add support for the Milk-V Duo S, a development board based on the
> Sophgo SG2000 SoC with 512 MiB of RAM.
>
> The SG2000 differs from the CV1800B used on the Milk-V Duo 64M and the
> SG2002 used on the Milk-V Duo 256M, but these SoCs share most of their
> IP blocks, including the CPU core, so the existing CV1800B support can
> be reused.
>
> Add a separate board directory, target and defconfig for the Duo S,
> based on the Milk-V Duo 256M ones. Like the Duo 256M, it reuses the
> common Milk-V Duo board code. The defconfig uses the upstream devicetree
> via OF_UPSTREAM.
>
> Link: https://milkv.io/docs/duo/getting-started/duos
> Acked-by: Andrei Lalaev <andrey.lalaev@gmail.com>
> Acked-by: Hiago De Franco <hfranco@baylibre.com>
> Signed-off-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
> ---
> arch/riscv/Kconfig | 4 +
> board/sophgo/milkv_duo_s/Kconfig | 30 +++++++
> board/sophgo/milkv_duo_s/MAINTAINERS | 8 ++
> board/sophgo/milkv_duo_s/Makefile | 6 ++
> board/sophgo/milkv_duo_s/milkv_duo_s.env | 8 ++
> configs/milkv_duo_s_defconfig | 43 ++++++++++
> doc/board/sophgo/index.rst | 1 +
> doc/board/sophgo/milkv_duo_s.rst | 131 +++++++++++++++++++++++++++++++
Please separate documentation changes into another commit.
> include/configs/milkv_duo_s.h | 12 +++
> 9 files changed, 243 insertions(+)
...
> diff --git a/configs/milkv_duo_s_defconfig b/configs/milkv_duo_s_defconfig
> new file mode 100644
> index 000000000000..41a31c4ad46c
> --- /dev/null
> +++ b/configs/milkv_duo_s_defconfig
> @@ -0,0 +1,43 @@
> +CONFIG_RISCV=y
> +CONFIG_SYS_MALLOC_LEN=0x820000
> +CONFIG_SYS_MALLOC_F_LEN=0x8000
> +CONFIG_NR_DRAM_BANKS=1
> +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x82300000
> +CONFIG_DEFAULT_DEVICE_TREE="sophgo/sg2000-milkv-duo-s"
> +CONFIG_SYS_LOAD_ADDR=0x80080000
> +CONFIG_IDENT_STRING=" milkv_duo_s"
> +CONFIG_TARGET_MILKV_DUO_S=y
> +CONFIG_ARCH_RV64I=y
> +CONFIG_RISCV_SMODE=y
> +CONFIG_FIT=y
> +CONFIG_BOOTSTD_FULL=y
> +# CONFIG_BOOTMETH_EFI_BOOTMGR is not set
> +CONFIG_SD_BOOT=y
> +CONFIG_SYS_CBSIZE=512
> +CONFIG_SYS_PBSIZE=544
> +CONFIG_SYS_PROMPT="milkv_duo_s# "
> +# CONFIG_CMD_BOOTDEV is not set
> +CONFIG_CMD_MBR=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_POWEROFF=y
> +# CONFIG_CMD_MII is not set
> +CONFIG_CMD_EXT4_WRITE=y
> +# CONFIG_ISO_PARTITION is not set
> +# CONFIG_EFI_PARTITION is not set
Personally speaking, I prefer to turn on EFI related stuff
(BOOTMETH_EFI_BOOTMGR and EFI_PARTITION). Here EFI is more practical
since Duo-S carries 512MiB RAM, and I do have a device booted through
EFI.
But anyway, it's a embedded device and takes forever to boot a generic
distribution, so what you've done here is fine, too.
...
> diff --git a/doc/board/sophgo/index.rst b/doc/board/sophgo/index.rst
> index 19c9a19b1d4b..61aceafceea3 100644
> --- a/doc/board/sophgo/index.rst
> +++ b/doc/board/sophgo/index.rst
> @@ -7,4 +7,5 @@ Sophgo
>
> milkv_duo
> milkv_duo_256m
> + milkv_duo_s
> licheerv_nano
> diff --git a/doc/board/sophgo/milkv_duo_s.rst b/doc/board/sophgo/milkv_duo_s.rst
> new file mode 100644
> index 000000000000..9f6bf04d1842
> --- /dev/null
> +++ b/doc/board/sophgo/milkv_duo_s.rst
...
> +Boot flow
> +~~~~~~~~~
> +The board boots from a FIP image, fip.bin, which contains the following
> +binaries:
> +
> +- FSBL (First Stage Boot Loader): the vendor bootloader [1]. It serves the
> + same purpose as U-Boot SPL, but U-Boot does not support SPL for this SoC
> + yet, so the vendor FSBL is required.
> +- Coprocessor firmware: the vendor firmware (cvirtos.bin) or custom firmware
> + for the C906L coprocessor. It is not needed to boot U-Boot, but it is
> + required by fiptool.
Please confirm whether this is correct. I remembered the coprocessor
firmware is optional, too.
> +- OpenSBI (fw_dynamic.bin), built with the board devicetree.
> +- U-Boot (u-boot.bin).
...
> +5. Set the board's boot core selection switch to RISC-V.
It'll be nice to describe the exact position of the switch.
...
Regards,
Yao Zi
next prev parent reply other threads:[~2026-11-04 4:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 14:30 [PATCH v2 0/2] board: sophgo: Add support for Milk-V Duo S João Paulo Gonçalves
2026-10-25 14:30 ` [PATCH v2 1/2] clk: sophgo: cv1800b: Add SG2000 compatible string João Paulo Gonçalves
2026-10-25 14:30 ` [PATCH v2 2/2] board: sophgo: Add support for Milk-V Duo S João Paulo Gonçalves
2026-11-04 4:31 ` Yao Zi [this message]
2026-11-07 17:52 ` João Paulo Gonçalves
2026-11-07 18:32 ` Yao Zi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auq1Pf0xDMoxRpXR@pie \
--to=me@ziyao.cc \
--cc=andrey.lalaev@gmail.com \
--cc=chen.wang@linux.dev \
--cc=dlan@kernel.org \
--cc=e@freeshell.de \
--cc=hanguidong02@gmail.com \
--cc=hfranco@baylibre.com \
--cc=inochiama@gmail.com \
--cc=josh.milas@gmail.com \
--cc=jpaulo.silvagoncalves@gmail.com \
--cc=leo.liang@sifive.com \
--cc=lukma@nabladev.com \
--cc=michal.simek@amd.com \
--cc=peng.fan@nxp.com \
--cc=raymond.mao@riscstar.com \
--cc=sumit.garg@kernel.org \
--cc=tim609@andestech.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=zhuxu_ran@zohomail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox