linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema
@ 2020-10-10 22:41 Serge Semin
  2020-10-10 22:41 ` [PATCH 01/18] dt-bindings: usb: usb-hcd: Convert generic USB properties to " Serge Semin
                   ` (17 more replies)
  0 siblings, 18 replies; 50+ messages in thread
From: Serge Semin @ 2020-10-10 22:41 UTC (permalink / raw)
  To: Mathias Nyman, Felipe Balbi, Greg Kroah-Hartman, Rob Herring
  Cc: Serge Semin, Serge Semin, Alexey Malahov, Pavel Parkhomenko,
	Andy Gross, Bjorn Andersson, Manu Gautam, Roger Quadros,
	Lad Prabhakar, Yoshihiro Shimoda, Neil Armstrong, Kevin Hilman,
	linux-usb, devicetree, linux-kernel

We've performed some work on the Generic USB HCD, xHCI and DWC USB3 DT
bindings in the framework of the Baikal-T1 SoC support integration into
the kernel. This patchset is a result of that work.

First of all we moved the generic USB properties from the legacy text
bindings into the USB HCD DT schema. So now the generic USB HCD-compatible
DT nodes are validated taking into account the optional properties like:
maximum-speed, dr_mode, otg-rev, usb-role-switch, etc. We've fixed these
properties a bit so they would correspond to what functionality kernel
currently supports.

Secondly we converted generic USB xHCI text bindings file into the DT
schema. It had to be split up into two bindings: DT schema with generic
xHCI properties and a generic xHCI device DT schema. The later will be
used to validate the pure xHCI-based nodes, while the former can be
utilized by some vendor-specific versions of xHCI.

Thirdly, what was primarily intended to be done for Baikal-T1 SoC USB we
converted the legacy text-based DWC USB3 bindings to DT schema and altered
the result a bit so it would be more coherent with what actually
controller and its driver support. Since we've now got the DWC USB3 DT
schema, we made it used to validate the sub-nodes of the Qualcom, TI and
Amlogic DWC3 DT nodes.

Alas the new DWC USB3 DT schema doesn't support all the DT nodes defined
as compatible with "snps,dwc3". There are next problems we've discovered
while were working on this patchset:

1) There are many "snps,dwc3"-compatible DT nodes, which names are defined
as "^usb[0-9](@.*)", "^dwc3(@.*)" and even "^dwusb(@.*)". It contradicts
to what usb-hcd.yaml requires. Since it's included into the allOf property
of the DWC USB3 DT binding, some USB DT nodes declared for Freescale,
Qualcomm, HiSilicon, Exynos, Allwinner, Omap, Stih and APM will fail the
dtbs_check validation. This is the main problem and currently I don't
really know how to fix it better. Ideally we should convert all the
problematic DT nodes to have "usb@"-prefixed names. But it will be very
painful due to having a lot of such nodes defined. On the other hand we
could just fix the usb-hcd.yaml file either by detaching the generic
properties into a separate DT schema and allOf-ing it in the HCDs with
non-standard node-names instead of using usb-hcd.yaml there, or just add
the non-standard node-names into the usb-hcd.yaml file. What do you think
would be better?

2) amlogic/meson-g12-common.dtsi has got a USB controller node defined
with boolean "snps,quirk-frame-length-adjustment", which actually is
supposed to have u32 type.

3) freescale/imx8mq.dtsi defines a USB controller node with unknown
"usb3-resume-missing-cas" property.

4) marvell/armada-37xx.dtsi defines a USB controller with unknown
"marvell,usb-misc-reg" property.

5) socionext/uniphier-pxs3.dtsi, uniphier-pxs2.dtsi define a USB
controller with too many PHYs.

We haven't fixed the problems denoted above in this patchset for now.
So any help, suggestions on how they (especially #1) could be fixed,
following up fixup patches would be appropriate.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Manu Gautam <mgautam@codeaurora.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (18):
  dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
  dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed property value
  dt-bindings: usb: usb-hcd: Add "otg-rev" property restriction
  dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types
  dt-bindings: usb: usb-hcd: Add "tpl-support" property
  dt-bindings: usb: usb-hcd: Add generic "usb-phy" property
  dt-bindings: usb: Convert xHCI bindings to DT schema
  dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device
  dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file
  dt-bindings: usb: Convert DWC USB3 bindings to DT schema
  dt-bindings: usb: dwc3: Add interrupt-names property support
  dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string
  dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions
  dt-bindings: usb: dwc3: Add Frame Length Adj restrictions
  dt-bindings: usb: meson-g12a-usb: Discard FL-adj property
  dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes
  dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node
  dt-bindings: usb: qcom,dwc3: Validate DWC3 sub-node

 .../usb/amlogic,meson-g12a-usb-ctrl.yaml      |  16 +-
 .../devicetree/bindings/usb/dwc3.txt          | 125 -------
 .../devicetree/bindings/usb/generic-xhci.yaml |  65 ++++
 .../devicetree/bindings/usb/generic.txt       |  57 ----
 .../devicetree/bindings/usb/qcom,dwc3.yaml    |   9 +-
 .../bindings/usb/renesas,usb-xhci.yaml        |   4 +-
 .../devicetree/bindings/usb/snps,dwc3.yaml    | 315 ++++++++++++++++++
 .../bindings/usb/ti,keystone-dwc3.yaml        |   4 +-
 .../devicetree/bindings/usb/usb-hcd.yaml      | 100 ++++++
 .../devicetree/bindings/usb/usb-xhci.txt      |  41 ---
 .../devicetree/bindings/usb/usb-xhci.yaml     |  40 +++
 11 files changed, 540 insertions(+), 236 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/dwc3.txt
 create mode 100644 Documentation/devicetree/bindings/usb/generic-xhci.yaml
 delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
 create mode 100644 Documentation/devicetree/bindings/usb/snps,dwc3.yaml
 delete mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.txt
 create mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.yaml

-- 
2.27.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2020-10-13 15:50 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 22:41 [PATCH 00/18] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema Serge Semin
2020-10-10 22:41 ` [PATCH 01/18] dt-bindings: usb: usb-hcd: Convert generic USB properties to " Serge Semin
2020-10-13 12:14   ` Rob Herring
2020-10-13 14:00     ` Serge Semin
2020-10-10 22:41 ` [PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed property value Serge Semin
2020-10-11 14:42   ` Greg Kroah-Hartman
2020-10-11 17:53     ` Serge Semin
2020-10-12 15:41       ` Greg Kroah-Hartman
2020-10-12 21:19         ` Serge Semin
2020-10-10 22:41 ` [PATCH 03/18] dt-bindings: usb: usb-hcd: Add "otg-rev" property restriction Serge Semin
2020-10-10 22:41 ` [PATCH 04/18] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types Serge Semin
2020-10-11  8:49   ` Sergei Shtylyov
2020-10-11 18:03     ` Serge Semin
2020-10-10 22:41 ` [PATCH 05/18] dt-bindings: usb: usb-hcd: Add "tpl-support" property Serge Semin
2020-10-11  8:47   ` Sergei Shtylyov
2020-10-11 18:05     ` Serge Semin
2020-10-11 18:06     ` Serge Semin
2020-10-10 22:41 ` [PATCH 06/18] dt-bindings: usb: usb-hcd: Add generic "usb-phy" property Serge Semin
2020-10-10 22:41 ` [PATCH 07/18] dt-bindings: usb: Convert xHCI bindings to DT schema Serge Semin
2020-10-13 12:30   ` Rob Herring
2020-10-13 14:29     ` Serge Semin
2020-10-10 22:41 ` [PATCH 08/18] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device Serge Semin
2020-10-10 22:41 ` [PATCH 09/18] dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file Serge Semin
2020-10-10 22:41 ` [PATCH 10/18] dt-bindings: usb: Convert DWC USB3 bindings to DT schema Serge Semin
2020-10-13 12:36   ` Rob Herring
2020-10-13 15:16     ` Serge Semin
2020-10-10 22:41 ` [PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support Serge Semin
2020-10-11  8:53   ` Sergei Shtylyov
2020-10-11 18:09     ` Serge Semin
2020-10-10 22:41 ` [PATCH 12/18] dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string Serge Semin
2020-10-10 22:41 ` [PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions Serge Semin
2020-10-11  8:56   ` Sergei Shtylyov
2020-10-11 18:14     ` Serge Semin
2020-10-10 22:41 ` [PATCH 14/18] dt-bindings: usb: dwc3: Add Frame Length Adj restrictions Serge Semin
2020-10-13 12:38   ` Rob Herring
2020-10-13 15:45     ` Serge Semin
2020-10-10 22:41 ` [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property Serge Semin
2020-10-12  7:54   ` Neil Armstrong
2020-10-12 14:22     ` Serge Semin
2020-10-12 15:01       ` Neil Armstrong
2020-10-12 15:13         ` Serge Semin
2020-10-12 15:29           ` Neil Armstrong
2020-10-10 22:41 ` [PATCH 16/18] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes Serge Semin
2020-10-12  7:38   ` Neil Armstrong
2020-10-13 12:42   ` Rob Herring
2020-10-13 15:50     ` Serge Semin
2020-10-10 22:41 ` [PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node Serge Semin
2020-10-11  9:04   ` Sergei Shtylyov
2020-10-11 18:18     ` Serge Semin
2020-10-10 22:41 ` [PATCH 18/18] dt-bindings: usb: qcom,dwc3: " Serge Semin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).