mbox series

[00/20] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema

Message ID 20201014101402.18271-1-Sergey.Semin@baikalelectronics.ru
Headers show
Series dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema | expand

Message

Serge Semin Oct. 14, 2020, 10:13 a.m. UTC
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.

Finally we've also fixed all the OHCI/EHCI, xHCI and DW USB3 compatible DT
nodes so they would comply with the nodes naming scema declared in the USB
HCD DT bindings file.

Link: https://lore.kernel.org/linux-usb/20201010224121.12672-1-Sergey.Semin@baikalelectronics.ru/
Changelog v2:
- Thanks to Sergei Shtylyov for suggesting the commit logs grammar fixes:
  [PATCH 04/18] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types
  [PATCH 05/18] dt-bindings: usb: usb-hcd: Add "tpl-support" property
  [PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support
  [PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions
  [PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node
- Set FL-adj of the amlogiv,meson-g12a-usb controller with value 0x20 instead
  of completely removing the property.
- Drop the patch:
  [PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed
                property value
  since "wireless" speed type is depracated due to lack of the device
  supporting it.
- Drop quotes from around the compat string constant.
- Discard '|' from the property descriptions, since we don't need to preserve
  the text formatting.
- Convert abbreviated form of the "maximum-speed" enum constraint into
  the multi-lined version of the list.
- Fix the DW USB3 "clock-names" prop description to be refererring to the
  enumerated clock-names instead of the ones from the Databook.
- Add explicit "additionalProperties: true" to the usb-xhci.yaml schema,
  since additionalProperties/unevaluatedProperties are going to be mandary
  for each binding.
- Use "oneOf: [dwc2.yaml#, snps,dwc3.yaml#]" instead of the bulky "if:
  properties: compatibe: ..." statement.
- Discard the "^dwc3@[0-9a-f]+$" nodes from being acceptable as sub-nodes
  of the Qualcomm DWC3 DT nodes.
- Add new patches:
  [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
  [PATCH 19/20] arch: dts: Fix xHCI DT nodes name
  [PATCH 20/20] arch: dts: Fix DWC USB3 DT nodes name

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-arm-kernel@lists.infradead.org
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-mips@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (20):
  dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
  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: Fix FL-adj property value
  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
  arch: dts: Fix EHCI/OHCI DT nodes name
  arch: dts: Fix xHCI DT nodes name
  arch: dts: Fix DWC USB3 DT nodes name

 .../usb/amlogic,meson-g12a-usb-ctrl.yaml      |   6 +-
 .../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      | 104 ++++++
 .../devicetree/bindings/usb/usb-xhci.txt      |  41 ---
 .../devicetree/bindings/usb/usb-xhci.yaml     |  42 +++
 arch/arc/boot/dts/axs10x_mb.dtsi              |   4 +-
 arch/arc/boot/dts/hsdk.dts                    |   4 +-
 arch/arc/boot/dts/vdk_axs10x_mb.dtsi          |   2 +-
 arch/arm/boot/dts/armada-375.dtsi             |   2 +-
 arch/arm/boot/dts/bcm5301x.dtsi               |   6 +-
 arch/arm/boot/dts/bcm53573.dtsi               |   4 +-
 arch/arm/boot/dts/exynos5250.dtsi             |   2 +-
 arch/arm/boot/dts/exynos54xx.dtsi             |   4 +-
 arch/arm/boot/dts/hisi-x5hd2.dtsi             |   4 +-
 arch/arm/boot/dts/keystone-k2e.dtsi           |   4 +-
 arch/arm/boot/dts/keystone.dtsi               |   2 +-
 arch/arm/boot/dts/lpc18xx.dtsi                |   4 +-
 arch/arm/boot/dts/ls1021a.dtsi                |   2 +-
 arch/arm/boot/dts/omap5-l4.dtsi               |   2 +-
 arch/arm/boot/dts/stih407-family.dtsi         |   2 +-
 arch/arm/boot/dts/stm32mp151.dtsi             |   4 +-
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |   2 +-
 arch/arm64/boot/dts/exynos/exynos5433.dtsi    |   4 +-
 arch/arm64/boot/dts/exynos/exynos7.dtsi       |   2 +-
 .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi |   4 +-
 .../arm64/boot/dts/freescale/fsl-ls1043a.dtsi |   6 +-
 .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi |   4 +-
 .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi |   4 +-
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi     |   2 +-
 .../arm64/boot/dts/hisilicon/hi3798cv200.dtsi |   4 +-
 arch/arm64/boot/dts/hisilicon/hip06.dtsi      |   4 +-
 arch/arm64/boot/dts/hisilicon/hip07.dtsi      |   4 +-
 arch/arm64/boot/dts/marvell/armada-cp11x.dtsi |   4 +-
 arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi  |   4 +-
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         |   4 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi         |   4 +-
 arch/arm64/boot/dts/qcom/msm8998.dtsi         |   2 +-
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi      |   2 +-
 arch/arm64/boot/dts/qcom/qcs404.dtsi          |   4 +-
 arch/arm64/boot/dts/qcom/sc7180.dtsi          |   2 +-
 arch/arm64/boot/dts/qcom/sdm845.dtsi          |   4 +-
 arch/arm64/boot/dts/qcom/sm8150.dtsi          |   2 +-
 arch/mips/boot/dts/ingenic/jz4740.dtsi        |   2 +-
 arch/mips/boot/dts/ingenic/jz4770.dtsi        |   2 +-
 arch/mips/boot/dts/mti/sead3.dts              |   2 +-
 arch/mips/boot/dts/ralink/mt7628a.dtsi        |   2 +-
 arch/powerpc/boot/dts/akebono.dts             |   6 +-
 53 files changed, 605 insertions(+), 305 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

Comments

Serge Semin Oct. 14, 2020, 5:39 p.m. UTC | #1
Ah, forgot to mark the series as v2. Sorry about that. The next one will be v3
then...

-Sergey

On Wed, Oct 14, 2020 at 01:13:42PM +0300, Serge Semin wrote:
> 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.
> 
> Finally we've also fixed all the OHCI/EHCI, xHCI and DW USB3 compatible DT
> nodes so they would comply with the nodes naming scema declared in the USB
> HCD DT bindings file.
> 
> Link: https://lore.kernel.org/linux-usb/20201010224121.12672-1-Sergey.Semin@baikalelectronics.ru/
> Changelog v2:
> - Thanks to Sergei Shtylyov for suggesting the commit logs grammar fixes:
>   [PATCH 04/18] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types
>   [PATCH 05/18] dt-bindings: usb: usb-hcd: Add "tpl-support" property
>   [PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support
>   [PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions
>   [PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node
> - Set FL-adj of the amlogiv,meson-g12a-usb controller with value 0x20 instead
>   of completely removing the property.
> - Drop the patch:
>   [PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed
>                 property value
>   since "wireless" speed type is depracated due to lack of the device
>   supporting it.
> - Drop quotes from around the compat string constant.
> - Discard '|' from the property descriptions, since we don't need to preserve
>   the text formatting.
> - Convert abbreviated form of the "maximum-speed" enum constraint into
>   the multi-lined version of the list.
> - Fix the DW USB3 "clock-names" prop description to be refererring to the
>   enumerated clock-names instead of the ones from the Databook.
> - Add explicit "additionalProperties: true" to the usb-xhci.yaml schema,
>   since additionalProperties/unevaluatedProperties are going to be mandary
>   for each binding.
> - Use "oneOf: [dwc2.yaml#, snps,dwc3.yaml#]" instead of the bulky "if:
>   properties: compatibe: ..." statement.
> - Discard the "^dwc3@[0-9a-f]+$" nodes from being acceptable as sub-nodes
>   of the Qualcomm DWC3 DT nodes.
> - Add new patches:
>   [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
>   [PATCH 19/20] arch: dts: Fix xHCI DT nodes name
>   [PATCH 20/20] arch: dts: Fix DWC USB3 DT nodes name
> 
> 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-arm-kernel@lists.infradead.org
> Cc: linux-snps-arc@lists.infradead.org
> Cc: linux-mips@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-usb@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> 
> Serge Semin (20):
>   dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
>   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: Fix FL-adj property value
>   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
>   arch: dts: Fix EHCI/OHCI DT nodes name
>   arch: dts: Fix xHCI DT nodes name
>   arch: dts: Fix DWC USB3 DT nodes name
> 
>  .../usb/amlogic,meson-g12a-usb-ctrl.yaml      |   6 +-
>  .../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      | 104 ++++++
>  .../devicetree/bindings/usb/usb-xhci.txt      |  41 ---
>  .../devicetree/bindings/usb/usb-xhci.yaml     |  42 +++
>  arch/arc/boot/dts/axs10x_mb.dtsi              |   4 +-
>  arch/arc/boot/dts/hsdk.dts                    |   4 +-
>  arch/arc/boot/dts/vdk_axs10x_mb.dtsi          |   2 +-
>  arch/arm/boot/dts/armada-375.dtsi             |   2 +-
>  arch/arm/boot/dts/bcm5301x.dtsi               |   6 +-
>  arch/arm/boot/dts/bcm53573.dtsi               |   4 +-
>  arch/arm/boot/dts/exynos5250.dtsi             |   2 +-
>  arch/arm/boot/dts/exynos54xx.dtsi             |   4 +-
>  arch/arm/boot/dts/hisi-x5hd2.dtsi             |   4 +-
>  arch/arm/boot/dts/keystone-k2e.dtsi           |   4 +-
>  arch/arm/boot/dts/keystone.dtsi               |   2 +-
>  arch/arm/boot/dts/lpc18xx.dtsi                |   4 +-
>  arch/arm/boot/dts/ls1021a.dtsi                |   2 +-
>  arch/arm/boot/dts/omap5-l4.dtsi               |   2 +-
>  arch/arm/boot/dts/stih407-family.dtsi         |   2 +-
>  arch/arm/boot/dts/stm32mp151.dtsi             |   4 +-
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |   2 +-
>  arch/arm64/boot/dts/exynos/exynos5433.dtsi    |   4 +-
>  arch/arm64/boot/dts/exynos/exynos7.dtsi       |   2 +-
>  .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi |   4 +-
>  .../arm64/boot/dts/freescale/fsl-ls1043a.dtsi |   6 +-
>  .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi |   4 +-
>  .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi |   4 +-
>  arch/arm64/boot/dts/hisilicon/hi3660.dtsi     |   2 +-
>  .../arm64/boot/dts/hisilicon/hi3798cv200.dtsi |   4 +-
>  arch/arm64/boot/dts/hisilicon/hip06.dtsi      |   4 +-
>  arch/arm64/boot/dts/hisilicon/hip07.dtsi      |   4 +-
>  arch/arm64/boot/dts/marvell/armada-cp11x.dtsi |   4 +-
>  arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi  |   4 +-
>  arch/arm64/boot/dts/qcom/ipq8074.dtsi         |   4 +-
>  arch/arm64/boot/dts/qcom/msm8996.dtsi         |   4 +-
>  arch/arm64/boot/dts/qcom/msm8998.dtsi         |   2 +-
>  arch/arm64/boot/dts/qcom/qcs404-evb.dtsi      |   2 +-
>  arch/arm64/boot/dts/qcom/qcs404.dtsi          |   4 +-
>  arch/arm64/boot/dts/qcom/sc7180.dtsi          |   2 +-
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          |   4 +-
>  arch/arm64/boot/dts/qcom/sm8150.dtsi          |   2 +-
>  arch/mips/boot/dts/ingenic/jz4740.dtsi        |   2 +-
>  arch/mips/boot/dts/ingenic/jz4770.dtsi        |   2 +-
>  arch/mips/boot/dts/mti/sead3.dts              |   2 +-
>  arch/mips/boot/dts/ralink/mt7628a.dtsi        |   2 +-
>  arch/powerpc/boot/dts/akebono.dts             |   6 +-
>  53 files changed, 605 insertions(+), 305 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
>
Alexey Brodkin Oct. 14, 2020, 7:12 p.m. UTC | #2
Hi Sergey,

>  arch/arc/boot/dts/axs10x_mb.dtsi               | 4 ++--
>  arch/arc/boot/dts/hsdk.dts                     | 4 ++--
>  arch/arc/boot/dts/vdk_axs10x_mb.dtsi           | 2 +-

For ARC boards

Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Serge Semin Oct. 14, 2020, 9:35 p.m. UTC | #3
On Wed, Oct 14, 2020 at 10:18:18PM +0200, Krzysztof Kozlowski wrote:
> On Wed, Oct 14, 2020 at 01:13:53PM +0300, Serge Semin wrote:
> > The DWC USB3 driver and some DTS files like Exynos 5250, Keystone k2e, etc
> > expects the DWC USB3 DT node to have the compatible string with the
> > "synopsys" vendor prefix. Let's add the corresponding compatible string to
> > the controller DT schema, but mark it as deprecated seeing the Synopsys,
> > Inc. is presented with just "snps" vendor prefix.
> 

> Instead of adding deprecated schema just correct the DTSes to use snps.
> The "synopsys" is not even in vendor prefixes.

Yeah, it's not, but the driver and some dts'es use it this way. I am not sure
that the solution suggested by you is much better than mine. So let's hear the
Rob'es opinion out in this matter. @Rob, what do you think?

-Sergey

> 
> Best regards,
> Krzysztof
Rob Herring Oct. 16, 2020, 6:33 p.m. UTC | #4
On Wed, 14 Oct 2020 13:13:43 +0300, Serge Semin wrote:
> The generic USB HCD properties have been described in the legacy bindings
> text file: Documentation/devicetree/bindings/usb/generic.txt . Let's
> convert it' content into the USB HCD DT schema properties so all USB DT
> nodes would be validated to have them properly utilized.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v2:
> - Discard '|' in all the new properties, since we don't need to preserve
>   the text formatting.
> - Convert abbreviated form of the "maximum-speed" enum restriction into
>   the multi-lined version of the list.
> - Drop quotes from around the string constants.
> ---
>  .../devicetree/bindings/usb/generic.txt       | 57 ------------
>  .../devicetree/bindings/usb/usb-hcd.yaml      | 88 +++++++++++++++++++
>  2 files changed, 88 insertions(+), 57 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring Oct. 16, 2020, 6:34 p.m. UTC | #5
On Wed, 14 Oct 2020 13:13:45 +0300, Serge Semin wrote:
> Aside from the UTMI+ there are also ULPI, Serial and HSIC PHY types
> that can be specified in the phy_type HCD property. Add them to the
> enumeration of the acceptable values.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v2:
> - Grammar fix: "s/PHY types can be/PHY types that can be"
> - Drop quotes from around the string constants.
> ---
>  Documentation/devicetree/bindings/usb/usb-hcd.yaml | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring Oct. 16, 2020, 6:49 p.m. UTC | #6
On Wed, 14 Oct 2020 13:13:49 +0300, Serge Semin wrote:
> For some reason the "brcm,xhci-brcm-v2" compatible string has been missing
> in the original bindings file. Add it to the Generic xHCI Controllers DT
> schema since the controller driver expects it to be supported.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> ---
>  Documentation/devicetree/bindings/usb/generic-xhci.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring Oct. 16, 2020, 6:50 p.m. UTC | #7
On Wed, 14 Oct 2020 13:13:52 +0300, Serge Semin wrote:
> The controller driver supports two types of DWC USB3 devices: with a
> common interrupt lane and with individual interrupts for each mode. Add
> support for both these cases to the DWC USB3 DT schema.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v2:
> - Grammar fix: "s/both of these cases support/support for both these cases"
> - Drop quotes from around the string constants.
> ---
>  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring Oct. 16, 2020, 6:53 p.m. UTC | #8
On Thu, Oct 15, 2020 at 12:35:54AM +0300, Serge Semin wrote:
> On Wed, Oct 14, 2020 at 10:18:18PM +0200, Krzysztof Kozlowski wrote:
> > On Wed, Oct 14, 2020 at 01:13:53PM +0300, Serge Semin wrote:
> > > The DWC USB3 driver and some DTS files like Exynos 5250, Keystone k2e, etc
> > > expects the DWC USB3 DT node to have the compatible string with the
> > > "synopsys" vendor prefix. Let's add the corresponding compatible string to
> > > the controller DT schema, but mark it as deprecated seeing the Synopsys,
> > > Inc. is presented with just "snps" vendor prefix.
> > 
> 
> > Instead of adding deprecated schema just correct the DTSes to use snps.
> > The "synopsys" is not even in vendor prefixes.
> 
> Yeah, it's not, but the driver and some dts'es use it this way. I am not sure
> that the solution suggested by you is much better than mine. So let's hear the
> Rob'es opinion out in this matter. @Rob, what do you think?

I think we should fix the dts files given there's only 5.

Rob
Rob Herring Oct. 16, 2020, 6:54 p.m. UTC | #9
On Wed, 14 Oct 2020 13:13:56 +0300, Serge Semin wrote:
> An empty snps,quirk-frame-length-adjustment won't cause any change
> performed by the driver. Moreover the DT schema validation will fail,
> since it expects the property being assigned with some value. So set
> fix the example by setting a valid FL-adj value in accordance with
> Neil Armstrong comment.
> 
> Link: https://lore.kernel.org/linux-usb/20201010224121.12672-16-Sergey.Semin@baikalelectronics.ru/
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> ---
> 
> Note the same problem is in the DT source file
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi .
> ---
>  .../devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml    | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring Oct. 16, 2020, 6:55 p.m. UTC | #10
On Wed, 14 Oct 2020 13:13:58 +0300, Serge Semin wrote:
> TI Keystone DWC3 compatible DT node is supposed to have a DWC USB3
> compatible sub-node to describe a fully functioning USB interface.
> Since DWC USB3 has now got a DT schema describing its DT node, let's make
> sure the TI Keystone DWC3 sub-node passes validation against it.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v2:
> - Grammar fix: "s/it'/its"
> ---
>  Documentation/devicetree/bindings/usb/ti,keystone-dwc3.yaml | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Serge Semin Oct. 19, 2020, 4:22 p.m. UTC | #11
On Fri, Oct 16, 2020 at 01:53:40PM -0500, Rob Herring wrote:
> On Thu, Oct 15, 2020 at 12:35:54AM +0300, Serge Semin wrote:
> > On Wed, Oct 14, 2020 at 10:18:18PM +0200, Krzysztof Kozlowski wrote:
> > > On Wed, Oct 14, 2020 at 01:13:53PM +0300, Serge Semin wrote:
> > > > The DWC USB3 driver and some DTS files like Exynos 5250, Keystone k2e, etc
> > > > expects the DWC USB3 DT node to have the compatible string with the
> > > > "synopsys" vendor prefix. Let's add the corresponding compatible string to
> > > > the controller DT schema, but mark it as deprecated seeing the Synopsys,
> > > > Inc. is presented with just "snps" vendor prefix.
> > > 
> > 
> > > Instead of adding deprecated schema just correct the DTSes to use snps.
> > > The "synopsys" is not even in vendor prefixes.
> > 
> > Yeah, it's not, but the driver and some dts'es use it this way. I am not sure
> > that the solution suggested by you is much better than mine. So let's hear the
> > Rob'es opinion out in this matter. @Rob, what do you think?
> 

> I think we should fix the dts files given there's only 5.

Ok. I'll do that.

-Sergey

> 
> Rob