* [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
@ 2026-10-01 19:38 ` Hiago De Franco
0 siblings, 0 replies; 11+ messages in thread
From: Hiago De Franco @ 2026-10-01 19:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Chen-Yu Yeh, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
The CV1800B SoC has a DWMAC controller connected to an internal 10/100
Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
reach the internal PHY are already described in cv180x.dtsi, but are
disabled by default.
Enable gmac0 and the MDIO multiplexer to make ethernet work.
Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
up at 100Mbps/Full and the interface gets an address via DHCP.
This can not be enabled by default as others may want to use the same
pins as GPIO, that is the reason an overlay is being used.
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
Hi,
This is a continuation of patch [1]. The same patch was sent before [2],
and an overlay was suggested, altought it was not sent. Therefore I am
sending this overlay now.
U-Boot logs:
milkv_duo# setenv fdtoverlay_addr_r 0x82480000
milkv_duo# boot
** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
1: Poky (Yocto Project Reference Distro)
Retrieving file: /Image.gz
append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
Retrieving file: /cv1800b-milkv-duo.dtb
Retrieving file: /cv1800b-milkv-duo-eth.dtbo
Uncompressing Kernel Image to 0
\## Flattened Device Tree blob at 82200000
Booting using the fdt blob at 0x82200000
Working FDT set to 82200000
Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
Working FDT set to 83560000
Kernel logs:
root@milkv-duo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
root@milkv-duo:~# dmesg | grep stmmaceth
[ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
[ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
[ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
[ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
[ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
[ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
[ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
[ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
[ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
[ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
[ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
[ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
[ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
[ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
[ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
[ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
[ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
[2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
---
arch/riscv/boot/dts/sophgo/Makefile | 3 +++
arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index d5c80d4ff005..adea990ad912 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
+cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
new file mode 100644
index 000000000000..52c85b4e0155
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Enable ethernet support on Milk-V Duo (CV1800B).
+ *
+ * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&gmac0 {
+ status = "okay";
+};
+
+&mdio {
+ status = "okay";
+};
---
base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
Best regards,
--
Hiago
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
@ 2026-10-01 19:38 ` Hiago De Franco
0 siblings, 0 replies; 11+ messages in thread
From: Hiago De Franco @ 2026-10-01 19:38 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Chen-Yu Yeh, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
The CV1800B SoC has a DWMAC controller connected to an internal 10/100
Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
reach the internal PHY are already described in cv180x.dtsi, but are
disabled by default.
Enable gmac0 and the MDIO multiplexer to make ethernet work.
Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
up at 100Mbps/Full and the interface gets an address via DHCP.
This can not be enabled by default as others may want to use the same
pins as GPIO, that is the reason an overlay is being used.
Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
---
Hi,
This is a continuation of patch [1]. The same patch was sent before [2],
and an overlay was suggested, altought it was not sent. Therefore I am
sending this overlay now.
U-Boot logs:
milkv_duo# setenv fdtoverlay_addr_r 0x82480000
milkv_duo# boot
** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
1: Poky (Yocto Project Reference Distro)
Retrieving file: /Image.gz
append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
Retrieving file: /cv1800b-milkv-duo.dtb
Retrieving file: /cv1800b-milkv-duo-eth.dtbo
Uncompressing Kernel Image to 0
\## Flattened Device Tree blob at 82200000
Booting using the fdt blob at 0x82200000
Working FDT set to 82200000
Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
Working FDT set to 83560000
Kernel logs:
root@milkv-duo:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
root@milkv-duo:~# dmesg | grep stmmaceth
[ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
[ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
[ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
[ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
[ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
[ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
[ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
[ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
[ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
[ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
[ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
[ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
[ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
[ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
[ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
[ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
[ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
[2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
---
arch/riscv/boot/dts/sophgo/Makefile | 3 +++
arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index d5c80d4ff005..adea990ad912 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
+cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
new file mode 100644
index 000000000000..52c85b4e0155
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Enable ethernet support on Milk-V Duo (CV1800B).
+ *
+ * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&gmac0 {
+ status = "okay";
+};
+
+&mdio {
+ status = "okay";
+};
---
base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
Best regards,
--
Hiago
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-01 19:38 ` Hiago De Franco
@ 2026-10-02 3:49 ` 葉宸佑
-1 siblings, 0 replies; 11+ messages in thread
From: 葉宸佑 @ 2026-10-02 3:49 UTC (permalink / raw)
To: Hiago De Franco
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
> This is a continuation of patch [1]. The same patch was sent before [2],
> and an overlay was suggested, altought it was not sent. Therefore I am
> sending this overlay now.
Thanks for picking this up. [2] was mine, for the Duo 256M; the overlay
rework stalled while I waited for the IO board, which has now arrived.
I will send the matching overlay for sg2002-milkv-duo256m in the same
shape as this one, so the two boards stay consistent.
One note, not a blocker for this patch: the internal PHY under the mdio
node this overlay enables is named phy@0 but has reg = <1> -- which is
also why it shows up as mdio_mux-0.0:01 in your log. 2/2 of my earlier
series [3] fixes the node name in cv180x.dtsi, so it covers CV1800B as
well, and already has Inochi's Reviewed-by. I will carry it in my
overlay series unless it lands first.
Reviewed-by: Chen-Yu Yeh <chenyou910331@gmail.com>
[3] https://lore.kernel.org/sophgo/20260803163427.74445-1-chenyou910331@gmail.com/
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
@ 2026-10-02 3:49 ` 葉宸佑
0 siblings, 0 replies; 11+ messages in thread
From: 葉宸佑 @ 2026-10-02 3:49 UTC (permalink / raw)
To: Hiago De Franco
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
> This is a continuation of patch [1]. The same patch was sent before [2],
> and an overlay was suggested, altought it was not sent. Therefore I am
> sending this overlay now.
Thanks for picking this up. [2] was mine, for the Duo 256M; the overlay
rework stalled while I waited for the IO board, which has now arrived.
I will send the matching overlay for sg2002-milkv-duo256m in the same
shape as this one, so the two boards stay consistent.
One note, not a blocker for this patch: the internal PHY under the mdio
node this overlay enables is named phy@0 but has reg = <1> -- which is
also why it shows up as mdio_mux-0.0:01 in your log. 2/2 of my earlier
series [3] fixes the node name in cv180x.dtsi, so it covers CV1800B as
well, and already has Inochi's Reviewed-by. I will carry it in my
overlay series unless it lands first.
Reviewed-by: Chen-Yu Yeh <chenyou910331@gmail.com>
[3] https://lore.kernel.org/sophgo/20260803163427.74445-1-chenyou910331@gmail.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-01 19:38 ` Hiago De Franco
@ 2026-10-14 0:35 ` Hiago De Franco
-1 siblings, 0 replies; 11+ messages in thread
From: Hiago De Franco @ 2026-10-14 0:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Chen-Yu Yeh, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
Hi Inochi Amaoto,
Just a friendly ping about this patch. Not sure if it was picked up by
you already.
Thanks!
On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
> The CV1800B SoC has a DWMAC controller connected to an internal 10/100
> Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
> reach the internal PHY are already described in cv180x.dtsi, but are
> disabled by default.
>
> Enable gmac0 and the MDIO multiplexer to make ethernet work.
>
> Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
> up at 100Mbps/Full and the interface gets an address via DHCP.
>
> This can not be enabled by default as others may want to use the same
> pins as GPIO, that is the reason an overlay is being used.
>
> Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
> ---
> Hi,
>
> This is a continuation of patch [1]. The same patch was sent before [2],
> and an overlay was suggested, altought it was not sent. Therefore I am
> sending this overlay now.
>
> U-Boot logs:
>
> milkv_duo# setenv fdtoverlay_addr_r 0x82480000
> milkv_duo# boot
> ** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
> 1: Poky (Yocto Project Reference Distro)
> Retrieving file: /Image.gz
> append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
> Retrieving file: /cv1800b-milkv-duo.dtb
> Retrieving file: /cv1800b-milkv-duo-eth.dtbo
> Uncompressing Kernel Image to 0
> \## Flattened Device Tree blob at 82200000
> Booting using the fdt blob at 0x82200000
> Working FDT set to 82200000
> Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
> Working FDT set to 83560000
>
> Kernel logs:
>
> root@milkv-duo:~# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
> link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
> inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
> valid_lft forever preferred_lft forever
> root@milkv-duo:~# dmesg | grep stmmaceth
> [ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
> [ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
> [ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
> [ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
> [ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
> [ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
> [ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
> [ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
> [ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
> [ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
> [ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
> [ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
> [ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
> [ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
> [ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
> [ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
> [ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
> [ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
> [ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
>
> [1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
> [2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
> ---
> arch/riscv/boot/dts/sophgo/Makefile | 3 +++
> arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
> index d5c80d4ff005..adea990ad912 100644
> --- a/arch/riscv/boot/dts/sophgo/Makefile
> +++ b/arch/riscv/boot/dts/sophgo/Makefile
> @@ -1,5 +1,8 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
> +cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
> dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
> dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
> dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> new file mode 100644
> index 000000000000..52c85b4e0155
> --- /dev/null
> +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Enable ethernet support on Milk-V Duo (CV1800B).
> + *
> + * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&gmac0 {
> + status = "okay";
> +};
> +
> +&mdio {
> + status = "okay";
> +};
>
> ---
> base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
> change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
>
> Best regards,
> --
> Hiago
>
Best regards,
--
Hiago
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
@ 2026-10-14 0:35 ` Hiago De Franco
0 siblings, 0 replies; 11+ messages in thread
From: Hiago De Franco @ 2026-10-14 0:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Chen-Yu Yeh, Andrei Lalaev, devicetree, linux-riscv, sophgo,
linux-kernel
Hi Inochi Amaoto,
Just a friendly ping about this patch. Not sure if it was picked up by
you already.
Thanks!
On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
> The CV1800B SoC has a DWMAC controller connected to an internal 10/100
> Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
> reach the internal PHY are already described in cv180x.dtsi, but are
> disabled by default.
>
> Enable gmac0 and the MDIO multiplexer to make ethernet work.
>
> Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
> up at 100Mbps/Full and the interface gets an address via DHCP.
>
> This can not be enabled by default as others may want to use the same
> pins as GPIO, that is the reason an overlay is being used.
>
> Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
> ---
> Hi,
>
> This is a continuation of patch [1]. The same patch was sent before [2],
> and an overlay was suggested, altought it was not sent. Therefore I am
> sending this overlay now.
>
> U-Boot logs:
>
> milkv_duo# setenv fdtoverlay_addr_r 0x82480000
> milkv_duo# boot
> ** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
> 1: Poky (Yocto Project Reference Distro)
> Retrieving file: /Image.gz
> append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
> Retrieving file: /cv1800b-milkv-duo.dtb
> Retrieving file: /cv1800b-milkv-duo-eth.dtbo
> Uncompressing Kernel Image to 0
> \## Flattened Device Tree blob at 82200000
> Booting using the fdt blob at 0x82200000
> Working FDT set to 82200000
> Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
> Working FDT set to 83560000
>
> Kernel logs:
>
> root@milkv-duo:~# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
> link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
> inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
> valid_lft forever preferred_lft forever
> root@milkv-duo:~# dmesg | grep stmmaceth
> [ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
> [ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
> [ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
> [ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
> [ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
> [ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
> [ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
> [ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
> [ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
> [ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
> [ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
> [ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
> [ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
> [ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
> [ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
> [ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
> [ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
> [ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
> [ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
>
> [1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
> [2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
> ---
> arch/riscv/boot/dts/sophgo/Makefile | 3 +++
> arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
> index d5c80d4ff005..adea990ad912 100644
> --- a/arch/riscv/boot/dts/sophgo/Makefile
> +++ b/arch/riscv/boot/dts/sophgo/Makefile
> @@ -1,5 +1,8 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
> +cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
> dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
> dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
> dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> new file mode 100644
> index 000000000000..52c85b4e0155
> --- /dev/null
> +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Enable ethernet support on Milk-V Duo (CV1800B).
> + *
> + * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&gmac0 {
> + status = "okay";
> +};
> +
> +&mdio {
> + status = "okay";
> +};
>
> ---
> base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
> change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
>
> Best regards,
> --
> Hiago
>
Best regards,
--
Hiago
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-14 0:35 ` Hiago De Franco
(?)
@ 2026-10-14 2:37 ` Chen Wang
2026-10-14 7:56 ` Inochi Amaoto
-1 siblings, 1 reply; 11+ messages in thread
From: Chen Wang @ 2026-10-14 2:37 UTC (permalink / raw)
To: Hiago De Franco; +Cc: Chen-Yu Yeh, sophgo, Inochi Amaoto
Hello, Hiago,
Oops, it looks like I missed your patch. Yours was for the Duo, while
Chen-yu's was for the Duo 256M [1]; I conflated the two and ended up
submitting only the one for Duo 256M [2].
Since we are very close to the merge window now, I don't plan to submit
any further PRs, so your Duo patch will have to wait for the next
cycle—I'm very sorry about that.
Could I trouble you to rebase and submit a new version after 7.4-rc1 is
released (this also serves as a reminder for us)? We will then include
it in the PR for 7.5.
[1]:
https://lore.kernel.org/linux-riscv/20261005093749.645014-1-chenyou910331@gmail.com/
link
[2]:
https://lore.kernel.org/sophgo/aff6ff25-8969-4a35-9543-9113afb2e003@linux.dev/
link
I've removed some people from the email's "To" list, keeping only the
relevant parties to avoid disturbing too many people.
Regards,
Chen
On 10/14/2026 8:35 AM, Hiago De Franco wrote:
> Hi Inochi Amaoto,
>
> Just a friendly ping about this patch. Not sure if it was picked up by
> you already.
>
> Thanks!
>
> On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
>> The CV1800B SoC has a DWMAC controller connected to an internal 10/100
>> Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
>> reach the internal PHY are already described in cv180x.dtsi, but are
>> disabled by default.
>>
>> Enable gmac0 and the MDIO multiplexer to make ethernet work.
>>
>> Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
>> up at 100Mbps/Full and the interface gets an address via DHCP.
>>
>> This can not be enabled by default as others may want to use the same
>> pins as GPIO, that is the reason an overlay is being used.
>>
>> Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
>> ---
>> Hi,
>>
>> This is a continuation of patch [1]. The same patch was sent before [2],
>> and an overlay was suggested, altought it was not sent. Therefore I am
>> sending this overlay now.
>>
>> U-Boot logs:
>>
>> milkv_duo# setenv fdtoverlay_addr_r 0x82480000
>> milkv_duo# boot
>> ** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
>> 1: Poky (Yocto Project Reference Distro)
>> Retrieving file: /Image.gz
>> append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
>> Retrieving file: /cv1800b-milkv-duo.dtb
>> Retrieving file: /cv1800b-milkv-duo-eth.dtbo
>> Uncompressing Kernel Image to 0
>> \## Flattened Device Tree blob at 82200000
>> Booting using the fdt blob at 0x82200000
>> Working FDT set to 82200000
>> Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
>> Working FDT set to 83560000
>>
>> Kernel logs:
>>
>> root@milkv-duo:~# ip a
>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
>> link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
>> inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
>> valid_lft forever preferred_lft forever
>> root@milkv-duo:~# dmesg | grep stmmaceth
>> [ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
>> [ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
>> [ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
>> [ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
>> [ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
>> [ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
>> [ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
>> [ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
>> [ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
>> [ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
>> [ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
>> [ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
>> [ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
>> [ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
>> [ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
>> [ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
>> [ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
>> [ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
>> [ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
>> [ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
>>
>> [1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
>> [2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
>> ---
>> arch/riscv/boot/dts/sophgo/Makefile | 3 +++
>> arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
>> 2 files changed, 20 insertions(+)
>>
>> diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
>> index d5c80d4ff005..adea990ad912 100644
>> --- a/arch/riscv/boot/dts/sophgo/Makefile
>> +++ b/arch/riscv/boot/dts/sophgo/Makefile
>> @@ -1,5 +1,8 @@
>> # SPDX-License-Identifier: GPL-2.0
>> dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
>> +cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
>> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
>> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
>> dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
>> dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
>> dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
>> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
>> new file mode 100644
>> index 000000000000..52c85b4e0155
>> --- /dev/null
>> +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
>> @@ -0,0 +1,17 @@
>> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
>> +/*
>> + * Enable ethernet support on Milk-V Duo (CV1800B).
>> + *
>> + * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
>> + */
>> +
>> +/dts-v1/;
>> +/plugin/;
>> +
>> +&gmac0 {
>> + status = "okay";
>> +};
>> +
>> +&mdio {
>> + status = "okay";
>> +};
>>
>> ---
>> base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
>> change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
>>
>> Best regards,
>> --
>> Hiago
>>
> Best regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-14 2:37 ` Chen Wang
@ 2026-10-14 7:56 ` Inochi Amaoto
2026-10-14 17:49 ` Hiago De Franco
0 siblings, 1 reply; 11+ messages in thread
From: Inochi Amaoto @ 2026-10-14 7:56 UTC (permalink / raw)
To: Chen Wang, Hiago De Franco; +Cc: Chen-Yu Yeh, sophgo, Inochi Amaoto
On Wed, Oct 14, 2026 at 10:37:01AM +0800, Chen Wang wrote:
> Hello, Hiago,
>
> Oops, it looks like I missed your patch. Yours was for the Duo, while
> Chen-yu's was for the Duo 256M [1]; I conflated the two and ended up
> submitting only the one for Duo 256M [2].
>
> Since we are very close to the merge window now, I don't plan to submit any
> further PRs, so your Duo patch will have to wait for the next cycle—I'm very
> sorry about that.
>
> Could I trouble you to rebase and submit a new version after 7.4-rc1 is
> released (this also serves as a reminder for us)? We will then include it in
> the PR for 7.5.
>
> [1]: https://lore.kernel.org/linux-riscv/20261005093749.645014-1-chenyou910331@gmail.com/
> link
>
> [2]: https://lore.kernel.org/sophgo/aff6ff25-8969-4a35-9543-9113afb2e003@linux.dev/
> link
>
> I've removed some people from the email's "To" list, keeping only the
> relevant parties to avoid disturbing too many people.
>
> Regards,
>
> Chen
>
Hi Chen,
Instead of taking this patch, I wonder whether it can be converted to a
generic DT overlay file for all the supported boards, so we won't needed
to merge many duplicated patch for it.
Regards,
Inochi
> On 10/14/2026 8:35 AM, Hiago De Franco wrote:
> > Hi Inochi Amaoto,
> >
> > Just a friendly ping about this patch. Not sure if it was picked up by
> > you already.
> >
> > Thanks!
> >
> > On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote:
> > > The CV1800B SoC has a DWMAC controller connected to an internal 10/100
> > > Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to
> > > reach the internal PHY are already described in cv180x.dtsi, but are
> > > disabled by default.
> > >
> > > Enable gmac0 and the MDIO multiplexer to make ethernet work.
> > >
> > > Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes
> > > up at 100Mbps/Full and the interface gets an address via DHCP.
> > >
> > > This can not be enabled by default as others may want to use the same
> > > pins as GPIO, that is the reason an overlay is being used.
> > >
> > > Signed-off-by: Hiago De Franco <hfranco@baylibre.com>
> > > ---
> > > Hi,
> > >
> > > This is a continuation of patch [1]. The same patch was sent before [2],
> > > and an overlay was suggested, altought it was not sent. Therefore I am
> > > sending this overlay now.
> > >
> > > U-Boot logs:
> > >
> > > milkv_duo# setenv fdtoverlay_addr_r 0x82480000
> > > milkv_duo# boot
> > > ** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux
> > > 1: Poky (Yocto Project Reference Distro)
> > > Retrieving file: /Image.gz
> > > append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi
> > > Retrieving file: /cv1800b-milkv-duo.dtb
> > > Retrieving file: /cv1800b-milkv-duo-eth.dtbo
> > > Uncompressing Kernel Image to 0
> > > \## Flattened Device Tree blob at 82200000
> > > Booting using the fdt blob at 0x82200000
> > > Working FDT set to 82200000
> > > Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK
> > > Working FDT set to 83560000
> > >
> > > Kernel logs:
> > >
> > > root@milkv-duo:~# ip a
> > > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue 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 qlen 1000
> > > link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff
> > > inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0
> > > valid_lft forever preferred_lft forever
> > > root@milkv-duo:~# dmesg | grep stmmaceth
> > > [ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found
> > > [ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found
> > > [ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0
> > > [ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
> > > [ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000
> > > [ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported
> > > [ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4)
> > > [ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported
> > > [ 0.639720] stmmaceth 4070000.ethernet: COE Type 2
> > > [ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported
> > > [ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors
> > > [ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled
> > > [ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
> > > [ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c
> > > [ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> > > [ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL)
> > > [ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found
> > > [ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
> > > [ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode
> > > [ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
> > >
> > > [1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/
> > > [2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/
> > > ---
> > > arch/riscv/boot/dts/sophgo/Makefile | 3 +++
> > > arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++
> > > 2 files changed, 20 insertions(+)
> > >
> > > diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
> > > index d5c80d4ff005..adea990ad912 100644
> > > --- a/arch/riscv/boot/dts/sophgo/Makefile
> > > +++ b/arch/riscv/boot/dts/sophgo/Makefile
> > > @@ -1,5 +1,8 @@
> > > # SPDX-License-Identifier: GPL-2.0
> > > dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
> > > +cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo
> > > +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb
> > > +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo
> > > dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
> > > dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
> > > dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
> > > diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> > > new file mode 100644
> > > index 000000000000..52c85b4e0155
> > > --- /dev/null
> > > +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso
> > > @@ -0,0 +1,17 @@
> > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > > +/*
> > > + * Enable ethernet support on Milk-V Duo (CV1800B).
> > > + *
> > > + * Copyright (c) 2026, Hiago De Franco <hfranco@baylibre.com>
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +&gmac0 {
> > > + status = "okay";
> > > +};
> > > +
> > > +&mdio {
> > > + status = "okay";
> > > +};
> > >
> > > ---
> > > base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea
> > > change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40
> > >
> > > Best regards,
> > > --
> > > Hiago
> > >
> > Best regards,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-14 7:56 ` Inochi Amaoto
@ 2026-10-14 17:49 ` Hiago De Franco
2026-10-16 2:34 ` 葉宸佑
0 siblings, 1 reply; 11+ messages in thread
From: Hiago De Franco @ 2026-10-14 17:49 UTC (permalink / raw)
To: Chen Wang, Inochi Amaoto; +Cc: Chen-Yu Yeh, sophgo
Hi Chen, Inochi,
On Wed, Oct 14, 2026 at 10:37:01AM +0800, Chen Wang wrote:
> Hello, Hiago,
>
> Oops, it looks like I missed your patch. Yours was for the Duo, while
> Chen-yu's was for the Duo 256M [1]; I conflated the two and ended up
> submitting only the one for Duo 256M [2].
>
> Since we are very close to the merge window now, I don't plan to submit any
> further PRs, so your Duo patch will have to wait for the next cycle—I'm very
> sorry about that.
>
> Could I trouble you to rebase and submit a new version after 7.4-rc1 is
> released (this also serves as a reminder for us)? We will then include it in
> the PR for 7.5.
>
> [1]: https://lore.kernel.org/linux-riscv/20261005093749.645014-1-chenyou910331@gmail.com/
> link
>
> [2]: https://lore.kernel.org/sophgo/aff6ff25-8969-4a35-9543-9113afb2e003@linux.dev/
> link
>
> I've removed some people from the email's "To" list, keeping only the
> relevant parties to avoid disturbing too many people.
no worries, all good from my side.
I will rebase and submit again a new version after 7.4-rc1 is out.
>
> Regards,
>
> Chen
>
On Wed, Oct 14, 2026 at 03:56:02PM +0800, Inochi Amaoto wrote:
> Hi Chen,
>
> Instead of taking this patch, I wonder whether it can be converted to a
> generic DT overlay file for all the supported boards, so we won't needed
> to merge many duplicated patch for it.
thanks for the idea. I can think about that, but in this case the other
overlay for 256M is already on linux-riscv/for-next, so after 7.4-rc1 is
out I can think about merging both overlays into only one file.
>
> Regards,
> Inochi
Best regards,
--
Hiago
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-14 17:49 ` Hiago De Franco
@ 2026-10-16 2:34 ` 葉宸佑
2026-10-19 8:36 ` Chen Wang
0 siblings, 1 reply; 11+ messages in thread
From: 葉宸佑 @ 2026-10-16 2:34 UTC (permalink / raw)
To: Hiago De Franco; +Cc: Chen Wang, Inochi Amaoto, sophgo
Hi Hiago, Inochi, Chen,
On Wed, Oct 14, 2026 at 02:49:15PM -0300, Hiago De Franco wrote:
> On Wed, Oct 14, 2026 at 03:56:02PM +0800, Inochi Amaoto wrote:
> > Instead of taking this patch, I wonder whether it can be converted to a
> > generic DT overlay file for all the supported boards, so we won't needed
> > to merge many duplicated patch for it.
>
> thanks for the idea. I can think about that, but in this case the other
> overlay for 256M is already on linux-riscv/for-next, so after 7.4-rc1 is
> out I can think about merging both overlays into only one file.
Since the 256M overlay in for-next is mine, I can take the merge after
7.4-rc1, if that suits you.
Only the Duo and the Duo 256M would use it: the Duo S and the Huashan
Pi already enable gmac0 and mdio in their board files. Both labels come
from cv180x.dtsi, so the overlay itself has nothing board-specific in
it.
What I have in mind:
1/2 turn sg2002-milkv-duo256m-eth.dtso into a shared cv18xx-eth.dtso
2/2 compose the same overlay with cv1800b-milkv-duo.dtb
2/2 is your patch reduced to two Makefile lines, so I would rather it
stay yours, sent on top of 1/2 with your Duo test. If you would prefer
to do the whole thing yourself, that is fine too, and I will test it on
the Duo 256M.
On naming, I would like to settle it in this series while the 256M
overlay is still new. The overlay is named after what it enables, but
the composed DTB is really the board plus the IO board: the base DTS
already sets USB to host, which the IO board's hub needs. So I would
call the composed DTBs sg2002-milkv-duo256m-ioboard.dtb and
cv1800b-milkv-duo-ioboard.dtb.
The reason I care about this is my own setup. Besides the IO board, I
use the Duo 256M with Ethernet wired up without the IO board, together
with USB networking over the USB-C port. That works on the vendor BSP,
which uses OTG, but not on mainline: both boards are host-only today,
and the host setting in the 256M DTS came from my own board patch,
copied from the Duo.
Once the overlay is done, I plan to look at device mode on mainline.
If it works, the host setting could move into a usb-host overlay:
<board>-ioboard.dtb = base + eth + usb-host
<board>-eth.dtb = base + eth
IO board users would then see no change. If the composed DTB kept the
-eth name instead, it would silently lose the IO board's USB ports when
the base changes, which is why I would rather rename now. That part
would be a separate series, of course.
I have both setups here, so please feel free to Cc me on Milk-V Duo
patches; I am glad to test.
Inochi, Chen, does that layout make sense to you, and any preference
on the names?
Thanks,
Chen-Yu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay
2026-10-16 2:34 ` 葉宸佑
@ 2026-10-19 8:36 ` Chen Wang
0 siblings, 0 replies; 11+ messages in thread
From: Chen Wang @ 2026-10-19 8:36 UTC (permalink / raw)
To: 葉宸佑, Hiago De Franco; +Cc: Inochi Amaoto, sophgo
On 10/16/2026 10:34 AM, 葉宸佑 wrote:
> Hi Hiago, Inochi, Chen,
>
> On Wed, Oct 14, 2026 at 02:49:15PM -0300, Hiago De Franco wrote:
>> On Wed, Oct 14, 2026 at 03:56:02PM +0800, Inochi Amaoto wrote:
>>> Instead of taking this patch, I wonder whether it can be converted to a
>>> generic DT overlay file for all the supported boards, so we won't needed
>>> to merge many duplicated patch for it.
>> thanks for the idea. I can think about that, but in this case the other
>> overlay for 256M is already on linux-riscv/for-next, so after 7.4-rc1 is
>> out I can think about merging both overlays into only one file.
> Since the 256M overlay in for-next is mine, I can take the merge after
> 7.4-rc1, if that suits you.
Chen-Yu and Hiago, you two can discuss it amongst yourselves, just make
sure there's no duplication should be fine.
>
> Only the Duo and the Duo 256M would use it: the Duo S and the Huashan
> Pi already enable gmac0 and mdio in their board files. Both labels come
> from cv180x.dtsi, so the overlay itself has nothing board-specific in
> it.
>
> What I have in mind:
>
> 1/2 turn sg2002-milkv-duo256m-eth.dtso into a shared cv18xx-eth.dtso
> 2/2 compose the same overlay with cv1800b-milkv-duo.dtb
>
> 2/2 is your patch reduced to two Makefile lines, so I would rather it
> stay yours, sent on top of 1/2 with your Duo test. If you would prefer
> to do the whole thing yourself, that is fine too, and I will test it on
> the Duo 256M.
>
> On naming, I would like to settle it in this series while the 256M
> overlay is still new. The overlay is named after what it enables, but
> the composed DTB is really the board plus the IO board: the base DTS
> already sets USB to host, which the IO board's hub needs. So I would
> call the composed DTBs sg2002-milkv-duo256m-ioboard.dtb and
> cv1800b-milkv-duo-ioboard.dtb.
>
> The reason I care about this is my own setup. Besides the IO board, I
> use the Duo 256M with Ethernet wired up without the IO board, together
> with USB networking over the USB-C port. That works on the vendor BSP,
> which uses OTG, but not on mainline: both boards are host-only today,
> and the host setting in the 256M DTS came from my own board patch,
> copied from the Duo.
>
> Once the overlay is done, I plan to look at device mode on mainline.
> If it works, the host setting could move into a usb-host overlay:
>
> <board>-ioboard.dtb = base + eth + usb-host
> <board>-eth.dtb = base + eth
>
> IO board users would then see no change. If the composed DTB kept the
> -eth name instead, it would silently lose the IO board's USB ports when
> the base changes, which is why I would rather rename now. That part
> would be a separate series, of course.
>
> I have both setups here, so please feel free to Cc me on Milk-V Duo
> patches; I am glad to test.
>
> Inochi, Chen, does that layout make sense to you, and any preference
> on the names?
Are there many expansion I/O boards currently on the market for the Duo
series? I'm not entirely sure, but my suggestion would be to avoid
adding too much support for expansion boards to the main codebase,
that's something best left for others to implement offline.
Inochi, what do you think?
> Thanks,
> Chen-Yu
Thanks, Chen
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-10-19 8:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 19:38 [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay Hiago De Franco
2026-10-01 19:38 ` Hiago De Franco
2026-10-02 3:49 ` 葉宸佑
2026-10-02 3:49 ` 葉宸佑
2026-10-14 0:35 ` Hiago De Franco
2026-10-14 0:35 ` Hiago De Franco
2026-10-14 2:37 ` Chen Wang
2026-10-14 7:56 ` Inochi Amaoto
2026-10-14 17:49 ` Hiago De Franco
2026-10-16 2:34 ` 葉宸佑
2026-10-19 8:36 ` Chen Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.