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

dt-bindings: usb: Convert DWC2 bindings to json-schema

Convert DWC2 bindings to DT schema format using json-schema.
DWC2 is widely use but a couple of compatibles and properties
(vusb_d-supply,vusb_a-supply) were missing in dwc2.txt, the
patch add them.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Benjamin Gaignard and committed by
Rob Herring
f3ca745d eae2614d

+151 -64
-64
Documentation/devicetree/bindings/usb/dwc2.txt
··· 1 - Platform DesignWare HS OTG USB 2.0 controller 2 - ----------------------------------------------------- 3 - 4 - Required properties: 5 - - compatible : One of: 6 - - brcm,bcm2835-usb: The DWC2 USB controller instance in the BCM2835 SoC. 7 - - hisilicon,hi6220-usb: The DWC2 USB controller instance in the hi6220 SoC. 8 - - rockchip,rk3066-usb: The DWC2 USB controller instance in the rk3066 Soc; 9 - - "rockchip,px30-usb", "rockchip,rk3066-usb", "snps,dwc2": for px30 Soc; 10 - - "rockchip,rk3188-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3188 Soc; 11 - - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc; 12 - - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs; 13 - - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs; 14 - - "amlogic,meson8-usb": The DWC2 USB controller instance in Amlogic Meson8 SoCs; 15 - - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs; 16 - - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs; 17 - - "amlogic,meson-g12a-usb": The DWC2 USB controller instance in Amlogic G12A SoCs; 18 - - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs; 19 - - snps,dwc2: A generic DWC2 USB controller with default parameters. 20 - - "st,stm32f4x9-fsotg": The DWC2 USB FS/HS controller instance in STM32F4x9 SoCs 21 - configured in FS mode; 22 - - "st,stm32f4x9-hsotg": The DWC2 USB HS controller instance in STM32F4x9 SoCs 23 - configured in HS mode; 24 - - "st,stm32f7-hsotg": The DWC2 USB HS controller instance in STM32F7 SoCs 25 - configured in HS mode; 26 - - reg : Should contain 1 register range (address and length) 27 - - interrupts : Should contain 1 interrupt 28 - - clocks: clock provider specifier 29 - - clock-names: shall be "otg" 30 - Refer to clk/clock-bindings.txt for generic clock consumer properties 31 - 32 - Optional properties: 33 - - phys: phy provider specifier 34 - - phy-names: shall be "usb2-phy" 35 - - vbus-supply: reference to the VBUS regulator. Depending on the current mode 36 - this is enabled (in "host" mode") or disabled (in "peripheral" mode). The 37 - regulator is updated if the controller is configured in "otg" mode and the 38 - status changes between "host" and "peripheral". 39 - Refer to phy/phy-bindings.txt for generic phy consumer properties 40 - - dr_mode: shall be one of "host", "peripheral" and "otg" 41 - Refer to usb/generic.txt 42 - - g-rx-fifo-size: size of rx fifo size in gadget mode. 43 - - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode. 44 - - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode. 45 - - snps,need-phy-for-wake: If present indicates that the phy needs to be left 46 - on for remote wakeup during suspend. 47 - - snps,reset-phy-on-wake: If present indicates that we need to reset the PHY when 48 - we detect a wakeup. This is due to a hardware errata. 49 - 50 - Deprecated properties: 51 - - g-use-dma: gadget DMA mode is automatically detected 52 - 53 - Example: 54 - 55 - usb@101c0000 { 56 - compatible = "ralink,rt3050-usb, snps,dwc2"; 57 - reg = <0x101c0000 40000>; 58 - interrupts = <18>; 59 - clocks = <&usb_otg_ahb_clk>; 60 - clock-names = "otg"; 61 - phys = <&usbphy>; 62 - phy-names = "usb2-phy"; 63 - snps,need-phy-for-wake; 64 - };
+151
Documentation/devicetree/bindings/usb/dwc2.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/dwc2.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: DesignWare HS OTG USB 2.0 controller Bindings 8 + 9 + maintainers: 10 + - Rob Herring <robh@kernel.org> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - const: brcm,bcm2835-usb 16 + - const: hisilicon,hi6220-usb 17 + - items: 18 + - const: rockchip,rk3066-usb 19 + - const: snps,dwc2 20 + - items: 21 + - const: rockchip,px30-usb 22 + - const: rockchip,rk3066-usb 23 + - const: snps,dwc2 24 + - items: 25 + - const: rockchip,rk3036-usb 26 + - const: rockchip,rk3066-usb 27 + - const: snps,dwc2 28 + - items: 29 + - const: rockchip,rv1108-usb 30 + - const: rockchip,rk3066-usb 31 + - const: snps,dwc2 32 + - items: 33 + - const: rockchip,rk3188-usb 34 + - const: rockchip,rk3066-usb 35 + - const: snps,dwc2 36 + - items: 37 + - const: rockchip,rk3228-usb 38 + - const: rockchip,rk3066-usb 39 + - const: snps,dwc2 40 + - items: 41 + - const: rockchip,rk3288-usb 42 + - const: rockchip,rk3066-usb 43 + - const: snps,dwc2 44 + - const: lantiq,arx100-usb 45 + - const: lantiq,xrx200-usb 46 + - items: 47 + - const: amlogic,meson8-usb 48 + - const: snps,dwc2 49 + - items: 50 + - const: amlogic,meson8b-usb 51 + - const: snps,dwc2 52 + - const: amlogic,meson-gxbb-usb 53 + - items: 54 + - const: amlogic,meson-g12a-usb 55 + - const: snps,dwc2 56 + - const: amcc,dwc-otg 57 + - const: snps,dwc2 58 + - const: st,stm32f4x9-fsotg 59 + - const: st,stm32f4x9-hsotg 60 + - const: st,stm32f7-hsotg 61 + - const: samsung,s3c6400-hsotg 62 + 63 + reg: 64 + maxItems: 1 65 + 66 + interrupts: 67 + maxItems: 1 68 + 69 + clocks: 70 + maxItems: 1 71 + 72 + clock-names: 73 + items: 74 + - const: otg 75 + 76 + resets: 77 + items: 78 + - description: common reset 79 + - description: ecc reset 80 + minItems: 1 81 + 82 + reset-names: 83 + items: 84 + - const: dwc2 85 + - const: dwc2-ecc 86 + minItems: 1 87 + 88 + phys: 89 + maxItems: 1 90 + 91 + phy-names: 92 + const: usb2-phy 93 + 94 + vbus-supply: 95 + description: reference to the VBUS regulator. Depending on the current mode 96 + this is enabled (in "host" mode") or disabled (in "peripheral" mode). The 97 + regulator is updated if the controller is configured in "otg" mode and the 98 + status changes between "host" and "peripheral". 99 + 100 + vusb_d-supply: 101 + description: phandle to voltage regulator of digital section, 102 + 103 + vusb_a-supply: 104 + description: phandle to voltage regulator of analog section. 105 + 106 + dr_mode: 107 + enum: [host, peripheral, otg] 108 + 109 + g-rx-fifo-size: 110 + $ref: /schemas/types.yaml#/definitions/uint32 111 + description: size of rx fifo size in gadget mode. 112 + 113 + g-np-tx-fifo-size: 114 + $ref: /schemas/types.yaml#/definitions/uint32 115 + description: size of non-periodic tx fifo size in gadget mode. 116 + 117 + g-tx-fifo-size: 118 + $ref: /schemas/types.yaml#/definitions/uint32-array 119 + description: size of periodic tx fifo per endpoint (except ep0) in gadget mode. 120 + 121 + snps,need-phy-for-wake: 122 + $ref: /schemas/types.yaml#/definitions/flag 123 + description: If present indicates that the phy needs to be left on for remote wakeup during suspend. 124 + 125 + snps,reset-phy-on-wake: 126 + $ref: /schemas/types.yaml#/definitions/flag 127 + description: If present indicates that we need to reset the PHY when we detect a wakeup. 128 + This is due to a hardware errata. 129 + 130 + required: 131 + - compatible 132 + - reg 133 + - interrupts 134 + - clocks 135 + - clock-names 136 + 137 + additionalProperties: false 138 + 139 + examples: 140 + - | 141 + usb@101c0000 { 142 + compatible = "rockchip,rk3066-usb", "snps,dwc2"; 143 + reg = <0x10180000 0x40000>; 144 + interrupts = <18>; 145 + clocks = <&usb_otg_ahb_clk>; 146 + clock-names = "otg"; 147 + phys = <&usbphy>; 148 + phy-names = "usb2-phy"; 149 + }; 150 + 151 + ...