RE: [EXT] Re: [PATCH v5 5/8] dt-bindings: usb: ci-hdrc-usb2: add compatible and clock-names restriction for imx93

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

> 
> On 31/01/2024 12:43, Xu Yang wrote:
> > The i.MX93 needs a wakup clock to work properly. This will add compatible
> > and restriction for i.MX93 platform.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
> >
> > ---
> > Changes in v2:
> >  - no changes
> > Changes in v3:
> >  - add clocks restriction
> > Changes in v4:
> >  - use 'contains' rather 'items'
> > Changes in v5:
> >  - rename clock name
> > ---
> >  .../devicetree/bindings/usb/ci-hdrc-usb2.yaml | 35 ++++++++++++++++++-
> >  1 file changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Documentation/devicetree/bindings/usb/ci-
> hdrc-usb2.yaml
> > index 6ad3582051b8..12466f7af00b 100644
> > --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
> > +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
> > @@ -57,6 +57,7 @@ properties:
> >            - enum:
> >                - fsl,imx8mm-usb
> >                - fsl,imx8mn-usb
> > +              - fsl,imx93-usb
> >            - const: fsl,imx7d-usb
> >            - const: fsl,imx27-usb
> >        - items:
> > @@ -486,7 +487,6 @@ allOf:
> >                - chipidea,usb2
> >                - fsl,imx23-usb
> >                - fsl,imx28-usb
> > -              - fsl,imx7d-usb
> >                - fsl,vf610-usb
> >      then:
> >        properties:
> > @@ -497,6 +497,38 @@ allOf:
> >            minItems: 1
> >            maxItems: 1
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          items:
> > +            - const: fsl,imx7d-usb
> > +            - const: fsl,imx27-usb
> 
> This does not look related to imx93.

Because fsl,imx93-usb is compatible with fsl,imx7d-usb and only imx93 needs
wakeup clock, so I remove fsl,imx7d-usb from previous if-then restriction.
Otherwise, when do dt-validate for imx93, it will require 1 clocks and 1 clock-names
property. Then imx7d and imx8* socs will lost restrictions on clocks and clock-names.

Then I still need add restrictions for compatible = 'fsl,imx7d-usb ', 'fsl,imx27-usb '
and other compatibles like 'fsl,imx8mm-usb', 'fsl,imx7d-usb, 'fsl,imx27-usb''. So the
below changes are for this purpose.

> 
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 1
> > +          maxItems: 1
> > +        clock-names:
> > +          minItems: 1
> > +          maxItems: 1
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - fsl,imx93-usb
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 2
> > +          maxItems: 2
> > +        clock-names:
> > +          minItems: 2
> > +          maxItems: 2
> > +          contains:
> > +            const: usb_wakeup
> 
> No, clocks must be fixed and specific. No contains allowed for new variants.

Well, I will change this then.

> 
> > +
> >    - if:
> >        properties:
> >          compatible:
> > @@ -504,6 +536,7 @@ allOf:
> >              oneOf:
> >                - pattern: '^fsl,imx5[0-3]+-usb$'
> >                - pattern: '^fsl,imx6[a-z]+-usb$'
> > +              - pattern: '^fsl,imx8[a-z]+-usb$'
> 
> Aren't you adding imx9?

See above explanation.

Thanks,
Xu Yang




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux