Subject: Re: [PATCH net-next v2 1/4] net: phy: add the link modes for 1000BASE-T1 Ethernet PHY

From: Stefan Eichenberger <[email-masked]>
Date: Thu, 13 Jul 2023 16:10:21 +0200

Hi Andrew,

On Mon, Jul 10, 2023 at 11:10:17PM +0200, Andrew Lunn wrote:
> On Mon, Jul 10, 2023 at 10:58:57PM +0200, Stefan Eichenberger wrote:
> > This patch adds the link modes for the 1000BASE-T1 Ethernet PHYs. It
> > supports 100BASE-T1/1000BASE-T1 in full duplex mode. So far I could not
> > find a 1000BASE-T1 PHY that also supports 10BASE-T1, so this mode is not
> > added.
> 
> Is this actually needed? Ideally you want to extend
> genphy_c45_pma_read_abilities() to look in the PHY registers and
> determine what the PHY can do. You should only use .features if it is
> impossible to determine the PHY abilities by reading registers.

Unfortunately the MDIO_PMA_EXTABLE register does not work on this PHY.
It will not signalize that it is BT1 capable (MDIO_PMA_EXTABLE_BT1). I
tested it again (should be 0x0800):
root@verdin-imx8mp-14777637:~# ./phytool read eth0/7:1/11
0x0020
The PHY documentation does not list this register at all.

Even though the MDIO_PMA_PMD_BT1 exists and works correctly:
root@verdin-imx8mp-14777637:~# ./phytool read eth0/7:1/18
0x0003
This register is documented in the datasheet again.

So unfortunately I think I have to force the features, or do you see
another possibility?

Regards,
Stefan