Re: [PATCH 3/4] dt-bindings: phy: cadence-torrent: add phy-mode constants
From: Benjamin Robin
Date: Tue Nov 24 2026 - 11:41:42 EST
On Saturday, November 21, 2026 at 5:20 PM, Krzysztof Kozlowski wrote:
> On Fri, Nov 20, 2026 at 01:55:51PM +0100, Benjamin Robin wrote:
> > Add the `CDNS_TORRENT_MODE_*` constants to
> > include/dt-bindings/phy/phy-cadence.h such as SATA-LP and 2500BASE-X.
>
> But why? Why do we need more of these properties?
The Torrent PHY supports multiple standards: PCIe, USB, SATA, XAUI and
SGMII, ... For some of them, additional configuration options exist:
- USB:
We need to know the I/O supply voltage (1.1 V or 1.2 V), since it
affects the TX full-swing magnitude multiplier configuration for the
USB TX/RX pad supply.
The link can also be limited to Gen 1 speed (5 Gb/s SuperSpeed)
instead of Gen 2 (10 Gb/s SuperSpeed+) to reduce power, which is why
the option is named "LP" (low power).
- SATA:
The PHY supports SATA Gen 1 (1.5 Gb/s), Gen 2 (3.0 Gb/s) and Gen 3
(6.0 Gb/s). The link can also be limited to Gen 2 to reduces power.
- XAUI:
The link can be configured to 1X only (3.125 Gb/s lane rate),
dropping the 2X rate (6.25 Gb/s), again to reduce power.
- SGMII:
The link can be "overclocked" to 2500BASE-X (called SGMII+ in the
user guide) instead of 1Gbps. There is no PHY type in
`include/dt-bindings/phy/phy.h` for 2500BASE-X, and since it is
technically SGMII at a higher speed, I am not sure adding a new PHY
type there is appropriate. That is why I added these constants to
phy-cadence.h instead of reusing PHY_* types. If there is a preferred
way, I am happy to rework this.
> >
> > These constants are used by the new Cadence Torrent PHY driver and
> > are referenced by the `cdns,phy-mode` property of the Cadence Torrent
> > PHY binding to select the PHY mode.
>
> That's obvious, explain why you are duplicating phy type instead.
You are right, the commit message needs improvement.
Any guidance on how you would like these options represented in the
binding would be much appreciated as I am not entirely sure about the
best approach myself.
The plan is to eventually allow reconfiguring the SGMII link speed
dynamically through phy_set_mode(), but for now the configuration needs
to be expressed statically from the DTS.
--
Benjamin Robin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com