Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Coia Prant" <coiaprant@gmail.com>
Cc: wsa+renesas@sang-engineering.com, devicetree@vger.kernel.org,
	conor+dt@kernel.org, neil.armstrong@linaro.org,
	olteanv@gmail.com, vkoul@kernel.org,
	linux-phy@lists.infradead.org, robh@kernel.org
Subject: Re: [PATCH v2 04/10] dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding
Date: Sun, 02 Aug 2026 14:25:38 +0000	[thread overview]
Message-ID: <20260802142539.3C9F31F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260801142244.679437-6-coiaprant@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing XPCS initialization for Rockchip DWMAC (Hardware Initialization Failure).
- [Low] Invalid use of 'minimum' and 'maximum' constraints on the 'reg' property in the subnode.
--

--- Patch [4]: [PATCH v2 04/10] dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding ---
commit 3427e61df71bfcc8fb661a8f120af0f4c141f21b
Author: Coia Prant <coiaprant@gmail.com>

dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding

Add device tree binding documentation for the Synopsys DesignWare
XPCS integrated on the Rockchip RK3568 SoC.

> diff --git a/Documentation/devicetree/bindings/net/pcs/rockchip-dwxpcs.yaml b/Documentation/devicetree/bindings/net/pcs/rockchip-dwxpcs.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/pcs/rockchip-dwxpcs.yaml
[ ... ]
> +patternProperties:
> +  "^pcs-mii@[0-3]$":
> +    type: object
> +    description: |
> +      One of the four MII ports of the XPCS.
> +      The port number is specified by the reg property (0..3).
> +      The port is linked to an Ethernet MAC controller via the
> +      pcs-handle property in the MAC's device tree node.

[Severity: High]
How is the pcs-handle property parsed by the Rockchip driver in practice?

With the generic pcs-handle parsing logic removed from stmmac_pcs_setup() in
favor of the platform-specific pcs_init callback:

drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c:stmmac_pcs_setup() {
	if (!priv->plat->pcs_init)
		return 0;

	ret = priv->plat->pcs_init(priv);
}

Does the Rockchip DWMAC driver provide this callback? If not, it seems
stmmac_pcs_setup() will silently return 0 without parsing the pcs-handle,
leaving the XPCS uninitialized and breaking the SGMII/QSGMII support described
here.

> +
> +    properties:
> +      reg:
> +        minimum: 0
> +        maximum: 3

[Severity: Low]
Does applying scalar numeric constraints like minimum and maximum directly to
the reg property cause a meta-schema validation error during
make dt_binding_check?

In the dtschema core, reg evaluates to an array of integers rather than a
scalar, so strict JSON schema validation typically fails with an error that
minimum is not allowed for an array. 

Could this be constrained as an array item instead, or omitted entirely in
favor of maxItems: 1 since the node name regex (^pcs-mii@[0-3]$) already
enforces the port number?

> +        description: |
> +          MII port number of PCS.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260801142244.679437-2-coiaprant@gmail.com?part=4

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-08-02 14:25 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-01 14:22 [PATCH v2 00/10] net-next: add basic support for RK3568 XPCS Coia Prant
2026-08-01 14:22 ` [PATCH v2 01/10] net: stmmac: move XPCS lifetime management to platform drivers Coia Prant
2026-08-01 14:22 ` [PATCH v2 02/10] dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property Coia Prant
2026-08-02 14:25   ` sashiko-bot
2026-08-01 14:22 ` [PATCH v2 03/10] phy: rockchip: naneng-combphy: add SGMII MAC selection for RK3568 Coia Prant
2026-08-01 20:58   ` Andrew Lunn
2026-08-02  2:51     ` Coia Prant
2026-08-01 14:22 ` [PATCH v2 04/10] dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding Coia Prant
2026-08-02 14:25   ` sashiko-bot [this message]
2026-08-01 14:22 ` [PATCH v2 05/10] arm64: dts: rockchip: rk3568: add XPCS and fixed-clock nodes Coia Prant
2026-08-01 16:28   ` Heiko Stübner
2026-08-01 19:19     ` Coia Prant
2026-08-01 21:05       ` Andrew Lunn
2026-08-02  3:28         ` Coia Prant
2026-08-02 15:19           ` Andrew Lunn
2026-08-02 18:36             ` Coia Prant
2026-08-01 14:22 ` [PATCH v2 06/10] net: pcs: xpcs: add ANRESTART support for SGMII link recovery Coia Prant
2026-08-01 21:10   ` Andrew Lunn
2026-08-02  3:11     ` Coia Prant
2026-08-02 14:30       ` Andrew Lunn
2026-08-02 14:59         ` Maxime Chevallier
2026-08-02 18:25         ` Coia Prant
2026-08-02 14:25   ` sashiko-bot
2026-08-01 14:22 ` [PATCH v2 07/10] net: pcs: xpcs: add Rockchip RK3568 platform glue driver Coia Prant
2026-08-02  1:29   ` Andrew Lunn
2026-08-02  3:20     ` Coia Prant
2026-08-02 14:39       ` Andrew Lunn
2026-08-02 18:33         ` Coia Prant
2026-08-02 19:00           ` Andrew Lunn
2026-08-02 14:25   ` sashiko-bot
2026-08-01 14:22 ` [PATCH v2 08/10] net: stmmac: dwmac-rk: add SGMII support for RK3568 Coia Prant
2026-08-02 14:25   ` sashiko-bot
2026-08-01 14:22 ` [PATCH v2 09/10] arm64: dts: rockchip: rk3568-photonicat: enable SGMII LAN port Coia Prant
2026-08-02 14:25   ` sashiko-bot
2026-08-01 14:22 ` [PATCH v2 10/10] MAINTAINERS: add entry for Rockchip XPCS driver Coia Prant

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=20260802142539.3C9F31F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=coiaprant@gmail.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 \
    --cc=wsa+renesas@sang-engineering.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