All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xu Yang <xu.yang_2@nxp.com>
To: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	conor+dt@kernel.org
Cc: s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com, peter.chen@kernel.org,
	xu.yang_2@nxp.com, jun.li@nxp.com, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v7 05/11] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties
Date: Wed, 28 Feb 2024 19:29:58 +0800	[thread overview]
Message-ID: <20240228113004.918205-5-xu.yang_2@nxp.com> (raw)
In-Reply-To: <20240228113004.918205-1-xu.yang_2@nxp.com>

Add restrictions for reg, interrupts, clock and clock-names properties
for imx Socs.

Signed-off-by: Xu Yang <xu.yang_2@nxp.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
---
 .../bindings/usb/ci-hdrc-usb2-imx.yaml        | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
index 50494ce06d07..a4730a2393e6 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-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
@@ -145,8 +151,54 @@ allOf:
             - const: idle
             - const: active
 
+  # imx27 Soc needs three clocks
+  - if:
+      properties:
+        compatible:
+          const: fsl,imx27-usb
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+        clock-names:
+          items:
+            - const: ipg
+            - const: ahb
+            - const: per
+    else:
+      # 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
+          clock-names:
+            items:
+              - const: ipg
+              - const: ahb
+              - const: per
+      else:
+        # other imx Socs only need one clock
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 1
+          clock-names:
+            minItems: 1
+            maxItems: 1
+
 required:
   - compatible
+  - reg
+  - interrupts
 
 unevaluatedProperties: false
 
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Xu Yang <xu.yang_2@nxp.com>
To: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	conor+dt@kernel.org
Cc: s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com, peter.chen@kernel.org,
	xu.yang_2@nxp.com, jun.li@nxp.com, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v7 05/11] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties
Date: Wed, 28 Feb 2024 19:29:58 +0800	[thread overview]
Message-ID: <20240228113004.918205-5-xu.yang_2@nxp.com> (raw)
In-Reply-To: <20240228113004.918205-1-xu.yang_2@nxp.com>

Add restrictions for reg, interrupts, clock and clock-names properties
for imx Socs.

Signed-off-by: Xu Yang <xu.yang_2@nxp.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
---
 .../bindings/usb/ci-hdrc-usb2-imx.yaml        | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
index 50494ce06d07..a4730a2393e6 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-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
@@ -145,8 +151,54 @@ allOf:
             - const: idle
             - const: active
 
+  # imx27 Soc needs three clocks
+  - if:
+      properties:
+        compatible:
+          const: fsl,imx27-usb
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+        clock-names:
+          items:
+            - const: ipg
+            - const: ahb
+            - const: per
+    else:
+      # 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
+          clock-names:
+            items:
+              - const: ipg
+              - const: ahb
+              - const: per
+      else:
+        # other imx Socs only need one clock
+        properties:
+          clocks:
+            minItems: 1
+            maxItems: 1
+          clock-names:
+            minItems: 1
+            maxItems: 1
+
 required:
   - compatible
+  - reg
+  - interrupts
 
 unevaluatedProperties: false
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-02-28 11:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 11:29 [PATCH v7 01/11] dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible Xu Yang
2024-02-28 11:29 ` Xu Yang
2024-02-28 11:29 ` [PATCH v7 02/11] arm64: dts: imx8ulp: add usb nodes Xu Yang
2024-02-28 11:29   ` Xu Yang
2024-02-28 11:29 ` [PATCH v7 03/11] arm64: dts: imx8ulp-evk: enable usb nodes and add ptn5150 nodes Xu Yang
2024-02-28 11:29   ` Xu Yang
2024-02-28 11:29 ` [PATCH v7 04/11] dt-bindings: usb: ci-hdrc-usb2-imx: move imx parts to dedicated schema Xu Yang
2024-02-28 11:29   ` Xu Yang
2024-02-29 15:11   ` Krzysztof Kozlowski
2024-02-29 15:11     ` Krzysztof Kozlowski
2024-03-08  8:30     ` [EXT] " Xu Yang
2024-03-08  8:30       ` Xu Yang
2024-03-08  8:38       ` Krzysztof Kozlowski
2024-03-08  8:38         ` Krzysztof Kozlowski
2024-02-28 11:29 ` Xu Yang [this message]
2024-02-28 11:29   ` [PATCH v7 05/11] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties Xu Yang
2024-02-29 15:13   ` Krzysztof Kozlowski
2024-02-29 15:13     ` Krzysztof Kozlowski
2024-03-08  8:46     ` [EXT] " Xu Yang
2024-03-08  8:46       ` Xu Yang
2024-02-28 11:29 ` [PATCH v7 06/11] dt-bindings: usb: ci-hdrc-usb2-imx: add compatible and clock-names restriction for imx93 Xu Yang
2024-02-28 11:29   ` Xu Yang
2024-02-29 15:14   ` Krzysztof Kozlowski
2024-02-29 15:14     ` Krzysztof Kozlowski
2024-03-12  6:36     ` [EXT] " Xu Yang
2024-03-12  6:36       ` Xu Yang
2024-02-29 15:14   ` Krzysztof Kozlowski
2024-02-29 15:14     ` Krzysztof Kozlowski
2024-02-28 11:30 ` [PATCH v7 07/11] dt-bindings: usb: ci-hdrc-usb2-imx: remove fsl,anatop property Xu Yang
2024-02-28 11:30   ` Xu Yang
2024-02-29 15:15   ` Krzysztof Kozlowski
2024-02-29 15:15     ` Krzysztof Kozlowski
2024-03-12  6:38     ` [EXT] " Xu Yang
2024-03-12  6:38       ` Xu Yang
2024-02-28 11:30 ` [PATCH v7 08/11] ARM: dts: imx6: remove fsl,anatop property from usb controller node Xu Yang
2024-02-28 11:30   ` Xu Yang
2024-02-28 11:30 ` [PATCH v7 09/11] arm64: dts: imx93: add usb nodes Xu Yang
2024-02-28 11:30   ` Xu Yang
2024-02-28 11:30 ` [PATCH v7 10/11] arm64: dts: imx93-11x11-evk: enable usb and typec nodes Xu Yang
2024-02-28 11:30   ` Xu Yang
2024-02-28 11:30 ` [PATCH v7 11/11] usb: chipidea: ci_hdrc_imx: align usb wakeup clock name with dt-bindings Xu Yang
2024-02-28 11:30   ` Xu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240228113004.918205-5-xu.yang_2@nxp.com \
    --to=xu.yang_2@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.