netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 0/5] Add Ethernet MAC support for SpacemiT K1
@ 2025-08-20  6:47 Vivian Wang
  2025-08-20  6:47 ` [PATCH net-next v6 1/5] dt-bindings: net: Add " Vivian Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Vivian Wang @ 2025-08-20  6:47 UTC (permalink / raw)
  To: Andrew Lunn, Jakub Kicinski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Yixun Lan, Vivian Wang, David S. Miller,
	Eric Dumazet, Paolo Abeni, Philipp Zabel, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti
  Cc: Vivian Wang, Vadim Fedorenko, Junhui Liu, Simon Horman,
	Maxime Chevallier, netdev, devicetree, linux-riscv, spacemit,
	linux-kernel, Conor Dooley, Hendrik Hamerlinck

SpacemiT K1 has two gigabit Ethernet MACs with RGMII and RMII support.
Add devicetree bindings, driver, and DTS for it.

Tested primarily on BananaPi BPI-F3. Basic TX/RX functionality also
tested on Milk-V Jupiter.

I would like to note that even though some bit field names superficially
resemble that of DesignWare MAC, all other differences point to it in
fact being a custom design.

Based on SpacemiT drivers [1]. These patches are also available at:

https://github.com/dramforever/linux/tree/k1/ethernet/v6

[1]: https://github.com/spacemit-com/linux-k1x

---
Changes in v6:
- Implement pause frame support
- Minor changes:
  - Convert comment for emac_stats_update() into assert_spin_locked()
  - Cosmetic fixes for some comments and whitespace
  - emac_set_mac_addr() is now refactored
- Link to v5: https://lore.kernel.org/r/20250812-net-k1-emac-v5-0-dd17c4905f49@iscas.ac.cn

Changes in v5:
- Rebased on v6.17-rc1, add back DTS now that they apply cleanly
- Use standard statistics interface, handle 32-bit statistics overflow
- Minor changes:
  - Fix clock resource handling in emac_resume
  - Ratelimit the message in emac_rx_frame_status
  - Add ndo_validate_addr = eth_validate_addr
  - Remove unnecessary parens in emac_set_mac_addr
  - Change some functions that never fail to return void instead of int
  - Minor rewording
- Link to v4: https://lore.kernel.org/r/20250703-net-k1-emac-v4-0-686d09c4cfa8@iscas.ac.cn

Changes in v4:
- Resource handling on probe and remove: timer_delete_sync and
  of_phy_deregister_fixed_link
- Drop DTS changes and dependencies (will send through SpacemiT tree)
- Minor changes:
  - Remove redundant phy_stop() and setting of ndev->phydev
  - Fix error checking for emac_open in emac_resume
  - Fix one missed dev_err -> dev_err_probe
  - Fix type of emac_start_xmit
  - Fix one missed reverse xmas tree formatting
  - Rename some functions for consistency between emac_* and ndo_*
- Link to v3: https://lore.kernel.org/r/20250702-net-k1-emac-v3-0-882dc55404f3@iscas.ac.cn

Changes in v3:
- Refactored and simplified emac_tx_mem_map
- Addressed other minor v2 review comments
- Removed what was patch 3 in v2, depend on DMA buses instead
- DT nodes in alphabetical order where appropriate
- Link to v2: https://lore.kernel.org/r/20250618-net-k1-emac-v2-0-94f5f07227a8@iscas.ac.cn

Changes in v2:
- dts: Put eth0 and eth1 nodes under a bus with dma-ranges
- dts: Added Milk-V Jupiter
- Fix typo in emac_init_hw() that broke the driver (Oops!)
- Reformatted line lengths to under 80
- Addressed other v1 review comments
- Link to v1: https://lore.kernel.org/r/20250613-net-k1-emac-v1-0-cc6f9e510667@iscas.ac.cn

---
Vivian Wang (5):
      dt-bindings: net: Add support for SpacemiT K1
      net: spacemit: Add K1 Ethernet MAC
      riscv: dts: spacemit: Add Ethernet support for K1
      riscv: dts: spacemit: Add Ethernet support for BPI-F3
      riscv: dts: spacemit: Add Ethernet support for Jupiter

 .../devicetree/bindings/net/spacemit,k1-emac.yaml  |   81 +
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    |   46 +
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts  |   46 +
 arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi       |   48 +
 arch/riscv/boot/dts/spacemit/k1.dtsi               |   22 +
 drivers/net/ethernet/Kconfig                       |    1 +
 drivers/net/ethernet/Makefile                      |    1 +
 drivers/net/ethernet/spacemit/Kconfig              |   29 +
 drivers/net/ethernet/spacemit/Makefile             |    6 +
 drivers/net/ethernet/spacemit/k1_emac.c            | 2179 ++++++++++++++++++++
 drivers/net/ethernet/spacemit/k1_emac.h            |  426 ++++
 11 files changed, 2885 insertions(+)
---
base-commit: 062b3e4a1f880f104a8d4b90b767788786aa7b78
change-id: 20250606-net-k1-emac-3e181508ea64

Best regards,
-- 
Vivian "dramforever" Wang


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

end of thread, other threads:[~2025-08-25 23:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20  6:47 [PATCH net-next v6 0/5] Add Ethernet MAC support for SpacemiT K1 Vivian Wang
2025-08-20  6:47 ` [PATCH net-next v6 1/5] dt-bindings: net: Add " Vivian Wang
2025-08-20  6:47 ` [PATCH net-next v6 2/5] net: spacemit: Add K1 Ethernet MAC Vivian Wang
2025-08-20 11:34   ` Maxime Chevallier
2025-08-20 17:48     ` Vivian Wang
2025-08-21 12:59   ` Vadim Fedorenko
2025-08-21 13:38     ` Vivian Wang
2025-08-21 23:14   ` Jakub Kicinski
2025-08-22 13:27     ` Vivian Wang
2025-08-20  6:47 ` [PATCH net-next v6 3/5] riscv: dts: spacemit: Add Ethernet support for K1 Vivian Wang
2025-08-25 23:32   ` Yixun Lan
2025-08-20  6:47 ` [PATCH net-next v6 4/5] riscv: dts: spacemit: Add Ethernet support for BPI-F3 Vivian Wang
2025-08-25 23:33   ` Yixun Lan
2025-08-20  6:47 ` [PATCH net-next v6 5/5] riscv: dts: spacemit: Add Ethernet support for Jupiter Vivian Wang
2025-08-25 23:33   ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).