Devicetree
 help / color / mirror / Atom feed
* [PATCH 1/2] riscv: dts: sophgo: Enable ethernet for Milk-V Duo 256M
@ 2026-08-03 16:33 Chen-Yu Yeh
  2026-08-22  2:13 ` Inochi Amaoto
  0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Yeh @ 2026-08-03 16:33 UTC (permalink / raw)
  To: chen.wang, inochiama
  Cc: Chen-Yu Yeh, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Longbin Li,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:RISC-V ARCHITECTURE,
	open list:SOPHGO DEVICETREES and DRIVERS, open list

The SG2002 has an internal ethernet PHY, but on the Milk-V Duo 256M the
ethernet signals are only routed to the RJ45 connector of the optional
IO board.

Enable the GMAC and the MDIO multiplexer so that the interface is usable
when such a board is attached.

Tested on actual Milk-V Duo 256M hardware: the GMAC probes, the MDIO
multiplexer selects the internal bus and the internal EPHY is detected
at address 1:

  eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY]

Link-up was not verified for lack of the IO board.

Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com>
---
 arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
index a2797c0bd767..1462a96a1c12 100644
--- a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
@@ -49,6 +49,14 @@ coprocessor_rtos: region@8fe00000 {
 	};
 };
 
+&gmac0 {
+	status = "okay";
+};
+
+&mdio {
+	status = "okay";
+};
+
 &osc {
 	clock-frequency = <25000000>;
 };

base-commit: 11881041b745b444e4f6c87a2748f1951cf02742
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] riscv: dts: sophgo: Enable ethernet for Milk-V Duo 256M
  2026-08-03 16:33 [PATCH 1/2] riscv: dts: sophgo: Enable ethernet for Milk-V Duo 256M Chen-Yu Yeh
@ 2026-08-22  2:13 ` Inochi Amaoto
  0 siblings, 0 replies; 2+ messages in thread
From: Inochi Amaoto @ 2026-08-22  2:13 UTC (permalink / raw)
  To: Chen-Yu Yeh, chen.wang, inochiama
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Longbin Li,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:RISC-V ARCHITECTURE,
	open list:SOPHGO DEVICETREES and DRIVERS, open list

On Tue, Aug 04, 2026 at 12:33:18AM +0800, Chen-Yu Yeh wrote:
> The SG2002 has an internal ethernet PHY, but on the Milk-V Duo 256M the
> ethernet signals are only routed to the RJ45 connector of the optional
> IO board.
> 
> Enable the GMAC and the MDIO multiplexer so that the interface is usable
> when such a board is attached.
> 
> Tested on actual Milk-V Duo 256M hardware: the GMAC probes, the MDIO
> multiplexer selects the internal bus and the internal EPHY is detected
> at address 1:
> 
>   eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY]
> 

> Link-up was not verified for lack of the IO board.
> 

This is not acceptable, I agree with something like DT overlay for
support external IO board to enable this. But you should not enable
this by default. As other may want to use this as GPIO.

Regards,
Inochi

> Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com>
> ---
>  arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> index a2797c0bd767..1462a96a1c12 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> @@ -49,6 +49,14 @@ coprocessor_rtos: region@8fe00000 {
>  	};
>  };
>  
> +&gmac0 {
> +	status = "okay";
> +};
> +
> +&mdio {
> +	status = "okay";
> +};
> +
>  &osc {
>  	clock-frequency = <25000000>;
>  };
> 
> base-commit: 11881041b745b444e4f6c87a2748f1951cf02742
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-22  2:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 16:33 [PATCH 1/2] riscv: dts: sophgo: Enable ethernet for Milk-V Duo 256M Chen-Yu Yeh
2026-08-22  2:13 ` Inochi Amaoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox