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

dt-bindings: usb: Convert xHCI bindings to DT schema

Currently the DT bindings of Generic xHCI Controllers are described by
means of the legacy text file. Since such format is deprecated in favor of
the DT schema, let's convert the Generic xHCI Controllers bindings file to
the corresponding yaml files. There will be two of them: a DT schema for
the xHCI controllers on a generic platform and a DT schema validating a
generic xHCI controllers properties. The later will be used to validate
the xHCI controllers, which aside from some vendor-specific features
support the basic xHCI functionality.

An xHCI-compatible DT node shall support the standard USB HCD properties
and custom ones like: usb2-lpm-disable, usb3-lpm-capable,
quirk-broken-port-ped and imod-interval-ns. In addition if a generic xHCI
controller is being validated against the DT schema it is also supposed to
be equipped with mandatory compatible string, single registers range,
single interrupts source, and is supposed to optionally contain up to two
reference clocks for the controller core and CSRs.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201210090944.16283-8-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Serge Semin and committed by
Greg Kroah-Hartman
17c01b82 c2683507

+105 -41
+63
Documentation/devicetree/bindings/usb/generic-xhci.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/generic-xhci.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: USB xHCI Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Mathias Nyman <mathias.nyman@intel.com> 11 + 12 + allOf: 13 + - $ref: "usb-xhci.yaml#" 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - description: Generic xHCI device 19 + const: generic-xhci 20 + - description: Armada 37xx/375/38x/8k SoCs 21 + items: 22 + - enum: 23 + - marvell,armada3700-xhci 24 + - marvell,armada-375-xhci 25 + - marvell,armada-380-xhci 26 + - marvell,armada-8k-xhci 27 + - const: generic-xhci 28 + - description: Broadcom STB SoCs with xHCI 29 + const: brcm,bcm7445-xhci 30 + - description: Generic xHCI device 31 + const: xhci-platform 32 + deprecated: true 33 + 34 + reg: 35 + maxItems: 1 36 + 37 + interrupts: 38 + maxItems: 1 39 + 40 + clocks: 41 + minItems: 1 42 + maxItems: 2 43 + 44 + clock-names: 45 + minItems: 1 46 + items: 47 + - const: core 48 + - const: reg 49 + 50 + unevaluatedProperties: false 51 + 52 + required: 53 + - compatible 54 + - reg 55 + - interrupts 56 + 57 + examples: 58 + - | 59 + usb@f0931000 { 60 + compatible = "generic-xhci"; 61 + reg = <0xf0931000 0x8c8>; 62 + interrupts = <0x0 0x4e 0x0>; 63 + };
-41
Documentation/devicetree/bindings/usb/usb-xhci.txt
··· 1 - USB xHCI controllers 2 - 3 - Required properties: 4 - - compatible: should be one or more of 5 - 6 - - "generic-xhci" for generic XHCI device 7 - - "marvell,armada3700-xhci" for Armada 37xx SoCs 8 - - "marvell,armada-375-xhci" for Armada 375 SoCs 9 - - "marvell,armada-380-xhci" for Armada 38x SoCs 10 - - "brcm,bcm7445-xhci" for Broadcom STB SoCs with XHCI 11 - - "xhci-platform" (deprecated) 12 - 13 - When compatible with the generic version, nodes must list the 14 - SoC-specific version corresponding to the platform first 15 - followed by the generic version. 16 - 17 - - reg: should contain address and length of the standard XHCI 18 - register set for the device. 19 - - interrupts: one XHCI interrupt should be described here. 20 - 21 - Optional properties: 22 - - clocks: reference to the clocks 23 - - clock-names: mandatory if there is a second clock, in this case 24 - the name must be "core" for the first clock and "reg" for the 25 - second one 26 - - usb2-lpm-disable: indicate if we don't want to enable USB2 HW LPM 27 - - usb3-lpm-capable: determines if platform is USB3 LPM capable 28 - - quirk-broken-port-ped: set if the controller has broken port disable mechanism 29 - - imod-interval-ns: default interrupt moderation interval is 5000ns 30 - - phys : see usb-hcd.yaml in the current directory 31 - 32 - additionally the properties from usb-hcd.yaml (in the current directory) are 33 - supported. 34 - 35 - 36 - Example: 37 - usb@f0931000 { 38 - compatible = "generic-xhci"; 39 - reg = <0xf0931000 0x8c8>; 40 - interrupts = <0x0 0x4e 0x0>; 41 - };
+42
Documentation/devicetree/bindings/usb/usb-xhci.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/usb-xhci.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Generic USB xHCI Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Mathias Nyman <mathias.nyman@intel.com> 11 + 12 + allOf: 13 + - $ref: "usb-hcd.yaml#" 14 + 15 + properties: 16 + usb2-lpm-disable: 17 + description: Indicates if we don't want to enable USB2 HW LPM 18 + type: boolean 19 + 20 + usb3-lpm-capable: 21 + description: Determines if platform is USB3 LPM capable 22 + type: boolean 23 + 24 + quirk-broken-port-ped: 25 + description: Set if the controller has broken port disable mechanism 26 + type: boolean 27 + 28 + imod-interval-ns: 29 + description: Interrupt moderation interval 30 + default: 5000 31 + 32 + additionalProperties: true 33 + 34 + examples: 35 + - | 36 + usb@f0930000 { 37 + compatible = "generic-xhci"; 38 + reg = <0xf0930000 0x8c8>; 39 + interrupts = <0x0 0x4e 0x0>; 40 + usb2-lpm-disable; 41 + usb3-lpm-capable; 42 + };