[PATCH] powerpc/kmcent2: update the ethernet devices' phy properties

Valentin Longchamp valentin at longchamp.me
Mon Jul 29 06:26:21 AEST 2019


Le dim. 28 juil. 2019 à 21:26, Scott Wood <oss at buserror.net> a écrit :
> On Sun, 2019-07-28 at 18:01 +0200, Valentin Longchamp wrote:
> > Le dim. 14 juil. 2019 à 22:05, Valentin Longchamp
> > <valentin at longchamp.me> a écrit :
> > >
> > > Change all phy-connection-type properties to phy-mode that are better
> > > supported by the fman driver.
> > >
> > > Use the more readable fixed-link node for the 2 sgmii links.
> > >
> > > Change the RGMII link to rgmii-id as the clock delays are added by the
> > > phy.
> > >
> > > Signed-off-by: Valentin Longchamp <valentin at longchamp.me>
>
> I don't see any other uses of phy-mode in arch/powerpc/boot/dts/fsl, and I see
> lots of phy-connection-type with fman.  Madalin, does this patch look OK?

The fman driver (mac_probe()) calls of_get_phy_mode() which first
looks for phy-mode, and then phy-connection-type. Both should be the
same according to the device tree binding.

With some older kernels I remember we had issues with
phy-connection-type but not phy-mode, but this is more than 2 years
ago, I don't remember the details. phy-mode works well (tested ~2
weeks ago) with 4.14, 4.19 and 5.2, for sure.

Valentin

>
> -Scott
>
> > > ---
> > >  arch/powerpc/boot/dts/fsl/kmcent2.dts | 16 +++++++++++-----
> > >  1 file changed, 11 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/arch/powerpc/boot/dts/fsl/kmcent2.dts
> > > b/arch/powerpc/boot/dts/fsl/kmcent2.dts
> > > index 48b7f9797124..c3e0741cafb1 100644
> > > --- a/arch/powerpc/boot/dts/fsl/kmcent2.dts
> > > +++ b/arch/powerpc/boot/dts/fsl/kmcent2.dts
> > > @@ -210,13 +210,19 @@
> > >
> > >                 fman at 400000 {
> > >                         ethernet at e0000 {
> > > -                               fixed-link = <0 1 1000 0 0>;
> > > -                               phy-connection-type = "sgmii";
> > > +                               phy-mode = "sgmii";
> > > +                               fixed-link {
> > > +                                       speed = <1000>;
> > > +                                       full-duplex;
> > > +                               };
> > >                         };
> > >
> > >                         ethernet at e2000 {
> > > -                               fixed-link = <1 1 1000 0 0>;
> > > -                               phy-connection-type = "sgmii";
> > > +                               phy-mode = "sgmii";
> > > +                               fixed-link {
> > > +                                       speed = <1000>;
> > > +                                       full-duplex;
> > > +                               };
> > >                         };
> > >
> > >                         ethernet at e4000 {
> > > @@ -229,7 +235,7 @@
> > >
> > >                         ethernet at e8000 {
> > >                                 phy-handle = <&front_phy>;
> > > -                               phy-connection-type = "rgmii";
> > > +                               phy-mode = "rgmii-id";
> > >                         };
> > >
> > >                         mdio0: mdio at fc000 {
> > > --
> > > 2.17.1
> > >
> >
> >
>


More information about the Linuxppc-dev mailing list