[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240312091703.1220649-5-xu.yang_2@nxp.com>
Date: Tue, 12 Mar 2024 17:16:58 +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,
imx@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH v8 05/10] 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
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
+ 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
+ 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
+
+ # other Soc need one clock
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx23-usb
+ - fsl,imx28-usb
+ - fsl,imx50-usb
+ - fsl,imx51-usb
+ - fsl,imx53-usb
+ - fsl,imx6q-usb
+ - fsl,imx6sl-usb
+ - fsl,imx6sx-usb
+ - fsl,imx6ul-usb
+ - fsl,imx8mm-usb
+ - fsl,imx8mn-usb
+ - fsl,vf610-usb
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+
unevaluatedProperties: false
examples:
--
2.34.1
Powered by blists - more mailing lists