Re: [RFC PATCH] dt-bindings: net: nxp,tja11xx: add compatible support

From: Andrew Lunn
Date: Mon May 04 2020 - 09:40:41 EST


On Mon, May 04, 2020 at 10:44:12AM +0200, Oleksij Rempel wrote:
> Hi all,
>
> here is first attempt to rework this binding. So far I have following
> questions and/or issues:
> - currently this PHY is identified by ID, not by compatible. Should it
> be probed by compatible?
> Theoretically I can use:
> compatible = "nxp,tja1102", "ethernet-phy-ieee802.3-c22";

Hi Oleksij

This will not work, in the current framework. PHYs probe via the ID
registers, or ethernet-phy-id0141.0e90 like compatible strings. MDIO
devices, which means devices like Ethernet switches, probe via
compatible strings. There are a few old DT blobs which do have a
compatible for the PHY, but they are white listed and ignored. See
of_mdio.c, whitelist_phys and of_mdiobus_child_is_phy().

If the DT validation code is wrongly forcing you to have a compatible,
i think your best bet is to use the ethernet-phy-id with the correct
ID values.

Andrew