diff mbox series

[v2,3/3] dt-bindings: usb: add documentation for aspeed udc

Message ID 20220517082558.3534161-4-neal_liu@aspeedtech.com (mailing list archive)
State New, archived
Headers show
Series add Aspeed udc driver for ast2600 | expand

Commit Message

Neal Liu May 17, 2022, 8:25 a.m. UTC
Add device tree binding documentation for the Aspeed USB2.0 Device
Controller.

Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
 .../bindings/usb/aspeed,ast2600-udc.yaml      | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml

Comments

Neal Liu May 17, 2022, 2:53 p.m. UTC | #1
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Tuesday, May 17, 2022 8:04 PM
> To: Neal Liu <neal_liu@aspeedtech.com>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof
> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Joel Stanley <joel@jms.id.au>;
> Andrew Jeffery <andrew@aj.id.au>; Felipe Balbi <balbi@kernel.org>; Sumit
> Semwal <sumit.semwal@linaro.org>; Christian König
> <christian.koenig@amd.com>; Geert Uytterhoeven <geert@linux-m68k.org>;
> Li Yang <leoyang.li@nxp.com>
> Cc: linux-aspeed@lists.ozlabs.org; linux-usb@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; linux-media@vger.kernel.org;
> dri-devel@lists.freedesktop.org; linaro-mm-sig@lists.linaro.org
> Subject: Re: [PATCH v2 3/3] dt-bindings: usb: add documentation for aspeed
> udc
> 
> On 17/05/2022 10:25, Neal Liu wrote:
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - interrupts
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/aspeed-clock.h>
> > +    usb: usb@1e6a2000 {
> > +            compatible = "aspeed,ast2600-udc";
> 
> Sorry for not noticing it earlier - slipped through the cracks. You use here
> unusual indentation (not matching the rest of the example - above is 4 spaces,
> here is 7 or 8).
> 
> Just keep 4 spaces for DTS example.
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
Got it. I'll revise it for next patch.
Thanks for your review.

> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml b/Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml
new file mode 100644
index 000000000000..2e91d5179359
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020 Facebook Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/aspeed,ast2600-udc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASPEED USB 2.0 Device Controller
+
+maintainers:
+  - Neal Liu <neal_liu@aspeedtech.com>
+
+description: |+
+  The ASPEED USB 2.0 Device Controller implements 1 control endpoint and
+  4 generic endpoints for AST260x.
+
+  Supports independent DMA channel for each generic endpoint.
+  Supports 32/256 stages descriptor mode for all generic endpoints.
+
+properties:
+  compatible:
+    enum:
+      - aspeed,ast2600-udc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/aspeed-clock.h>
+    usb: usb@1e6a2000 {
+            compatible = "aspeed,ast2600-udc";
+            reg = <0x1e6a2000 0x300>;
+            interrupts = <9>;
+            clocks = <&syscon ASPEED_CLK_GATE_USBPORT2CLK>;
+            pinctrl-names = "default";
+            pinctrl-0 = <&pinctrl_usb2bd_default>;
+    };