* [PATCH v2 0/2] riscv: dts: sophgo: add cv1800b ethernet support overlay
@ 2026-11-04 14:52 Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 1/2] riscv: dts: sophgo: make sg2002-milkv-duo256m-eth overlay generic Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 2/2] riscv: dts: sophgo: add Milk-V Duo ethernet DTB Hiago De Franco
0 siblings, 2 replies; 3+ messages in thread
From: Hiago De Franco @ 2026-11-04 14:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Alexandre Ghiti, Chen-Yu Yeh, devicetree, linux-riscv, sophgo,
linux-kernel
Hi,
The first version of this patch added a board specific ethernet overlay
for the Milk-V Duo. During the review it was pointed out that the Milk-V
Duo 256M already has an identical overlay, because both boards just need
gmac0 and the mdio multiplexer from cv180x.dtsi to be enabled. Instead of
adding one overlay per board, this series makes that overlay shared.
1/2 renames sg2002-milkv-duo256m-eth.dtso to cv18xx-eth.dtso. Only the
file name and its comment change, and the composed DTB for the Milk-V Duo
256M keeps the sg2002-milkv-duo256m-eth.dtb name.
2/2 composes the same overlay with the Milk-V Duo DTB, adding
cv1800b-milkv-duo-eth.dtb.
Changes in v2:
- Use a single shared cv18xx-eth.dtso instead of a board specific overlay.
- Rebase on v7.4-rc1.
- Link to v1: https://patch.msgid.link/20261001-milkv-duo-eth-overlay-v1-1-78bc1454f35b@baylibre.com
Testing on a Milk-V Duo (CV1800B) with its IO base board, booting the
Milk-V Duo DTB with the ethernet overlay applied by U-Boot:
U-Boot 2026.10-00013-g3c998cf93c4f (Nov 04 2026 - 11:35:44 -0300)milkv_duo
DRAM: 63.3 MiB
Core: 22 devices, 15 uclasses, devicetree: separate
MMC: mmc@4310000: 0
Loading Environment from FAT... OK
In: serial@4140000
Out: serial@4140000
Err: serial@4140000
Net: eth0: ethernet@4070000
Hit any key to stop autoboot: 0
** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
1: Duo-OS (Milk-V Duo Boards Distro)
Retrieving file: /Image.gz
append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
Retrieving file: /cv1800b-milkv-duo.dtb
Retrieving file: /cv18xx-eth.dtbo
Retrieving file: /cv1800b-milkv-duo-led-blink.dtbo
Uncompressing Kernel Image to 0
Booting using the fdt blob at 0x82200000
Working FDT set to 82200000
Loading Device Tree to 000000008355e000, end 0000000083566fff ... OK
Working FDT set to 8355e000
Starting kernel ...
[...]
root@milkv-duo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 0a:6e:82:b5:51:74 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.68/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
root@milkv-duo:~# dmesg | grep stmmaceth
[ 0.500755] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
[ 0.500827] stmmaceth 4070000.ethernet: IRQ sfty not found
[ 0.501156] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
[ 0.524693] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[ 0.524795] stmmaceth 4070000.ethernet: DWMAC1000
[ 0.524819] stmmaceth 4070000.ethernet: DMA HW capability register supported
[ 0.524838] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
[ 0.524860] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
[ 0.524878] stmmaceth 4070000.ethernet: COE Type 2
[ 0.524896] stmmaceth 4070000.ethernet: TX Checksum insertion supported
[ 0.524916] stmmaceth 4070000.ethernet: Normal descriptors
[ 0.524935] stmmaceth 4070000.ethernet: Ring mode enabled
[ 0.524952] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 0.525082] stmmaceth 4070000.ethernet: device MAC address 0a:6e:82:b5:51:74
[ 12.726604] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 12.752406] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
[ 12.792299] stmmaceth 4070000.ethernet eth0: No Safety Features support found
[ 12.826448] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
[ 12.826535] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
[ 14.892433] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
Hiago De Franco (2):
riscv: dts: sophgo: make sg2002-milkv-duo256m-eth overlay generic
riscv: dts: sophgo: add Milk-V Duo ethernet DTB
arch/riscv/boot/dts/sophgo/Makefile | 6 ++++--
.../dts/sophgo/{sg2002-milkv-duo256m-eth.dtso => cv18xx-eth.dtso} | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
Best regards,
--
Hiago
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] riscv: dts: sophgo: make sg2002-milkv-duo256m-eth overlay generic
2026-11-04 14:52 [PATCH v2 0/2] riscv: dts: sophgo: add cv1800b ethernet support overlay Hiago De Franco
@ 2026-11-04 14:52 ` Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 2/2] riscv: dts: sophgo: add Milk-V Duo ethernet DTB Hiago De Franco
1 sibling, 0 replies; 3+ messages in thread
From: Hiago De Franco @ 2026-11-04 14:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Alexandre Ghiti, Chen-Yu Yeh, devicetree, linux-riscv, sophgo,
linux-kernel
The overlay only enables gmac0 and the MDIO mux, which are common to the
CV180x and SG200x SoCs, so it can be reused by other boards such as the
Milk-V Duo (CV1800B).
Rename it to cv18xx-eth.dtso.
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
arch/riscv/boot/dts/sophgo/Makefile | 4 ++--
.../dts/sophgo/{sg2002-milkv-duo256m-eth.dtso => cv18xx-eth.dtso} | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index 49639cb0888b..440acd0aa55a 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,12 +1,12 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += cv18xx-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-milkv-duo256m.dtb
-sg2002-milkv-duo256m-eth-dtbs := sg2002-milkv-duo256m.dtb sg2002-milkv-duo256m-eth.dtbo
+sg2002-milkv-duo256m-eth-dtbs := sg2002-milkv-duo256m.dtb cv18xx-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-milkv-duo256m-eth.dtb
-dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-milkv-duo256m-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v2.dtb
diff --git a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m-eth.dtso b/arch/riscv/boot/dts/sophgo/cv18xx-eth.dtso
similarity index 66%
rename from arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m-eth.dtso
rename to arch/riscv/boot/dts/sophgo/cv18xx-eth.dtso
index cc93746d932c..cdb8db063977 100644
--- a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m-eth.dtso
+++ b/arch/riscv/boot/dts/sophgo/cv18xx-eth.dtso
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
- * Enable ethernet on Milk-V Duo 256M with the USB & Ethernet IO board.
+ * Enable ethernet on boards that use the internal ethernet PHY of the
+ * CV180x and SG200x SoCs.
*
* Copyright (c) 2026, Chen-Yu Yeh <chenyou910331@gmail.com>
*/
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] riscv: dts: sophgo: add Milk-V Duo ethernet DTB
2026-11-04 14:52 [PATCH v2 0/2] riscv: dts: sophgo: add cv1800b ethernet support overlay Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 1/2] riscv: dts: sophgo: make sg2002-milkv-duo256m-eth overlay generic Hiago De Franco
@ 2026-11-04 14:52 ` Hiago De Franco
1 sibling, 0 replies; 3+ messages in thread
From: Hiago De Franco @ 2026-11-04 14:52 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Alexandre Ghiti, Chen-Yu Yeh, devicetree, linux-riscv, sophgo,
linux-kernel
Add a DTB that applies the shared cv18xx-eth.dtbo overlay to the Milk-V
Duo (CV1800B) base DTB. This enables gmac0 and the internal PHY MDIO mux
on boards with the Ethernet IO board, matching the existing Milk-V Duo
256M DTB.
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
arch/riscv/boot/dts/sophgo/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index 440acd0aa55a..3c9f3530526e 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
+cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv18xx-eth.dtbo
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += cv18xx-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-04 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 14:52 [PATCH v2 0/2] riscv: dts: sophgo: add cv1800b ethernet support overlay Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 1/2] riscv: dts: sophgo: make sg2002-milkv-duo256m-eth overlay generic Hiago De Franco
2026-11-04 14:52 ` [PATCH v2 2/2] riscv: dts: sophgo: add Milk-V Duo ethernet DTB Hiago De Franco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®