All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Fabio Estevam <festevam@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	"tharvey@gateworks.com" <tharvey@gateworks.com>,
	netdev <netdev@vger.kernel.org>, Marek Vasut <marex@denx.de>,
	Fabio Estevam <festevam@denx.de>
Subject: Re: Marvell 88E6320 connected to i.MX8MN
Date: Fri, 28 Oct 2022 13:58:57 +0200	[thread overview]
Message-ID: <Y1vEAUJIJf8VBTdv@lunn.ch> (raw)
In-Reply-To: <CAOMZO5ANFe1AH2PqafbHd97G0L=-LnSyHt5VjBKh0EAskm5JBw@mail.gmail.com>

On Thu, Oct 27, 2022 at 11:24:40PM -0300, Fabio Estevam wrote:
>  Hi Vladimir,
> 
> On Thu, Oct 27, 2022 at 5:41 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> 
> > Looks like you are missing the Marvell PHY driver; the generic PHY
> > driver gets used. Can you enable CONFIG_MARVELL_PHY?
> 
> CONFIG_MARVELL_PHY is already selected.
> 
> However, there is no support for 88E6320 in the Marvell PHY driver.

In theory, there should not be any support needed. The PHY registers 2
and 3 contain the PHY ID. If Marvell have reused an off the shelf PHY,
it should have an ID which the drivers knows.

However, a few Marvell Switches are broken by design, and registers 2
and 3 are empty. It is documented you should not use them to identify
the PHY. As usual for a datasheet, it gives no explanation why they
decided to break 802.3 Clause 22, but they have. So there is a
workaround for a couple of switches. See family_prod_id_table in
drivers/net/dsa/mv88e6xxx/chip.c

Under /sys/class/mdio_bus/ you should find all the PHYs and there is a
file phy_id. If it is 0, it has the above problem. Otherwise, you
might need to add the ID to drivers/net/phy/marvell.c.

You should be able to use mii-tool to dump the common PHY registers in
both your working and not working state and see if there is any
difference.

	Andrew

      reply	other threads:[~2022-10-28 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  2:16 Marvell 88E6320 connected to i.MX8MN Fabio Estevam
2022-10-27 12:32 ` Andrew Lunn
2022-10-28 11:27   ` Fabio Estevam
2022-10-27 20:41 ` Vladimir Oltean
2022-10-28  2:24   ` Fabio Estevam
2022-10-28 11:58     ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1vEAUJIJf8VBTdv@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=tharvey@gateworks.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.