Message ID | 20240802091702.2057294-1-xu.yang_2@nxp.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/5] dt-bindings: phy: imx8mq-usb: add compatible "fsl,imx95-usb-phy" | expand |
On 02/08/2024 11:16, Xu Yang wrote: > The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a > compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems > to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) > block. Since i.MX95 usb phy is able to switch SS lanes, this will also > add orientation-switch and port property to the file. > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > --- > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- > 1 file changed, 36 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > index dc3a3f709fea..b0a614a9556d 100644 > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > @@ -11,12 +11,17 @@ maintainers: > > properties: > compatible: > - enum: > - - fsl,imx8mq-usb-phy > - - fsl,imx8mp-usb-phy > + oneOf: > + - enum: > + - fsl,imx8mq-usb-phy > + - fsl,imx8mp-usb-phy > + - items: > + - const: fsl,imx95-usb-phy > + - const: fsl,imx8mp-usb-phy > > reg: > - maxItems: 1 > + minItems: 1 > + maxItems: 2 > > "#phy-cells": > const: 0 > @@ -28,6 +33,17 @@ properties: > items: > - const: phy > > + orientation-switch: > + description: > + Flag the PHY as possible handler of USB Type-C orientation switching No need to duplicate definitions of properties. > + type: boolean > + > + port: > + $ref: /schemas/graph.yaml#/properties/port > + description: > + A port node to link the PHY to a TypeC controller for the purpose of > + handling orientation switching. Same here. You probably miss reference to usb-switch. > + > power-domains: > maxItems: 1 > > @@ -89,6 +105,22 @@ required: > - clocks > - clock-names > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - fsl,imx95-usb-phy > + then: > + properties: > + reg: > + minItems: 2 list and describe the items here, instead. Krzysztof
On Sun, Aug 04, 2024 at 04:16:34PM +0200, Krzysztof Kozlowski wrote: > On 02/08/2024 11:16, Xu Yang wrote: > > The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a > > compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems > > to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) > > block. Since i.MX95 usb phy is able to switch SS lanes, this will also > > add orientation-switch and port property to the file. > > > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > > --- > > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- > > 1 file changed, 36 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > index dc3a3f709fea..b0a614a9556d 100644 > > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > @@ -11,12 +11,17 @@ maintainers: > > > > properties: > > compatible: > > - enum: > > - - fsl,imx8mq-usb-phy > > - - fsl,imx8mp-usb-phy > > + oneOf: > > + - enum: > > + - fsl,imx8mq-usb-phy > > + - fsl,imx8mp-usb-phy > > + - items: > > + - const: fsl,imx95-usb-phy > > + - const: fsl,imx8mp-usb-phy > > > > reg: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 2 > > > > "#phy-cells": > > const: 0 > > @@ -28,6 +33,17 @@ properties: > > items: > > - const: phy > > > > + orientation-switch: > > + description: > > + Flag the PHY as possible handler of USB Type-C orientation switching > > No need to duplicate definitions of properties. Okay. I need to use usb-switch. > > > + type: boolean > > + > > + port: > > + $ref: /schemas/graph.yaml#/properties/port > > + description: > > + A port node to link the PHY to a TypeC controller for the purpose of > > + handling orientation switching. > > Same here. You probably miss reference to usb-switch. Okay. > > > + > > power-domains: > > maxItems: 1 > > > > @@ -89,6 +105,22 @@ required: > > - clocks > > - clock-names > > > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - fsl,imx95-usb-phy > > + then: > > + properties: > > + reg: > > + minItems: 2 > > list and describe the items here, instead. Okay. Thanks, Xu Yang > > > Krzysztof >
On Sun, Aug 04, 2024 at 04:16:34PM +0200, Krzysztof Kozlowski wrote: > On 02/08/2024 11:16, Xu Yang wrote: > > The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a > > compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems > > to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) > > block. Since i.MX95 usb phy is able to switch SS lanes, this will also > > add orientation-switch and port property to the file. > > > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > > --- > > .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- > > 1 file changed, 36 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > index dc3a3f709fea..b0a614a9556d 100644 > > --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > > @@ -11,12 +11,17 @@ maintainers: > > > > properties: > > compatible: > > - enum: > > - - fsl,imx8mq-usb-phy > > - - fsl,imx8mp-usb-phy > > + oneOf: > > + - enum: > > + - fsl,imx8mq-usb-phy > > + - fsl,imx8mp-usb-phy > > + - items: > > + - const: fsl,imx95-usb-phy > > + - const: fsl,imx8mp-usb-phy > > > > reg: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 2 > > > > "#phy-cells": > > const: 0 > > @@ -28,6 +33,17 @@ properties: > > items: > > - const: phy > > > > + orientation-switch: > > + description: > > + Flag the PHY as possible handler of USB Type-C orientation switching > > No need to duplicate definitions of properties. I replace it with "orientation-switch: true". > > > + type: boolean > > + > > + port: > > + $ref: /schemas/graph.yaml#/properties/port > > + description: > > + A port node to link the PHY to a TypeC controller for the purpose of > > + handling orientation switching. > > Same here. You probably miss reference to usb-switch. How about port? Should I replace it with "port: true" or "port:" " $ref: /schemas/usb/usb-switch.yaml#/properties/port" Thanks, Xu Yang > > > + > > power-domains: > > maxItems: 1 > > > > @@ -89,6 +105,22 @@ required: > > - clocks > > - clock-names > > > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - fsl,imx95-usb-phy > > + then: > > + properties: > > + reg: > > + minItems: 2 > > list and describe the items here, instead. > > > Krzysztof >
On 05/08/2024 09:04, Xu Yang wrote: > On Sun, Aug 04, 2024 at 04:16:34PM +0200, Krzysztof Kozlowski wrote: >> On 02/08/2024 11:16, Xu Yang wrote: >>> The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a >>> compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems >>> to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) >>> block. Since i.MX95 usb phy is able to switch SS lanes, this will also >>> add orientation-switch and port property to the file. >>> >>> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> >>> --- >>> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- >>> 1 file changed, 36 insertions(+), 4 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml >>> index dc3a3f709fea..b0a614a9556d 100644 >>> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml >>> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml >>> @@ -11,12 +11,17 @@ maintainers: >>> >>> properties: >>> compatible: >>> - enum: >>> - - fsl,imx8mq-usb-phy >>> - - fsl,imx8mp-usb-phy >>> + oneOf: >>> + - enum: >>> + - fsl,imx8mq-usb-phy >>> + - fsl,imx8mp-usb-phy >>> + - items: >>> + - const: fsl,imx95-usb-phy >>> + - const: fsl,imx8mp-usb-phy >>> >>> reg: >>> - maxItems: 1 >>> + minItems: 1 >>> + maxItems: 2 >>> >>> "#phy-cells": >>> const: 0 >>> @@ -28,6 +33,17 @@ properties: >>> items: >>> - const: phy >>> >>> + orientation-switch: >>> + description: >>> + Flag the PHY as possible handler of USB Type-C orientation switching >> >> No need to duplicate definitions of properties. > > I replace it with "orientation-switch: true". > >> >>> + type: boolean >>> + >>> + port: >>> + $ref: /schemas/graph.yaml#/properties/port >>> + description: >>> + A port node to link the PHY to a TypeC controller for the purpose of >>> + handling orientation switching. >> >> Same here. You probably miss reference to usb-switch. > > How about port? Should I replace it with "port: true" or > > "port:" > " $ref: /schemas/usb/usb-switch.yaml#/properties/port" You can drop both if you add ref to usb-switch and use unevaluatedProperties. Best regards, Krzysztof
On Mon, Aug 05, 2024 at 09:22:18AM +0200, Krzysztof Kozlowski wrote: > On 05/08/2024 09:04, Xu Yang wrote: > > On Sun, Aug 04, 2024 at 04:16:34PM +0200, Krzysztof Kozlowski wrote: > >> On 02/08/2024 11:16, Xu Yang wrote: > >>> The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a > >>> compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems > >>> to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) > >>> block. Since i.MX95 usb phy is able to switch SS lanes, this will also > >>> add orientation-switch and port property to the file. > >>> > >>> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> > >>> --- > >>> .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- > >>> 1 file changed, 36 insertions(+), 4 deletions(-) > >>> > >>> diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > >>> index dc3a3f709fea..b0a614a9556d 100644 > >>> --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > >>> +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml > >>> @@ -11,12 +11,17 @@ maintainers: > >>> > >>> properties: > >>> compatible: > >>> - enum: > >>> - - fsl,imx8mq-usb-phy > >>> - - fsl,imx8mp-usb-phy > >>> + oneOf: > >>> + - enum: > >>> + - fsl,imx8mq-usb-phy > >>> + - fsl,imx8mp-usb-phy > >>> + - items: > >>> + - const: fsl,imx95-usb-phy > >>> + - const: fsl,imx8mp-usb-phy > >>> > >>> reg: > >>> - maxItems: 1 > >>> + minItems: 1 > >>> + maxItems: 2 > >>> > >>> "#phy-cells": > >>> const: 0 > >>> @@ -28,6 +33,17 @@ properties: > >>> items: > >>> - const: phy > >>> > >>> + orientation-switch: > >>> + description: > >>> + Flag the PHY as possible handler of USB Type-C orientation switching > >> > >> No need to duplicate definitions of properties. > > > > I replace it with "orientation-switch: true". > > > >> > >>> + type: boolean > >>> + > >>> + port: > >>> + $ref: /schemas/graph.yaml#/properties/port > >>> + description: > >>> + A port node to link the PHY to a TypeC controller for the purpose of > >>> + handling orientation switching. > >> > >> Same here. You probably miss reference to usb-switch. > > > > How about port? Should I replace it with "port: true" or > > > > "port:" > > " $ref: /schemas/usb/usb-switch.yaml#/properties/port" > > You can drop both if you add ref to usb-switch and use > unevaluatedProperties. Got it! It's helpful Thanks, Xu Yang > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml index dc3a3f709fea..b0a614a9556d 100644 --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml @@ -11,12 +11,17 @@ maintainers: properties: compatible: - enum: - - fsl,imx8mq-usb-phy - - fsl,imx8mp-usb-phy + oneOf: + - enum: + - fsl,imx8mq-usb-phy + - fsl,imx8mp-usb-phy + - items: + - const: fsl,imx95-usb-phy + - const: fsl,imx8mp-usb-phy reg: - maxItems: 1 + minItems: 1 + maxItems: 2 "#phy-cells": const: 0 @@ -28,6 +33,17 @@ properties: items: - const: phy + orientation-switch: + description: + Flag the PHY as possible handler of USB Type-C orientation switching + type: boolean + + port: + $ref: /schemas/graph.yaml#/properties/port + description: + A port node to link the PHY to a TypeC controller for the purpose of + handling orientation switching. + power-domains: maxItems: 1 @@ -89,6 +105,22 @@ required: - clocks - clock-names +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx95-usb-phy + then: + properties: + reg: + minItems: 2 + else: + properties: + reg: + maxItems: 1 + additionalProperties: false examples:
The usb phy in i.MX95 is compatible with i.MX8MP's, this will add a compatible "fsl,imx95-usb-phy" for i.MX95. Also change reg maxItems to 2 since i.MX95 needs another regmap to control Type-C Assist (TCA) block. Since i.MX95 usb phy is able to switch SS lanes, this will also add orientation-switch and port property to the file. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> --- .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-)