From: Yao Zi <me@ziyao.cc>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Frank <Frank.Sae@motor-comm.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Choong Yong Liang <yong.liang.choong@linux.intel.com>,
Chen-Yu Tsai <wens@csie.org>, Jisheng Zhang <jszhang@kernel.org>,
Furong Xu <0x1207@gmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Mingcong Bai <jeffbai@aosc.io>,
Kexy Biscuit <kexybiscuit@aosc.io>
Subject: Re: [RFC PATCH net-next v4 1/3] net: phy: motorcomm: Support YT8531S PHY in YT6801 Ethernet controller
Date: Tue, 23 Dec 2025 17:40:10 +0000 [thread overview]
Message-ID: <aUrT-qZTPd5H8L1G@pie> (raw)
In-Reply-To: <5365dc9f-310a-4532-9987-ae0e1849f46b@lunn.ch>
On Sun, Dec 21, 2025 at 09:29:01PM +0100, Andrew Lunn wrote:
> On Tue, Dec 16, 2025 at 06:03:29PM +0000, Yao Zi wrote:
> > YT6801's internal PHY is confirmed as a GMII-capable variant of YT8531S
> > by a previous series[1] and reading PHY ID. Add support for
> > PHY_INTERFACE_MODE_GMII for YT8531S to allow the Ethernet driver to
> > reuse the PHY code for its internal PHY.
> >
> > Link: https://lore.kernel.org/all/a48d76ac-db08-46d5-9528-f046a7b541dc@motor-comm.com/ # [1]
> > Co-developed-by: Frank Sae <Frank.Sae@motor-comm.com>
> > Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
> > Signed-off-by: Yao Zi <me@ziyao.cc>
> > ---
> > drivers/net/phy/motorcomm.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> > index 89b5b19a9bd2..b751fbc6711a 100644
> > --- a/drivers/net/phy/motorcomm.c
> > +++ b/drivers/net/phy/motorcomm.c
> > @@ -910,6 +910,10 @@ static int ytphy_rgmii_clk_delay_config(struct phy_device *phydev)
> > val |= FIELD_PREP(YT8521_RC1R_RX_DELAY_MASK, rx_reg) |
> > FIELD_PREP(YT8521_RC1R_GE_TX_DELAY_MASK, tx_reg);
> > break;
> > + case PHY_INTERFACE_MODE_GMII:
> > + if (phydev->drv->phy_id != PHY_ID_YT8531S)
> > + return -EOPNOTSUPP;
> > + break;
>
> You have a break here. So the write to RGMII delay register will be
> performed, even thought this is an GMII PHY. Does the register exists?
With testing it seems the register simply makes no effect on the YT8531S
PHY integrated in YT6801.
> Would it be better to just return 0;
However, returning early here could avoid possible confusion. Will
change it in v5.
> Andrew
Regards,
Yao Zi
next prev parent reply other threads:[~2025-12-23 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251216180331.61586-1-me@ziyao.cc>
2025-12-16 18:03 ` [RFC PATCH net-next v4 1/3] net: phy: motorcomm: Support YT8531S PHY in YT6801 Ethernet controller Yao Zi
2025-12-21 20:29 ` Andrew Lunn
2025-12-23 17:40 ` Yao Zi [this message]
2025-12-16 18:03 ` [RFC PATCH net-next v4 2/3] net: stmmac: Add glue driver for Motorcomm YT6801 ethernet controller Yao Zi
2025-12-21 20:42 ` Andrew Lunn
2025-12-16 18:03 ` [RFC PATCH net-next v4 3/3] MAINTAINERS: Assign myself as maintainer of Motorcomm DWMAC glue driver Yao Zi
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=aUrT-qZTPd5H8L1G@pie \
--to=me@ziyao.cc \
--cc=0x1207@gmail.com \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jeffbai@aosc.io \
--cc=jszhang@kernel.org \
--cc=kexybiscuit@aosc.io \
--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=rmk+kernel@armlinux.org.uk \
--cc=vladimir.oltean@nxp.com \
--cc=wens@csie.org \
--cc=yong.liang.choong@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).