From: Kory Maincent <kory.maincent@bootlin.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <richardcochran@gmail.com>,
<Parthiban.Veerasooran@microchip.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v5 2/2] net: phy: micrel: Add PTP support for lan8842
Date: Fri, 29 Aug 2025 16:53:10 +0200 [thread overview]
Message-ID: <20250829165310.2b97569b@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <20250829134836.1024588-3-horatiu.vultur@microchip.com>
On Fri, 29 Aug 2025 15:48:36 +0200
Horatiu Vultur <horatiu.vultur@microchip.com> wrote:
> It has the same PTP IP block as lan8814, only the number of GPIOs is
> different, all the other functionality is the same. So reuse the same
> functions as lan8814 for lan8842.
> There is a revision of lan8842 called lan8832 which doesn't have the PTP
> IP block. So make sure in that case the PTP is not initialized.
...
> @@ -5817,6 +5831,43 @@ static int lan8842_probe(struct phy_device *phydev)
> if (ret < 0)
> return ret;
>
> + /* Revision lan8832 doesn't have support for PTP, therefore don't add
> + * any PTP clocks
> + */
> + ret = lanphy_read_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> + LAN8842_SKU_REG);
> + if (ret < 0)
> + return ret;
> +
> + priv->rev = ret;
> + if (priv->rev == 0x8832)
> + return 0;
Is the lan8832 PHY ID the same as the lan8842? This would be surprising.
If they have different PHY ID, it will never enter the lan8842 probe function as
it is not added to mdio_device_id.
Also you should add a define instead of using several time 0x8832.
...
> @@ -5912,6 +5989,26 @@ static irqreturn_t lan8842_handle_interrupt(struct
> phy_device *phydev) ret = IRQ_HANDLED;
> }
>
> + /* Phy revision lan8832 doesn't have support for PTP threrefore
nitpick: therefore
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-08-29 14:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 13:48 [PATCH net-next v5 0/2] net: phy: micrel: Add PTP support for lan8842 Horatiu Vultur
2025-08-29 13:48 ` [PATCH net-next v5 1/2] net: phy: micrel: Introduce function __lan8814_ptp_probe_once Horatiu Vultur
2025-08-29 14:33 ` Kory Maincent
2025-09-01 6:16 ` Horatiu Vultur
2025-08-29 13:48 ` [PATCH net-next v5 2/2] net: phy: micrel: Add PTP support for lan8842 Horatiu Vultur
2025-08-29 14:53 ` Kory Maincent [this message]
2025-09-01 6:21 ` Horatiu Vultur
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=20250829165310.2b97569b@kmaincent-XPS-13-7390 \
--to=kory.maincent@bootlin.com \
--cc=Parthiban.Veerasooran@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.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=richardcochran@gmail.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