Re: [PATCH v1 3/5] dt-bindings: net: Add HPE GXP UMAC

From: Andrew Lunn
Date: Tue Jul 25 2023 - 13:51:46 EST


On Tue, Jul 25, 2023 at 01:44:30PM +0000, Hawkins, Nick wrote:
> Hi Andrew,
>
> Thank you for the feedback.
>
> > > +examples:
> > > + - |
> > > + ethernet@4000 {
> > > + compatible = "hpe,gxp-umac";
> > > + reg = <0x4000 0x80>;
> > > + interrupts = <22>;
> > > + mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
>
> > Do both ports get the sane MAC address?
>
> No they do not. The first one will get the MAC address, the second
> will be an external phy we are managing via the MDIO path.

Then please put the mac-address property in the correct place, inside
port@0.

> > > + ethernet-ports {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + port@0 {
> > > + reg = <0>;
> > > + phy-handle = <&eth_phy0>;
> > > + };

> > > + mdio {
>
> > This seems to be wrong. You have a standalone MDIO bus driver, not
> > part of the MAC address space?
>
> I based this from other yaml examples I found. Is there a better way to
> represent it?

The validator when given examples does not validate phy-handle
actually points to a known node. So you can just leave the mdio bus
out all together.

> mdio0: mdio@4080 {
> compatible = "hpe,gxp-umac-mdio";
> reg = <0x4080 0x10>;
> #address-cells = <1>;
> #size-cells = <0>;
> ext_phy0: ethernt-phy@0 {
> compatible = "marvell,88e1415","ethernet-phy-ieee802.3-c22";

which is wrong. Please read the binding document for PHYs.

Andrew