mbox series

[v2,00/18] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name

Message ID 20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru
Headers show
Series dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name | expand

Message

Serge Semin Nov. 11, 2020, 9:15 a.m. UTC
As the subject states this series is an attempt to harmonize the xHCI,
EHCI, OHCI and DWC USB3 DT nodes with the DT schema introduced in the
framework of the patchset [1].

Firstly as Krzysztof suggested we've deprecated a support of DWC USB3
controllers with "synopsys,"-vendor prefix compatible string in favor of
the ones with valid "snps,"-prefix. It's done in all the DTS files,
which have been unfortunate to define such nodes.

Secondly we suggest to fix the snps,quirk-frame-length-adjustment property
declaration in the Amlogic meson-g12-common.dtsi DTS file, since it has
been erroneously declared as boolean while having uint32 type. Neil said
it was ok to init that property with 0x20 value.

Thirdly the main part of the patchset concern fixing the xHCI, EHCI/OHCI
and DWC USB3 DT nodes name as in accordance with their DT schema the
corresponding node name is suppose to comply with the Generic USB HCD DT
schema, which requires the USB nodes to have the name acceptable by the
regexp: "^usb(@.*)?". Such requirement had been applicable even before we
introduced the new DT schema in [1], but as we can see it hasn't been
strictly implemented for a lot the DTS files. Since DT schema is now
available the automated DTS validation shall make sure that the rule isn't
violated.

Note most of these patches have been a part of the last three patches of
[1]. But since there is no way to have them merged in in a combined
manner, I had to move them to the dedicated series and split them up so to
be accepted by the corresponding subsystem maintainers one-by-one.

[1] Link: https://lore.kernel.org/linux-usb/20201014101402.18271-1-Sergey.Semin@baikalelectronics.ru/
Changelog v1:
- As Krzysztof suggested I've created a script which checked whether the
  node names had been also updated in all the depended dts files. As a
  result I found two more files which should have been also modified:
  arch/arc/boot/dts/{axc003.dtsi,axc003_idu.dtsi}
- Correct the USB DWC3 nodes name found in
  arch/arm64/boot/dts/apm/{apm-storm.dtsi,apm-shadowcat.dtsi} too.

