[PATCH v2 04/22] dt-bindings: phy: cadence-torrent: add phy-mode constants
Benjamin Robin
benjamin.robin at bootlin.com
Wed Dec 2 07:08:49 PST 2026
Add the CDNS_TORRENT_MODE_* constants to
`include/dt-bindings/phy/phy-cadence.h`. They are used by the Cadence
Torrent PHY driver and referenced by the "cdns,phy-mode" property to
select an optional configuration for a given PHY standard.
The Torrent PHY supports multiple standards (PCIe, USB, SATA, XAUI,
SGMII, ...). Some of them expose additional configuration options,
each encoded as a bit in "cdns,phy-mode":
- USB:
CDNS_TORRENT_MODE_USB_IO_11V selects the 1.1 V I/O supply voltage
(instead of 1.2 V), which affects the TX full-swing magnitude
multiplier configuration for the USB TX/RX pad supply.
CDNS_TORRENT_MODE_USB_G1 limits the link to SuperSpeed Gen 1 (5 Gb/s)
instead of Gen 2 (10 Gb/s, SuperSpeed+) to reduce power.
- SATA:
CDNS_TORRENT_MODE_SATA_LP limits the link to SATA Gen 2 (3 Gb/s)
instead of allowing Gen 3 (6 Gb/s), to reduce power.
- XAUI:
CDNS_TORRENT_MODE_XAUI_LP restricts the link to 1X operation
(3.125 Gb/s lane rate), dropping the 2X rate (6.25 Gb/s), again to
reduce power.
- SGMII:
CDNS_TORRENT_MODE_2500_BASEX overclocks the link to 2500BASE-X
(called "SGMII+" in the user guide) instead of 1 Gb/s.
Signed-off-by: Benjamin Robin <benjamin.robin at bootlin.com>
---
Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml | 8 ++++++++
include/dt-bindings/phy/phy-cadence.h | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
index 827f76e5edba..b91a957ef422 100644
--- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
@@ -101,6 +101,14 @@ patternProperties:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 12]
+ cdns,phy-mode:
+ description:
+ Specifies an optional mode of PHY for which the group of PHY lanes is used.
+ Refer include/dt-bindings/phy/phy-cadence.h for the constants to be used.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3, 4, 8, 16]
+ default: 0
+
cdns,num-lanes:
description:
Number of lanes.
diff --git a/include/dt-bindings/phy/phy-cadence.h b/include/dt-bindings/phy/phy-cadence.h
index 0671991208fc..ed2c11b3150d 100644
--- a/include/dt-bindings/phy/phy-cadence.h
+++ b/include/dt-bindings/phy/phy-cadence.h
@@ -15,6 +15,13 @@
#define CDNS_TORRENT_DERIVED_REFCLK 1
#define CDNS_TORRENT_RECEIVED_REFCLK 2
+#define CDNS_TORRENT_MODE_NONE 0x00
+#define CDNS_TORRENT_MODE_USB_G1 0x01
+#define CDNS_TORRENT_MODE_USB_IO_11V 0x02
+#define CDNS_TORRENT_MODE_XAUI_LP 0x04
+#define CDNS_TORRENT_MODE_SATA_LP 0x08
+#define CDNS_TORRENT_MODE_2500_BASEX 0x10
+
/* Sierra */
#define CDNS_SIERRA_PLL_CMNLC 0
#define CDNS_SIERRA_PLL_CMNLC1 1
--
2.56.1
More information about the linux-arm-kernel
mailing list