[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ec3efce-653c-46c5-977f-5a46391e675f@kernel.org>
Date: Tue, 2 Sep 2025 14:21:36 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
Cc: Clément Léger <clement.leger@...tlin.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, Philipp Zabel
<p.zabel@...gutronix.de>, Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next 01/10] dt-bindings: net: pcs: renesas,rzn1-miic:
Document RZ/T2H and RZ/N2H SoCs
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@...10000
> (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
Powered by blists - more mailing lists