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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 5, 2022 at 9:10 AM Vladimir Oltean <vladimir.oltean@xxxxxxx> wrote:
>
> Hi Tim,
>
> On Fri, Dec 02, 2022 at 02:29:20PM -0800, Tim Harvey wrote:
> > When I add the phy-mode/phy-handle props with this patch I get the
> > following failure:
> > 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
> >
> > 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?
>
> Does this patch help?
>
> From 6bd79d9b9994fcb7762301fe297f963c272d9210 Mon Sep 17 00:00:00 2001
> From: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> Date: Mon, 5 Dec 2022 19:05:24 +0200
> Subject: [PATCH] net: dsa: mv88e6xxx: accept phy-mode = "internal" for
>  internal PHY ports
>
> The ethernet-controller dt-schema, mostly evolved by Linux, has the
> "internal" PHY mode for connections between a MAC and internal PHY.
>
> U-Boot may provide device tree blobs where this phy-mode is specified,
> so make the Linux driver accept them.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index ccfa4751d3b7..ba4fff8690aa 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -833,10 +833,13 @@ static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,
>
>         chip->info->ops->phylink_get_caps(chip, port, config);
>
> -       /* Internal ports need GMII for PHYLIB */
> -       if (mv88e6xxx_phy_is_internal(ds, port))
> +       if (mv88e6xxx_phy_is_internal(ds, port)) {
> +               __set_bit(PHY_INTERFACE_MODE_INTERNAL,
> +                         config->supported_interfaces);
> +               /* Internal ports with no phy-mode need GMII for PHYLIB */
>                 __set_bit(PHY_INTERFACE_MODE_GMII,
>                           config->supported_interfaces);
> +       }
>  }
>
>  static void mv88e6xxx_mac_config(struct dsa_switch *ds, int port,
> --
> 2.34.1
>

Vladimir,

Yes, this patch resolves the issue. Enabling CONFIG_MARVELL_PHY
without this patch still shows the issue.

Thanks - please cc me on that and I'll respond (unless you want me to send it).

I'll submit a v2 of my dt patch with fec phy-mode = 'rgmii' after this
patch lands.

Best Regards,

Tim



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux