[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef00a8e6-4121-42d2-a752-a3dbd7244f16@kernel.org>
Date: Mon, 2 Jun 2025 22:21:30 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Frank Li <Frank.li@....com>, Stefan Wahren <wahrenst@....net>
Cc: 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>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>,
imx@...ts.linux.dev
Subject: Re: [PATCH 1/1] dt-bindings: net: convert qca,qca7000.txt yaml format
On 02/06/2025 17:35, Frank Li wrote:
>
>>> +
>>> +properties:
>>> + compatible:
>>> + const: qca,qca7000
>>> +
>>> + reg:
>>> + maxItems: 1
>>> +
>>> + interrupts:
>>> + maxItems: 1
>>> +
>>> + spi-cpha: true
>>> +
>>> + spi-cpol: true
>> In case of a SPI setup these properties should be required. Unfortunately
>> i'm not sure how to enforce this. Maybe depending on the presence of "reg"?
>
> But It think depend on reg is not good idea, which too obscure. Ideally it
> should be use two compatible strings. It should treat as two kinds device.
> It is really old devices and not worth to update compatible string.
>
> Maybe some one in dt team can provide suggestion!
>
> Rob and Krzysztof Kozlowski:
> any idea about this?
You can check for reg and require these, e.g.:
https://elixir.bootlin.com/linux/v6.4-rc7/source/Documentation/devicetree/bindings/net/qcom,ipa.yaml#L191
See also for very similar case:
Documentation/devicetree/bindings/net/dsa/realtek.yaml
However for multi-bus devices we usually do not code such constraints.
Partially because of typical cases - i2c and spi - it would not be possible.
Best regards,
Krzysztof
Powered by blists - more mailing lists