From: sashiko-bot@kernel.org
To: "Benjamin Robin" <benjamin.robin@bootlin.com>
Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.org,
robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH 3/4] dt-bindings: phy: cadence-torrent: add phy-mode constants
Date: Fri, 20 Nov 2026 13:10:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-225185@kernel.org> (raw)
In-Reply-To: <20261120-phy-cadence-torrent-ng-v1-3-da2db7125cd7@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: phy: cadence-torrent: cdns,phy-mode conflates
modes and duplicates QSGMII
--
commit 2de59f32b4a9ba0a123cffdae1bfb6c23d74476c
Author: Benjamin Robin <benjamin.robin@bootlin.com>
dt-bindings: phy: cadence-torrent: add phy-mode constants
This commit adds the cdns,phy-mode property to the Cadence Torrent PHY
binding and defines the CDNS_TORRENT_MODE_* constants in
include/dt-bindings/phy/phy-cadence.h.
> diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> index 8e845e2373acd..17a8343ac8990 100644
> --- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> @@ -101,6 +101,15 @@ 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
> + minimum: 0
> + maximum: 63
> + 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 0671991208fcd..94945b843288c 100644
> --- a/include/dt-bindings/phy/phy-cadence.h
> +++ b/include/dt-bindings/phy/phy-cadence.h
> @@ -15,6 +15,14 @@
> #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
> +#define CDNS_TORRENT_MODE_QSGMII 0x20
> +
> /* Sierra */
> #define CDNS_SIERRA_PLL_CMNLC 0
> #define CDNS_SIERRA_PLL_CMNLC1 1
[Severity: Medium]
Should cdns,phy-mode be modeling all of these as a single unconstrained
0..63 bitmask?
First, CDNS_TORRENT_MODE_QSGMII duplicates PHY_TYPE_QSGMII (9 in
include/dt-bindings/phy/phy.h), which is already accepted by cdns,phy-type,
creating two ways to describe QSGMII in Device Tree.
Second, the CDNS_TORRENT_MODE_* flags pack orthogonal hardware properties
into one bitmask: an I/O supply voltage characteristic
(CDNS_TORRENT_MODE_USB_IO_11V), a USB link generation limit
(CDNS_TORRENT_MODE_USB_G1), protocol low-power settings
(CDNS_TORRENT_MODE_XAUI_LP and CDNS_TORRENT_MODE_SATA_LP), and Ethernet
interface sub-modes (CDNS_TORRENT_MODE_2500_BASEX and
CDNS_TORRENT_MODE_QSGMII).
Finally, constraining cdns,phy-mode only with minimum: 0 and maximum: 63
allows arbitrary bitwise combinations of mutually exclusive protocol flags
to pass dtbs_check without per-cdns,phy-type validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-phy-cadence-torrent-ng-v1-0-da2db7125cd7@bootlin.com?part=3
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-11-20 13:10 UTC|newest]
Thread overview: 6+ 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-20 12:55 ` [PATCH 3/4] dt-bindings: phy: cadence-torrent: add phy-mode constants Benjamin Robin
2026-11-20 13:10 ` sashiko-bot [this message]
[not found] ` <20261120-phy-cadence-torrent-ng-v1-4-da2db7125cd7@bootlin.com>
2026-11-20 13:33 ` [PATCH 4/4] phy: cadence-torrent: rewrite Torrent PHY driver sashiko-bot
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=sashiko-outbox-225185@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=benjamin.robin@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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