[PATCH v5 1/9] dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048
Peng Fan
peng.fan at oss.nxp.com
Fri Sep 5 06:11:48 PDT 2025
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
More information about the linux-arm-kernel
mailing list