[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240228113004.918205-5-xu.yang_2@nxp.com>
Date: Wed, 28 Feb 2024 19:29: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,
linux-kernel@...r.kernel.org
Subject: [PATCH v7 05/11] 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
---
.../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
Powered by blists - more mailing lists