[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfEYg1BVTVMGAUJX@lizhi-Precision-Tower-5810>
Date: Tue, 12 Mar 2024 23:07:47 -0400
From: Frank Li <Frank.li@....com>
To: Xu Yang <xu.yang_2@....com>
Cc: Rob Herring <robh@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
dl-linux-imx <linux-imx@....com>,
"peter.chen@...nel.org" <peter.chen@...nel.org>,
Jun Li <jun.li@....com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH v8 05/10] dt-bindings: usb: ci-hdrc-usb2-imx:
add restrictions for reg, interrupts, clock and clock-names properties
On Wed, Mar 13, 2024 at 02:48:00AM +0000, Xu Yang wrote:
>
> >
> > On Tue, Mar 12, 2024 at 05:16:58PM +0800, Xu Yang wrote:
> > > Add restrictions for reg, interrupts, clock and clock-names properties
> > > for imx Socs.
> > >
> > > Signed-off-by: Xu Yang <xu.yang_2@....com>
> > >
> > > ---
> > > Changes in v4:
> > > - new patch since v3's discussion
> > > - split the reg, interrupts, clock and clock-names properties into
> > > common part and device-specific
> > > Changes in v5:
> > > - keep common property unchanged
> > > - make if-then more readable
> > > - remove non imx part
> > > Changes in v6:
> > > - new patch based on ci-hdrc-usb2-imx.yaml
> > > Changes in v7:
> > > - no changes
> > > Changes in v8:
> > > - remove if:else:if:else:if:else block
> > > ---
> > > .../bindings/usb/chipidea,usb2-imx.yaml | 80 +++++++++++++++++++
> > > 1 file changed, 80 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml
> > b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml
> > > index cdbb224e9f68..fb1c378dfe88 100644
> > > --- a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml
> > > @@ -49,6 +49,12 @@ properties:
> > > - const: fsl,imx6ul-usb
> > > - const: fsl,imx27-usb
> > >
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + interrupts:
> > > + maxItems: 1
> > > +
> > > clocks:
> > > minItems: 1
> > > maxItems: 3
> > > @@ -144,6 +150,80 @@ allOf:
> > > - const: idle
> > > - const: active
> > >
> > > + # imx27 Soc needs three clocks
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + const: fsl,imx27-usb
> > > + then:
> > > + properties:
> > > + clocks:
> > > + minItems: 3
> > > + maxItems: 3
> >
> > The max is already 3, so drop maxItems.
>
> Okay.
>
> >
> > > + clock-names:
> > > + items:
> > > + - const: ipg
> > > + - const: ahb
> > > + - const: per
> > > +
> > > + # imx25 and imx35 Soc need three clocks
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + contains:
> > > + enum:
> > > + - fsl,imx25-usb
> > > + - fsl,imx35-usb
> > > + then:
> > > + properties:
> > > + clocks:
> > > + minItems: 3
> > > + maxItems: 3
> >
> > Same here.
>
> Okay.
>
> >
> > > + clock-names:
> > > + items:
> > > + - const: ipg
> > > + - const: ahb
> > > + - const: per
> > > +
> > > + # imx7d Soc need one clock
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + items:
> > > + - const: fsl,imx7d-usb
> > > + - const: fsl,imx27-usb
> > > + then:
> > > + properties:
> > > + clocks:
> > > + maxItems: 1
> > > + clock-names:
> > > + maxItems: 1
> >
> > What's the name?
>
> Can I not specify the name since the macro definition for USB
> controller clock in clock.h is recognizable and the driver doesn't
> get this clock by name rather index?
If clock-names is not required for fsl,imx7d-usb,
clock-names: false
If driver use index to get clock, why need clock-names at other platform?
I supposed these should be the same for all chips.
Frank
>
> Thanks,
> Xu Yang
>
Powered by blists - more mailing lists