On 12/07/2022 19:37, William Zhang wrote:Understand the DT schema purpose. But items property allows multiple enums in the list which gives a lot of flexibility but make it hard to validate. I am not familiar with DT schema, is there any directive to specify one enum value depending on another so dts validation tool can report error if combination is wrong?
For 4908 board variant, it will need to be followed by 4908 chip. Sorry+ - description: BCM4908 Family based boards
+ items:
+ - enum:
+ # BCM4908 SoC based boards
+ - brcm,bcm94908
+ - asus,gt-ac5300
+ - netgear,raxe500
+ # BCM4906 SoC based boards
+ - brcm,bcm94906
+ - netgear,r8000p
+ - tplink,archer-c2300-v1
+ - enum:
+ - brcm,bcm4908
+ - brcm,bcm4906
+ - brcm,bcm49408
This is wrong. brcm,bcm94908 followed by brcm,bcm4906 does not look
like valid list of compatibles.
for the basic question but is there any requirement to enforce this kind
of rule? I would assume dts writer know what he/she is doing and select
the right combination.
The entire point of DT schema is to validate DTS. Combination like above
prevents that goal.
Best regards,
Krzysztof
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature