From: Andrew Lunn <andrew@lunn.ch>
To: Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
MD Danish Anwar <danishanwar@ti.com>,
Ravi Gunasekaran <r-gunasekaran@ti.com>
Subject: Re: [PATCH 1/2] net: phy: dp83869: Add PHY ID for chip revision 3
Date: Tue, 14 May 2024 14:47:08 +0200 [thread overview]
Message-ID: <b2db4e61-8bc1-4076-a2b9-7b6a028461aa@lunn.ch> (raw)
In-Reply-To: <20240514122728.1490156-1-thomas.gessler@brueckmann-gmbh.de>
On Tue, May 14, 2024 at 02:27:27PM +0200, Thomas Gessler wrote:
> The recent silicon revision 3 of the DP83869 has a different PHY ID
> which has to be added to the driver in order for the PHY to be detected.
> There appear to be no documented differences between the revisions,
> although there are some discussions in the TI forum about different
> behavior for some registers.
Do you have the datasheet? What does it say about the ID in registers
2 and 3? Often the lower nibble is the revision. Meaning there can be
16 revisions of a PHY.
> static struct phy_driver dp83869_driver[] = {
> - DP83869_PHY_DRIVER(DP83869_PHY_ID, "TI DP83869"),
> + DP83869_PHY_DRIVER(DP83869REV1_PHY_ID, "TI DP83869 Rev. 1"),
> + DP83869_PHY_DRIVER(DP83869REV3_PHY_ID, "TI DP83869 Rev. 3"),
> DP83869_PHY_DRIVER(DP83561_PHY_ID, "TI DP83561-SP"),
If you look at DP83869_PHY_DRIVER() it uses:
#define DP83869_PHY_DRIVER(_id, _name) \
{ \
PHY_ID_MATCH_MODEL(_id), \
As the name suggests, it matches on the model. The revision is
ignored. A mask is applied to ignore the lower nibble. So this change
looks pointless.
> static struct mdio_device_id __maybe_unused dp83869_tbl[] = {
> - { PHY_ID_MATCH_MODEL(DP83869_PHY_ID) },
> + { PHY_ID_MATCH_MODEL(DP83869REV1_PHY_ID) },
> + { PHY_ID_MATCH_MODEL(DP83869REV3_PHY_ID) },
> { PHY_ID_MATCH_MODEL(DP83561_PHY_ID) },
And this has the same issue. If you want the match to include the
revision, you need to use PHY_ID_MATCH_EXACT(). If the different
revisions are supposed to be compatible, a single PHY_ID_MATCH_MODEL()
is sufficient.
Andrew
---
pw-bot: cr
next prev parent reply other threads:[~2024-05-14 12:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 12:27 [PATCH 1/2] net: phy: dp83869: Add PHY ID for chip revision 3 Thomas Gessler
2024-05-14 12:27 ` [PATCH 2/2] net: phy: dp83869: Fix RGMII-SGMII and 1000BASE-X Thomas Gessler
2024-05-14 12:56 ` Andrew Lunn
2024-05-15 8:15 ` Thomas Geßler
2024-05-15 15:10 ` Andrew Lunn
2024-05-14 13:05 ` Russell King (Oracle)
2024-05-15 8:45 ` Thomas Geßler
2024-05-14 13:08 ` Andrew Lunn
2024-05-15 7:47 ` Thomas Geßler
2024-05-14 12:47 ` Andrew Lunn [this message]
2024-05-15 7:04 ` [PATCH 1/2] net: phy: dp83869: Add PHY ID for chip revision 3 Thomas Geßler
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=b2db4e61-8bc1-4076-a2b9-7b6a028461aa@lunn.ch \
--to=andrew@lunn.ch \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=thomas.gessler@brueckmann-gmbh.de \
/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.