mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Agustin <isasmendi.agus@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: add driver for the ZTE ZX279128S internal Gigabit PHY
Date: Fri, 6 Nov 2026 08:17:58 +0000	[thread overview]
Message-ID: <d909ed3e-8613-4a9d-ab59-f59187d734df@gmail.com> (raw)
In-Reply-To: <b38a7a97-c88c-44fa-ab0f-89d1e809e21e@lunn.ch>

Thanks for the review.

Before sending a v2 I went back to the bench, and the result changes the 
picture, with the generic PHY driver and only what the boot firmware 
sets up, the four LAN PHYs link and pass traffic at 1000, 100 and 10 
Mb/s with no errors, across cold and warm boots and repeated renegotiation.

The TX DAC registers already hold the values this driver writes, and the 
PHY adjusts them itself with the link speed. It turned out to be a bug 
in our MAC driver (frames were sent to the wrong egress port), not 
anything in the PHY. That leaves only an LDO level and one undocumented 
register, with no measured benefit, so I'm withdrawing this patch. This 
is also consistent with Navid's ZX279128S series, which uses the generic 
driver for these PHYs. If I find a case where the vendor settings make a 
difference, I'll come back with data.

Sorry for the noise, and thanks again.

On 11/5/26 15:07, Andrew Lunn wrote:
>> +static int zte_gephy_config_init(struct phy_device *phydev)
>> +{
>> +	int ret, i, ldo;
> Given how minimal this driver is, there are some potential traps we
> could fall into later when we find out more about the device. To
> reduce the risk a bit, please could you add a test here:
>
>         if (phydev->interface != PHY_INTERFACE_MODE_INTERNAL)
>           	  return -EINVAL;
>
>> +static struct phy_driver zte_gephy_driver[] = {
>> +	{
>> +		PHY_ID_MATCH_MODEL(ZTE_GEPHY_PHY_ID),
>> +		.name			= "ZTE ZX279128S Gigabit PHY",
>> +		.flags			= PHY_IS_INTERNAL,
>> +		.config_init		= zte_gephy_config_init,
>> +		/* The boot firmware hands over with BMCR_PDOWN set. No
>> +		 * .suspend: powering the analog domain down and up at runtime
>> +		 * has not been tested.
>> +		 */
>> +		.resume			= genphy_resume,
> It looks odd with just resume, it makes it look like a workaround.
>
> Why not have config_init() take it out of power down?
>
>      Andrew

      reply	other threads:[~2026-11-06  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 14:49 Agustin Santiago Isasmendi via B4 Relay
2026-11-05 15:07 ` Andrew Lunn
2026-11-06  8:17   ` Agustin [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=d909ed3e-8613-4a9d-ab59-f59187d734df@gmail.com \
    --to=isasmendi.agus@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --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 \
    /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

all inboxes | Powered by JetHome®