[PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x

jitendra.vegiraju@broadcom.com posted 5 patches 1 year, 3 months ago
MAINTAINERS                                   |   8 +
drivers/net/ethernet/stmicro/stmmac/Kconfig   |  11 +
drivers/net/ethernet/stmicro/stmmac/Makefile  |   3 +-
drivers/net/ethernet/stmicro/stmmac/common.h  |   4 +
.../net/ethernet/stmicro/stmmac/dw25gmac.c    | 161 ++++++
.../net/ethernet/stmicro/stmmac/dw25gmac.h    |  92 ++++
.../net/ethernet/stmicro/stmmac/dwmac-brcm.c  | 478 ++++++++++++++++++
.../net/ethernet/stmicro/stmmac/dwxgmac2.h    |   1 +
.../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  42 ++
.../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  52 ++
drivers/net/ethernet/stmicro/stmmac/hwif.c    |  26 +-
drivers/net/ethernet/stmicro/stmmac/hwif.h    |   1 +
.../net/ethernet/stmicro/stmmac/stmmac_main.c |  26 +
include/linux/stmmac.h                        |   2 +
14 files changed, 905 insertions(+), 2 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
[PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by jitendra.vegiraju@broadcom.com 1 year, 3 months ago
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.

v5->v6:
   Change summary to address comments/suggestions by Serge Semin.
   Patch1:
     Removed the comlexity of hdma mapping in previous patch series and
     use static DMA mapping.
     Renamed plat_stmmacenet_data::snps_dev_id as dev_id and moved to
     the beginning of the struct.
   Patch2:
     Added dw25gmac_get_hw_feature() for dw25gmac.
     Use static one-to-one VDMA-TC-PDMA mapping.
   Patch4:
     Remove usage of plat_stmmacenet_data::msi_*_vec variables for
     interrupt vector initialization.
     Change phy_interface type to XGMII.
     Cleanup unused macros.
     
v4->v5:
   Summary of changes in this patch series:
   As suggested by Serge Semin, defined common setup function for dw25gmac.
   To accommodate early adopter DW25GMAC used in BCM8958x device, provide
   a mechanism to override snps_id and snps_dev_id used for driver entry
   matching in hwif.c

   Patch1:
     Added plat_stmmacenet_data::snps_id,snps_dev_id fields - Serge Semin
   Patch2:
     Define common setup function for dw25gmac_setup() - Serge Semin
     Support DW25GMAC IPs with varying VDMA/PDMA count - Abhishek Chauhan
     Allocate and initialize hdma mapping configuration data dynamically
     based on device's VDMA/PDMA feature capabilities in dw25gmac_setup().
     Spelling errors in commit log, lower case 0x for hex -Amit Singh Tomar
   Patch3:
     Glue support in hwif.c for DW25GMAC in hwif.c - Serge Semin
     Provide an option to override snps_id and snps_dev_id when the device
     reports version info not conformant with driver's expectations as is
     the case with BCM8958x device. - Serge Semin
   Patch4:
     Remove setup function in the glue driver - Serge Semin
     Remove unnecessary calls pci_enable_device() and pci_set_master()
     in dwxgmac_brcm_pci_resume() - Jakub Kicinski
     Merge variable definitions to single line - Amit Singh Tomar
    https://lore.kernel.org/netdev/20240904054815.1341712-1-jitendra.vegiraju@broadcom.com/
   
v3->v4:
   Based on Serge's questions, received a confirmation from Synopsys 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.
       Converted 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
   https://lore.kernel.org/netdev/20240814221818.2612484-1-jitendra.vegiraju@broadcom.com/

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 snps_id, dev_id to struct plat_stmmacenet_data
  Add basic dw25gmac support in 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  |   4 +
 .../net/ethernet/stmicro/stmmac/dw25gmac.c    | 161 ++++++
 .../net/ethernet/stmicro/stmmac/dw25gmac.h    |  92 ++++
 .../net/ethernet/stmicro/stmmac/dwmac-brcm.c  | 478 ++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |   1 +
 .../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  42 ++
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  52 ++
 drivers/net/ethernet/stmicro/stmmac/hwif.c    |  26 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |   1 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  26 +
 include/linux/stmmac.h                        |   2 +
 14 files changed, 905 insertions(+), 2 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
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Jitendra Vegiraju 1 year, 3 months ago
Hi netdev team,

On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>
> 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.
>
> v5->v6:
>    Change summary to address comments/suggestions by Serge Semin.
>    Patch1:
>      Removed the comlexity of hdma mapping in previous patch series and
>      use static DMA mapping.
>      Renamed plat_stmmacenet_data::snps_dev_id as dev_id and moved to
>      the beginning of the struct.
>    Patch2:
>      Added dw25gmac_get_hw_feature() for dw25gmac.
>      Use static one-to-one VDMA-TC-PDMA mapping.
>    Patch4:
>      Remove usage of plat_stmmacenet_data::msi_*_vec variables for
>      interrupt vector initialization.
>      Change phy_interface type to XGMII.
>      Cleanup unused macros.
>

I would like to seek your guidance on how to take this patch series forward.
Thanks to your feedback and Serge's suggestions, we made some forward
progress on this patch series.
Please make any suggestions to enable us to upstream driver support
for BCM8958x.
Thanks,
Jitendra
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Abhishek Chauhan (ABC) 1 year ago

On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
> Hi netdev team,
> 
> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>>
>> 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.
>>
>> v5->v6:
>>    Change summary to address comments/suggestions by Serge Semin.
>>    Patch1:
>>      Removed the comlexity of hdma mapping in previous patch series and
>>      use static DMA mapping.
>>      Renamed plat_stmmacenet_data::snps_dev_id as dev_id and moved to
>>      the beginning of the struct.
>>    Patch2:
>>      Added dw25gmac_get_hw_feature() for dw25gmac.
>>      Use static one-to-one VDMA-TC-PDMA mapping.
>>    Patch4:
>>      Remove usage of plat_stmmacenet_data::msi_*_vec variables for
>>      interrupt vector initialization.
>>      Change phy_interface type to XGMII.
>>      Cleanup unused macros.
>>
> 
> I would like to seek your guidance on how to take this patch series forward.
> Thanks to your feedback and Serge's suggestions, we made some forward
> progress on this patch series.
> Please make any suggestions to enable us to upstream driver support
> for BCM8958x.

Jitendra,
	 Have we resent this patch or got it approved ? I dont see any updates after this patch. 

> Thanks,
> Jitendra
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Jitendra Vegiraju 1 year ago
Hi Abhishek,

On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
quic_abchauha@quicinc.com> wrote:

>
>
> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
> > Hi netdev team,
> >
> > On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
> >>
> >> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
> >>
> >> This patchset adds basic PCI ethernet device driver support for Broadcom
> >> BCM8958x Automotive Ethernet switch SoC devices.
> >>
> >
> > I would like to seek your guidance on how to take this patch series
> forward.
> > Thanks to your feedback and Serge's suggestions, we made some forward
> > progress on this patch series.
> > Please make any suggestions to enable us to upstream driver support
> > for BCM8958x.
>
> Jitendra,
>          Have we resent this patch or got it approved ? I dont see any
> updates after this patch.
>
>
Thank you for inquiring about the status of this patch.
As stmmac driver is going through a maintainer transition, we wanted to
wait until a new maintainer is identified.
We would like to send the updated patch as soon as possible.
Thanks,
Jitendra
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Abhishek Chauhan (ABC) 8 months, 2 weeks ago

On 2/7/2025 3:18 PM, Jitendra Vegiraju wrote:
> Hi Abhishek,
> 
> On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
> quic_abchauha@quicinc.com> wrote:
> 
>>
>>
>> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
>>> Hi netdev team,
>>>
>>> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>>>>
>>>> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
>>>>
>>>> This patchset adds basic PCI ethernet device driver support for Broadcom
>>>> BCM8958x Automotive Ethernet switch SoC devices.
>>>>
>>>
>>> I would like to seek your guidance on how to take this patch series
>> forward.
>>> Thanks to your feedback and Serge's suggestions, we made some forward
>>> progress on this patch series.
>>> Please make any suggestions to enable us to upstream driver support
>>> for BCM8958x.
>>
>> Jitendra,
>>          Have we resent this patch or got it approved ? I dont see any
>> updates after this patch.
>>
>>
> Thank you for inquiring about the status of this patch.
> As stmmac driver is going through a maintainer transition, we wanted to
> wait until a new maintainer is identified.
> We would like to send the updated patch as soon as possible.
> Thanks,
> Jitendra
Thanks Jitendra, I am sorry but just a follow up. 

Do we know if stmmac maintainer are identified now ?

Andrew/Russell - Can you please help us ? 

Best regards
ABC

> 
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Yanteng Si 8 months, 2 weeks ago
在 5/28/25 8:04 AM, Abhishek Chauhan (ABC) 写道:
> 
> 
> On 2/7/2025 3:18 PM, Jitendra Vegiraju wrote:
>> Hi Abhishek,
>>
>> On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
>> quic_abchauha@quicinc.com> wrote:
>>
>>>
>>>
>>> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
>>>> Hi netdev team,
>>>>
>>>> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>>>>>
>>>>> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
>>>>>
>>>>> This patchset adds basic PCI ethernet device driver support for Broadcom
>>>>> BCM8958x Automotive Ethernet switch SoC devices.
>>>>>
>>>>
>>>> I would like to seek your guidance on how to take this patch series
>>> forward.
>>>> Thanks to your feedback and Serge's suggestions, we made some forward
>>>> progress on this patch series.
>>>> Please make any suggestions to enable us to upstream driver support
>>>> for BCM8958x.
>>>
>>> Jitendra,
>>>           Have we resent this patch or got it approved ? I dont see any
>>> updates after this patch.
>>>
>>>
>> Thank you for inquiring about the status of this patch.
>> As stmmac driver is going through a maintainer transition, we wanted to
>> wait until a new maintainer is identified.
>> We would like to send the updated patch as soon as possible.
>> Thanks,
>> Jitendra
> Thanks Jitendra, I am sorry but just a follow up.
> 
> Do we know if stmmac maintainer are identified now ?

I'm curious why such a precondition is added?


Thanks,
Yanteng
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Jitendra Vegiraju 8 months, 2 weeks ago
Hi Yanteng,

On Wed, May 28, 2025 at 6:36 PM Yanteng Si <si.yanteng@linux.dev> wrote:
>
> 在 5/28/25 8:04 AM, Abhishek Chauhan (ABC) 写道:
> >
> >
> > On 2/7/2025 3:18 PM, Jitendra Vegiraju wrote:
> >> Hi Abhishek,
> >>
> >> On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
> >> quic_abchauha@quicinc.com> wrote:
> >>
> >>>
> >>>
> >>> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
> >>>> Hi netdev team,
> >>>>
> >>>> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
> >>>>>
> >>>>> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
> >>>>>
> >>>>> This patchset adds basic PCI ethernet device driver support for Broadcom
> >>>>> BCM8958x Automotive Ethernet switch SoC devices.
> >>>>>
> >>>>
> >>>> I would like to seek your guidance on how to take this patch series
> >>> forward.
> >>>> Thanks to your feedback and Serge's suggestions, we made some forward
> >>>> progress on this patch series.
> >>>> Please make any suggestions to enable us to upstream driver support
> >>>> for BCM8958x.
> >>>
> >>> Jitendra,
> >>>           Have we resent this patch or got it approved ? I dont see any
> >>> updates after this patch.
> >>>
> >>>
> >> Thank you for inquiring about the status of this patch.
> >> As stmmac driver is going through a maintainer transition, we wanted to
> >> wait until a new maintainer is identified.
> >> We would like to send the updated patch as soon as possible.
> >> Thanks,
> >> Jitendra
> > Thanks Jitendra, I am sorry but just a follow up.
> >
> > Do we know if stmmac maintainer are identified now ?
>
> I'm curious why such a precondition is added?
>
It's not a precondition. Let me give some context.
This patch series adds support for a new Hyper DMA(HDMA) MAC from Synopsis.
Many of the netdev community members reviewed the patches at that time.
Being the module maintainer at that time, Serge took the initiative to
guide us through integrating the new MAC into the stmmac driver.
We addressed all the review comments and submitted the last patch series.
Without an official maintainer, we didn't get feedback on the last patch series.
Because of this, we wanted to wait until a new maintainer is assigned
to this module.
As Abhishek expressed in his email, it appears the HDMA MAC is
becoming more mainstream.
We are hoping to rebase the patch series and resubmit for review if
netdev team members show interest.
Thanks,
Jitendra
>
> Thanks,
> Yanteng
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Yanteng Si 8 months, 2 weeks ago
在 5/29/25 10:56 AM, Jitendra Vegiraju 写道:
> Hi Yanteng,
>
> On Wed, May 28, 2025 at 6:36 PM Yanteng Si <si.yanteng@linux.dev> wrote:
>> 在 5/28/25 8:04 AM, Abhishek Chauhan (ABC) 写道:
>>>
>>> On 2/7/2025 3:18 PM, Jitendra Vegiraju wrote:
>>>> Hi Abhishek,
>>>>
>>>> On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
>>>> quic_abchauha@quicinc.com> wrote:
>>>>
>>>>>
>>>>> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
>>>>>> Hi netdev team,
>>>>>>
>>>>>> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>>>>>>> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
>>>>>>>
>>>>>>> This patchset adds basic PCI ethernet device driver support for Broadcom
>>>>>>> BCM8958x Automotive Ethernet switch SoC devices.
>>>>>>>
>>>>>> I would like to seek your guidance on how to take this patch series
>>>>> forward.
>>>>>> Thanks to your feedback and Serge's suggestions, we made some forward
>>>>>> progress on this patch series.
>>>>>> Please make any suggestions to enable us to upstream driver support
>>>>>> for BCM8958x.
>>>>> Jitendra,
>>>>>            Have we resent this patch or got it approved ? I dont see any
>>>>> updates after this patch.
>>>>>
>>>>>
>>>> Thank you for inquiring about the status of this patch.
>>>> As stmmac driver is going through a maintainer transition, we wanted to
>>>> wait until a new maintainer is identified.
>>>> We would like to send the updated patch as soon as possible.
>>>> Thanks,
>>>> Jitendra
>>> Thanks Jitendra, I am sorry but just a follow up.
>>>
>>> Do we know if stmmac maintainer are identified now ?
>> I'm curious why such a precondition is added?
>>
> It's not a precondition. Let me give some context.
> This patch series adds support for a new Hyper DMA(HDMA) MAC from Synopsis.
> Many of the netdev community members reviewed the patches at that time.
> Being the module maintainer at that time, Serge took the initiative to
> guide us through integrating the new MAC into the stmmac driver.
> We addressed all the review comments and submitted the last patch series.
> Without an official maintainer, we didn't get feedback on the last patch series.
> Because of this, we wanted to wait until a new maintainer is assigned
> to this module.
> As Abhishek expressed in his email, it appears the HDMA MAC is
> becoming more mainstream.
> We are hoping to rebase the patch series and resubmit for review if
> netdev team members show interest.


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

In my opinion, the precondition for waiting for a maintainer is that

the patch set has passed the review. I checked lore and did not find

any R&B tags in the patch set, which means your patch set has not

yet met the merging requirements.

Therefore, I think you can continue to push forward with this patch

set and not let it stagnate. I will take some time to review the previous

versions (which may take a while) and hope to be helpful.

Thanks,

Yanteng

> Thanks,
> Jitendra
>> Thanks,
>> Yanteng
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Abhishek Chauhan (ABC) 8 months, 2 weeks ago

On 5/28/2025 10:14 PM, Yanteng Si wrote:
> 
> 在 5/29/25 10:56 AM, Jitendra Vegiraju 写道:
>> Hi Yanteng,
>>
>> On Wed, May 28, 2025 at 6:36 PM Yanteng Si <si.yanteng@linux.dev> wrote:
>>> 在 5/28/25 8:04 AM, Abhishek Chauhan (ABC) 写道:
>>>>
>>>> On 2/7/2025 3:18 PM, Jitendra Vegiraju wrote:
>>>>> Hi Abhishek,
>>>>>
>>>>> On Fri, Feb 7, 2025 at 10:21 AM Abhishek Chauhan (ABC) <
>>>>> quic_abchauha@quicinc.com> wrote:
>>>>>
>>>>>>
>>>>>> On 11/5/2024 8:12 AM, Jitendra Vegiraju wrote:
>>>>>>> Hi netdev team,
>>>>>>>
>>>>>>> On Fri, Oct 18, 2024 at 1:53 PM <jitendra.vegiraju@broadcom.com> wrote:
>>>>>>>> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
>>>>>>>>
>>>>>>>> This patchset adds basic PCI ethernet device driver support for Broadcom
>>>>>>>> BCM8958x Automotive Ethernet switch SoC devices.
>>>>>>>>
>>>>>>> I would like to seek your guidance on how to take this patch series
>>>>>> forward.
>>>>>>> Thanks to your feedback and Serge's suggestions, we made some forward
>>>>>>> progress on this patch series.
>>>>>>> Please make any suggestions to enable us to upstream driver support
>>>>>>> for BCM8958x.
>>>>>> Jitendra,
>>>>>>            Have we resent this patch or got it approved ? I dont see any
>>>>>> updates after this patch.
>>>>>>
>>>>>>
>>>>> Thank you for inquiring about the status of this patch.
>>>>> As stmmac driver is going through a maintainer transition, we wanted to
>>>>> wait until a new maintainer is identified.
>>>>> We would like to send the updated patch as soon as possible.
>>>>> Thanks,
>>>>> Jitendra
>>>> Thanks Jitendra, I am sorry but just a follow up.
>>>>
>>>> Do we know if stmmac maintainer are identified now ?
>>> I'm curious why such a precondition is added?
>>>
>> It's not a precondition. Let me give some context.
>> This patch series adds support for a new Hyper DMA(HDMA) MAC from Synopsis.
>> Many of the netdev community members reviewed the patches at that time.
>> Being the module maintainer at that time, Serge took the initiative to
>> guide us through integrating the new MAC into the stmmac driver.
>> We addressed all the review comments and submitted the last patch series.
>> Without an official maintainer, we didn't get feedback on the last patch series.
>> Because of this, we wanted to wait until a new maintainer is assigned
>> to this module.
>> As Abhishek expressed in his email, it appears the HDMA MAC is
>> becoming more mainstream.
>> We are hoping to rebase the patch series and resubmit for review if
>> netdev team members show interest.
> 
> 
> https://lore.kernel.org/netdev/20241018205332.525595-1-jitendra.vegiraju@broadcom.com/
> 
> In my opinion, the precondition for waiting for a maintainer is that
> 
> the patch set has passed the review. I checked lore and did not find
> 
> any R&B tags in the patch set, which means your patch set has not
> 
> yet met the merging requirements.
> 
> Therefore, I think you can continue to push forward with this patch
> 
> set and not let it stagnate. I will take some time to review the previous
> 
> versions (which may take a while) and hope to be helpful.
> 
> Thanks,
> 
> Yanteng
> 
I will review the patch in the coming few days as well. As this patch also helps Qualcomm to develop the 
HDMA arch for 25XGMAC EMAC controller. 
This patch is validated/verfied/tested on Qualcomm platform devices which are not PCIE based. 
>> Thanks,
>> Jitendra
>>> Thanks,
>>> Yanteng
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Russell King (Oracle) 8 months, 2 weeks ago
On Tue, May 27, 2025 at 05:04:52PM -0700, Abhishek Chauhan (ABC) wrote:
> Thanks Jitendra, I am sorry but just a follow up. 
> 
> Do we know if stmmac maintainer are identified now ?
> 
> Andrew/Russell - Can you please help us ? 

My mainline work is in abayence at the moment (apart from occasionally
replying to a few emails from time to time) as I have other commitments
at the moment. I still have my own patches from before the previous
merge window that I didn't get around to submitting.

Sorry, I'm not in a position to help right now.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Serge Semin 1 year, 3 months ago
Hi Jitendra

On Fri, Oct 18, 2024 at 01:53:27PM GMT, jitendra.vegiraju@broadcom.com wrote:
> 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.
> 
> v5->v6:
>    Change summary to address comments/suggestions by Serge Semin.
>    Patch1:
>      Removed the comlexity of hdma mapping in previous patch series and
>      use static DMA mapping.
>      Renamed plat_stmmacenet_data::snps_dev_id as dev_id and moved to
>      the beginning of the struct.
>    Patch2:
>      Added dw25gmac_get_hw_feature() for dw25gmac.
>      Use static one-to-one VDMA-TC-PDMA mapping.
>    Patch4:
>      Remove usage of plat_stmmacenet_data::msi_*_vec variables for
>      interrupt vector initialization.
>      Change phy_interface type to XGMII.
>      Cleanup unused macros.

Sorry for abandoning the v5 discussion for too long. I've finally
finished another urgent task, so I'll be more interactive in the next
few weeks. I'll get back to reviewing this series today or early
tomorrow.

-Serge(y)

>      
> v4->v5:
>    Summary of changes in this patch series:
>    As suggested by Serge Semin, defined common setup function for dw25gmac.
>    To accommodate early adopter DW25GMAC used in BCM8958x device, provide
>    a mechanism to override snps_id and snps_dev_id used for driver entry
>    matching in hwif.c
> 
>    Patch1:
>      Added plat_stmmacenet_data::snps_id,snps_dev_id fields - Serge Semin
>    Patch2:
>      Define common setup function for dw25gmac_setup() - Serge Semin
>      Support DW25GMAC IPs with varying VDMA/PDMA count - Abhishek Chauhan
>      Allocate and initialize hdma mapping configuration data dynamically
>      based on device's VDMA/PDMA feature capabilities in dw25gmac_setup().
>      Spelling errors in commit log, lower case 0x for hex -Amit Singh Tomar
>    Patch3:
>      Glue support in hwif.c for DW25GMAC in hwif.c - Serge Semin
>      Provide an option to override snps_id and snps_dev_id when the device
>      reports version info not conformant with driver's expectations as is
>      the case with BCM8958x device. - Serge Semin
>    Patch4:
>      Remove setup function in the glue driver - Serge Semin
>      Remove unnecessary calls pci_enable_device() and pci_set_master()
>      in dwxgmac_brcm_pci_resume() - Jakub Kicinski
>      Merge variable definitions to single line - Amit Singh Tomar
>     https://lore.kernel.org/netdev/20240904054815.1341712-1-jitendra.vegiraju@broadcom.com/
>    
> v3->v4:
>    Based on Serge's questions, received a confirmation from Synopsys 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.
>        Converted 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
>    https://lore.kernel.org/netdev/20240814221818.2612484-1-jitendra.vegiraju@broadcom.com/
> 
> 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 snps_id, dev_id to struct plat_stmmacenet_data
>   Add basic dw25gmac support in 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  |   4 +
>  .../net/ethernet/stmicro/stmmac/dw25gmac.c    | 161 ++++++
>  .../net/ethernet/stmicro/stmmac/dw25gmac.h    |  92 ++++
>  .../net/ethernet/stmicro/stmmac/dwmac-brcm.c  | 478 ++++++++++++++++++
>  .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |   1 +
>  .../ethernet/stmicro/stmmac/dwxgmac2_core.c   |  42 ++
>  .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  52 ++
>  drivers/net/ethernet/stmicro/stmmac/hwif.c    |  26 +-
>  drivers/net/ethernet/stmicro/stmmac/hwif.h    |   1 +
>  .../net/ethernet/stmicro/stmmac/stmmac_main.c |  26 +
>  include/linux/stmmac.h                        |   2 +
>  14 files changed, 905 insertions(+), 2 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
>
Re: [PATCH net-next v6 0/5] net: stmmac: Add PCI driver support for BCM8958x
Posted by Jitendra Vegiraju 1 year, 3 months ago
Hi Serge,

On Mon, Oct 21, 2024 at 4:05 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> Hi Jitendra
>
> On Fri, Oct 18, 2024 at 01:53:27PM GMT, jitendra.vegiraju@broadcom.com wrote:
> > From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
> >
> > This patchset adds basic PCI ethernet device driver support for Broadcom
> > BCM8958x Automotive Ethernet switch SoC devices.
> >
>
> Sorry for abandoning the v5 discussion for too long. I've finally
> finished another urgent task, so I'll be more interactive in the next
> few weeks. I'll get back to reviewing this series today or early
> tomorrow.
>
No worries. I understand, you will have to deal with multiple tasks at one time.
Sorry, if I sent the patch too soon.
Thank you for your support with our first attempt at upstreaming the work.

> -Serge(y)
>
> >