Re: [PATCH net-next v3 5/5] riscv: dts: spacemit: Add Ethernet support for Jupiter

From
Vivian Wang <hidden>
Date
2025-07-03 07:47:03
Also in
linux-devicetree, linux-riscv, lkml, spacemit
Reply to
Junhui Liu, 2025-07-03
Hi Junhui,

On 7/3/25 14:48, Junhui Liu wrote:
Hi Vivian,
Thanks for you work!

On 2025/7/2 14:01, Vivian Wang wrote:
quoted
Milk-V Jupiter uses an RGMII PHY for each port and uses GPIO for PHY
reset.

Signed-off-by: Vivian Wang <redacted>
Successfully tested with iperf3 on Milk-V Jupiter.

TCP Rx: 941 Mbits/sec
TCP Tx: 943 Mbits/sec
UDP Rx: 956 Mbits/sec
UDP Tx: 956 Mbits/sec

Tested-by: Junhui Liu <junhui.liu@pigmoral.tech> 
Thanks for the testing! I do not have a Milk-V Jupiter handy, so that
was very helpful.

As discussed [1], I will post a v4 soon with minor fixes and also sans
the DTS changes. I will put your Tested-by on the driver patch instead
of this DTS patch, so it will show up in v4.

Are you okay with this? If you don't like it feel free to tell me.

Regards,
Vivian "dramforever" Wang

[1]: https://lore.kernel.org/spacemit/a9cad07c-0973-43c3-89f3-95b856b575df@iscas.ac.cn/ (local)
quoted
---
  arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 46
+++++++++++++++++++++++
  1 file changed, 46 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index
4483192141049caa201c093fb206b6134a064f42..c5933555c06b66f40e61fe2b9c159ba0770c2fa1
100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -20,6 +20,52 @@ chosen {
      };
  };
  +&eth0 {
+    phy-handle = <&rgmii0>;
+    phy-mode = "rgmii-id";
+    pinctrl-names = "default";
+    pinctrl-0 = <&gmac0_cfg>;
+    rx-internal-delay-ps = <0>;
+    tx-internal-delay-ps = <0>;
+    status = "okay";
+
+    mdio-bus {
+        #address-cells = <0x1>;
+        #size-cells = <0x0>;
+
+        reset-gpios = <&gpio K1_GPIO(110) GPIO_ACTIVE_LOW>;
+        reset-delay-us = <10000>;
+        reset-post-delay-us = <100000>;
+
+        rgmii0: phy@1 {
+            reg = <0x1>;
+        };
+    };
+};
+
+&eth1 {
+    phy-handle = <&rgmii1>;
+    phy-mode = "rgmii-id";
+    pinctrl-names = "default";
+    pinctrl-0 = <&gmac1_cfg>;
+    rx-internal-delay-ps = <0>;
+    tx-internal-delay-ps = <250>;
+    status = "okay";
+
+    mdio-bus {
+        #address-cells = <0x1>;
+        #size-cells = <0x0>;
+
+        reset-gpios = <&gpio K1_GPIO(115) GPIO_ACTIVE_LOW>;
+        reset-delay-us = <10000>;
+        reset-post-delay-us = <100000>;
+
+        rgmii1: phy@1 {
+            reg = <0x1>;
+        };
+    };
+};
+
  &uart0 {
      pinctrl-names = "default";
      pinctrl-0 = <&uart0_2_cfg>;
Thread (15 messages) 15 messages, 4 authors, last reply 2025-07-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help