Subject: Re: [PATCH net-next v3 10/11] net: mdio: add C45-over-C22 fallback to fwnode_mdiobus_register_phy()

From: Michael Walle <[email-masked]>
Date: Wed, 19 Jul 2023 09:32:19 +0200

Am 2023-07-19 02:03, schrieb Andrew Lunn:
>> Please note, that both with the old and the new code compatible =
>> "ethernet-phy-idNNNN.NNNN" only works for the C22 case. I'm wondering 
>> if
>> compatible = "ethernet-phy-idNNNN.NNNN", "ethernet-phy-ieee802.3-c45
>> even makes sense because there might be multiple C45 ids. At least it 
>> is
>> an allowed pattern according to the device tree bindings. But with the
>> current code, the ethernet-phy-idNNNN.NNNN is ignored in the c45 case.
> 
> I think these two should be orthogonal.
> 
> ethernet-phy-idNNNN.NNNN should be used to load the driver. The driver
> has a list of IDs it can drive, and we want the module loading
> machinery to load a module which can driver this ID.

See [1]. It is used to overwrite the PHY ID. Which I think works
in the c22 case.

> "ethernet-phy-ieee802.3-c45" should be about how to read the ID
> registers, if ethernet-phy-idNNNN.NNNN is not present.

And if it's present? See [2].

-michael

[1] 
https://elixir.bootlin.com/linux/v6.4.3/source/Documentation/devicetree/bindings/net/ethernet-phy.yaml#L38
[2] 
https://elixir.bootlin.com/linux/v6.4.3/source/Documentation/devicetree/bindings/net/ethernet-phy.yaml#L50