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 U-Boot
override to preserve the existing networking support.

Signed-off-by: Zhuxu Ran <[email protected]>
---
 arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi | 14 ++++++++++++++
 board/sophgo/milkv_duo/MAINTAINERS           |  1 +
 configs/milkv_duo_defconfig                  |  3 ++-
 3 files changed, 17 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..509d99936e2
--- /dev/null
+++ b/arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/*
+ * Copyright (C) 2026 Zhuxu Ran <[email protected]>
+ */
+
+/*
+ * 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.
+ */
+&gmac0 {
+       status = "okay";
+};
diff --git a/board/sophgo/milkv_duo/MAINTAINERS 
b/board/sophgo/milkv_duo/MAINTAINERS
index 651a0592f7a..a6ff5585240 100644
--- a/board/sophgo/milkv_duo/MAINTAINERS
+++ b/board/sophgo/milkv_duo/MAINTAINERS
@@ -4,3 +4,4 @@ S:      Maintained
 F:     board/sophgo/milkv_duo/
 F:     configs/milkv_duo_defconfig
 F:     doc/board/sophgo/milkv_duo.rst
+F:     arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi
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

-- 
2.55.0

Reply via email to