[PATCH v3 21/26] dt-bindings: crypto: convert rockchip-crypto to yaml

Krzysztof Kozlowski krzk at kernel.org
Thu Mar 24 11:19:31 PDT 2022


On 24/03/2022 17:20, LABBE Corentin wrote:

(...)
>>
>>> +    resets:
>>> +      minItems: 6
>>> +else:
>>> +  if:
>>> +    properties:
>>> +      compatible:
>>> +        const: rockchip,rk3328-crypto
>>> +  then:
>>> +    properties:
>>> +      clocks:
>>> +        minItems: 3
>>> +      clock-names:
>>> +        minItems: 3
>>> +
>>
> 
> I have create a binding update patch (https://github.com/montjoie/linux/commit/da05ef9bb488c16cfd15a47054f5b1161829b6bf)
> But I have lot of problem, DT are not validating.
> Example: Documentation/devicetree/bindings/crypto/rockchip,rk3288-crypto.example.dtb: crypto at ff8a0000: resets: [[4294967295, 174]] is too short
> 
> I have tried also to set default resets/maxItems to 3 and setting it to 4 via an if. But I still got error like maxItems cannot be update after initial set.
> 
> Any idea on why my new binding update patch is failling ?

For such case one way to solve is to:
1. Define the most relaxed min/maxItems in properties.
2. Narrow the min/maxItems in allOf for each flavor.
Something like in clocks for:
Documentation/devicetree/bindings/clock/samsung,exynos7885-clock.yaml


Best regards,
Krzysztof



More information about the Linux-rockchip mailing list