diff mbox series

[v2,3/5] dt-bindings: usb: ci-hdrc-usb2: add compatible and clock-names restriction for imx93

Message ID 20231218085456.3962720-3-xu.yang_2@nxp.com
State Superseded
Headers show
Series [v2,1/5] arm64: dts: imx8ulp: add usb nodes | expand

Commit Message

Xu Yang Dec. 18, 2023, 8:54 a.m. UTC
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@nxp.com>

---
Changes in v2:
 - no changes
---
 .../devicetree/bindings/usb/ci-hdrc-usb2.yaml        | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Krzysztof Kozlowski Dec. 19, 2023, 7:47 a.m. UTC | #1
On 18/12/2023 09:54, 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@nxp.com>
> 
> ---
> Changes in v2:
>  - no changes

No changes? Where is the v1 in such case?

> ---
>  .../devicetree/bindings/usb/ci-hdrc-usb2.yaml        | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
> index b7e664f7395b..4e22b369e43f 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:
> @@ -411,6 +412,17 @@ allOf:
>          external-vbus-divider: false
>          samsung,picophy-pre-emp-curr-control: false
>          samsung,picophy-dc-vol-level-adjust: false

Blank line

> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx93-usb
> +    then:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: usb_ctrl_root_clk
> +            - const: usb_wakeup_clk

What about all the reset? reg, interrupts? Maybe it is time to split the
schema into common part and device-specific.



Best regards,
Krzysztof
Xu Yang Dec. 21, 2023, 1:13 p.m. UTC | #2
Hi Krzysztof,

> 
> On 20/12/2023 03:23, Xu Yang wrote:
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          contains:
> >>> +            const: fsl,imx93-usb
> >>> +    then:
> >>> +      properties:
> >>> +        clock-names:
> >>> +          items:
> >>> +            - const: usb_ctrl_root_clk
> >>> +            - const: usb_wakeup_clk
> >>
> >> What about all the reset? reg, interrupts? Maybe it is time to split the
> >> schema into common part and device-specific.
> >
> > Why I need to consider reset, reg and interrupts? Should I add restrictions on
> > these too? I may not really understand your meaning.
> 
> I looked at the binding and it seems that you allow different number of
> items for them. Why aren't these constrained for your device?

Well, understood now. I should add number of clocks and clock-names
for my case. However, reset, reg and interrupts property is not special
for imx93.

Thanks,
Xu Yang

> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
index b7e664f7395b..4e22b369e43f 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:
@@ -411,6 +412,17 @@  allOf:
         external-vbus-divider: false
         samsung,picophy-pre-emp-curr-control: false
         samsung,picophy-dc-vol-level-adjust: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx93-usb
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: usb_ctrl_root_clk
+            - const: usb_wakeup_clk
 
 unevaluatedProperties: false