linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/5] Add Ethernet MAC support for SpacemiT K1
@ 2025-07-02  6:01 Vivian Wang
  2025-07-02  6:01 ` [PATCH net-next v3 1/5] dt-bindings: net: Add " Vivian Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Vivian Wang @ 2025-07-02  6:01 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Yixun Lan, Vivian Wang, Philipp Zabel, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti
  Cc: Vivian Wang, Lukas Bulwahn, Geert Uytterhoeven,
	Parthiban Veerasooran, netdev, devicetree, linux-riscv, spacemit,
	linux-kernel, Conor Dooley

SpacemiT K1 has two gigabit Ethernet MACs with RGMII and RMII support.
Add a driver for them, as well as the supporting devicetree and bindings
updates.

Tested on BananaPi BPI-F3 and 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].

This series depends on reset controller support [2] and DMA buses [3]
for K1. There are some minor conflicts resulting from both touching
k1.dtsi, but it should just both be adding nodes.

These patches can also be pulled from:

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

[1]: https://github.com/spacemit-com/linux-k1x
[2]: https://lore.kernel.org/all/20250613011139.1201702-1-elder@riscstar.com
[3]: https://lore.kernel.org/all/20250623-k1-dma-buses-rfc-wip-v1-0-c0144082061f@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            | 1884 ++++++++++++++++++++
 drivers/net/ethernet/spacemit/k1_emac.h            |  420 +++++
 11 files changed, 2584 insertions(+)
---
base-commit: d9946fe286439c2aeaa7953b8c316efe5b83d515
change-id: 20250606-net-k1-emac-3e181508ea64
prerequisite-message-id: <20250613011139.1201702-1-elder@riscstar.com>
prerequisite-patch-id: 2c73c63bef3640e63243ddcf3c07b108d45f6816
prerequisite-patch-id: 0faba75db33c96a588e722c4f2b3862c4cbdaeae
prerequisite-patch-id: 5db8688ef86188ec091145fae9e14b2211cd2b8c
prerequisite-patch-id: e0fe84381637dc888d996a79ea717ff0e3441bd1
prerequisite-patch-id: 2fc0ef1c2fcda92ad83400da5aadaf194fe78627
prerequisite-patch-id: bfa54447803e5642059c386e2bd96297e691d0bf
prerequisite-message-id: <20250523-22-k1-sdhci-v1-1-6e0adddf7494@gentoo.org>
prerequisite-patch-id: 53fc23b06e26ab0ebb2c52ee09f4b2cffab889e2
prerequisite-message-id: <20250623-k1-dma-buses-rfc-wip-v1-0-c0144082061f@iscas.ac.cn>
prerequisite-patch-id: 7f04dcf6f82a9a9fa3a8a78ae4992571f85eb6ca
prerequisite-patch-id: 291c9bcd2ce688e08a8ab57c6d274a57cac6b33c
prerequisite-patch-id: 957d7285e8d2a7698beb0c25cb0f6ea733246af0

Best regards,
-- 
Vivian "dramforever" Wang


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2025-07-03 10:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02  6:01 [PATCH net-next v3 0/5] Add Ethernet MAC support for SpacemiT K1 Vivian Wang
2025-07-02  6:01 ` [PATCH net-next v3 1/5] dt-bindings: net: Add " Vivian Wang
2025-07-02  6:01 ` [PATCH net-next v3 2/5] net: spacemit: Add K1 Ethernet MAC Vivian Wang
2025-07-02  7:17   ` Maxime Chevallier
2025-07-02  7:41     ` Vivian Wang
2025-07-03  7:19   ` Simon Horman
2025-07-03  7:58     ` Vivian Wang
2025-07-02  6:01 ` [PATCH net-next v3 3/5] riscv: dts: spacemit: Add Ethernet support for K1 Vivian Wang
2025-07-02  6:01 ` [PATCH net-next v3 4/5] riscv: dts: spacemit: Add Ethernet support for BPI-F3 Vivian Wang
2025-07-02  6:01 ` [PATCH net-next v3 5/5] riscv: dts: spacemit: Add Ethernet support for Jupiter Vivian Wang
2025-07-03  6:48   ` Junhui Liu
2025-07-03  7:46     ` Vivian Wang
2025-07-03  9:00       ` Junhui Liu
2025-07-03  7:23 ` [PATCH net-next v3 0/5] Add Ethernet MAC support for SpacemiT K1 Simon Horman
2025-07-03  7:39   ` Vivian Wang

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).