riscv: dts: spacemit: Add ethernet device for K3
Subsystems (5)
PATCH v5 1/1 riscv: dts: spacemit: Add ethernet device for K3
Add all ethernet device nodes for K3 SoC.
---
Require the following patch series:
1. Basic DT device patch
https://lore.kernel.org/spacemit/[email protected]
2. Ethernet driver patch
https://lore.kernel.org/spacemit/[email protected]
Changed from v4:
1. Fix pinctrl pin name
2. Remove alias for disabled node
Changed from v3:
1. Separate the pin as RGMII pin and INT pin.
2. Add comment for pin usage.
3. Rename the ethernet pinctrl node to address it is RGMII node.
Changed from v2:
1. keep aliases in alphabetical order.
Changed from v1:
1. remove interrupt-parents property
2. add aliases for ethernet node
--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 22 ++++ arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 44 ++++++++ arch/riscv/boot/dts/spacemit/k3.dtsi | 104 +++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +22 -0
@@ -4,13 +4,17 @@ * Copyright (c) 2026 Guodong Xu <[email protected]> */ +#include <dt-bindings/gpio/gpio.h> + #include "k3.dtsi" +#include "k3-pinctrl.dtsi" / { model = "SpacemiT K3 Pico-ITX"; compatible = "spacemit,k3-pico-itx", "spacemit,k3"; aliases { + ethernet0 = ð0; serial0 = &uart0; };
@@ -24,6 +28,24 @@ memory@100000000 { }; }; +ð0 { + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_rgmii_0_cfg>, <&gmac0_phy_0_cfg>; + phy-mode = "rgmii-id"; + phy-handle = <&phy0>; + status = "okay"; + + mdio { + phy0: phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <10000>; + }; + }; +}; + &uart0 { status = "okay"; };
arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi new file +44 -0
44 lines not on this page · raw message
arch/riscv/boot/dts/spacemit/k3.dtsi +104 -0
116 lines not on this page · raw message
--
2.53.0
Hi Inochi,
Quoted 3 lines · Inochi Amaoto
Add all ethernet device nodes for K3 SoC.
Signed-off-by Inochi Amaoto <[email protected]>
Looks good to me, thanks
Signature · 1 line
Yixun Lan (dlan)
Yixun Lan
maintainerHi Inochi,
Can you rebase the patch on top of spacemit DT branch, it would ease my life to merge it, as I see some conflicts..
https://github.com/spacemit-com/linux/tree/k1/dt-for-next
Also one comment below.. Please check
Quoted 26 lines · Inochi Amaoto
Add all ethernet device nodes for K3 SoC.
Signed-off-by Inochi Amaoto <[email protected]>---
Require the following patch series:
1. Basic DT device patch
https://lore.kernel.org/spacemit/[email protected]
2. Ethernet driver patch
https://lore.kernel.org/spacemit/[email protected]Changed from v4:
1. Fix pinctrl pin name
2. Remove alias for disabled nodeChanged from v3:
1. Separate the pin as RGMII pin and INT pin.
2. Add comment for pin usage.
3. Rename the ethernet pinctrl node to address it is RGMII node.Changed from v2:
1. keep aliases in alphabetical order.Changed from v1:
1. remove interrupt-parents property
2. add aliases for ethernet node
---
..
Quoted 13 lines
arch/riscv/boot/dts/spacemit/k3.dtsi +1
-0@@ -5,6 +5,7 @@ */ #include <dt-bindings/clock/spacemit,k3-clocks.h> +#include <dt-bindings/reset/spacemit,k3-resets.h> #include <dt-bindings/interrupt-controller/irq.h> /dts-v1/;
arch/riscv/boot/dts/spacemit/k3.dtsi soc: soc { · line 446
Quoted 9 lines
arch/riscv/boot/dts/spacemit/k3.dtsi +6
-0@@ -437,6 +438,109 @@ soc: soc { dma-noncoherent; ranges; + gmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <0xf>; + snps,rd_osr_lmt = <0xf>; + /* max axi burst len is 256 */ + snps,blen = <256 128 64 32 16 0 0>; + };
I've got a DT complaint, can you take a look? probably put it inside ethernet node? although will duplicate a little bit in several nodes..
arch/riscv/boot/dts/spacemit/k3.dtsi:441.37-446.5: Warning (simple_bus_reg): /soc/stmmac-axi-config: missing or empty reg/ranges property
Signature · 1 line
Yixun Lan (dlan)