[PATCH 1/6] dt-bindings: phy: ti: phy-gmii-sel: Add bindings for J721e

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Tue Sep 20 23:39:35 PDT 2022


On 20/09/2022 06:27, Siddharth Vadapalli wrote:
> Hello Krzysztof,
>
>>> +    then:
>>> +      properties:
>>> +        ti,qsgmii-main-ports:
>>> +          minItems: 2
>>> +          maxItems: 2
>>> +          items:
>>> +            minimum: 1
>>> +            maximum: 8
>>> +
>>>    - if:
>>>        not:
>>>          properties:
>>> @@ -94,6 +133,7 @@ allOf:
>>>              contains:
>>>                enum:
>>>                  - ti,j7200-cpsw5g-phy-gmii-sel
>>> +                - ti,j721e-cpsw9g-phy-gmii-sel
>>>      then:
>>>        properties:
>>>          ti,qsgmii-main-ports: false
>>
>> This is interesting here... Did you test the bindings with your DTS?
> 
> Yes, I tried it out with different compatibles in the DTS file for the
> node, making sure that the property "ti,qsgmii-main-ports" is allowed
> only for the "ti,j7200-cpsw5g-phy-gmii-sel" and the
> "ti,j721e-cpsw9g-phy-gmii-sel" compatibles. Additionally, I also tested
> that the "minItems", "maxItems", "minimum" and "maximum" checks apply.
> All of the rules within the "allOf", are enforced one after the other in
> sequence, based on my testing. Please let me know in case of any
> suggestions to implement it in a better way.

Great! I think I see now what I missed previously. The last hunk with
"ti,qsgmii-main-ports: false" is in a if: with negation ("not:")?

Best regards,
Krzysztof



More information about the linux-phy mailing list