回覆: 回覆: 回覆: [PATCH net-next v5 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
From: Jacky Chou
Date: Mon Nov 09 2026 - 07:04:28 EST
Hi Andrew,
Thank you for your reply.
> > > > > > The aspeed,ast2400-mac, aspeed,ast2500-mac, and
> > > > > > aspeed,ast2600-mac compatibles are currently only valid when
> > > > > > paired with the generic "faraday,ftgmac100" fallback: if a
> > > > > > node ever bound through the generic entry alone,
> > > > > > ftgmac100_probe() would set
> > > > > > rxdes0_edorr_mask/txdes0_edotr_mask to BIT(15) instead of the
> > > > > > Aspeed BIT(30), skip Aspeed clock setup, and leave the DMA
> > > > > > mask too
> > > narrow.
> > > > >
> > > > > And device would work or not? If device still works after all
> > > > > these steps above, then why isn't fallback applicable?
> > > > >
> > > > > Be explicit, because I have no clue whether Aspeed clock setup
> > > > > is necessary for device to operate.
> > > > >
> > > >
> > > > It is necessary: ftgmac100_setup_clk() enables the MAC's clock,
> > > > and only runs when priv->is_aspeed is true - skipped if a node
> > > > ever bound through the generic entry. Without
> > > > ftgmac100_setup_clk(), the MAC on
> > >
> > > This part is obvious.
> > >
> > > > Aspeed platform would be left without a working clock, so it
> > > > wouldn't be able to configure register and TX/RX at all.
> > >
> > > So you are saying device will not work? Then make it obvious that
> > > clock is necessary for basic register access.
> > >
> >
> > Yes, the MAC on Aspeed platform does not work at all. Without the
> > clock, even basic register access to the MAC is not possible.
>
> Then for this new compatible you can mark it required.
>
> Maybe test what happens if you mark it required for all aspeed compatibles.
> Do an .dts files fail the test tools?
>
Tested dtbs_check against every in-tree AST2400/2500/2600 board .dts:
no failures with "clocks" marked required for all four Aspeed
compatibles. Only the pre-existing "compatible ... is too long"
warnings show up, from the two-string fallback that gets fixed once
the .dtsi change lands separately.
Will do this in v6, split by generation:
- ast2400-mac: clocks/clock-names required, 1 item max (no RCLK)
- ast2500/2600/2700-mac: clocks required, 1-2 items (RCLK optional)
- clock-names required whenever clocks has 2 items, since the
driver only picks up RCLK by name - a second clock without a
name would silently never get enabled
- clocks/clock-names disallowed for the generic "faraday,ftgmac100"
Thanks,
Jacky