[PATCH v2 04/10] dt-bindings: net: pcs: add rockchip,rk3568-xpcs binding
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Aug 2 07:25:38 PDT 2026
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 at 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
More information about the linux-phy
mailing list