[PATCH v2 0/2] riscv: dts: sophgo: Milk-V Duo 256M ethernet support

Hiago De Franco hfranco at baylibre.com
Sat Oct 3 09:32:27 PDT 2026


On Sat, Oct 03, 2026 at 04:46:24PM +0800, Chen-Yu Yeh wrote:
> The Milk-V Duo 256M has no Ethernet connector of its own; the SG2002's
> internal PHY is only usable through the optional USB & Ethernet IO
> board. This series adds an overlay for that board and fixes the name of
> the internal PHY node it exposes.
> 
> Changes in v2:
>  - Enable Ethernet through an overlay instead of in the board
>    devicetree, since without the IO board the pins may be used as GPIO
>    (Inochi)
>  - Send both patches in one thread (Inochi)
>  - Test link-up and traffic on the IO board, which v1 could not
>  - Collect Inochi's Reviewed-by on the PHY node name fix
> 
> The overlay has the same shape as Hiago's for the Milk-V Duo [1], so the
> two boards stay consistent. The PHY node name fix is in cv180x.dtsi and
> so covers that board as well.
> 
> Testing, with a kernel built from this branch:
> 
>  - sg2002-milkv-duo256m-eth.dtb: eth0 comes up at 100Mbps/Full, gets an
>    address via DHCP and passes traffic
>  - sg2002-milkv-duo256m.dtb: no eth0 is created, and the gmac node
>    reads back as disabled
>    
> Kernel log with sg2002-milkv-duo256m-eth.dtb:
> 
>   [    1.426499] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
>   [    1.426536] stmmaceth 4070000.ethernet: 	DWMAC1000
>   [    6.052829] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
>   [    8.138131] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
> 
>   # ip addr show eth0
>   2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
>       inet 192.168.0.47/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
> 
> With the base sg2002-milkv-duo256m.dtb:
> 
>   # ip addr show eth0
>   ip: can't find device 'eth0'
>   # cat /proc/device-tree/soc/ethernet at 4070000/status
>   disabled
> 
> iperf3 against a desktop on the same switch gives 94 Mbit/s with the
> board sending and 70-74 Mbit/s with it receiving, with no
> retransmissions either way. The receive side being slower is not a CPU
> limit on the board; I have not looked into it further yet.
> 
> v1: https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
>     https://lore.kernel.org/sophgo/20260803163427.74445-1-chenyou910331@gmail.com/
> 
> [1] https://lore.kernel.org/sophgo/20261001-milkv-duo-eth-overlay-v1-1-78bc1454f35b@baylibre.com/

for the series,

Reviewed-by: Hiago De Franco <hfranco at baylibre.com>

> 
> Chen-Yu Yeh (2):
>   riscv: dts: sophgo: add Milk-V Duo 256M ethernet support overlay
>   riscv: dts: sophgo: cv180x: Fix internal ephy node name
> 
>  arch/riscv/boot/dts/sophgo/Makefile             |  3 +++
>  arch/riscv/boot/dts/sophgo/cv180x.dtsi          |  2 +-
>  .../dts/sophgo/sg2002-milkv-duo256m-eth.dtso    | 17 +++++++++++++++++
>  3 files changed, 21 insertions(+), 1 deletion(-)
>  create mode 100644 arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m-eth.dtso
> 
> -- 
> 2.43.0
> 

Best regards,
-- 
Hiago



More information about the linux-riscv mailing list