mbox series

[V5,net-next,0/7] ARM: Enable GENET support for RPi 4

Message ID 1573501766-21154-1-git-send-email-wahrenst@gmx.net
Headers show
Series ARM: Enable GENET support for RPi 4 | expand

Message

Stefan Wahren Nov. 11, 2019, 7:49 p.m. UTC
Raspberry Pi 4 uses the broadcom genet chip in version five.
This chip has a dma controller integrated. Up to now the maximal
burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4
does only work with the smaller maximal burst size of 0x8.

Additionally the patch series has some IRQ retrieval improvements and
adds support for a missing PHY mode.

This series based on Matthias Brugger's V1 series [1].

[1] - https://patchwork.kernel.org/cover/11186193/

Changes in V5:
- address Doug's comment

Changes in V4:
- rebased on current net-next
- remove RGMII_ID support
- remove fixes tag from patch 1
- add Florian's suggestions to patch 5

Changes in V3:
- introduce SoC-specific compatibles for GENET (incl. dt-binding)
- use platform_get_irq_optional for optional IRQ
- remove Fixes tag from IRQ error handling change
- move most of MDIO stuff to bcm2711.dtsi

Changes in V2:
- add 2 fixes for IRQ retrieval
- add support for missing PHY modes
- declare PHY mode RGMII RXID based on the default settings
- add alias to allow firmware append the MAC address

Stefan Wahren (7):
  net: bcmgenet: Avoid touching non-existent interrupt
  net: bcmgenet: Fix error handling on IRQ retrieval
  dt-bindings: net: bcmgenet: Add BCM2711 support
  net: bcmgenet: Add BCM2711 support
  net: bcmgenet: Refactor register access in bcmgenet_mii_config
  net: bcmgenet: Add RGMII_RXID support
  ARM: dts: bcm2711-rpi-4: Enable GENET support

 .../devicetree/bindings/net/brcm,bcmgenet.txt      |  2 +-
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts              | 17 +++++
 arch/arm/boot/dts/bcm2711.dtsi                     | 26 ++++++++
 drivers/net/ethernet/broadcom/genet/bcmgenet.c     | 74 ++++++++++++++++++----
 drivers/net/ethernet/broadcom/genet/bcmgenet.h     |  1 +
 drivers/net/ethernet/broadcom/genet/bcmmii.c       | 47 +++++++-------
 6 files changed, 130 insertions(+), 37 deletions(-)

--
2.7.4

Comments

David Miller Nov. 13, 2019, 3:35 a.m. UTC | #1
From: Stefan Wahren <wahrenst@gmx.net>
Date: Mon, 11 Nov 2019 20:49:19 +0100

> Raspberry Pi 4 uses the broadcom genet chip in version five.
> This chip has a dma controller integrated. Up to now the maximal
> burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4
> does only work with the smaller maximal burst size of 0x8.
> 
> Additionally the patch series has some IRQ retrieval improvements and
> adds support for a missing PHY mode.
> 
> This series based on Matthias Brugger's V1 series [1].
> 
> [1] - https://patchwork.kernel.org/cover/11186193/

What tree should this be applied to?  Patch #7 does not apply to net-next.
Florian Fainelli Nov. 13, 2019, 3:56 a.m. UTC | #2
On 11/12/2019 7:35 PM, David Miller wrote:
> From: Stefan Wahren <wahrenst@gmx.net>
> Date: Mon, 11 Nov 2019 20:49:19 +0100
> 
>> Raspberry Pi 4 uses the broadcom genet chip in version five.
>> This chip has a dma controller integrated. Up to now the maximal
>> burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4
>> does only work with the smaller maximal burst size of 0x8.
>>
>> Additionally the patch series has some IRQ retrieval improvements and
>> adds support for a missing PHY mode.
>>
>> This series based on Matthias Brugger's V1 series [1].
>>
>> [1] - https://patchwork.kernel.org/cover/11186193/
> 
> What tree should this be applied to?  Patch #7 does not apply to net-next.

Do you mind taking 1-6 and I take patch 7 through the Broadcom ARM SoC tree?
David Miller Nov. 13, 2019, 4:06 a.m. UTC | #3
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 12 Nov 2019 19:56:36 -0800

> 
> 
> On 11/12/2019 7:35 PM, David Miller wrote:
>> From: Stefan Wahren <wahrenst@gmx.net>
>> Date: Mon, 11 Nov 2019 20:49:19 +0100
>> 
>>> Raspberry Pi 4 uses the broadcom genet chip in version five.
>>> This chip has a dma controller integrated. Up to now the maximal
>>> burst size was hard-coded to 0x10. But it turns out that Raspberry Pi 4
>>> does only work with the smaller maximal burst size of 0x8.
>>>
>>> Additionally the patch series has some IRQ retrieval improvements and
>>> adds support for a missing PHY mode.
>>>
>>> This series based on Matthias Brugger's V1 series [1].
>>>
>>> [1] - https://patchwork.kernel.org/cover/11186193/
>> 
>> What tree should this be applied to?  Patch #7 does not apply to net-next.
> 
> Do you mind taking 1-6 and I take patch 7 through the Broadcom ARM SoC tree?

Sure, I'll do that right now, thanks!
Florian Fainelli Nov. 14, 2019, 8:35 p.m. UTC | #4
On Mon, 11 Nov 2019 20:49:26 +0100, Stefan Wahren <wahrenst@gmx.net> wrote:
> This enables the Gigabit Ethernet support on the Raspberry Pi 4.
> The defined PHY mode is equivalent to the default register settings
> in the downstream tree.
> 
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

Applied to devicetree/next, thanks!
--
Florian