[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240221080238.1615536-5-xu.yang_2@nxp.com>
Date: Wed, 21 Feb 2024 16:02:34 +0800
From: Xu Yang <xu.yang_2@....com>
To: gregkh@...uxfoundation.org,
robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org,
shawnguo@...nel.org,
conor+dt@...nel.org
Cc: s.hauer@...gutronix.de,
kernel@...gutronix.de,
festevam@...il.com,
linux-imx@....com,
peter.chen@...nel.org,
xu.yang_2@....com,
jun.li@....com,
linux-usb@...r.kernel.org,
devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [RESEND v6 5/9] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties
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
---
.../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 2ec62f564bf5..20bb048938ff 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2-imx.yaml
@@ -49,11 +49,63 @@ properties:
- const: fsl,imx6ul-usb
- const: fsl,imx27-usb
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
allOf:
- $ref: ci-hdrc-usb2.yaml#
+ # 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
Powered by blists - more mailing lists