Support the Cadence MACB/GEM instances on Mobileye EyeQ5 SoCs
Get series with b4
b4 am [email protected] change-id 20250311-macb-65a7fa86af1dVersions newest first
- v2 Latest18 patches 23 repliesIn review
- v113 patches 24 repliesSuperseded
Changes in v2 from the cover letter · 22 lines
- Rebase upon latest net-next (1ea2e106130a).
- dt-bindings:
- Add description to mobileye,olb phandle, following a
make dt_binding_check warning reported by Rob's bot.
- Add "sort compatibles" patch.
- Take "Acked-by: Rob Herring" on dma-coherent patch.
- Improve "allow tsu_clk without tx_clk" commit message following Rob's comment.
- Take "Reviewed-by: Andrew Lunn" trailer on four patches:
net: macb: use BIT() macro for capability definitions
net: macb: add no LSO capability (MACB_CAPS_NO_LSO)
net: macb: sort #includes
MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs
- net: macb:
- Split:
simplify macb_probe() code touching match data
into two commits, following comment by Andrew:
Remove local variables clk_init and init in macb_probe() drop macb_config NULL checking
- Replace match-data IP alignment value by a more robust solution: HW support IP alignment if it does not support RSC.
- use regmap_update_bits() for OLB register writes.
- fix insertion order of compatible.
- fix LSO detection comment.
- move local variables struct macb_dma_desc_64 inside conditionals,
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | dt-bindings: net: cdns,macb: sort compatiblesDocumentation/ | +4 | 1 reply | |
| 2/18 | dt-bindings: net: cdns,macb: add Mobileye EyeQ5 ethernet interfaceDocumentation/ | +24 | 1 reply | |
| 3/18 | dt-bindings: net: cdns,macb: allow tsu_clk without tx_clkDocumentation/ | +1 | 1 reply | |
| 4/18 | dt-bindings: net: cdns,macb: allow dma-coherentDocumentation/ | +2 | 0 replies | |
| 5/18 | net: macb: use BIT() macro for capability definitionsdrivers/ | +20 | 1 reply | |
| 6/18 | net: macb: Remove local variables clk_init and init in macb_probe()drivers/ | +3 | 1 reply | |
| 7/18 | net: macb: drop macb_config NULL checkingdrivers/ | +2 | 1 reply | |
| 8/18 | net: macb: introduce DMA descriptor helpers (is 64bit? is PTP?)drivers/ drivers/ | +40 | 1 reply | |
| 9/18 | net: macb: sort #includesdrivers/ | +18 | 1 reply | |
| 10/18 | net: macb: remove illusion about TBQPH/RBQPH being per-queuedrivers/ drivers/ | +14 | 2 replies | |
| 11/18 | net: macb: single dma_alloc_coherent() for DMA descriptorsdrivers/ | +46 | 2 replies | |
| 12/18 | net: macb: match skb_reserve(skb, NET_IP_ALIGN) with HW alignmentdrivers/ drivers/ | +21 | 3 replies | |
| 13/18 | net: macb: avoid double endianness swap in macb_set_hwaddr()drivers/ | +2 | 1 reply | |
| 14/18 | net: macb: add no LSO capability (MACB_CAPS_NO_LSO)drivers/ drivers/ | +5 | 1 reply | |
| 15/18 | net: macb: Add "mobileye,eyeq5-gem" compatibledrivers/ | +80 | 1 reply | |
| 16/18 | MIPS: mobileye: add EyeQ5 DMA IOCU supportMAINTAINERS arch/ arch/ +1 more | +164 | 3 replies | |
| 17/18 | MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllersarch/ | +34 | 0 replies | |
| 18/18 | MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYsarch/ | +26 | 0 replies |
Reviews trailers per patch
12 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Rob Herring (Arm) | Andrew Lunn | Krzysztof Kozlowski | Sean Anderson |
|---|---|---|---|---|
| 1/18 | R-b | |||
| 2/18 | ||||
| 3/18 | R-b | |||
| 4/18 | A-b | |||
| 5/18 | R-b | R-b | ||
| 6/18 | R-b | |||
| 7/18 | R-b | |||
| 8/18 | ||||
| 9/18 | R-b | R-b | ||
| 10/18 | R-b | |||
| 11/18 | R-b | |||
| 12/18 | ||||
| 13/18 | R-b | |||
| 14/18 | R-b | R-b | ||
| 15/18 | ||||
| 16/18 | ||||
| 17/18 | ||||
| 18/18 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH net-next v2 00/18] Support the Cadence MACB/GEM instances on Mobileye EyeQ5 SoCs
Mobileye EyeQ5 SoCs provides two GEM IP blocks. The end result of this series is working 1G networking on the EyeQ5 eval board. It isn't just a new macb_config & compatible, we also provide some cleanup & fixes along the way.
dt-bindings:
[PATCH net-next v2 01/18] dt-bindings: net: cdns,macb: sort compatibles [PATCH net-next v2 02/18] dt-bindings: net: cdns,macb: add Mobileye EyeQ5 ethernet interface [PATCH net-next v2 03/18] dt-bindings: net: cdns,macb: allow tsu_clk without tx_clk [PATCH net-next v2 04/18] dt-bindings: net: cdns,macb: allow dma-coherent
Cleanup:
[PATCH net-next v2 05/18] net: macb: use BIT() macro for capability definitions [PATCH net-next v2 06/18] net: macb: Remove local variables clk_init and init in macb_probe() [PATCH net-next v2 07/18] net: macb: drop macb_config NULL checking
[PATCH net-next v2 08/18] net: macb: introduce DMA descriptor helpers (is 64bit? is PTP?) [PATCH net-next v2 09/18] net: macb: sort #includes
Fixes:
[PATCH net-next v2 10/18] net: macb: remove illusion about TBQPH/RBQPH being per-queue [PATCH net-next v2 11/18] net: macb: single dma_alloc_coherent() for DMA descriptors [PATCH net-next v2 12/18] net: macb: match skb_reserve(skb, NET_IP_ALIGN) with HW alignment [PATCH net-next v2 13/18] net: macb: avoid double endianness swap in macb_set_hwaddr()
EyeQ5 support:
[PATCH net-next v2 14/18] net: macb: add no LSO capability (MACB_CAPS_NO_LSO) [PATCH net-next v2 15/18] net: macb: Add "mobileye,eyeq5-gem" compatible
DTS:
[PATCH net-next v2 16/18] MIPS: mobileye: add EyeQ5 DMA IOCU support [PATCH net-next v2 17/18] MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllers [PATCH net-next v2 18/18] MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs
Note: I've categorised [PATCH 12/18] as a fix, but it is also mandatory for working GEM on EyeQ5 SoCs. Hardware is RSC capable so we mustn't do the skb_reserve(). It probably is the first platform where NET_IP_ALIGN=2 and the devices are RSC capable.
Note: I did not extract the platform specific code (2 syscon registers being written to) from macb_config->init into separate resources. I cannot dissociate that register write sequence into something more fluid (modeling clocks/PHYs).
Have a nice day,
Théo
---
Changes in v2:
- Rebase upon latest net-next (1ea2e106130a).
- dt-bindings:
- Add description to mobileye,olb phandle, following a
make dt_binding_check warning reported by Rob's bot.
- Add "sort compatibles" patch.
- Take "Acked-by: Rob Herring" on dma-coherent patch.
- Improve "allow tsu_clk without tx_clk" commit message following Rob's comment.
- Take "Reviewed-by: Andrew Lunn" trailer on four patches:
net: macb: use BIT() macro for capability definitions
net: macb: add no LSO capability (MACB_CAPS_NO_LSO)
net: macb: sort #includes
MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs
- net: macb:
- Split:
simplify macb_probe() code touching match data
into two commits, following comment by Andrew:
Remove local variables clk_init and init in macb_probe() drop macb_config NULL checking
- Replace match-data IP alignment value by a more robust solution: HW support IP alignment if it does not support RSC.
- use regmap_update_bits() for OLB register writes.
- fix insertion order of compatible.
- fix LSO detection comment.
- move local variables struct macb_dma_desc_64 inside conditionals,
in macb_{get,get}_addr(). - add "remove illusion about TBQPH/RBQPH being per-queue" commit.
- add "single dma_alloc_coherent() for DMA descriptors" commit.
- add "avoid double endianness swap in macb_set_hwaddr()" commit.
- DTS: lowercase reg properties of PHYs.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Théo Lebrun (18):
dt-bindings: net: cdns,macb: sort compatibles
dt-bindings: net: cdns,macb: add Mobileye EyeQ5 ethernet interface
dt-bindings: net: cdns,macb: allow tsu_clk without tx_clk
dt-bindings: net: cdns,macb: allow dma-coherent
net: macb: use BIT() macro for capability definitions
net: macb: Remove local variables clk_init and init in macb_probe()
net: macb: drop macb_config NULL checking
net: macb: introduce DMA descriptor helpers (is 64bit? is PTP?)
net: macb: sort #includes
net: macb: remove illusion about TBQPH/RBQPH being per-queue
net: macb: single dma_alloc_coherent() for DMA descriptors
net: macb: match skb_reserve(skb, NET_IP_ALIGN) with HW alignment
net: macb: avoid double endianness swap in macb_set_hwaddr()
net: macb: add no LSO capability (MACB_CAPS_NO_LSO)
net: macb: Add "mobileye,eyeq5-gem" compatible
MIPS: mobileye: add EyeQ5 DMA IOCU support
MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllers
MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs
.../devicetree/bindings/net/cdns,macb.yaml | 38 ++- MAINTAINERS | 2 +- arch/mips/boot/dts/mobileye/eyeq5-epm5.dts | 26 ++ arch/mips/boot/dts/mobileye/eyeq5.dtsi | 34 ++ arch/mips/mobileye/Kconfig | 1 + arch/mips/mobileye/Makefile | 2 + arch/mips/mobileye/eyeq5-iocu-dma.c | 160 +++++++++ drivers/net/ethernet/cadence/macb.h | 56 ++- drivers/net/ethernet/cadence/macb_main.c | 380 ++++++++++++--------- 9 files changed, 498 insertions(+), 201 deletions(-)
---
base-commit: bb26d1066f9db96d9b10d7724798aa14203f3ef8
change-id: 20250311-macb-65a7fa86af1d
Best regards,
Signature · 1 line
Théo Lebrun <[email protected]>