回覆: 回覆: [PATCH net-next v2 3/6] net: ftgmac100: Enable AST2700 RMII support

From: Jacky Chou

Date: Thu Oct 08 2026 - 08:10:46 EST


> > The applications of device tree in ftgmac100 have 'use-ncsi',
> 'fixed-link'/'phy-handle'
> > and legacy mdio probing for AST2400/2500.
> >
> > The 'use-ncsi' will bind a fixed-link phy device on speed 100 and
> > RMII, so it will include phydev for netdev.
> > The 'fixed-link' also bind a fixed-link phy device for phydev in netdev.
> > The 'phy-handle' will return the actual phy device instance for phydev.
> > The legacy mdio method also returns phydev if the MAC node includes
> > mdio in dts and find the phy device by mdc/mdio.
> >
> > Therefore, in the current code, the devices tree does not include
> > 'phy-handle', 'use-ncsi', 'fixed-link and 'mdio' properties, the
> > ftgmac100_probe_dt() still returns 0 as success at the end, and the phydev in
> netdev will be NULL.
> >
> > All applications in ftgmac100 must get the phy device handle,
> > regardless of the actual phy device or the virtual fixed-link phy device.
> >
> > I would like to add a patch to adjust the ftgmac100_probe_dt(), once
> > the device tree lacks one of them will return the corresponding error
> > or no device error to make probing failed.
>
> You cannot cause regressions with existing device, e.g.
>
> aspeed-ast2500-evb.dts
>
> &mac0 {
> status = "okay";
>
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; };
>
> No phy-handle, no use-ncsi.
>
> So enforcing these must be limited to 2700.
>
> It looks like you can test that some sort of PHY has been found. But then please
> remove all tests which check that phydev is not NULL. And include a good
> commit message why this is safe and will not cause regressions.
>

Thank you for bringing this device to my attention.
I will verify all applications running on the AST2700 and update the commit
message to explain why this change is safe.

Thanks,
Jacky