Devicetree
 help / color / mirror / Atom feed
From: Benjamin Robin <benjamin.robin@bootlin.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Yuti Amonkar" <yamonkar@cadence.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>, "Nishanth Menon" <nm@ti.com>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Tero Kristo" <kristo@kernel.org>, "Andrew Davis" <afd@ti.com>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Chintan Vankar" <c-vankar@ti.com>,
	"Abhash Kumar Jha" <a-kumar2@ti.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Thomas Richard" <thomas.richard@bootlin.com>,
	"Swapnil Jakhade" <sjakhade@cadence.com>,
	"Siddharth Vadapalli" <s-vadapalli@ti.com>,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org
Subject: Re: [PATCH 3/4] dt-bindings: phy: cadence-torrent: add phy-mode constants
Date: Tue, 24 Nov 2026 17:41:19 +0100	[thread overview]
Message-ID: <8vihTUc0Sjqm4gFwtZkB5w@bootlin.com> (raw)
In-Reply-To: <20261121-wine-nautilus-of-courage-94af4f@quoll>

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




  reply	other threads:[~2026-11-24 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 12:55 [PATCH 0/4] phy: cadence-torrent: rewrite Torrent PHY driver Benjamin Robin
2026-11-20 12:55 ` [PATCH 1/4] arm64: dts: ti: k3-j7200: Fix QSGMII overlay by adding SERDES PHY Benjamin Robin
2026-11-20 12:55 ` [PATCH 2/4] dt-bindings: phy: cadence-torrent: drop cdns,num-lanes default value Benjamin Robin
2026-11-21 16:19   ` Krzysztof Kozlowski
2026-11-24 16:11     ` Benjamin Robin
2026-11-20 12:55 ` [PATCH 3/4] dt-bindings: phy: cadence-torrent: add phy-mode constants Benjamin Robin
2026-11-20 13:10   ` sashiko-bot
2026-11-21 16:20   ` Krzysztof Kozlowski
2026-11-24 16:41     ` Benjamin Robin [this message]
2026-11-20 12:55 ` [PATCH 4/4] phy: cadence-torrent: rewrite Torrent PHY driver Benjamin Robin
2026-11-20 13:33   ` sashiko-bot
2026-11-21 16:16   ` Krzysztof Kozlowski

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=8vihTUc0Sjqm4gFwtZkB5w@bootlin.com \
    --to=benjamin.robin@bootlin.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a-kumar2@ti.com \
    --cc=afd@ti.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=c-vankar@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mani@kernel.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nm@ti.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=simona@ffwll.ch \
    --cc=sjakhade@cadence.com \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas.richard@bootlin.com \
    --cc=tzimmermann@suse.de \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    --cc=vladimir.kondratiev@mobileye.com \
    --cc=yamonkar@cadence.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