Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: usb: dwc3-xilinx: Convert USB DWC3 bindings

Convert USB DWC3 bindings to DT schema format using json-schema.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Link: https://lore.kernel.org/r/1638808021-26921-1-git-send-email-manish.narani@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Manish Narani and committed by
Greg Kroah-Hartman
a5b5b45f 856d3624

+131 -56
-56
Documentation/devicetree/bindings/usb/dwc3-xilinx.txt
··· 1 - Xilinx SuperSpeed DWC3 USB SoC controller 2 - 3 - Required properties: 4 - - compatible: May contain "xlnx,zynqmp-dwc3" or "xlnx,versal-dwc3" 5 - - reg: Base address and length of the register control block 6 - - clocks: A list of phandles for the clocks listed in clock-names 7 - - clock-names: Should contain the following: 8 - "bus_clk" Master/Core clock, have to be >= 125 MHz for SS 9 - operation and >= 60MHz for HS operation 10 - 11 - "ref_clk" Clock source to core during PHY power down 12 - - resets: A list of phandles for resets listed in reset-names 13 - - reset-names: 14 - "usb_crst" USB core reset 15 - "usb_hibrst" USB hibernation reset 16 - "usb_apbrst" USB APB reset 17 - 18 - Required child node: 19 - A child node must exist to represent the core DWC3 IP block. The name of 20 - the node is not important. The content of the node is defined in dwc3.txt. 21 - 22 - Optional properties for snps,dwc3: 23 - - dma-coherent: Enable this flag if CCI is enabled in design. Adding this 24 - flag configures Global SoC bus Configuration Register and 25 - Xilinx USB 3.0 IP - USB coherency register to enable CCI. 26 - - interrupt-names: Should contain the following: 27 - "dwc_usb3" USB gadget mode interrupts 28 - "otg" USB OTG mode interrupts 29 - "hiber" USB hibernation interrupts 30 - 31 - Example device node: 32 - 33 - usb@0 { 34 - #address-cells = <0x2>; 35 - #size-cells = <0x1>; 36 - compatible = "xlnx,zynqmp-dwc3"; 37 - reg = <0x0 0xff9d0000 0x0 0x100>; 38 - clock-names = "bus_clk", "ref_clk"; 39 - clocks = <&clk125>, <&clk125>; 40 - resets = <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>, 41 - <&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>, 42 - <&zynqmp_reset ZYNQMP_RESET_USB1_APB>; 43 - reset-names = "usb_crst", "usb_hibrst", "usb_apbrst"; 44 - ranges; 45 - 46 - dwc3@fe200000 { 47 - compatible = "snps,dwc3"; 48 - reg = <0x0 0xfe200000 0x40000>; 49 - interrupt-names = "dwc_usb3", "otg", "hiber"; 50 - interrupts = <0 65 4>, <0 69 4>, <0 75 4>; 51 - phys = <&psgtr 2 PHY_TYPE_USB3 0 2>; 52 - phy-names = "usb3-phy"; 53 - dr_mode = "host"; 54 - dma-coherent; 55 - }; 56 - };
+131
Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/dwc3-xilinx.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Xilinx SuperSpeed DWC3 USB SoC controller 8 + 9 + maintainers: 10 + - Manish Narani <manish.narani@xilinx.com> 11 + 12 + properties: 13 + compatible: 14 + items: 15 + - enum: 16 + - xlnx,zynqmp-dwc3 17 + - xlnx,versal-dwc3 18 + reg: 19 + maxItems: 1 20 + 21 + "#address-cells": 22 + enum: [ 1, 2 ] 23 + 24 + "#size-cells": 25 + enum: [ 1, 2 ] 26 + 27 + ranges: true 28 + 29 + power-domains: 30 + description: specifies a phandle to PM domain provider node 31 + maxItems: 1 32 + 33 + clocks: 34 + description: 35 + A list of phandle and clock-specifier pairs for the clocks 36 + listed in clock-names. 37 + items: 38 + - description: Master/Core clock, has to be >= 125 MHz 39 + for SS operation and >= 60MHz for HS operation. 40 + - description: Clock source to core during PHY power down. 41 + 42 + clock-names: 43 + items: 44 + - const: bus_clk 45 + - const: ref_clk 46 + 47 + resets: 48 + description: 49 + A list of phandles for resets listed in reset-names. 50 + 51 + items: 52 + - description: USB core reset 53 + - description: USB hibernation reset 54 + - description: USB APB reset 55 + 56 + reset-names: 57 + items: 58 + - const: usb_crst 59 + - const: usb_hibrst 60 + - const: usb_apbrst 61 + 62 + phys: 63 + minItems: 1 64 + maxItems: 2 65 + 66 + phy-names: 67 + minItems: 1 68 + maxItems: 2 69 + items: 70 + enum: 71 + - usb2-phy 72 + - usb3-phy 73 + 74 + # Required child node: 75 + 76 + patternProperties: 77 + "^usb@[0-9a-f]+$": 78 + $ref: snps,dwc3.yaml# 79 + 80 + required: 81 + - compatible 82 + - reg 83 + - "#address-cells" 84 + - "#size-cells" 85 + - ranges 86 + - power-domains 87 + - clocks 88 + - clock-names 89 + - resets 90 + - reset-names 91 + 92 + additionalProperties: false 93 + 94 + examples: 95 + - | 96 + #include <dt-bindings/dma/xlnx-zynqmp-dpdma.h> 97 + #include <dt-bindings/power/xlnx-zynqmp-power.h> 98 + #include <dt-bindings/reset/xlnx-zynqmp-resets.h> 99 + #include <dt-bindings/clock/xlnx-zynqmp-clk.h> 100 + #include <dt-bindings/reset/xlnx-zynqmp-resets.h> 101 + #include <dt-bindings/phy/phy.h> 102 + axi { 103 + #address-cells = <2>; 104 + #size-cells = <2>; 105 + 106 + usb@0 { 107 + #address-cells = <0x2>; 108 + #size-cells = <0x2>; 109 + compatible = "xlnx,zynqmp-dwc3"; 110 + reg = <0x0 0xff9d0000 0x0 0x100>; 111 + clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; 112 + clock-names = "bus_clk", "ref_clk"; 113 + power-domains = <&zynqmp_firmware PD_USB_0>; 114 + resets = <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>, 115 + <&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>, 116 + <&zynqmp_reset ZYNQMP_RESET_USB1_APB>; 117 + reset-names = "usb_crst", "usb_hibrst", "usb_apbrst"; 118 + phys = <&psgtr 2 PHY_TYPE_USB3 0 2>; 119 + phy-names = "usb3-phy"; 120 + ranges; 121 + 122 + usb@fe200000 { 123 + compatible = "snps,dwc3"; 124 + reg = <0x0 0xfe200000 0x0 0x40000>; 125 + interrupt-names = "host", "otg"; 126 + interrupts = <0 65 4>, <0 69 4>; 127 + dr_mode = "host"; 128 + dma-coherent; 129 + }; 130 + }; 131 + };