[PATCH v10 1/2] dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Oct 5 15:19:13 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: schema validation fails for non-RK3568 variants due to default injection
--
commit f30c2450528092b975c8899ad617f4fa20dab422
Author: Coia Prant <coiaprant at gmail.com>
dt-bindings: phy: rockchip: naneng-combphy: add rockchip,sgmii-mac-sel property
On RK3568, the SGMII interface can be routed to either GMAC0 or
GMAC1 via the pipe_sgmii_mac_sel bit in the pipe GRF registers.
Add the optional "rockchip,sgmii-mac-sel" property to allow the
device tree to select which GMAC controller is used for SGMII.
> diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> index 379b08bd9e97a..8e898bce9af73 100644
> --- a/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml
> @@ -80,6 +80,15 @@ properties:
> description:
> Some additional pipe settings are accessed through GRF regs.
>
> + rockchip,sgmii-mac-sel:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 1
> + description:
> + Select gmac0 or gmac1 to be used as SGMII controller.
> + The hardware reset value is GMAC1 (1). Set this to 0 to route
> + SGMII to GMAC0.
> +
> "#phy-cells":
> const: 1
[ ... ]
> @@ -105,6 +114,10 @@ allOf:
> maxItems: 1
> reset-names:
> maxItems: 1
> + rockchip,sgmii-mac-sel: true
> + else:
> + properties:
> + rockchip,sgmii-mac-sel: false
[Severity: Medium]
Will this break dtbs_check for non-RK3568 platforms?
When the dtschema tooling processes a device node for a non-RK3568 compatible
(like rockchip,rk3588-naneng-combphy), it injects the top-level default value
of 1 into the node data.
Then the allOf evaluation applies this else branch, which enforces
rockchip,sgmii-mac-sel: false (meaning the property must not exist).
The presence of the injected default value violates this constraint, causing
validation to fail.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005221229.1095843-1-coiaprant@gmail.com?part=1
More information about the linux-phy
mailing list