netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next v4 0/5] net: stmmac: Add PCI driver support for BCM8958x
@ 2024-08-14 22:18 jitendra.vegiraju
  2024-08-14 22:18 ` [net-next v4 1/5] net: stmmac: Add HDMA mapping for dw25gmac support jitendra.vegiraju
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: jitendra.vegiraju @ 2024-08-14 22:18 UTC (permalink / raw)
  To: netdev
  Cc: alexandre.torgue, joabreu, davem, edumazet, kuba, pabeni,
	mcoquelin.stm32, jitendra.vegiraju, bcm-kernel-feedback-list,
	richardcochran, ast, daniel, hawk, john.fastabend, fancer.lancer,
	rmk+kernel, ahalaney, xiaolei.wang, rohan.g.thomas,
	Jianheng.Zhang, leong.ching.swee, linux-kernel, linux-stm32,
	linux-arm-kernel, bpf, andrew, linux, horms, florian.fainelli

From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>

This patchset adds basic PCI ethernet device driver support for Broadcom
BCM8958x Automotive Ethernet switch SoC devices.

This SoC device has PCIe ethernet MAC attached to an integrated ethernet
switch using XGMII interface. The PCIe ethernet controller is presented to
the Linux host as PCI network device.

The following block diagram gives an overview of the application.
             +=================================+
             |       Host CPU/Linux            |
             +=================================+
                        || PCIe
                        ||
        +==========================================+
        |           +--------------+               |
        |           | PCIE Endpoint|               |
        |           | Ethernet     |               |
        |           | Controller   |               |
        |           |   DMA        |               |
        |           +--------------+               |
        |           |   MAC        |   BCM8958X    |
        |           +--------------+   SoC         |
        |               || XGMII                   |
        |               ||                         |
        |           +--------------+               |
        |           | Ethernet     |               |
        |           | switch       |               |
        |           +--------------+               |
        |             || || || ||                  |
        +==========================================+
                      || || || || More external interfaces

The MAC block on BCM8958x is based on Synopsis XGMAC 4.00a core. This
MAC IP introduces new DMA architecture called Hyper-DMA for virtualization
scalability.

Driver functionality specific to new MAC (DW25GMAC) is implemented in
new file dw25gmac.c.

Management of integrated ethernet switch on this SoC is not handled by
the PCIe interface.
This SoC device has PCIe ethernet MAC directly attached to an integrated
ethernet switch using XGMII interface.

v3->v4:
   Based on Serge's questions, received a confirmation from Synopsis that
   the MAC IP is indeed the new 25GMAC design.
   Renamed all references of XGMAC4 to 25GMAC.
   The patch series is rearranged slightly as follows.
   Patch1 (new): Define HDMA mapping data structure in kernel's stmmac.h
   Patch2 (v3 Patch1): Adds dma_ops for dw25gmac in stmmac core
       Renamed new files dwxgmac4.* to dw25gmac.* - Serge Semin
       Defined new Synopsis version and device id macros for DW25GMAC.
       Coverted bit operations to FIELD_PREP macros - Russell King
       Moved hwif.h to this patch, Sparse flagged warning - Simon Horman
       Defined macros for hardcoded values TDPS etc - Serge Semin
       Read number of PDMAs/VDMAs from hardware - Serge Semin
   Patch3 (v3 Patch2): Hooks in hardware interface handling for dw25gmac
       Resolved user_version quirks questions - Serge, Russell, Andrew
       Added new stmmac_hw entry for DW25GMAC. - Serge
       Added logic to override synopsis_dev_id by glue driver.
   Patch4 (v3 Patch3): Adds PCI driver for BCM8958x device
       Define bitmmap macros for hardcoded values - Andrew Lunn
       Added per device software node - Andrew Lunn
   Patch5(new/split): Adds BCM8958x driver to build system
   
v2->v3:
   Addressed v2 comments from Andrew, Jakub, Russel and Simon.
   Based on suggestion by Russel and Andrew, added software node to create
   phylink in fixed-link mode.
   Moved dwxgmac4 specific functions to new files dwxgmac4.c and dwxgmac4.h
   in stmmac core module.
   Reorganized the code to use the existing glue logic support for xgmac in
   hwif.c and override ops functions for dwxgmac4 specific functions.
   The patch is split into three parts.
     Patch#1 Adds dma_ops for dwxgmac4 in stmmac core
     Patch#2 Hooks in the hardware interface handling for dwxgmac4
     Patch#3 Adds PCI driver for BCM8958x device
   https://lore.kernel.org/netdev/20240802031822.1862030-1-jitendra.vegiraju@broadcom.com/

v1->v2:
   Minor fixes to address coding style issues.
   Sent v2 too soon by mistake, without waiting for review comments.
   Received feedback on this version.
   https://lore.kernel.org/netdev/20240511015924.41457-1-jitendra.vegiraju@broadcom.com/

v1:  
   https://lore.kernel.org/netdev/20240510000331.154486-1-jitendra.vegiraju@broadcom.com/

Jitendra Vegiraju (5):
  Add HDMA mapping for dw25gmac support
  Add basic dw25gmac support to stmmac core
  Integrate dw25gmac into stmmac hwif handling
  Add PCI driver support for BCM8958x
  Add BCM8958x driver to build system

 MAINTAINERS                                   |   8 +
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  11 +
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   3 +-
 drivers/net/ethernet/stmicro/stmmac/common.h  |   2 +
 .../net/ethernet/stmicro/stmmac/dw25gmac.c    | 173 ++++++
 .../net/ethernet/stmicro/stmmac/dw25gmac.h    |  90 +++
 .../net/ethernet/stmicro/stmmac/dwmac-brcm.c  | 530 ++++++++++++++++++
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  31 +
 drivers/net/ethernet/stmicro/stmmac/hwif.c    |  25 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |   1 +
 include/linux/stmmac.h                        |  50 ++
 12 files changed, 922 insertions(+), 3 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dw25gmac.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dw25gmac.h
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-brcm.c

-- 
2.34.1


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

end of thread, other threads:[~2024-08-30 23:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 22:18 [net-next v4 0/5] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-14 22:18 ` [net-next v4 1/5] net: stmmac: Add HDMA mapping for dw25gmac support jitendra.vegiraju
2024-08-15 23:30   ` Abhishek Chauhan (ABC)
2024-08-20 23:10     ` Jitendra Vegiraju
2024-08-20 23:12       ` Abhishek Chauhan (ABC)
2024-08-14 22:18 ` [net-next v4 2/5] net: stmmac: Add basic dw25gmac support to stmmac core jitendra.vegiraju
2024-08-22 17:16   ` Amit Singh Tomar
2024-08-26 17:41     ` Jitendra Vegiraju
2024-08-14 22:18 ` [net-next v4 3/5] net: stmmac: Integrate dw25gmac into stmmac hwif handling jitendra.vegiraju
2024-08-23 13:48   ` Serge Semin
2024-08-26 18:53     ` Jitendra Vegiraju
2024-08-29 10:52       ` Serge Semin
2024-08-30 23:35         ` Jitendra Vegiraju
2024-08-14 22:18 ` [net-next v4 4/5] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-16 18:27   ` Jakub Kicinski
2024-08-20 23:16     ` Jitendra Vegiraju
2024-08-22 16:35   ` Amit Singh Tomar
2024-08-26 17:30     ` Jitendra Vegiraju
2024-08-27 20:32       ` Amit Singh Tomar
2024-08-14 22:18 ` [net-next v4 5/5] net: stmmac: Add BCM8958x driver to build system jitendra.vegiraju
2024-08-16 18:46 ` [net-next v4 0/5] net: stmmac: Add PCI driver support for BCM8958x Serge Semin

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