linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name
@ 2021-02-10 17:28 Serge Semin
  2021-02-10 17:28 ` [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-10 17:28 UTC (permalink / raw)
  To: Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Rob Herring, Greg Kroah-Hartman
  Cc: linux-usb, Vineet Gupta, Rafal Milecki, Wei Xu,
	Thomas Bogendoerfer, Michael Ellerman, Jason Cooper,
	Santosh Shilimkar, Shawn Guo, Benoit Cousson, Patrice Chotard,
	Maxime Ripard, Khuong Dinh, Andy Gross, Alexey Brodkin,
	Hauke Mehrtens, Maxime Coquelin, Alexandre Torgue,
	Amelie Delaunay, Vladimir Zapolskiy, Paul Cercueil,
	Matthias Brugger, Benjamin Herrenschmidt, Paul Mackerras,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Kukjin Kim,
	Li Yang, Tony Lindgren, Chen-Yu Tsai, Jun Li, linux-snps-arc,
	bcm-kernel-feedback-list, linux-stm32, linux-arm-kernel,
	linux-mips, linux-mediatek, linuxppc-dev, linux-samsung-soc,
	linux-omap, linux-arm-msm, devicetree, linux-kernel

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.

Link: https://lore.kernel.org/linux-usb/20201020115959.2658-1-Sergey.Semin@baikalelectronics.ru
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.

Link: https://lore.kernel.org/linux-usb/20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru
Changelog v3:
- Drop the patches:
  [PATCH v2 04/18] arm: dts: hisi-x5hd2: Harmonize EHCI/OHCI DT nodes name
  [PATCH v2 06/18] arm64: dts: hisi: Harmonize EHCI/OHCI DT nodes name
  [PATCH v2 07/18] mips: dts: jz47x: Harmonize EHCI/OHCI DT nodes name
  [PATCH v2 08/18] mips: dts: sead3: Harmonize EHCI/OHCI DT nodes name
  [PATCH v2 09/18] mips: dts: ralink: mt7628a: Harmonize EHCI/OHCI DT nodes name
  [PATCH v2 11/18] arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name
  [PATCH v2 12/18] arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name
  [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
  since they have been applied to the corresponding maintainers repos.

Link: https://lore.kernel.org/linux-usb/20201205155621.3045-1-Sergey.Semin@baikalelectronics.ru
Changelog v4:
- Just resend.

Link: https://lore.kernel.org/linux-usb/20201210091756.18057-1-Sergey.Semin@baikalelectronics.ru/
Changelog v5:
- Drop the patch:
  [PATCH v4 02/10] arm64: dts: amlogic: meson-g12: Set FL-adj property value
  since it has been applied to the corresponding maintainers repos.
- Get back the patch:
  [PATCH 21/29] arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
  as it has been missing in the kernel 5.11-rc7
- Rebase onto the kernel 5.11-rc7

Link: https://lore.kernel.org/lkml/20210208135154.6645-1-Sergey.Semin@baikalelectronics.ru/
Changelog v6:
- Just resend and add linux-usb.vger.kernel.org to the list of Ccecipients.

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 (10):
  arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
  arm: dts: keystone: Correct DWC USB3 compatible string
  arc: dts: Harmonize EHCI/OHCI DT nodes name
  arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name
  powerpc: dts: akebono: Harmonize EHCI/OHCI 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
  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/keystone-k2e.dtsi          | 6 +++---
 arch/arm/boot/dts/keystone.dtsi              | 4 ++--
 arch/arm/boot/dts/lpc18xx.dtsi               | 4 ++--
 arch/arm/boot/dts/ls1021a.dtsi               | 2 +-
 arch/arm/boot/dts/stih407-family.dtsi        | 2 +-
 arch/arm64/boot/dts/apm/apm-shadowcat.dtsi   | 4 ++--
 arch/arm64/boot/dts/apm/apm-storm.dtsi       | 6 +++---
 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/powerpc/boot/dts/akebono.dts            | 6 +++---
 drivers/usb/dwc3/dwc3-qcom.c                 | 3 ++-
 23 files changed, 42 insertions(+), 41 deletions(-)

-- 
2.30.0


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

* [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 17:28 [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name Serge Semin
@ 2021-02-10 17:28 ` Serge Semin
  2021-02-10 18:17   ` Rob Herring
  2021-02-10 17:28 ` [PATCH v6 10/10] arm64: dts: qcom: Harmonize DWC USB3 DT nodes name Serge Semin
  2021-02-10 18:21 ` [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 " Florian Fainelli
  2 siblings, 1 reply; 14+ messages in thread
From: Serge Semin @ 2021-02-10 17:28 UTC (permalink / raw)
  To: Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Rob Herring, Greg Kroah-Hartman, Andy Gross
  Cc: linux-usb, linux-arm-msm, linux-kernel

In accordance with the USB HCD/DRD schema all the USB controllers are
supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
existing DT-nodes will be renamed in a subsequent patch let's first make
sure the DWC3 Qualcomm driver supports them and second falls back to the
deprecated naming so not to fail on the legacy DTS-files passed to the
newer kernels.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index c703d552bbcf..49ad8d507d37 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
 	struct device		*dev = &pdev->dev;
 	int			ret;
 
-	dwc3_np = of_get_child_by_name(np, "dwc3");
+	dwc3_np = of_get_child_by_name(np, "usb") ?:
+		  of_get_child_by_name(np, "dwc3");
 	if (!dwc3_np) {
 		dev_err(dev, "failed to find dwc3 core child\n");
 		return -ENODEV;
-- 
2.30.0


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

* [PATCH v6 10/10] arm64: dts: qcom: Harmonize DWC USB3 DT nodes name
  2021-02-10 17:28 [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name Serge Semin
  2021-02-10 17:28 ` [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin
@ 2021-02-10 17:28 ` Serge Semin
  2021-02-10 18:21 ` [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 " Florian Fainelli
  2 siblings, 0 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-10 17:28 UTC (permalink / raw)
  To: Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Rob Herring, Greg Kroah-Hartman, Andy Gross
  Cc: linux-usb, linux-arm-msm, devicetree, linux-kernel

In accordance with the DWC USB3 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 "snps,dwc3"-compatible nodes are correctly
named.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 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 +-
 9 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index defcbd15edf9..34e97da98270 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
@@ -1064,7 +1064,7 @@ &usb2 {
 	status = "okay";
 	extcon = <&usb2_id>;
 
-	dwc3@7600000 {
+	usb@7600000 {
 		extcon = <&usb2_id>;
 		dr_mode = "otg";
 		maximum-speed = "high-speed";
@@ -1075,7 +1075,7 @@ &usb3 {
 	status = "okay";
 	extcon = <&usb3_id>;
 
-	dwc3@6a00000 {
+	usb@6a00000 {
 		extcon = <&usb3_id>;
 		dr_mode = "otg";
 	};
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index a32e5e79ab0b..7df4eb710aae 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -427,7 +427,7 @@ usb_0: usb@8af8800 {
 			resets = <&gcc GCC_USB0_BCR>;
 			status = "disabled";
 
-			dwc_0: dwc3@8a00000 {
+			dwc_0: usb@8a00000 {
 				compatible = "snps,dwc3";
 				reg = <0x8a00000 0xcd00>;
 				interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
@@ -468,7 +468,7 @@ usb_1: usb@8cf8800 {
 			resets = <&gcc GCC_USB1_BCR>;
 			status = "disabled";
 
-			dwc_1: dwc3@8c00000 {
+			dwc_1: usb@8c00000 {
 				compatible = "snps,dwc3";
 				reg = <0x8c00000 0xcd00>;
 				interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 7eef07e73e25..374bb7b557e4 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -1768,7 +1768,7 @@ usb3: usb@6af8800 {
 			power-domains = <&gcc USB30_GDSC>;
 			status = "disabled";
 
-			dwc3@6a00000 {
+			usb@6a00000 {
 				compatible = "snps,dwc3";
 				reg = <0x06a00000 0xcc00>;
 				interrupts = <0 131 IRQ_TYPE_LEVEL_HIGH>;
@@ -1979,7 +1979,7 @@ usb2: usb@76f8800 {
 			power-domains = <&gcc USB30_GDSC>;
 			status = "disabled";
 
-			dwc3@7600000 {
+			usb@7600000 {
 				compatible = "snps,dwc3";
 				reg = <0x07600000 0xcc00>;
 				interrupts = <0 138 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index ebdaaf1dfca4..1a7fb9d3ccab 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -1678,7 +1678,7 @@ usb3: usb@a8f8800 {
 
 			resets = <&gcc GCC_USB_30_BCR>;
 
-			usb3_dwc3: dwc3@a800000 {
+			usb3_dwc3: usb@a800000 {
 				compatible = "snps,dwc3";
 				reg = <0x0a800000 0xcd00>;
 				interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi b/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi
index a80c578484ba..f8a55307b855 100644
--- a/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404-evb.dtsi
@@ -337,7 +337,7 @@ &usb2_phy_sec {
 &usb3 {
 	status = "okay";
 
-	dwc3@7580000 {
+	usb@7580000 {
 		dr_mode = "host";
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index 339790ba585d..9c4be020d568 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -544,7 +544,7 @@ usb3: usb@7678800 {
 			assigned-clock-rates = <19200000>, <200000000>;
 			status = "disabled";
 
-			dwc3@7580000 {
+			usb@7580000 {
 				compatible = "snps,dwc3";
 				reg = <0x07580000 0xcd00>;
 				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
@@ -573,7 +573,7 @@ usb2: usb@79b8800 {
 			assigned-clock-rates = <19200000>, <133333333>;
 			status = "disabled";
 
-			dwc3@78c0000 {
+			usb@78c0000 {
 				compatible = "snps,dwc3";
 				reg = <0x078c0000 0xcc00>;
 				interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 22b832fc62e3..347a98ba12e0 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -2855,7 +2855,7 @@ usb_1: usb@a6f8800 {
 					<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3 0>;
 			interconnect-names = "usb-ddr", "apps-usb";
 
-			usb_1_dwc3: dwc3@a600000 {
+			usb_1_dwc3: usb@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xe000>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index bcf888381f14..2133e58776d1 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -3771,7 +3771,7 @@ usb_1: usb@a6f8800 {
 					<&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_0 0>;
 			interconnect-names = "usb-ddr", "apps-usb";
 
-			usb_1_dwc3: dwc3@a600000 {
+			usb_1_dwc3: usb@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
@@ -3819,7 +3819,7 @@ usb_2: usb@a8f8800 {
 					<&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_1 0>;
 			interconnect-names = "usb-ddr", "apps-usb";
 
-			usb_2_dwc3: dwc3@a800000 {
+			usb_2_dwc3: usb@a800000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a800000 0 0xcd00>;
 				interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 5270bda7418f..45007621e09c 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1562,7 +1562,7 @@ usb_1: usb@a6f8800 {
 
 			resets = <&gcc GCC_USB30_PRIM_BCR>;
 
-			usb_1_dwc3: dwc3@a600000 {
+			usb_1_dwc3: usb@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.30.0


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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 17:28 ` [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin
@ 2021-02-10 18:17   ` Rob Herring
  2021-02-10 18:40     ` Serge Semin
  0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2021-02-10 18:17 UTC (permalink / raw)
  To: Serge Semin
  Cc: Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
<Sergey.Semin@baikalelectronics.ru> wrote:
>
> In accordance with the USB HCD/DRD schema all the USB controllers are
> supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> existing DT-nodes will be renamed in a subsequent patch let's first make
> sure the DWC3 Qualcomm driver supports them and second falls back to the
> deprecated naming so not to fail on the legacy DTS-files passed to the
> newer kernels.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index c703d552bbcf..49ad8d507d37 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
>         struct device           *dev = &pdev->dev;
>         int                     ret;
>
> -       dwc3_np = of_get_child_by_name(np, "dwc3");
> +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> +                 of_get_child_by_name(np, "dwc3");

Is there some reason using compatible instead wouldn't work here?

Rob

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

* Re: [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name
  2021-02-10 17:28 [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name Serge Semin
  2021-02-10 17:28 ` [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin
  2021-02-10 17:28 ` [PATCH v6 10/10] arm64: dts: qcom: Harmonize DWC USB3 DT nodes name Serge Semin
@ 2021-02-10 18:21 ` Florian Fainelli
  2021-02-10 18:43   ` Serge Semin
  2 siblings, 1 reply; 14+ messages in thread
From: Florian Fainelli @ 2021-02-10 18:21 UTC (permalink / raw)
  To: Serge Semin, Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Rob Herring, Greg Kroah-Hartman
  Cc: linux-usb, Vineet Gupta, Rafal Milecki, Wei Xu,
	Thomas Bogendoerfer, Michael Ellerman, Jason Cooper,
	Santosh Shilimkar, Shawn Guo, Benoit Cousson, Patrice Chotard,
	Maxime Ripard, Khuong Dinh, Andy Gross, Alexey Brodkin,
	Hauke Mehrtens, Maxime Coquelin, Alexandre Torgue,
	Amelie Delaunay, Vladimir Zapolskiy, Paul Cercueil,
	Matthias Brugger, Benjamin Herrenschmidt, Paul Mackerras,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Kukjin Kim,
	Li Yang, Tony Lindgren, Chen-Yu Tsai, Jun Li, linux-snps-arc,
	bcm-kernel-feedback-list, linux-stm32, linux-arm-kernel,
	linux-mips, linux-mediatek, linuxppc-dev, linux-samsung-soc,
	linux-omap, linux-arm-msm, devicetree, linux-kernel

On 2/10/21 9:28 AM, Serge Semin wrote:
> 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.
> 
> Link: https://lore.kernel.org/linux-usb/20201020115959.2658-1-Sergey.Semin@baikalelectronics.ru
> 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.
> 
> Link: https://lore.kernel.org/linux-usb/20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru
> Changelog v3:
> - Drop the patches:
>   [PATCH v2 04/18] arm: dts: hisi-x5hd2: Harmonize EHCI/OHCI DT nodes name
>   [PATCH v2 06/18] arm64: dts: hisi: Harmonize EHCI/OHCI DT nodes name
>   [PATCH v2 07/18] mips: dts: jz47x: Harmonize EHCI/OHCI DT nodes name
>   [PATCH v2 08/18] mips: dts: sead3: Harmonize EHCI/OHCI DT nodes name
>   [PATCH v2 09/18] mips: dts: ralink: mt7628a: Harmonize EHCI/OHCI DT nodes name
>   [PATCH v2 11/18] arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name
>   [PATCH v2 12/18] arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name
>   [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
>   since they have been applied to the corresponding maintainers repos.
> 
> Link: https://lore.kernel.org/linux-usb/20201205155621.3045-1-Sergey.Semin@baikalelectronics.ru
> Changelog v4:
> - Just resend.
> 
> Link: https://lore.kernel.org/linux-usb/20201210091756.18057-1-Sergey.Semin@baikalelectronics.ru/
> Changelog v5:
> - Drop the patch:
>   [PATCH v4 02/10] arm64: dts: amlogic: meson-g12: Set FL-adj property value
>   since it has been applied to the corresponding maintainers repos.
> - Get back the patch:
>   [PATCH 21/29] arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
>   as it has been missing in the kernel 5.11-rc7
> - Rebase onto the kernel 5.11-rc7
> 
> Link: https://lore.kernel.org/lkml/20210208135154.6645-1-Sergey.Semin@baikalelectronics.ru/
> Changelog v6:
> - Just resend and add linux-usb.vger.kernel.org to the list of Ccecipients.


If this needs to go on, can you drop the people who already took your
patches (trying to lower my email amount to something manageable).
Thank you.
-- 
Florian

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 18:17   ` Rob Herring
@ 2021-02-10 18:40     ` Serge Semin
  2021-02-10 18:56       ` Bjorn Andersson
  2021-02-10 18:59       ` Rob Herring
  0 siblings, 2 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-10 18:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Serge Semin, Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> <Sergey.Semin@baikalelectronics.ru> wrote:
> >
> > In accordance with the USB HCD/DRD schema all the USB controllers are
> > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > existing DT-nodes will be renamed in a subsequent patch let's first make
> > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > deprecated naming so not to fail on the legacy DTS-files passed to the
> > newer kernels.
> >
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > ---
> >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > index c703d552bbcf..49ad8d507d37 100644
> > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> >         struct device           *dev = &pdev->dev;
> >         int                     ret;
> >
> > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > +                 of_get_child_by_name(np, "dwc3");
> 

> Is there some reason using compatible instead wouldn't work here?

I don't know for sure. The fix has been requested in the framework of
this discussion:
https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
by the driver maintainer Bjorn. To get a firm answer it's better to
have him asked. As I see it having of_get_compatible_child() utilized
here would also work. At least for the available in kernel dt-files.
See the affected dts-es in:
https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/

A problem may happen if some older versions of DTS-es had another
compatible string in the dwc3 sub-node...

-Sergey

> 
> Rob

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

* Re: [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name
  2021-02-10 18:21 ` [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 " Florian Fainelli
@ 2021-02-10 18:43   ` Serge Semin
  0 siblings, 0 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-10 18:43 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Serge Semin, Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Rob Herring, Greg Kroah-Hartman, linux-usb, Vineet Gupta,
	Rafal Milecki, Wei Xu, Thomas Bogendoerfer, Michael Ellerman,
	Jason Cooper, Santosh Shilimkar, Shawn Guo, Benoit Cousson,
	Patrice Chotard, Maxime Ripard, Khuong Dinh, Andy Gross,
	Alexey Brodkin, Hauke Mehrtens, Maxime Coquelin,
	Alexandre Torgue, Amelie Delaunay, Vladimir Zapolskiy,
	Paul Cercueil, Matthias Brugger, Benjamin Herrenschmidt,
	Paul Mackerras, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Kukjin Kim, Li Yang, Tony Lindgren,
	Chen-Yu Tsai, Jun Li, linux-snps-arc, bcm-kernel-feedback-list,
	linux-stm32, linux-arm-kernel, linux-mips, linux-mediatek,
	linuxppc-dev, linux-samsung-soc, linux-omap, linux-arm-msm,
	devicetree, linux-kernel

On Wed, Feb 10, 2021 at 10:21:47AM -0800, Florian Fainelli wrote:
> On 2/10/21 9:28 AM, Serge Semin wrote:
> > 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.
> > 
> > Link: https://lore.kernel.org/linux-usb/20201020115959.2658-1-Sergey.Semin@baikalelectronics.ru
> > 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.
> > 
> > Link: https://lore.kernel.org/linux-usb/20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru
> > Changelog v3:
> > - Drop the patches:
> >   [PATCH v2 04/18] arm: dts: hisi-x5hd2: Harmonize EHCI/OHCI DT nodes name
> >   [PATCH v2 06/18] arm64: dts: hisi: Harmonize EHCI/OHCI DT nodes name
> >   [PATCH v2 07/18] mips: dts: jz47x: Harmonize EHCI/OHCI DT nodes name
> >   [PATCH v2 08/18] mips: dts: sead3: Harmonize EHCI/OHCI DT nodes name
> >   [PATCH v2 09/18] mips: dts: ralink: mt7628a: Harmonize EHCI/OHCI DT nodes name
> >   [PATCH v2 11/18] arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name
> >   [PATCH v2 12/18] arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name
> >   [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
> >   since they have been applied to the corresponding maintainers repos.
> > 
> > Link: https://lore.kernel.org/linux-usb/20201205155621.3045-1-Sergey.Semin@baikalelectronics.ru
> > Changelog v4:
> > - Just resend.
> > 
> > Link: https://lore.kernel.org/linux-usb/20201210091756.18057-1-Sergey.Semin@baikalelectronics.ru/
> > Changelog v5:
> > - Drop the patch:
> >   [PATCH v4 02/10] arm64: dts: amlogic: meson-g12: Set FL-adj property value
> >   since it has been applied to the corresponding maintainers repos.
> > - Get back the patch:
> >   [PATCH 21/29] arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
> >   as it has been missing in the kernel 5.11-rc7
> > - Rebase onto the kernel 5.11-rc7
> > 
> > Link: https://lore.kernel.org/lkml/20210208135154.6645-1-Sergey.Semin@baikalelectronics.ru/
> > Changelog v6:
> > - Just resend and add linux-usb.vger.kernel.org to the list of Ccecipients.
> 
> 

> If this needs to go on, can you drop the people who already took your
> patches (trying to lower my email amount to something manageable).
> Thank you.

Ah, sorry for the noise. I'll clean the Cc-list up in the next attempt
to have this finally fully accepted.

-Sergey

> -- 
> Florian

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 18:40     ` Serge Semin
@ 2021-02-10 18:56       ` Bjorn Andersson
  2021-02-10 19:33         ` Serge Semin
  2021-02-10 18:59       ` Rob Herring
  1 sibling, 1 reply; 14+ messages in thread
From: Bjorn Andersson @ 2021-02-10 18:56 UTC (permalink / raw)
  To: Serge Semin
  Cc: Rob Herring, Serge Semin, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:

> On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > <Sergey.Semin@baikalelectronics.ru> wrote:
> > >
> > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > newer kernels.
> > >
> > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > ---
> > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > index c703d552bbcf..49ad8d507d37 100644
> > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > >         struct device           *dev = &pdev->dev;
> > >         int                     ret;
> > >
> > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > +                 of_get_child_by_name(np, "dwc3");
> > 
> 
> > Is there some reason using compatible instead wouldn't work here?
> 
> I don't know for sure. The fix has been requested in the framework of
> this discussion:
> https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> by the driver maintainer Bjorn. To get a firm answer it's better to
> have him asked.

My feedback was simply that it has to catch both cases, I didn't
consider the fact that we have a compatible to match against.

> As I see it having of_get_compatible_child() utilized
> here would also work. At least for the available in kernel dt-files.
> See the affected dts-es in:
> https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> 
> A problem may happen if some older versions of DTS-es had another
> compatible string in the dwc3 sub-node...
> 

Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
that instead.

Regards,
Bjorn

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 18:40     ` Serge Semin
  2021-02-10 18:56       ` Bjorn Andersson
@ 2021-02-10 18:59       ` Rob Herring
  1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2021-02-10 18:59 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Felipe Balbi, Bjorn Andersson, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed, Feb 10, 2021 at 12:40 PM Serge Semin
<Sergey.Semin@baikalelectronics.ru> wrote:
>
> On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > <Sergey.Semin@baikalelectronics.ru> wrote:
> > >
> > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > newer kernels.
> > >
> > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > ---
> > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > index c703d552bbcf..49ad8d507d37 100644
> > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > >         struct device           *dev = &pdev->dev;
> > >         int                     ret;
> > >
> > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > +                 of_get_child_by_name(np, "dwc3");
> >
>
> > Is there some reason using compatible instead wouldn't work here?
>
> I don't know for sure. The fix has been requested in the framework of
> this discussion:
> https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> by the driver maintainer Bjorn. To get a firm answer it's better to
> have him asked. As I see it having of_get_compatible_child() utilized
> here would also work. At least for the available in kernel dt-files.
> See the affected dts-es in:
> https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
>
> A problem may happen if some older versions of DTS-es had another
> compatible string in the dwc3 sub-node...

I guess there's some 'synopsys,dwc3' too, but looking at 2 compatibles
is better than looking at 2 node names. We try to not care what node
names are generally.

Rob

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 18:56       ` Bjorn Andersson
@ 2021-02-10 19:33         ` Serge Semin
  2021-02-12 17:33           ` Serge Semin
  2021-02-12 17:49           ` Bjorn Andersson
  0 siblings, 2 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-10 19:33 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Serge Semin, Rob Herring, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed, Feb 10, 2021 at 12:56:59PM -0600, Bjorn Andersson wrote:
> On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:
> 
> > On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > > <Sergey.Semin@baikalelectronics.ru> wrote:
> > > >
> > > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > > newer kernels.
> > > >
> > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > > ---
> > > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > > index c703d552bbcf..49ad8d507d37 100644
> > > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > > >         struct device           *dev = &pdev->dev;
> > > >         int                     ret;
> > > >
> > > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > > +                 of_get_child_by_name(np, "dwc3");
> > > 
> > 
> > > Is there some reason using compatible instead wouldn't work here?
> > 
> > I don't know for sure. The fix has been requested in the framework of
> > this discussion:
> > https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> > by the driver maintainer Bjorn. To get a firm answer it's better to
> > have him asked.
> 
> My feedback was simply that it has to catch both cases, I didn't
> consider the fact that we have a compatible to match against.
> 
> > As I see it having of_get_compatible_child() utilized
> > here would also work. At least for the available in kernel dt-files.
> > See the affected dts-es in:
> > https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> > 
> > A problem may happen if some older versions of DTS-es had another
> > compatible string in the dwc3 sub-node...
> > 
> 
> Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
> that instead.

Ok then. I'll replace of_get_child_by_name() here with
of_get_compatible_child() matching just against "snps,dwc3" in v7. Can you
confirm that noone ever had a Qcom-based hardware described with dts having
the "synopsys,dwc3" compatible used as the DWC USB3 sub-node here? That
string has been marked as deprecated recently because the vendor-prefix
was changed sometime ago, but the original driver still accept it.

Alternatively to be on a safe side we could match against both
compatibles here as Rob suggests. What do you think?

-Sergey

> 
> Regards,
> Bjorn

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 19:33         ` Serge Semin
@ 2021-02-12 17:33           ` Serge Semin
  2021-02-12 18:01             ` Bjorn Andersson
  2021-02-12 17:49           ` Bjorn Andersson
  1 sibling, 1 reply; 14+ messages in thread
From: Serge Semin @ 2021-02-12 17:33 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Serge Semin, Rob Herring, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed, Feb 10, 2021 at 10:33:26PM +0300, Serge Semin wrote:
> On Wed, Feb 10, 2021 at 12:56:59PM -0600, Bjorn Andersson wrote:
> > On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:
> > 
> > > On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > > > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > > > <Sergey.Semin@baikalelectronics.ru> wrote:
> > > > >
> > > > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > > > newer kernels.
> > > > >
> > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > > > ---
> > > > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > index c703d552bbcf..49ad8d507d37 100644
> > > > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > > > >         struct device           *dev = &pdev->dev;
> > > > >         int                     ret;
> > > > >
> > > > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > > > +                 of_get_child_by_name(np, "dwc3");
> > > > 
> > > 
> > > > Is there some reason using compatible instead wouldn't work here?
> > > 
> > > I don't know for sure. The fix has been requested in the framework of
> > > this discussion:
> > > https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> > > by the driver maintainer Bjorn. To get a firm answer it's better to
> > > have him asked.
> > 
> > My feedback was simply that it has to catch both cases, I didn't
> > consider the fact that we have a compatible to match against.
> > 
> > > As I see it having of_get_compatible_child() utilized
> > > here would also work. At least for the available in kernel dt-files.
> > > See the affected dts-es in:
> > > https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> > > 
> > > A problem may happen if some older versions of DTS-es had another
> > > compatible string in the dwc3 sub-node...
> > > 
> > 
> > Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
> > that instead.
> 
> Ok then. I'll replace of_get_child_by_name() here with
> of_get_compatible_child() matching just against "snps,dwc3" in v7. Can you
> confirm that noone ever had a Qcom-based hardware described with dts having
> the "synopsys,dwc3" compatible used as the DWC USB3 sub-node here? That
> string has been marked as deprecated recently because the vendor-prefix
> was changed sometime ago, but the original driver still accept it.
> 
> Alternatively to be on a safe side we could match against both
> compatibles here as Rob suggests. What do you think?

Bjorn, any comment on the question above? So I could respin the series
with this patch updated.

Also note, since the patch's gonna be changed I'll have to remove your
Reviewed-by tag unless u explicitly say I shouldn't.

-Sergey

> 
> -Sergey
> 
> > 
> > Regards,
> > Bjorn

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-10 19:33         ` Serge Semin
  2021-02-12 17:33           ` Serge Semin
@ 2021-02-12 17:49           ` Bjorn Andersson
  2021-02-12 19:51             ` Serge Semin
  1 sibling, 1 reply; 14+ messages in thread
From: Bjorn Andersson @ 2021-02-12 17:49 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Rob Herring, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Wed 10 Feb 13:33 CST 2021, Serge Semin wrote:

> On Wed, Feb 10, 2021 at 12:56:59PM -0600, Bjorn Andersson wrote:
> > On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:
> > 
> > > On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > > > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > > > <Sergey.Semin@baikalelectronics.ru> wrote:
> > > > >
> > > > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > > > newer kernels.
> > > > >
> > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > > > ---
> > > > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > index c703d552bbcf..49ad8d507d37 100644
> > > > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > > > >         struct device           *dev = &pdev->dev;
> > > > >         int                     ret;
> > > > >
> > > > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > > > +                 of_get_child_by_name(np, "dwc3");
> > > > 
> > > 
> > > > Is there some reason using compatible instead wouldn't work here?
> > > 
> > > I don't know for sure. The fix has been requested in the framework of
> > > this discussion:
> > > https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> > > by the driver maintainer Bjorn. To get a firm answer it's better to
> > > have him asked.
> > 
> > My feedback was simply that it has to catch both cases, I didn't
> > consider the fact that we have a compatible to match against.
> > 
> > > As I see it having of_get_compatible_child() utilized
> > > here would also work. At least for the available in kernel dt-files.
> > > See the affected dts-es in:
> > > https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> > > 
> > > A problem may happen if some older versions of DTS-es had another
> > > compatible string in the dwc3 sub-node...
> > > 
> > 
> > Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
> > that instead.
> 
> Ok then. I'll replace of_get_child_by_name() here with
> of_get_compatible_child() matching just against "snps,dwc3" in v7. Can you
> confirm that noone ever had a Qcom-based hardware described with dts having
> the "synopsys,dwc3" compatible used as the DWC USB3 sub-node here? That
> string has been marked as deprecated recently because the vendor-prefix
> was changed sometime ago, but the original driver still accept it.
> 

I don't see any Qualcomm users of "synopsys,dwc3", past or present.

> Alternatively to be on a safe side we could match against both
> compatibles here as Rob suggests. What do you think?
> 

Let's go with only "snps,dwc3".

Regards,
Bjorn

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-12 17:33           ` Serge Semin
@ 2021-02-12 18:01             ` Bjorn Andersson
  0 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2021-02-12 18:01 UTC (permalink / raw)
  To: Serge Semin
  Cc: Serge Semin, Rob Herring, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Fri 12 Feb 11:33 CST 2021, Serge Semin wrote:

> On Wed, Feb 10, 2021 at 10:33:26PM +0300, Serge Semin wrote:
> > On Wed, Feb 10, 2021 at 12:56:59PM -0600, Bjorn Andersson wrote:
> > > On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:
> > > 
> > > > On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > > > > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > > > > <Sergey.Semin@baikalelectronics.ru> wrote:
> > > > > >
> > > > > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > > > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > > > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > > > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > > > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > > > > newer kernels.
> > > > > >
> > > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > > > > ---
> > > > > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > index c703d552bbcf..49ad8d507d37 100644
> > > > > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > > > > >         struct device           *dev = &pdev->dev;
> > > > > >         int                     ret;
> > > > > >
> > > > > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > > > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > > > > +                 of_get_child_by_name(np, "dwc3");
> > > > > 
> > > > 
> > > > > Is there some reason using compatible instead wouldn't work here?
> > > > 
> > > > I don't know for sure. The fix has been requested in the framework of
> > > > this discussion:
> > > > https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> > > > by the driver maintainer Bjorn. To get a firm answer it's better to
> > > > have him asked.
> > > 
> > > My feedback was simply that it has to catch both cases, I didn't
> > > consider the fact that we have a compatible to match against.
> > > 
> > > > As I see it having of_get_compatible_child() utilized
> > > > here would also work. At least for the available in kernel dt-files.
> > > > See the affected dts-es in:
> > > > https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> > > > 
> > > > A problem may happen if some older versions of DTS-es had another
> > > > compatible string in the dwc3 sub-node...
> > > > 
> > > 
> > > Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
> > > that instead.
> > 
> > Ok then. I'll replace of_get_child_by_name() here with
> > of_get_compatible_child() matching just against "snps,dwc3" in v7. Can you
> > confirm that noone ever had a Qcom-based hardware described with dts having
> > the "synopsys,dwc3" compatible used as the DWC USB3 sub-node here? That
> > string has been marked as deprecated recently because the vendor-prefix
> > was changed sometime ago, but the original driver still accept it.
> > 
> > Alternatively to be on a safe side we could match against both
> > compatibles here as Rob suggests. What do you think?
> 
> Bjorn, any comment on the question above? So I could respin the series
> with this patch updated.
> 
> Also note, since the patch's gonna be changed I'll have to remove your
> Reviewed-by tag unless u explicitly say I shouldn't.
> 

Sounds good, I'd be happy to review the new patch.

PS. As this only affect the Qualcomm part of the series I would suggest
that you send these patches off separate and don't send all 10 patches
together.

Thanks,
Bjorn

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

* Re: [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names
  2021-02-12 17:49           ` Bjorn Andersson
@ 2021-02-12 19:51             ` Serge Semin
  0 siblings, 0 replies; 14+ messages in thread
From: Serge Semin @ 2021-02-12 19:51 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Serge Semin, Rob Herring, Felipe Balbi, Krzysztof Kozlowski,
	Florian Fainelli, Greg Kroah-Hartman, Andy Gross, Linux USB List,
	linux-arm-msm, linux-kernel

On Fri, Feb 12, 2021 at 11:49:15AM -0600, Bjorn Andersson wrote:
> On Wed 10 Feb 13:33 CST 2021, Serge Semin wrote:
> 
> > On Wed, Feb 10, 2021 at 12:56:59PM -0600, Bjorn Andersson wrote:
> > > On Wed 10 Feb 12:40 CST 2021, Serge Semin wrote:
> > > 
> > > > On Wed, Feb 10, 2021 at 12:17:27PM -0600, Rob Herring wrote:
> > > > > On Wed, Feb 10, 2021 at 11:29 AM Serge Semin
> > > > > <Sergey.Semin@baikalelectronics.ru> wrote:
> > > > > >
> > > > > > In accordance with the USB HCD/DRD schema all the USB controllers are
> > > > > > supposed to have DT-nodes named with prefix "^usb(@.*)?".  Since the
> > > > > > existing DT-nodes will be renamed in a subsequent patch let's first make
> > > > > > sure the DWC3 Qualcomm driver supports them and second falls back to the
> > > > > > deprecated naming so not to fail on the legacy DTS-files passed to the
> > > > > > newer kernels.
> > > > > >
> > > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > > > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > > > > ---
> > > > > >  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> > > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > index c703d552bbcf..49ad8d507d37 100644
> > > > > > --- a/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > +++ b/drivers/usb/dwc3/dwc3-qcom.c
> > > > > > @@ -630,7 +630,8 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
> > > > > >         struct device           *dev = &pdev->dev;
> > > > > >         int                     ret;
> > > > > >
> > > > > > -       dwc3_np = of_get_child_by_name(np, "dwc3");
> > > > > > +       dwc3_np = of_get_child_by_name(np, "usb") ?:
> > > > > > +                 of_get_child_by_name(np, "dwc3");
> > > > > 
> > > > 
> > > > > Is there some reason using compatible instead wouldn't work here?
> > > > 
> > > > I don't know for sure. The fix has been requested in the framework of
> > > > this discussion:
> > > > https://lore.kernel.org/linux-usb/20201020115959.2658-30-Sergey.Semin@baikalelectronics.ru/#t
> > > > by the driver maintainer Bjorn. To get a firm answer it's better to
> > > > have him asked.
> > > 
> > > My feedback was simply that it has to catch both cases, I didn't
> > > consider the fact that we have a compatible to match against.
> > > 
> > > > As I see it having of_get_compatible_child() utilized
> > > > here would also work. At least for the available in kernel dt-files.
> > > > See the affected dts-es in:
> > > > https://lore.kernel.org/linux-usb/20210210172850.20849-11-Sergey.Semin@baikalelectronics.ru/
> > > > 
> > > > A problem may happen if some older versions of DTS-es had another
> > > > compatible string in the dwc3 sub-node...
> > > > 
> > > 
> > > Afaict all Qualcomm dts files has "snps,dwc3", so you can match against
> > > that instead.
> > 
> > Ok then. I'll replace of_get_child_by_name() here with
> > of_get_compatible_child() matching just against "snps,dwc3" in v7. Can you
> > confirm that noone ever had a Qcom-based hardware described with dts having
> > the "synopsys,dwc3" compatible used as the DWC USB3 sub-node here? That
> > string has been marked as deprecated recently because the vendor-prefix
> > was changed sometime ago, but the original driver still accept it.
> > 
> 
> I don't see any Qualcomm users of "synopsys,dwc3", past or present.
> 
> > Alternatively to be on a safe side we could match against both
> > compatibles here as Rob suggests. What do you think?
> > 
> 
> Let's go with only "snps,dwc3".

Ok. Thanks. I'll resend just two patches in ten minutes.

-Sergey

> 
> Regards,
> Bjorn

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

end of thread, other threads:[~2021-02-12 19:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 17:28 [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name Serge Semin
2021-02-10 17:28 ` [PATCH v6 09/10] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin
2021-02-10 18:17   ` Rob Herring
2021-02-10 18:40     ` Serge Semin
2021-02-10 18:56       ` Bjorn Andersson
2021-02-10 19:33         ` Serge Semin
2021-02-12 17:33           ` Serge Semin
2021-02-12 18:01             ` Bjorn Andersson
2021-02-12 17:49           ` Bjorn Andersson
2021-02-12 19:51             ` Serge Semin
2021-02-10 18:59       ` Rob Herring
2021-02-10 17:28 ` [PATCH v6 10/10] arm64: dts: qcom: Harmonize DWC USB3 DT nodes name Serge Semin
2021-02-10 18:21 ` [PATCH RESEND v6 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 " Florian Fainelli
2021-02-10 18:43   ` 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).