[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250905131148.GA19427@nxa18884-linux.ap.freescale.net>
Date: Fri, 5 Sep 2025 21:11:48 +0800
From: Peng Fan <peng.fan@....nxp.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Peng Fan <peng.fan@....com>, Marc Kleine-Budde <mkl@...gutronix.de>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Aswath Govindraju <a-govindraju@...com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Frank Li <frank.li@....com>,
Haibo Chen <haibo.chen@....com>, linux-can@...r.kernel.org,
linux-phy@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 1/9] dt-bindings: phy: ti,tcan104x-can: Document NXP
TJA105X/1048
Hi Krzysztof,
On Fri, Sep 05, 2025 at 09:52:19AM +0200, Krzysztof Kozlowski wrote:
>On Thu, Sep 04, 2025 at 04:36:44PM +0800, Peng Fan wrote:
>> The TJA1048 is a dual high-speed CAN transceiver with sleep mode supported
>> and no EN pin.
>>
[snip]
>>
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: nxp,tja1048
>> + then:
>> + properties:
>> + '#phy-cells':
>> + const: 1
>> + enable-gpios: false
>> + silent-gpios: false
>> + standby-gpios:
>> + minItems: 2
>> + else:
>> + properties:
>> + '#phy-cells':
>> + const: 0
>> + standby-gpios:
>> + maxItems: 1
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + enum:
>> + - nxp,tja1051
>> + - nxp,tja1057
>> + then:
>> + properties:
>> + silent-gpios: true
>> + else:
>> + properties:
>> + silent-gpios: false
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: nxp,tja1051
>
>This is here and in if earlier. Just keep in only one place. Also
>earlier else also touches standby-gpios, so you basically have it in
>multiple places.
>
>Just define if:then:, without any else:, for each variant.
Thanks for your suggestions. This is cleaner and easier to read.
Does something as below looks good to you?
allOf:
- if:
properties:
compatible:
enum:
- nxp,tjr1443
- ti,tcan1042
- ti,tcan1043
then:
properties:
'#phy-cells':
const: 0
silent-gpios: false
standby-gpios:
maxItems: 1
- if:
properties:
compatible:
contains:
const: nxp,tja1048
then:
properties:
'#phy-cells':
const: 1
enable-gpios: false
silent-gpios: false
standby-gpios:
minItems: 2
- if:
properties:
compatible:
contains:
const: nxp,tja1051
then:
properties:
silent-gpios: true
standby-gpios: false
'#phy-cells':
const: 0
- if:
properties:
compatible:
contains:
const: nxp,tja1057
then:
properties:
enable-gpios: false
silent-gpios: true
standby-gpios: false
'#phy-cells':
const: 0
Thanks,
Peng
Powered by blists - more mailing lists