All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Russell King <linux@armlinux.org.uk>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next] net: phy: add basic driver for NXP CBTX PHY
Date: Thu, 13 Apr 2023 16:51:32 +0300	[thread overview]
Message-ID: <20230413135132.ybakyayxflai7tzy@skbuf> (raw)
In-Reply-To: <e2ea17e9-2c6a-9a89-bb09-29eca8dbf6bc@gmail.com>

Hi Heiner,

On Tue, Apr 11, 2023 at 06:49:42PM +0200, Heiner Kallweit wrote:
> > +	return phy_set_bits(phydev, CBTX_PDOWN_CTRL,
> > +			    CBTX_PDOWN_CTL_TRUE_PDOWN);
> 
> A comment may be helpful explaining how true_pdown mode
> is different from power-down mode set by C22 standard
> bit in BMCR as part of genphy_suspend().

The NXP documentation for True Power Down vs General Power Down did not
convince me, and I don't want to speculate and give an answer that might
be incorrect.

There are not many people who can help me give an answer right now
during the holidays. The high level idea is that the PHY may enter a
mode of lower power consumption.

If it's acceptable to you, I can implement suspend and resume as direct
calls to genphy_suspend() and genphy_resume(), and make the change later,
if needed.

> > +static int cbtx_config_intr(struct phy_device *phydev)
> > +{
> > +	int ret;
> > +
> > +	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
> > +		ret = cbtx_ack_interrupts(phydev);
> > +		if (ret < 0)
> > +			return ret;
> > +
> > +		ret = phy_write(phydev, CBTX_IRQ_ENABLE,
> > +				CBTX_IRQ_AN_COMPLETE | CBTX_IRQ_LINK_DOWN);
> 
> I think you need also CBTX_IRQ_ENERGYON. Otherwise you won't get a
> link-up interrupt in forced mode.

I've tested just now with "ethtool -s p1 autoneg off speed 100 duplex full",
and you are exactly correct. I will add the media side energy detection logic
to the enabled IRQ sources in v2. Thanks.

  reply	other threads:[~2023-04-13 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 15:57 [PATCH net-next] net: phy: add basic driver for NXP CBTX PHY Vladimir Oltean
2023-04-11 16:49 ` Heiner Kallweit
2023-04-13 13:51   ` Vladimir Oltean [this message]
2023-04-13 19:46     ` Heiner Kallweit

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=20230413135132.ybakyayxflai7tzy@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.