[PATCH 2/3] riscv: milkv_duo: Use upstream devicetree

Junhui Liu junhui.liu at pigmoral.tech
Wed Jul 8 18:30:14 CEST 2026


Hi Zhuxu,

On Mon Jul 6, 2026 at 9:43 AM CST, Zhuxu Ran wrote:
> Switch Milk-V Duo to the upstream CV1800B devicetree by enabling
> CONFIG_OF_UPSTREAM and selecting sophgo/cv1800b-milkv-duo.
>
> The upstream devicetree keeps the Ethernet MAC disabled. Add a
> small U-Boot override to keep the existing U-Boot networking
> support enabled.
>
> Signed-off-by: Zhuxu Ran <zhuxu_ran at zohomail.com>
> ---
>  arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi | 12 ++++++++++++
>  configs/milkv_duo_defconfig                  |  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi b/arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi
> new file mode 100644
> index 00000000000..158b02a543a
> --- /dev/null
> +++ b/arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi
> @@ -0,0 +1,12 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * U-Boot overrides for Milk-V Duo.
> + *
> + * The upstream Linux device tree describes the CV1800B Ethernet MAC, but
> + * keeps it disabled. Enable it here to preserve the existing U-Boot
> + * networking support when using the upstream device tree.
> + */

What about moving this comment to be right above the &gmac0 node,
instead of having it as a top-level file description? This file may be
extended with other U-Boot overrides in the future.

> +
> +&gmac0 {
> +	status = "okay";
> +};
> diff --git a/configs/milkv_duo_defconfig b/configs/milkv_duo_defconfig
> index f1f3930564b..9d6b80362d5 100644
> --- a/configs/milkv_duo_defconfig
> +++ b/configs/milkv_duo_defconfig
> @@ -4,7 +4,8 @@ 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="cv1800b-milkv-duo"
> +CONFIG_DEFAULT_DEVICE_TREE="sophgo/cv1800b-milkv-duo"
> +CONFIG_OF_UPSTREAM=y
>  CONFIG_SYS_LOAD_ADDR=0x80080000
>  CONFIG_IDENT_STRING="milkv_duo"
>  CONFIG_TARGET_MILKV_DUO=y

-- 
Best regards,
Junhui Liu



More information about the U-Boot mailing list