Re: [net-next RFC PATCH 03/14] dt-bindings: net: document ethernet PHY package nodes

Andrew Lunn
2023-11-20T21:25:30Z

> A real DT that use this is (ipq807x):
>
> &mdio {
> status = "okay";
> pinctrl-0 = <&mdio_pins>;
> pinctrl-names = "default";
> reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
>
> ethernet-phy-package {
> compatible = "ethernet-phy-package";
> phy-mode = "psgmii";
>
> global-phys = <&qca8075_4>, <&qca8075_psgmii>;
> global-phy-names = "combo", "analog_psgmii";
>
> qca8075_0: ethernet-phy@0 {
> compatible = "ethernet-phy-ieee802.3-c22";
> reg = <0>;
> };

...

> };
>
> qca8081: ethernet-phy@28 {
> compatible = "ethernet-phy-id004d.d101";
> reg = <28>;
> reset-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
> };

I've no idea if DT allows this. The issue is that reg is the same for
both nodes within the ethernet-phy-package container, and
ethernet-phy@28. They are all addresses on the same MDIO bus. We are
parsing this bus structure ourselves in __of_mdiobus_register(), so we
could make it work, but i don't know if we should make it work.

Andrew