diff mbox series

[v2,1/1] dt-bindings: usb: cdns,usb3: use common usb-drd yaml

Message ID 20240607154119.1543290-1-Frank.Li@nxp.com (mailing list archive)
State Accepted
Commit 1899e79cf1f6405bef358ce5c436679afe6c4034
Headers show
Series [v2,1/1] dt-bindings: usb: cdns,usb3: use common usb-drd yaml | expand

Commit Message

Frank Li June 7, 2024, 3:41 p.m. UTC
Use common usb-drd yaml for usb OTG related propteries to fix below
DTB_CHECK warning.

arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: 'port', 'usb-role-switch' do not match any of the regexes: 'pinctrl-[0-9]+'

Add "port" proptery to use connect type C connector and fix below warning.
arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: Unevaluated properties are not allowed ('port' was unexpected)

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---

Notes:
    change from v1 to v2
    - add dependences
    - remove dr-mode : true and usb-role-switch: true
    - update commit message
    
    pass dt_binding_check
    
    make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8  dt_binding_check DT_SCHEMA_FILES=cdns,usb3.yaml
      SCHEMA  Documentation/devicetree/bindings/processed-schema.json
      CHKDT   Documentation/devicetree/bindings
      LINT    Documentation/devicetree/bindings
      DTEX    Documentation/devicetree/bindings/usb/cdns,usb3.example.dts
      DTC_CHK Documentation/devicetree/bindings/usb/cdns,usb3.example.dtb

 .../devicetree/bindings/usb/cdns,usb3.yaml        | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) June 10, 2024, 10:33 p.m. UTC | #1
On Fri, 07 Jun 2024 11:41:19 -0400, Frank Li wrote:
> Use common usb-drd yaml for usb OTG related propteries to fix below
> DTB_CHECK warning.
> 
> arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: 'port', 'usb-role-switch' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Add "port" proptery to use connect type C connector and fix below warning.
> arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: Unevaluated properties are not allowed ('port' was unexpected)
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> 
> Notes:
>     change from v1 to v2
>     - add dependences
>     - remove dr-mode : true and usb-role-switch: true
>     - update commit message
> 
>     pass dt_binding_check
> 
>     make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8  dt_binding_check DT_SCHEMA_FILES=cdns,usb3.yaml
>       SCHEMA  Documentation/devicetree/bindings/processed-schema.json
>       CHKDT   Documentation/devicetree/bindings
>       LINT    Documentation/devicetree/bindings
>       DTEX    Documentation/devicetree/bindings/usb/cdns,usb3.example.dts
>       DTC_CHK Documentation/devicetree/bindings/usb/cdns,usb3.example.dtb
> 
>  .../devicetree/bindings/usb/cdns,usb3.yaml        | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
index 69a93a0722f07..f454ddd9bbaa6 100644
--- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
+++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml
@@ -42,8 +42,11 @@  properties:
       - const: otg
       - const: wakeup
 
-  dr_mode:
-    enum: [host, otg, peripheral]
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      This port is used with the 'usb-role-switch' property to connect the
+      cdns3 to type C connector.
 
   maximum-speed:
     enum: [super-speed, high-speed, full-speed]
@@ -70,6 +73,9 @@  properties:
     description: Enable resetting of PHY if Rx fail is detected
     type: boolean
 
+dependencies:
+  port: [ usb-role-switch ]
+
 required:
   - compatible
   - reg
@@ -77,7 +83,10 @@  required:
   - interrupts
   - interrupt-names
 
-additionalProperties: false
+allOf:
+  - $ref: usb-drd.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |