Skip to content

riscv: spacemit: Add ethernet support for K3

Inochi Amaoto linux-arm-kernel linux-devicetree linux-riscv lkml netdev spacemit 10 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest4 patches 2 repliesApplied 4/4
  2. v94 patches 3 repliesSuperseded
  3. v83 patches 5 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v73 patches1 replySuperseded
v63 patches0 repliesSuperseded
v53 patches4 repliesSuperseded
v43 patches7 repliesSuperseded
v33 patches5 repliesSuperseded
v23 patches6 repliesSuperseded
v13 patches18 repliesSuperseded

Changes in v10 from the cover letter

- https://lore.kernel.org/netdev/[email protected]
patch 3:
1. fix misaligned brace.

Patches in v10 All 4 applied

#Subject and filesSizeRepliesApplied
1/4dt-bindings: net: Add support for Spacemit K3 dwmacDocumentation/devicetree/bindings/net/snps,dwmac.yaml Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml+104 -02 repliesApplied
2/4net: stmmac: platform: Add snps,dwmac-5.40a IP compatible stringdrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c+1 -00 repliesApplied
3/4net: stmmac: Add glue layer for Spacemit K3 SoCdrivers/net/ethernet/stmicro/stmmac/Kconfig drivers/net/ethernet/stmicro/stmmac/Makefile drivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c+240 -00 repliesApplied
4/4MAINTAINERS: add entry for SpacemiT DWMAC glue layerMAINTAINERS+6 -00 repliesApplied

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchRob Herring (Arm)Russell King (Oracle)
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH net-next v10 0/4] riscv: spacemit: Add ethernet support for K3

Add initial support for ethernet controller of the Spacemit K3 SoC. This ethernet controller is almost a standard Synopsys DesignWare MAC (version 5.40a). This controller require a syscon device to configure some basic features, like interface type and internal delay.

Change from v9:
- https://lore.kernel.org/netdev/[email protected]
patch 3:
1. fix misaligned brace.

Change from v8:
- https://lore.kernel.org/netdev/[email protected]
patch 2:
1. Apply Russell's tag.
patch 3:
1. reverse the order of the local variable to make it "reverse christmas tree" for function spacemit_dwmac_update_irq_config() and function spacemit_set_phy_intf_sel()
2. Apply Russell's tag
patch 4:
1. Add MAINTAINERS entry

Change from v7:
- https://lore.kernel.org/netdev/[email protected]
patch 3:
1. Remove unused parameter in spacemit_dwmac_fix_delay().

Change from v6:
- https://lore.kernel.org/netdev/[email protected]
patch 1:
1. Drop the extra blank line at the last

Change from v5:
- https://lore.kernel.org/netdev/[email protected]
patch 3:
1. fix error from checkpatch

Change from v4:
- https://lore.kernel.org/netdev/[email protected]
patch 1:
1 Apply Rob's tag.
2 Adjust clock description according to Russell's suggestion. patch 3:
1. Add set_phy_intf_sel() and get_interfaces() hook, suggested by Russell.

Change from v3:
- https://lore.kernel.org/netdev/[email protected]
patch 1:
1. fix the uncorrect compatible string postion
patch 3:
1. add "CTRL_" prefix to all ctrl register definition
2. only use delay config 0 to calculate delay code.
3. fix typo in the comment

Change from v2:
- https://lore.kernel.org/netdev/[email protected]
patch 1:
1. remove not needed compatible for select
2. drop empty line in "spacemit,apmu" properties
3. add spacemit,apmu properties to required.
patch 3:
1. remove misused phy_fix_phy_mode_for_mac_delays.
2. use local tx clock instead of the clk_tx_i in the dwmac.

Change from v1:
- https://lore.kernel.org/netdev/[email protected]
patch 1:
1. remove phy clock
patch 3:
1. improve comment and include something special about Spacmit K3 dwmac
2. reorder the included file
3. fix wrong delay macro used in spacemit_dwmac_set_delay.
4. add check for maximum supported delay.
5. use DIV_ROUND_CLOSEST to calculate best delay configuration.
6. use assign for the ctrl register initial value.
7. fix input when calling of_property_read_u32().

Inochi Amaoto (4):
dt-bindings: net: Add support for Spacemit K3 dwmac
net: stmmac: platform: Add snps,dwmac-5.40a IP compatible string
net: stmmac: Add glue layer for Spacemit K3 SoC
MAINTAINERS: add entry for SpacemiT DWMAC glue layer

 .../devicetree/bindings/net/snps,dwmac.yaml   |   2 +
 .../bindings/net/spacemit,k3-dwmac.yaml       | 102 ++++++++
 MAINTAINERS                                   |   6 +
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  12 +
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-spacemit.c  | 227 ++++++++++++++++++
 .../ethernet/stmicro/stmmac/stmmac_platform.c |   1 +
 7 files changed, 351 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c

--
2.53.0