[PATCH 1/2] ARM: dts: imx6qdl-gw5904: add internal mdio nodes

Tim Harvey tharvey at gateworks.com
Fri Dec 2 14:29:20 PST 2022


On Fri, Dec 2, 2022 at 9:31 AM Andrew Lunn <andrew at lunn.ch> wrote:
>
> > > > >                                 port at 5 {
> > > > >                                         reg = <5>;
> > > > >                                         label = "cpu";
> > > > >                                         ethernet = <&fec>;
> > > > > +                                       phy-mode = "rgmii-id";
> > > > > +
> > > > > +                                       fixed-link {
> > > > > +                                               speed = <1000>;
> > > > > +                                               full-duplex;
> > > > > +                                       };
> > > > >                                 };
> > >
> > > This part is needed to make a warning go away. Does the SoC network interface
> > > have phy-mode = "rgmii"; ?
> >
> > No, it looks like this:
> >
> > &fec {
> >         pinctrl-names = "default";
> >         pinctrl-0 = <&pinctrl_enet>;
> >         phy-mode = "rgmii-id";
>
> > Is something here wrong?
>
> It suggests both ends should insert RGMII delays. So you will end up
> with double delays. Have one end say plain "rgmii" and the other
> "rgmii-id". I would probably go with the FEC being "rgmii".
>
>     Andrew

Andrew,

That makes sense - I will change the fec node to rgmii.

Upon further testing I find there is something else wrong with this
patch however that I don't yet understand.

Without it the switch works fine (due to RGMII delay being configured
via boot firmware) but I do get the warning you had mentioned due to
the phy-mode/phy-handle props missing:
mv88e6085 2188000.ethernet-1:00: switch 0x1760 detected: Marvell
88E6176, revision 1
mv88e6085 2188000.ethernet-1:00: OF node
/soc/bus at 2100000/ethernet at 2188000/mdio/switch at 0/ports/port at 5 of CPU
port 5 lacks the required "phy-mode" property
mv88e6085 2188000.ethernet-1:00: OF node
/soc/bus at 2100000/ethernet at 2188000/mdio/switch at 0/ports/port at 5 of CPU
port 5 lacks the required "phy-handle", "fixed-link" or "managed"
properties
mv88e6085 2188000.ethernet-1:00: Skipping phylink registration for CPU port 5
mv88e6085 2188000.ethernet-1:00 lan4 (uninitialized): PHY
[mv88e6xxx-1:00] driver [Generic PHY] (irq=POLL)
mv88e6085 2188000.ethernet-1:00 lan3 (uninitialized): PHY
[mv88e6xxx-1:01] driver [Generic PHY] (irq=POLL)
mv88e6085 2188000.ethernet-1:00 lan2 (uninitialized): PHY
[mv88e6xxx-1:02] driver [Generic PHY] (irq=POLL)
mv88e6085 2188000.ethernet-1:00 lan1 (uninitialized): PHY
[mv88e6xxx-1:03] driver [Generic PHY] (irq=POLL)

When I add the phy-mode/phy-handle props with this patch I get the
following failure:
mv88e6085 2188000.ethernet-1:00: switch 0x1760 detected: Marvell
88E6176, revision 1
mv88e6085 2188000.ethernet-1:00: switch 0x1760 detected: Marvell
88E6176, revision 1
mv88e6085 2188000.ethernet-1:00: configuring for fixed/rgmii-id link mode
mv88e6085 2188000.ethernet-1:00: p5: delay RXCLK yes, TXCLK yes
mv88e6085 2188000.ethernet-1:00: p5: delay RXCLK yes, TXCLK yes
mv88e6085 2188000.ethernet-1:00: Link is Up - 1Gbps/Full - flow control off
mv88e6085 2188000.ethernet-1:00 lan4 (uninitialized): validation of
internal with support 00000000,00000000,000062ff and advertisement
00000000,00000000,000062ff failed: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan4 (uninitialized): failed to
connect to PHY: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan4 (uninitialized): error -22
setting up PHY for tree 0, switch 0, port 0
mv88e6085 2188000.ethernet-1:00 lan3 (uninitialized): validation of
internal with support 00000000,00000000,000062ff and advertisement
00000000,00000000,000062ff failed: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan3 (uninitialized): failed to
connect to PHY: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan3 (uninitialized): error -22
setting up PHY for tree 0, switch 0, port 1
mv88e6085 2188000.ethernet-1:00 lan2 (uninitialized): validation of
internal with support 00000000,00000000,000062ff and advertisement
00000000,00000000,000062ff failed: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan2 (uninitialized): failed to
connect to PHY: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan2 (uninitialized): error -22
setting up PHY for tree 0, switch 0, port 2
mv88e6085 2188000.ethernet-1:00 lan1 (uninitialized): validation of
internal with support 00000000,00000000,000062ff and advertisement
00000000,00000000,000062ff failed: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan1 (uninitialized): failed to
connect to PHY: -EINVAL
mv88e6085 2188000.ethernet-1:00 lan1 (uninitialized): error -22
setting up PHY for tree 0, switch 0, port 3

I've run into this message before and had a hard time understanding
the issue from the message - it seems to indicate the phy status
matches advertisement but that its an invalid mode?

Thanks,

Tim



More information about the linux-arm-kernel mailing list