From: Yao Zi <me@ziyao.cc>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Russell King <linux@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>, Yao Zi <me@ziyao.cc>,
Frank <Frank.Sae@motor-comm.com>
Cc: thomas.petazzoni@bootlin.com,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH net-next 3/3] net: phy: motorcomm: Enable analog frontend on YT8531S
Date: Tue, 1 Sep 2026 16:56:16 +0000 [thread overview]
Message-ID: <apcDsF_P9fDDiOn6@pie> (raw)
In-Reply-To: <3053bd10-50c0-4a4e-bfe3-7c2479bad560@bootlin.com>
On Tue, Sep 01, 2026 at 04:21:36PM +0200, Maxime Chevallier wrote:
>
>
> On 9/1/26 15:59, Paolo Abeni wrote:
> > On 8/31/26 9:37 AM, Maxime Chevallier wrote:
> >> The YT6801 PCIe NIC includes the dwmac-motorcomm IP for the MAC part, as
> >> well as a YT8531S PHY, configured in GMII mode.
> >>
> >> It seems this PHY requires the Analog Front-end (AFE) DAC clock to be
> >> enabled for link to reliably establish, otherwise the link just doesn't
> >> come up.
> >>
> >> Let's enable it at config_init().
> >>
> >> This logic has been extracted from the vendor driver provided by
> >> Motorcomm.
> >>
> >> It's really unclear if this is specific to the integrated version of
> >> that PHY, and how this potentially interacts with the fiber mode this
> >> PHY supports, so this configuration is only enabled when the interface
> >> is GMII, i.e. the PHY is integrated.
> >>
> >> With this, the PHY reliably establishes link and the YT6801 PCIe card
> >> becomes fully functional.
> >>
> >> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> >> ---
> >> drivers/net/phy/motorcomm.c | 14 +++++++++++++-
> >> 1 file changed, 13 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> >> index 36c229460a77..90a4f86f2758 100644
> >> --- a/drivers/net/phy/motorcomm.c
> >> +++ b/drivers/net/phy/motorcomm.c
> >> @@ -144,6 +144,11 @@
> >> #define YT8521_CLOCK_GATING_REG 0xC
> >> #define YT8521_CGR_RX_CLK_EN BIT(12)
> >>
> >> +/* Analog front-end control register 3 */
> >> +#define YT8531S_EXT_AFE_CTRL3 0x12
> >> +/* Analog front-end DAC clock enable */
> >> +#define YT8531S_AFE_CTRL3_CLKDAC_AON BIT(13)
> >> +
> >> #define YT8521_EXTREG_SLEEP_CONTROL1_REG 0x27
> >> #define YT8521_ESC1R_SLEEP_SW BIT(15)
> >> #define YT8521_ESC1R_PLLON_SLP BIT(14)
> >> @@ -1740,8 +1745,15 @@ static int yt8531s_config_init(struct phy_device *phydev)
> >> if (ret)
> >> goto err_restore_page;
> >>
> >> - if (phy_interface_is_rgmii(phydev))
> >> + if (phy_interface_is_rgmii(phydev)) {
> >> ret = yt8531_set_ds(phydev);
> >> + if (ret)
> >> + goto err_restore_page;
> >> + }
> >> +
> >> + if (phydev->interface == PHY_INTERFACE_MODE_GMII)
> >> + ret = ytphy_modify_ext(phydev, YT8531S_EXT_AFE_CTRL3,
> >> + 0, YT8531S_AFE_CTRL3_CLKDAC_AON);
> >
> > Sashiko suspects this will not survive a suspend/resume:
> >
> > https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831073747.361482-1-maxime.chevallier%40bootlin.com
>
> hmm sashiko may be right, worth adding right now as it seems there are
> some discussions already on motorcomm suspend/resume issues, let me spin
> a V2
>
> Thanks !
Yes, suspend/resume already works for some time on devices unaffected
by the issue under discussion. It looks good to me apart from this.
I'll call some guys to test for regressions on devices proven to work
before.
> Maxime
>
Best regards,
Yao Zi
next prev parent reply other threads:[~2026-09-01 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 7:37 [PATCH net-next 0/3] net: phy: motorcomm: Enable analog frontend DAC on yt8531S Maxime Chevallier
2026-08-31 7:37 ` [PATCH net-next 1/3] net: phy: motorcomm: Split yt8521_config_init() page management Maxime Chevallier
2026-08-31 7:37 ` [PATCH net-next 2/3] net: phy: motorcomm: Add a dedicated .config_init for YT8531S Maxime Chevallier
2026-08-31 7:37 ` [PATCH net-next 3/3] net: phy: motorcomm: Enable analog frontend on YT8531S Maxime Chevallier
2026-09-01 13:59 ` Paolo Abeni
2026-09-01 14:21 ` Maxime Chevallier
2026-09-01 16:56 ` Yao Zi [this message]
2026-09-01 16:33 ` [PATCH net-next 0/3] net: phy: motorcomm: Enable analog frontend DAC on yt8531S 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=apcDsF_P9fDDiOn6@pie \
--to=me@ziyao.cc \
--cc=Frank.Sae@motor-comm.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alexis.lothore@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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