net: ftgmac100: Add AST2700 support
Get series with b4
b4 am [email protected] change-id 20260623-support_ast2700-68fb164da45cVersions newest first
- v7 Latest7 patches 0 repliesNew
- v67 patches 4 repliesSuperseded
- v57 patches 8 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 7 patches | 5 replies | Superseded | |
| v3 | 6 patches | 5 replies | Superseded | |
| v2 | 6 patches | 15 replies | Superseded | |
| v1 | 5 patches | 7 replies | Superseded |
Changes in v7 from the cover letter
- Require exactly one of "phy-mode" or "use-ncsi" for the AST2700
compatible in the devicetree binding, instead of unconditionally
requiring "phy-mode". The driver's use-ncsi path never reaches the
phy-mode check, and the binding's own first example (use-ncsi, no
phy-mode) was valid but failed the previous schema.
- Link to v6: https://lore.kernel.org/r/[email protected]
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | dt-bindings: net: ftgmac100: Make Aspeed compatibles standaloneDocumentation/ | +61 | 0 replies | |
| 2/7 | dt-bindings: net: ftgmac100: Add AST2700 compatibleDocumentation/ | +16 | 0 replies | |
| 3/7 | net: ftgmac100: Add AST2700 compatible supportdrivers/ | +10 | 0 replies | |
| 4/7 | net: ftgmac100: Enable AST2700 RMII supportdrivers/ drivers/ | +20 | 0 replies | |
| 5/7 | net: ftgmac100: Require phy-mode for AST2700drivers/ | +6 | 0 replies | |
| 6/7 | net: ftgmac100: Add AST2700 upper DMA address supportdrivers/ drivers/ | +59 | 0 replies | |
| 7/7 | net: ftgmac100: Allow building on ARM64drivers/ drivers/ | +13 | 0 replies |
Reviews trailers per patch
6 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Conor Dooley | Andrew Lunn |
|---|---|---|
| 1/7 | A-b | |
| 2/7 | A-b | |
| 3/7 | R-b | |
| 4/7 | ||
| 5/7 | R-b | |
| 6/7 | R-b | |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v7 0/7] net: ftgmac100: Add AST2700 support
Add the pieces needed for the FTGMAC100 driver to run on Aspeed AST2700 systems.
AST2700 keeps using the FTGMAC100 MAC IP, but the enablement is not limited to a new compatible string. The SoC can boot with the MAC on ARM64, needs the Aspeed-specific RMII mode bit programmed when a port is wired for RMII, and requires the driver to use the upper DMA address fields in the ring base registers and packet descriptors. Those fields expose a 35-bit DMA address range on AST2700, so the driver must request a mask that matches the address bits the hardware can encode.
The series first documents and wires up the aspeed,ast2700-mac compatible. It then treats AST2700 as an Aspeed MAC in the driver, enables the RMII mode programming, writes the AST2700 high descriptor-ring base registers, carries the RX/TX descriptor high address bits, rebuilds full DMA addresses before unmapping buffers, and requests a 35-bit DMA mask. The high ring base registers are only touched for AST2700 so older Aspeed device tree register windows remain unchanged. With that in place, the FTGMAC100 Kconfig entry can be made available on ARM64 while keeping the existing Aspeed MDIO dependency for AST2600 and newer ARCH_ASPEED systems.
RGMII delay is configured at the bootloader stage, the same way it is handled for AST2600, not by this driver. Aspeed's SDK bootloader configures both AST2600 and AST2700 boards with the RGMII delay disabled and advertises "phy-mode = rgmii-id" to match, mirroring the OpenBMC bootloader change that stopped inserting delays on AST2600 so its device trees could use the correct "rgmii-id" setting. On AST2700, every on-chip MAC is likewise configured by the bootloader with RGMII delay disabled and "rgmii-id" phy-mode. Because the delay is already resolved before Linux boots, the ftgmac100 driver does not need to program any RGMII delay for either AST2600 or AST2700.
This series has been validated on AST2700 EVB and AST2600 EVB.
Patch layout:
- patch 1 makes the existing aspeed,ast2400-mac, aspeed,ast2500-mac, and aspeed,ast2600-mac compatibles standalone, dropping the requirement to pair them with the generic "faraday,ftgmac100" fallback compatible, and constrains the clocks/clock-names properties per compatible instead of leaving them generically optional.
- patch 2 adds the aspeed,ast2700-mac compatible to the binding, with its RMII RCLK gate, reset support, the "phy-mode" requirement, and extends the clocks/clock-names validation to cover it as well.
- patch 3 adds the AST2700 match data and OF compatible.
- patch 4 programs the AST2700 RMII enable bit and documents why netdev->phydev can never be NULL at that point for AST2700.
- patch 5 makes "phy-mode" a required device tree property for AST2700 and fails probe if it is missing.
- patch 6 adds AST2700 upper DMA address handling for rings and descriptors.
- patch 7 enables the Faraday/FTGMAC100 Kconfig options on ARM64 and selects MDIO_ASPEED for ARCH_ASPEED.
---
Changes in v7:
- Require exactly one of "phy-mode" or "use-ncsi" for the AST2700
compatible in the devicetree binding, instead of unconditionally
requiring "phy-mode". The driver's use-ncsi path never reaches the
phy-mode check, and the binding's own first example (use-ncsi, no
phy-mode) was valid but failed the previous schema.
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- Constrain the clocks and clock-names properties per compatible in the devicetree binding instead of leaving them generically optional:
aspeed,ast2400-mac takes exactly one clock, aspeed,ast2500-mac/ aspeed,ast2600-mac/aspeed,ast2700-mac take one or two, and the plain faraday,ftgmac100 compatible takes none. Require clock-names whenever
two clocks are listed. Split across patch 1 (base rule) and patch 2
(extended to AST2700), matching how the compatible additions
themselves are already split.
- Simplify the compatible schema from oneOf: [const: faraday,ftgmac100,
enum: [...]] to a single flat enum, since neither branch needs
multi-string matching.
- Drop Reviewed-by from Rob Herring on patch 2 since its content
changed again.
- Link to v5: https://lore.kernel.org/r/[email protected]
Changes in v5:
- Pick up Reviewed-by from Rob Herring on the AST2700 binding
patch.
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Split the dt-bindings patch into two: one making the existing aspeed,ast2400-mac, aspeed,ast2500-mac, and aspeed,ast2600-mac
compatibles standalone, and a second adding the new
aspeed,ast2700-mac compatible, per review feedback that these are
two separate concerns.
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Require "phy-mode" in the devicetree binding when the AST2700
compatible is used, matching the driver's probe-time requirement
added in v2.
- Drop the "faraday,ftgmac100" fallback compatible requirement for
AST2700; "aspeed,ast2700-mac" now stands on its own in the binding,
matching how the driver already matches it independently.
- Drop the same "faraday,ftgmac100" fallback requirement for
aspeed,ast2400-mac, aspeed,ast2500-mac, and aspeed,ast2600-mac as
well, per review feedback. The same EDORR/EDOTR bit mismatch applies
to all of them if a node ever bound through the generic
faraday,ftgmac100 entry alone; there is no evidence this has ever
happened in practice since ftgmac100_of_match[] has had dedicated
entries for these SoCs since commit 03a2aba50b2c, but keeping the
binding correct avoids leaving the same landmine in place. Folded
into this series rather than sent as a follow-up, to avoid
self-conflicting with a later series touching the same "compatible"
block. Note this makes make dtbs_check warn against arch/arm/boot/dts/aspeed/aspeed-g4.dtsi, aspeed-g5.dtsi, and
aspeed-g6.dtsi, which still declare the two-string compatible; that
.dtsi change will be sent separately through the Aspeed/arm-soc tree,
since dt-bindings changes don't go through that tree.
- Document in the RMII-enable patch why netdev->phydev is always
non-NULL by the time ftgmac100_start_hw() checks phydev->interface
for AST2700: ftgmac100_probe_dt() always attaches a phy_device
before register_netdev() can succeed, via a discrete PHY
(phy-handle), a fixed-link node, or NC-SI's internal fixed 100Mbit
PHY, and any failure in that setup aborts probe first.
- Drop Reviewed-by from Krzysztof Kozlowski on the dt-bindings patch
since its content changed.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Make "phy-mode" a required device tree property for AST2700 and fail
probe if it is missing, instead of silently defaulting to RGMII.
- Document in the cover letter how RGMII delay is configured at the
bootloader stage for AST2600 and AST2700.
- Simplify the MDIO_ASPEED Kconfig select to ARCH_ASPEED only, dropping
the redundant MACH_ASPEED_G6 condition, and update its help text to
mention AST2700.
- Pick up Reviewed-by from Krzysztof Kozlowski on the dt-bindings patch.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Jacky Chou (7):
dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
dt-bindings: net: ftgmac100: Add AST2700 compatible
net: ftgmac100: Add AST2700 compatible support
net: ftgmac100: Enable AST2700 RMII support
net: ftgmac100: Require phy-mode for AST2700
net: ftgmac100: Add AST2700 upper DMA address support
net: ftgmac100: Allow building on ARM64
.../devicetree/bindings/net/faraday,ftgmac100.yaml | 88 ++++++++++++++++--- drivers/net/ethernet/faraday/Kconfig | 7 +- drivers/net/ethernet/faraday/ftgmac100.c | 98 +++++++++++++++++++--- drivers/net/ethernet/faraday/ftgmac100.h | 7 ++ drivers/net/mdio/Kconfig | 16 ++-- 5 files changed, 183 insertions(+), 33 deletions(-)
---
base-commit: 66726ba54a01a2951688a56f5eb4d13d063acbea
change-id: 20260623-support_ast2700-68fb164da45c
Best regards,
Signature · 1 line
Jacky Chou <[email protected]>