[PATCH net-next 2/2] dt-bindings: net: dsa: Flag unexpected ethernet ports

Krzysztof Kozlowski krzysztof.kozlowski at oss.qualcomm.com
Mon Nov 30 20:23:24 PST 2026


On 23/11/2026 17:11, netdev-bot+sashiko at kernel.org wrote:
>>  
>>          $ref: dsa-port.yaml#
>>  
>>          properties:
>> +          reg:
>> +            maximum: 6
> 
> [Severity: High]
> Was renesas,rzn1-a5psw.yaml left out of this conversion on purpose? It
> looks like it has the same problem the commit message describes. It
> references dsa.yaml ports, its ethernet-ports node uses
> additionalProperties: true, and its port pattern still limits the unit
> address:
> 
> Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml:

This is fixed by Lad's patch:
https://lore.kernel.org/all/20261120002549.1908299-7-prabhakar.mahadev-lad.rj@bp.renesas.com/

> 
> allOf:
>   - $ref: dsa.yaml#/$defs/ethernet-ports
> ...
>   ethernet-ports:
>     type: object
>     additionalProperties: true
>     patternProperties:
>       "^(ethernet-)?port@[0-4]$":
> 
> Under a renesas,rzn1-a5psw switch, a node such as port at 5 or port at 7 does
> not match this pattern. It does match the generic
> "^(ethernet-)?port@[0-9a-f]+$" pattern in dsa.yaml, so only the generic
> dsa-port.yaml checks apply and it passes validation. This hardware only
> has ports 0-4 (4 ports plus 1 CPU port).
> 
> Would the same change used here for qca8k.yaml work for that file too,
> i.e. "^(ethernet-)?port@" plus reg: maximum: 4?
> 
> nxp,netc-switch.yaml has a weaker form of the same gap:
> 
>   ethernet-ports:
>     type: object
>     patternProperties:
>       "^ethernet-port@[0-9a-f]$":
>         type: object
>         $ref: dsa-port.yaml#
> 
> A node named port at 1 (no ethernet- prefix) or ethernet-port at 10 does not
> match this pattern. Instead it matches the
> '^(ethernet-)?port@[0-9a-f]+$' pattern in ethernet-switch.yaml, which is
> reached through $ref: dsa.yaml# and only applies type: object.
> 
> Such a node skips the NETC port schema, including dsa-port.yaml and its
> unevaluatedProperties: false, and passes without a warning.
> 
> Should this patch cover nxp,netc-switch.yaml as well?

As Rob explained, that requires a bit more effort than this simple cleanup.


Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list