From: Alexander Wilhelm <alexander.wilhelm@westermo.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Aquantia PHY in OCSGMII mode?
Date: Fri, 1 Aug 2025 07:50:14 +0200 [thread overview]
Message-ID: <aIxVlpg9Je3I+NeA@FUE-ALEWI-WINX> (raw)
In-Reply-To: <aIvDcxeBPhHADDik@shell.armlinux.org.uk>
Am Thu, Jul 31, 2025 at 08:26:43PM +0100 schrieb Russell King (Oracle):
> On Thu, Jul 31, 2025 at 08:16:42PM +0300, Vladimir Oltean wrote:
> > Hi Alexander,
> >
> > On Thu, Jul 31, 2025 at 04:59:09PM +0200, Alexander Wilhelm wrote:
> > > Hello devs,
> > >
> > > I'm fairly new to Ethernet PHY drivers and would appreciate your help. I'm
> > > working with the Aquantia AQR115 PHY. The existing driver already supports the
> > > AQR115C, so I reused that code for the AQR115, assuming minimal differences. My
> > > goal is to enable 2.5G link speed. The PHY supports OCSGMII mode, which seems to
> > > be non-standard.
> > >
> > > * Is it possible to use this mode with the current driver?
> > > * If yes, what would be the correct DTS entry?
> > > * If not, I’d be willing to implement support. Could you suggest a good starting point?
> > >
> > > Any hints or guidance would be greatly appreciated.
> > >
> > >
> > > Best regards
> > > Alexander Wilhelm
> > >
> >
> > In addition to what Andrew and Russell said:
> >
> > The Aquantia PHY driver is a bit unlike other PHY drivers, in that it
> > prefers not to change the hardware configuration, and work with the
> > provisioning of the firmware.
>
> I'll state here that this is a design decision of the PHY driver.
> It is possible to reconfigure the PHY (I have code in the PHY
> driver to do it, so I can test the module on the Armada 388 based
> Clearfog patform.
>
> Essentially, in aqr107_fill_interface_modes() I do this:
>
> + phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1, MDIO_CTRL1_LPOWER);
> + mdelay(10);
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x31a, 2);
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_CFG_10M,
> + VEND1_GLOBAL_CFG_SGMII_AN |
> + VEND1_GLOBAL_CFG_SERDES_MODE_SGMII);
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_CFG_100M,
> + VEND1_GLOBAL_CFG_SGMII_AN |
> + VEND1_GLOBAL_CFG_SERDES_MODE_SGMII);
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_CFG_1G,
> + VEND1_GLOBAL_CFG_SGMII_AN |
> + VEND1_GLOBAL_CFG_SERDES_MODE_SGMII);
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_CFG_2_5G,
> + VEND1_GLOBAL_CFG_SGMII_AN |
> + VEND1_GLOBAL_CFG_SERDES_MODE_OCSGMII);
> + phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1,
> + MDIO_CTRL1_LPOWER);
>
> with:
>
> #define VEND1_GLOBAL_CFG_SERDES_MODE_XFI 0
> #define VEND1_GLOBAL_CFG_SERDES_MODE_SGMII 3
> #define VEND1_GLOBAL_CFG_SERDES_MODE_OCSGMII 4
> +#define VEND1_GLOBAL_CFG_SERDES_MODE_LOW_POWER 5
> #define VEND1_GLOBAL_CFG_SERDES_MODE_XFI5G 6
> +#define VEND1_GLOBAL_CFG_SERDES_MODE_XFI20G 7
> +#define VEND1_GLOBAL_CFG_SGMII_AN BIT(3)
> +#define VEND1_GLOBAL_CFG_SERDES_SILENT BIT(6)
>
> and this works. So... we could actually reconfigure the PHY independent
> of what was programmed into the firmware.
Thanks, a good idea. I'll check how the firmware is configured and override the
PHY configuration to my needs.
Best regards
Alexander Wilhelm
next prev parent reply other threads:[~2025-08-01 5:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 14:59 Aquantia PHY in OCSGMII mode? Alexander Wilhelm
2025-07-31 15:14 ` Andrew Lunn
2025-07-31 16:02 ` Russell King (Oracle)
2025-08-01 5:44 ` Alexander Wilhelm
2025-08-04 14:53 ` Andrew Lunn
2025-07-31 17:16 ` Vladimir Oltean
2025-07-31 19:26 ` Russell King (Oracle)
2025-08-01 5:50 ` Alexander Wilhelm [this message]
2025-08-01 11:01 ` Vladimir Oltean
2025-08-01 11:54 ` Alexander Wilhelm
2025-08-01 11:58 ` Russell King (Oracle)
2025-08-01 12:06 ` Alexander Wilhelm
2025-08-01 12:23 ` Russell King (Oracle)
2025-08-01 12:36 ` Alexander Wilhelm
2025-08-01 13:04 ` Vladimir Oltean
2025-08-01 14:02 ` Russell King (Oracle)
2025-08-01 14:37 ` Vladimir Oltean
2025-08-04 6:17 ` Alexander Wilhelm
2025-08-04 10:01 ` Vladimir Oltean
2025-08-04 13:01 ` Alexander Wilhelm
2025-08-04 13:41 ` Vladimir Oltean
2025-08-04 14:47 ` Alexander Wilhelm
2025-08-04 16:00 ` Vladimir Oltean
2025-08-04 16:02 ` Vladimir Oltean
2025-08-05 7:59 ` Alexander Wilhelm
2025-08-05 10:20 ` Vladimir Oltean
2025-08-05 12:44 ` Alexander Wilhelm
2025-08-06 14:58 ` Vladimir Oltean
2025-08-07 5:56 ` Alexander Wilhelm
2025-08-27 5:57 ` Alexander Wilhelm
2025-08-27 7:31 ` Vladimir Oltean
2025-08-27 8:41 ` Alexander Wilhelm
2025-08-27 8:47 ` Russell King (Oracle)
2025-08-27 9:03 ` Alexander Wilhelm
2025-08-27 9:13 ` Russell King (Oracle)
2025-08-28 9:28 ` Vladimir Oltean
2025-10-02 5:54 ` Alexander Wilhelm
2025-10-07 14:08 ` Vladimir Oltean
2025-10-08 7:47 ` Alexander Wilhelm
2025-10-08 11:10 ` Vladimir Oltean
2025-10-08 12:52 ` Russell King (Oracle)
2025-10-08 13:00 ` Vladimir Oltean
2025-10-08 13:28 ` Alexander Wilhelm
2025-10-08 14:55 ` Vladimir Oltean
2025-10-09 6:05 ` Alexander Wilhelm
2025-08-27 8:08 ` Russell King (Oracle)
2025-08-27 8:32 ` Alexander Wilhelm
2025-08-27 8:45 ` Russell King (Oracle)
2025-08-04 14:22 ` Russell King (Oracle)
2025-08-04 14:51 ` Alexander Wilhelm
2025-08-04 14:56 ` Vladimir Oltean
2025-08-01 11:13 ` Vladimir Oltean
2025-08-01 5:53 ` Alexander Wilhelm
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=aIxVlpg9Je3I+NeA@FUE-ALEWI-WINX \
--to=alexander.wilhelm@westermo.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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=olteanv@gmail.com \
--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.