Commit ec396626 authored by Roger Quadros's avatar Roger Quadros Committed by Felipe Balbi
Browse files

dt-bindings: usb: ti,keystone-dwc3.yaml: Improve schema



There were some review comments after the patch was integrated.
Address those.

Fixes: 1883a934 ("dt-bindings: usb: convert keystone-usb.txt to YAML")
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 1fa645b1
Loading
Loading
Loading
Loading
+37 −14
Original line number Original line Diff line number Diff line
@@ -11,22 +11,36 @@ maintainers:


properties:
properties:
  compatible:
  compatible:
    oneOf:
    items:
      - const: "ti,keystone-dwc3"
      - enum:
      - const: "ti,am654-dwc3"
        - ti,keystone-dwc3
        - ti,am654-dwc3


  reg:
  reg:
    maxItems: 1
    maxItems: 1
    description: Address and length of the register set for the USB subsystem on

      the SOC.
  '#address-cells':
    const: 1

  '#size-cells':
    const: 1

  ranges: true


  interrupts:
  interrupts:
    maxItems: 1
    maxItems: 1
    description: The irq number of this device that is used to interrupt the MPU.



  clocks:
  clocks:
    description: Clock ID for USB functional clock.
    minItems: 1
    maxItems: 2

  assigned-clocks:
    minItems: 1
    maxItems: 2

  assigned-clock-parents:
    minItems: 1
    maxItems: 2


  power-domains:
  power-domains:
    description: Should contain a phandle to a PM domain provider node
    description: Should contain a phandle to a PM domain provider node
@@ -42,33 +56,42 @@ properties:


  phy-names:
  phy-names:
    items:
    items:
      - const: "usb3-phy"
      - const: usb3-phy

  dma-coherent: true


  dwc3:
  dma-ranges: true

patternProperties:
  "usb@[a-f0-9]+$":
    type: object
    description: This is the node representing the DWC3 controller instance
    description: This is the node representing the DWC3 controller instance
      Documentation/devicetree/bindings/usb/dwc3.txt
      Documentation/devicetree/bindings/usb/dwc3.txt


required:
required:
  - compatible
  - compatible
  - reg
  - reg
  - "#address-cells"
  - "#size-cells"
  - ranges
  - interrupts
  - interrupts
  - clocks

additionalProperties: false


examples:
examples:
  - |
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>


    usb: usb@2680000 {
    dwc3@2680000 {
      compatible = "ti,keystone-dwc3";
      compatible = "ti,keystone-dwc3";
      #address-cells = <1>;
      #address-cells = <1>;
      #size-cells = <1>;
      #size-cells = <1>;
      reg = <0x2680000 0x10000>;
      reg = <0x2680000 0x10000>;
      clocks = <&clkusb>;
      clocks = <&clkusb>;
      clock-names = "usb";
      interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>;
      interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>;
      ranges;
      ranges;


      dwc3@2690000 {
      usb@2690000 {
        compatible = "synopsys,dwc3";
        compatible = "synopsys,dwc3";
        reg = <0x2690000 0x70000>;
        reg = <0x2690000 0x70000>;
        interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>;
        interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>;