Re: [PATCH net-next 01/10] dt-bindings: net: pcs: renesas,rzn1-miic: Document RZ/T2H and RZ/N2H SoCs
From: Krzysztof Kozlowski
Date: Tue Sep 02 2025 - 08:28:30 EST
On 02/09/2025 14:17, Lad, Prabhakar wrote:
>>> power-domains:
>>> maxItems: 1
>>> @@ -60,11 +77,11 @@ patternProperties:
>>> properties:
>>> reg:
>>> description: MII Converter port number.
>>> - enum: [1, 2, 3, 4, 5]
>>
>> Why?
>>
> If I keep this here and just adjust the below for RZ/T2H case I do get errors:
>
> reg:
> enum: [0, 1, 2, 3]
>
>
> arch/arm64/boot/dts/renesas/r9a09g077m44-rzt2h-evk.dtb: ethss@80110000
> (renesas,r9a09g077-miic): mii-conv@0:reg:0:0: 0 is not one of [1, 2,
> 3, 4, 5]
> from schema $id:
> http://devicetree.org/schemas/net/pcs/renesas,rzn1-miic.yaml#
>
> Any pointers on how to handle this case?
So please grow this with '0' to cover the widest choices, which you then
narrow in individual if:then:.
The trouble with your if:then: is that they are huge and they also nest
patterns and if:then:.
This often is less maintainable, so maybe you should consider having two
separate binding files? You can have also common-shared properties.
Anyway, I am fine with current approach of one binding as well, so up to
you folks.
>
>>>
>>> renesas,miic-input:
>>> description: Converter input port configuration. This value should use
>>> - one of the values defined in dt-bindings/net/pcs-rzn1-miic.h.
>>> + one of the values defined in dt-bindings/net/pcs-rzn1-miic.h for RZ/N1 SoC
>>> + and include/dt-bindings/net/pcs-rzt2h-miic.h for RZ/{T2H, N2H} SoCs.
>>> $ref: /schemas/types.yaml#/definitions/uint32
>>>
Best regards,
Krzysztof