Changelog v2:
- Drop the patch:
  [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string
  and get back the one which marks the "synopsys,dwc3" compatible string
  as deprecated into the DT schema related series.
- Drop the patches:
  [PATCH 03/29] arm: dts: am437x: Correct DWC USB3 compatible string
  [PATCH 04/29] arm: dts: exynos: Correct DWC USB3 compatible string
  [PATCH 07/29] arm: dts: bcm53x: Harmonize EHCI/OHCI DT nodes name
  [PATCH 08/29] arm: dts: stm32: Harmonize EHCI/OHCI DT nodes name
  [PATCH 16/29] arm: dts: bcm5301x: Harmonize xHCI DT nodes name
  [PATCH 19/29] arm: dts: exynos: Harmonize DWC USB3 DT nodes name
  [PATCH 21/29] arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
  [PATCH 22/29] arm: dts: omap5: Harmonize DWC USB3 DT nodes name
  [PATCH 24/29] arm64: dts: allwinner: h6: Harmonize DWC USB3 DT nodes name
  [PATCH 26/29] arm64: dts: exynos: Harmonize DWC USB3 DT nodes name
  [PATCH 27/29] arm64: dts: layerscape: Harmonize DWC USB3 DT nodes name
  since they have been applied to the corresponding maintainers repos.
- Fix drivers/usb/dwc3/dwc3-qcom.c to be looking for the "usb@"-prefixed
  sub-node and falling back to the "dwc3@"-prefixed one on failure.

Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Rafal Milecki <zajec5@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Benoit Cousson <bcousson@baylibre.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Khuong Dinh <khuong@os.amperecomputing.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Jun Li <lijun.kernel@gmail.com>
Cc: linux-snps-arc@lists.infradead.org
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Serge Semin (18):
  arm: dts: keystone: Correct DWC USB3 compatible string
  arm64: dts: amlogic: meson-g12: Set FL-adj property value
  arc: dts: Harmonize EHCI/OHCI DT nodes name
  arm: dts: hisi-x5hd2: Harmonize EHCI/OHCI DT nodes name
  arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name
  arm64: dts: hisi: Harmonize EHCI/OHCI DT nodes name
  mips: dts: jz47x: Harmonize EHCI/OHCI DT nodes name
  mips: dts: sead3: Harmonize EHCI/OHCI DT nodes name
  mips: dts: ralink: mt7628a: Harmonize EHCI/OHCI DT nodes name
  powerpc: dts: akebono: Harmonize EHCI/OHCI DT nodes name
  arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name
  arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name
  arm: dts: keystone: Harmonize DWC USB3 DT nodes name
  arm: dts: stih407-family: Harmonize DWC USB3 DT nodes name
  arm64: dts: apm: Harmonize DWC USB3 DT nodes name
  arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
  usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  arm64: dts: qcom: Harmonize DWC USB3 DT nodes name

 arch/arc/boot/dts/axc003.dtsi                     | 4 ++--
 arch/arc/boot/dts/axc003_idu.dtsi                 | 4 ++--
 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/hisi-x5hd2.dtsi                 | 4 ++--
 arch/arm/boot/dts/keystone-k2e.dtsi               | 6 +++---
 arch/arm/boot/dts/keystone.dtsi                   | 4 ++--
 arch/arm/boot/dts/lpc18xx.dtsi                    | 4 ++--
 arch/arm/boot/dts/stih407-family.dtsi             | 2 +-
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-
 arch/arm64/boot/dts/apm/apm-shadowcat.dtsi        | 4 ++--
 arch/arm64/boot/dts/apm/apm-storm.dtsi            | 6 +++---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi         | 2 +-
 arch/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 +++---
 drivers/usb/dwc3/dwc3-qcom.c                      | 3 ++-
 34 files changed, 58 insertions(+), 57 deletions(-)

Comments

Thomas Bogendoerfer Nov. 12, 2020, 10:41 p.m. UTC | #1
On Wed, Nov 11, 2020 at 12:15:41PM +0300, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node

> name is suppose to comply with the Generic USB HCD DT schema, which

> requires the USB nodes to have the name acceptable by the regexp:

> "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible

> nodes are correctly named.

> 

> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>

> Acked-by: Paul Cercueil <paul@crapouillou.net>

> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---

>  arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +-

>  arch/mips/boot/dts/ingenic/jz4770.dtsi | 2 +-

>  2 files changed, 2 insertions(+), 2 deletions(-)


applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
Thomas Bogendoerfer Nov. 12, 2020, 10:41 p.m. UTC | #2
On Wed, Nov 11, 2020 at 12:15:42PM +0300, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node

> name is suppose to comply with the Generic USB HCD DT schema, which

> requires the USB nodes to have the name acceptable by the regexp:

> "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible

> nodes are correctly named.

> 

> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>

> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---

>  arch/mips/boot/dts/mti/sead3.dts | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
Wei Xu Nov. 25, 2020, 2:27 a.m. UTC | #3
Hi Serge,

On 2020/11/11 17:15, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node

> name is suppose to comply with the Generic USB HCD DT schema, which

> requires the USB nodes to have the name acceptable by the regexp:

> "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible

> nodes are correctly named.

> 

> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>

> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---

>  arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 4 ++--

>  arch/arm64/boot/dts/hisilicon/hip06.dtsi       | 4 ++--

>  arch/arm64/boot/dts/hisilicon/hip07.dtsi       | 4 ++--

>  3 files changed, 6 insertions(+), 6 deletions(-)

> 

> diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi

> index 12bc1d3ed424..a4acecb75c89 100644

> --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi

> +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi

> @@ -585,7 +585,7 @@ pcie: pcie@9860000 {

>  			status = "disabled";

>  		};

>  

> -		ohci: ohci@9880000 {

> +		ohci: usb@9880000 {

>  			compatible = "generic-ohci";

>  			reg = <0x9880000 0x10000>;

>  			interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;

> @@ -600,7 +600,7 @@ ohci: ohci@9880000 {

>  			status = "disabled";

>  		};

>  

> -		ehci: ehci@9890000 {

> +		ehci: usb@9890000 {

>  			compatible = "generic-ehci";

>  			reg = <0x9890000 0x10000>;

>  			interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;

> diff --git a/arch/arm64/boot/dts/hisilicon/hip06.dtsi b/arch/arm64/boot/dts/hisilicon/hip06.dtsi

> index 50ceaa959bdc..1226440d54ad 100644

> --- a/arch/arm64/boot/dts/hisilicon/hip06.dtsi

> +++ b/arch/arm64/boot/dts/hisilicon/hip06.dtsi

> @@ -373,7 +373,7 @@ refclk: refclk {

>  			#clock-cells = <0>;

>  		};

>  

> -		usb_ohci: ohci@a7030000 {

> +		usb_ohci: usb@a7030000 {

>  			compatible = "generic-ohci";

>  			reg = <0x0 0xa7030000 0x0 0x10000>;

>  			interrupt-parent = <&mbigen_usb>;

> @@ -382,7 +382,7 @@ usb_ohci: ohci@a7030000 {

>  			status = "disabled";

>  		};

>  

> -		usb_ehci: ehci@a7020000 {

> +		usb_ehci: usb@a7020000 {

>  			compatible = "generic-ehci";

>  			reg = <0x0 0xa7020000 0x0 0x10000>;

>  			interrupt-parent = <&mbigen_usb>;

> diff --git a/arch/arm64/boot/dts/hisilicon/hip07.dtsi b/arch/arm64/boot/dts/hisilicon/hip07.dtsi

> index 4773a533fce5..93f99a5255ac 100644

> --- a/arch/arm64/boot/dts/hisilicon/hip07.dtsi

> +++ b/arch/arm64/boot/dts/hisilicon/hip07.dtsi

> @@ -1253,7 +1253,7 @@ uart0: uart@602b0000 {

>  			status = "disabled";

>  		};

>  

> -		usb_ohci: ohci@a7030000 {

> +		usb_ohci: usb@a7030000 {

>  			compatible = "generic-ohci";

>  			reg = <0x0 0xa7030000 0x0 0x10000>;

>  			interrupt-parent = <&mbigen_usb>;

> @@ -1262,7 +1262,7 @@ usb_ohci: ohci@a7030000 {

>  			status = "disabled";

>  		};

>  

> -		usb_ehci: ehci@a7020000 {

> +		usb_ehci: usb@a7020000 {

>  			compatible = "generic-ehci";

>  			reg = <0x0 0xa7020000 0x0 0x10000>;

>  			interrupt-parent = <&mbigen_usb>;

> 


Thanks!
But a similar patch has been sent out earlier:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20201012131739.1655-8-thunder.leizhen@huawei.com/

Best Regards,
Wei