Messages in this thread | | | Date | Fri, 23 Jun 2023 21:54:34 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next v2 04/10] net: phy: replace is_c45 with phy_accces_mode |
| |
On Fri, Jun 23, 2023 at 07:34:22PM +0200, Andrew Lunn wrote: > > @@ -131,9 +131,11 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, > > > > is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45"); > > if (is_c45 || fwnode_get_phy_id(child, &phy_id)) > > - phy = get_phy_device(bus, addr, is_c45); > > + phy = get_phy_device(bus, addr, > > + is_c45 ? PHY_ACCESS_C45 : PHY_ACCESS_C22); > > else > > - phy = phy_device_create(bus, addr, phy_id, 0, NULL); > > + phy = phy_device_create(bus, addr, phy_id, PHY_ACCESS_C22, > > + NULL); > > Documentation/devicetree/bindings/net/ethernet-phy.yaml says: > > compatible: > oneOf: > - const: ethernet-phy-ieee802.3-c22 > description: PHYs that implement IEEE802.3 clause 22 > - const: ethernet-phy-ieee802.3-c45 > description: PHYs that implement IEEE802.3 clause 45 > > It would be nice to make this documentation more specific. It now > refers to 'bus transaction', so maybe we want to append that to these > lines?
Humm, looking at patch 9, maybe i got this wrong. Patch 9 seems to suggest ethernet-phy-ieee802.3-c45 means c45 register space, and it is upto the core to figure out how to access that register space, either using c45 transactions, or C45 over C22.
Andrew
| |