2020-10-20 12:04:41

by Serge Semin

[permalink] [raw]
Subject: [PATCH 00/29] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name

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 removed 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 the controller driver and
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/[email protected]/
Changelog v0:
- 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.

Cc: Vineet Gupta <[email protected]>
Cc: Rafal Milecki <[email protected]>
Cc: Wei Xu <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Khuong Dinh <[email protected]>
Cc: Andy Gross <[email protected]>
Cc: Alexey Brodkin <[email protected]>
Cc: Hauke Mehrtens <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Amelie Delaunay <[email protected]>
Cc: Vladimir Zapolskiy <[email protected]>
Cc: Paul Cercueil <[email protected]>
Cc: Matthias Brugger <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Gregory Clement <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Bjorn Andersson <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Serge Semin (29):
usb: dwc3: Discard synopsys,dwc3 compatibility string
arm: dts: keystone: Correct DWC USB3 compatible string
arm: dts: am437x: Correct DWC USB3 compatible string
arm: dts: exynos: 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: bcm53x: Harmonize EHCI/OHCI DT nodes name
arm: dts: stm32: 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
arm: dts: bcm5301x: Harmonize xHCI 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: exynos: Harmonize DWC USB3 DT nodes name
arm: dts: keystone: Harmonize DWC USB3 DT nodes name
arm: dts: ls1021a: Harmonize DWC USB3 DT nodes name
arm: dts: omap5: Harmonize DWC USB3 DT nodes name
arm: dts: stih407-family: Harmonize DWC USB3 DT nodes name
arm64: dts: allwinner: h6: Harmonize DWC USB3 DT nodes name
arm64: dts: apm: Harmonize DWC USB3 DT nodes name
arm64: dts: exynos: Harmonize DWC USB3 DT nodes name
arm64: dts: layerscape: Harmonize DWC USB3 DT nodes name
arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name
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/am437x-l4.dtsi | 4 ++--
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 | 4 ++--
arch/arm/boot/dts/exynos54xx.dtsi | 4 ++--
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/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/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/exynos/exynos5433.dtsi | 4 ++--
arch/arm64/boot/dts/exynos/exynos7.dtsi | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 4 ++--
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 6 +++---
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 4 ++--
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 4 ++--
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/core.c | 3 ---
49 files changed, 84 insertions(+), 87 deletions(-)

--
2.27.0


2020-10-20 12:04:53

by Serge Semin

[permalink] [raw]
Subject: [PATCH 17/29] arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name

In accordance with the Generic xHCI 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-xhci"-compatible nodes are
correctly named.

Signed-off-by: Serge Semin <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
index 9dcf16beabf5..1e37ae181acf 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
@@ -275,7 +275,7 @@ CP11X_LABEL(thermal): thermal-sensor@70 {
};
};

- CP11X_LABEL(usb3_0): usb3@500000 {
+ CP11X_LABEL(usb3_0): usb@500000 {
compatible = "marvell,armada-8k-xhci",
"generic-xhci";
reg = <0x500000 0x4000>;
@@ -287,7 +287,7 @@ CP11X_LABEL(usb3_0): usb3@500000 {
status = "disabled";
};

- CP11X_LABEL(usb3_1): usb3@510000 {
+ CP11X_LABEL(usb3_1): usb@510000 {
compatible = "marvell,armada-8k-xhci",
"generic-xhci";
reg = <0x510000 0x4000>;
--
2.27.0

2020-10-20 12:05:02

by Serge Semin

[permalink] [raw]
Subject: [PATCH 08/29] arm: dts: stm32: Harmonize EHCI/OHCI DT nodes name

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 <[email protected]>
Acked-by: Amelie Delaunay <[email protected]>
---
arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index bfe29023fbd5..576f7da564c5 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -1404,7 +1404,7 @@ ethernet0: ethernet@5800a000 {
status = "disabled";
};

- usbh_ohci: usbh-ohci@5800c000 {
+ usbh_ohci: usb@5800c000 {
compatible = "generic-ohci";
reg = <0x5800c000 0x1000>;
clocks = <&rcc USBH>;
@@ -1413,7 +1413,7 @@ usbh_ohci: usbh-ohci@5800c000 {
status = "disabled";
};

- usbh_ehci: usbh-ehci@5800d000 {
+ usbh_ehci: usb@5800d000 {
compatible = "generic-ehci";
reg = <0x5800d000 0x1000>;
clocks = <&rcc USBH>;
--
2.27.0

2020-10-20 12:05:12

by Serge Semin

[permalink] [raw]
Subject: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

In accordance with the DWC USB3 bindings the property is supposed to have
uint32 type. It's erroneous from the DT schema and driver points of view
to declare it as boolean. As Neil suggested set it to 0x20 so not break
the platform and to make the dtbs checker happy.

Link: https://lore.kernel.org/linux-usb/[email protected]/
Signed-off-by: Serge Semin <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 1e83ec5b8c91..3033ab2be1ff 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -2380,7 +2380,7 @@ dwc3: usb@ff500000 {
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
dr_mode = "host";
snps,dis_u2_susphy_quirk;
- snps,quirk-frame-length-adjustment;
+ snps,quirk-frame-length-adjustment = <0x20>;
snps,parkmode-disable-ss-quirk;
};
};
--
2.27.0

2020-10-20 12:05:38

by Serge Semin

[permalink] [raw]
Subject: [PATCH 22/29] arm: dts: omap5: Harmonize DWC USB3 DT nodes name

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 <[email protected]>
---
arch/arm/boot/dts/omap5-l4.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap5-l4.dtsi b/arch/arm/boot/dts/omap5-l4.dtsi
index f3d3a16b7c64..887b3359dd5a 100644
--- a/arch/arm/boot/dts/omap5-l4.dtsi
+++ b/arch/arm/boot/dts/omap5-l4.dtsi
@@ -194,7 +194,7 @@ usb3: omap_dwc3@0 {
#size-cells = <1>;
utmi-mode = <2>;
ranges = <0 0 0x20000>;
- dwc3: dwc3@10000 {
+ dwc3: usb@10000 {
compatible = "snps,dwc3";
reg = <0x10000 0x10000>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
--
2.27.0

2020-10-20 12:05:57

by Serge Semin

[permalink] [raw]
Subject: [PATCH 15/29] powerpc: dts: akebono: Harmonize EHCI/OHCI DT nodes name

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 <[email protected]>
---
arch/powerpc/boot/dts/akebono.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/boot/dts/akebono.dts b/arch/powerpc/boot/dts/akebono.dts
index df18f8dc4642..343326c30380 100644
--- a/arch/powerpc/boot/dts/akebono.dts
+++ b/arch/powerpc/boot/dts/akebono.dts
@@ -126,7 +126,7 @@ SATA0: sata@30000010000 {
interrupts = <93 2>;
};

- EHCI0: ehci@30010000000 {
+ EHCI0: usb@30010000000 {
compatible = "ibm,476gtr-ehci", "generic-ehci";
reg = <0x300 0x10000000 0x0 0x10000>;
interrupt-parent = <&MPIC>;
@@ -140,14 +140,14 @@ SD0: sd@30000000000 {
interrupt-parent = <&MPIC>;
};

- OHCI0: ohci@30010010000 {
+ OHCI0: usb@30010010000 {
compatible = "ibm,476gtr-ohci", "generic-ohci";
reg = <0x300 0x10010000 0x0 0x10000>;
interrupt-parent = <&MPIC>;
interrupts = <89 1>;
};

- OHCI1: ohci@30010020000 {
+ OHCI1: usb@30010020000 {
compatible = "ibm,476gtr-ohci", "generic-ohci";
reg = <0x300 0x10020000 0x0 0x10000>;
interrupt-parent = <&MPIC>;
--
2.27.0

2020-10-20 12:06:01

by Serge Semin

[permalink] [raw]
Subject: [PATCH 03/29] arm: dts: am437x: Correct DWC USB3 compatible string

Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
Use it instead of the deprecated "synopsys" one.

Signed-off-by: Serge Semin <[email protected]>
---
arch/arm/boot/dts/am437x-l4.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
index 3d393fe252c6..59eeff217844 100644
--- a/arch/arm/boot/dts/am437x-l4.dtsi
+++ b/arch/arm/boot/dts/am437x-l4.dtsi
@@ -2386,7 +2386,7 @@ dwc3_1: omap_dwc3@0 {
ranges = <0 0 0x20000>;

usb1: usb@10000 {
- compatible = "synopsys,dwc3";
+ compatible = "snps,dwc3";
reg = <0x10000 0x10000>;
interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
@@ -2466,7 +2466,7 @@ dwc3_2: omap_dwc3@0 {
ranges = <0 0 0x20000>;

usb2: usb@10000 {
- compatible = "synopsys,dwc3";
+ compatible = "snps,dwc3";
reg = <0x10000 0x10000>;
interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
--
2.27.0

2020-10-20 12:06:57

by Serge Semin

[permalink] [raw]
Subject: [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string

Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
Discard a DW USB3 compatible string with the deprecated prefix seeing
one isn't used by any dts file anymore.

Signed-off-by: Serge Semin <[email protected]>
---
drivers/usb/dwc3/core.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 2eb34c8b4065..28440250e798 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1878,9 +1878,6 @@ static const struct of_device_id of_dwc3_match[] = {
{
.compatible = "snps,dwc3"
},
- {
- .compatible = "synopsys,dwc3"
- },
{ },
};
MODULE_DEVICE_TABLE(of, of_dwc3_match);
--
2.27.0

2020-10-20 12:06:58

by Serge Semin

[permalink] [raw]
Subject: [PATCH 10/29] arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name

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 <[email protected]>
---
arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
index 10b8249b8ab6..82ffd7b0ad8a 100644
--- a/arch/arm/boot/dts/lpc18xx.dtsi
+++ b/arch/arm/boot/dts/lpc18xx.dtsi
@@ -121,7 +121,7 @@ mmcsd: mmcsd@40004000 {
status = "disabled";
};

- usb0: ehci@40006100 {
+ usb0: usb@40006100 {
compatible = "nxp,lpc1850-ehci", "generic-ehci";
reg = <0x40006100 0x100>;
interrupts = <8>;
@@ -133,7 +133,7 @@ usb0: ehci@40006100 {
status = "disabled";
};

- usb1: ehci@40007100 {
+ usb1: usb@40007100 {
compatible = "nxp,lpc1850-ehci", "generic-ehci";
reg = <0x40007100 0x100>;
interrupts = <9>;
--
2.27.0

2020-10-20 12:07:54

by Serge Semin

[permalink] [raw]
Subject: [PATCH 04/29] arm: dts: exynos: Correct DWC USB3 compatible string

Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
Use it instead of the deprecated "synopsys" one.

Signed-off-by: Serge Semin <[email protected]>
---
arch/arm/boot/dts/exynos5250.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index e3dbe4166836..6daeba7d6b49 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -630,7 +630,7 @@ usb_dwc3 {
ranges;

usbdrd_dwc3: dwc3@12000000 {
- compatible = "synopsys,dwc3";
+ compatible = "snps,dwc3";
reg = <0x12000000 0x10000>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
phys = <&usbdrd_phy 0>, <&usbdrd_phy 1>;
--
2.27.0

2020-10-20 12:18:05

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string

On Tue, Oct 20, 2020 at 3:02 PM Serge Semin
<[email protected]> wrote:
>
> Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> Discard a DW USB3 compatible string with the deprecated prefix seeing
> one isn't used by any dts file anymore.

I'm afraid it's no go.
It's an ABI from the moment when the driver started supporting this
compatible string.

--
With Best Regards,
Andy Shevchenko

2020-10-20 12:29:55

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string


Hi,

Serge Semin <[email protected]> writes:
> Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> Discard a DW USB3 compatible string with the deprecated prefix seeing
> one isn't used by any dts file anymore.
>
> Signed-off-by: Serge Semin <[email protected]>
> ---
> drivers/usb/dwc3/core.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 2eb34c8b4065..28440250e798 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1878,9 +1878,6 @@ static const struct of_device_id of_dwc3_match[] = {
> {
> .compatible = "snps,dwc3"
> },
> - {
> - .compatible = "synopsys,dwc3"
> - },
> { },
> };
> MODULE_DEVICE_TABLE(of, of_dwc3_match);

sorry, no. You can't guarantee that there isn't a FW in ROM somewhere
using the old string.

--
balbi


Attachments:
signature.asc (873.00 B)

2020-10-20 12:30:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string

On Tue, Oct 20, 2020 at 03:15:06PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 20, 2020 at 3:02 PM Serge Semin
> <[email protected]> wrote:
> >
> > Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> > Discard a DW USB3 compatible string with the deprecated prefix seeing
> > one isn't used by any dts file anymore.
>
> I'm afraid it's no go.
> It's an ABI from the moment when the driver started supporting this
> compatible string.

Exactly.

Please mark the compatible as deprecated in bindings, correct the DTSes
and optionally after one or two years (or any time later) remove the
support for deprecated bindings.

Best regards,
Krzysztof

2020-10-20 12:35:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 03/29] arm: dts: am437x: Correct DWC USB3 compatible string

On Tue, Oct 20, 2020 at 02:59:33PM +0300, Serge Semin wrote:
> Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> Use it instead of the deprecated "synopsys" one.
>
> Signed-off-by: Serge Semin <[email protected]>
> ---
> arch/arm/boot/dts/am437x-l4.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-20 12:35:04

by Serge Semin

[permalink] [raw]
Subject: Re: [PATCH 01/29] usb: dwc3: Discard synopsys,dwc3 compatibility string

On Tue, Oct 20, 2020 at 02:28:01PM +0200, Krzysztof Kozlowski wrote:
> On Tue, Oct 20, 2020 at 03:15:06PM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 20, 2020 at 3:02 PM Serge Semin
> > <[email protected]> wrote:
> > >
> > > Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> > > Discard a DW USB3 compatible string with the deprecated prefix seeing
> > > one isn't used by any dts file anymore.
> >

> > I'm afraid it's no go.
> > It's an ABI from the moment when the driver started supporting this
> > compatible string.
>
> Exactly.
>
> Please mark the compatible as deprecated in bindings, correct the DTSes
> and optionally after one or two years (or any time later) remove the
> support for deprecated bindings.

Ok. I'll just get the original patch back then:
https://lore.kernel.org/linux-usb/[email protected]/T/#m0f92acafbd740e63b7156efac58850e0757d2110
and resend the series later after the rest of the patchset have been cooked
a bit.

-Sergey

>
> Best regards,
> Krzysztof
>

2020-10-20 12:40:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 08/29] arm: dts: stm32: Harmonize EHCI/OHCI DT nodes name

On Tue, Oct 20, 2020 at 02:59:38PM +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 <[email protected]>
> Acked-by: Amelie Delaunay <[email protected]>
> ---
> arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-20 12:43:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 17/29] arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name

On Tue, Oct 20, 2020 at 02:59:47PM +0300, Serge Semin wrote:
> In accordance with the Generic xHCI 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-xhci"-compatible nodes are
> correctly named.
>
> Signed-off-by: Serge Semin <[email protected]>
> ---
> arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-20 13:09:11

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

Hi Serge,

On 20/10/2020 13:59, Serge Semin wrote:
> In accordance with the DWC USB3 bindings the property is supposed to have
> uint32 type. It's erroneous from the DT schema and driver points of view
> to declare it as boolean. As Neil suggested set it to 0x20 so not break
> the platform and to make the dtbs checker happy.
>
> Link: https://lore.kernel.org/linux-usb/[email protected]/
> Signed-off-by: Serge Semin <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index 1e83ec5b8c91..3033ab2be1ff 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -2380,7 +2380,7 @@ dwc3: usb@ff500000 {
> interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
> dr_mode = "host";
> snps,dis_u2_susphy_quirk;
> - snps,quirk-frame-length-adjustment;
> + snps,quirk-frame-length-adjustment = <0x20>;
> snps,parkmode-disable-ss-quirk;
> };
> };
>

You were faster than me !

Reviewed-by: Neil Armstrong <[email protected]>

2020-10-21 01:19:35

by Serge Semin

[permalink] [raw]
Subject: [PATCH 07/29] arm: dts: bcm53x: Harmonize EHCI/OHCI DT nodes name

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 <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
---
arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 0016720ce530..bf5656d79a55 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -261,7 +261,7 @@ usb2: usb2@21000 {

interrupt-parent = <&gic>;

- ehci: ehci@21000 {
+ ehci: usb@21000 {
#usb-cells = <0>;

compatible = "generic-ehci";
@@ -283,7 +283,7 @@ ehci_port2: port@2 {
};
};

- ohci: ohci@22000 {
+ ohci: usb@22000 {
#usb-cells = <0>;

compatible = "generic-ohci";
diff --git a/arch/arm/boot/dts/bcm53573.dtsi b/arch/arm/boot/dts/bcm53573.dtsi
index 4af8e3293cff..51546fccc616 100644
--- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -135,7 +135,7 @@ usb2: usb2@4000 {
#address-cells = <1>;
#size-cells = <1>;

- ehci: ehci@4000 {
+ ehci: usb@4000 {
compatible = "generic-ehci";
reg = <0x4000 0x1000>;
interrupt-parent = <&gic>;
@@ -155,7 +155,7 @@ ehci_port2: port@2 {
};
};

- ohci: ohci@d000 {
+ ohci: usb@d000 {
#usb-cells = <0>;

compatible = "generic-ohci";
--
2.27.0

2020-10-21 02:38:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

On Tue, Oct 20, 2020 at 02:59:35PM +0300, Serge Semin wrote:
> In accordance with the DWC USB3 bindings the property is supposed to have
> uint32 type. It's erroneous from the DT schema and driver points of view
> to declare it as boolean.

I think the driver uses it as u32, so what do you mean by "declare" in
context of a driver?

Best regards,
Krzysztof

2020-10-21 02:42:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 15/29] powerpc: dts: akebono: Harmonize EHCI/OHCI DT nodes name

On Tue, Oct 20, 2020 at 02:59:45PM +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 <[email protected]>
> ---
> arch/powerpc/boot/dts/akebono.dts | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-21 02:56:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 22/29] arm: dts: omap5: Harmonize DWC USB3 DT nodes name

On Tue, Oct 20, 2020 at 02:59:52PM +0300, Serge Semin wrote:
> 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 <[email protected]>
> ---
> arch/arm/boot/dts/omap5-l4.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-21 02:57:14

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 10/29] arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name

On Tue, Oct 20, 2020 at 02:59:40PM +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 <[email protected]>
> ---
> arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-21 02:58:29

by Serge Semin

[permalink] [raw]
Subject: Re: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

On Tue, Oct 20, 2020 at 02:34:04PM +0200, Krzysztof Kozlowski wrote:
> On Tue, Oct 20, 2020 at 02:59:35PM +0300, Serge Semin wrote:
> > In accordance with the DWC USB3 bindings the property is supposed to have
> > uint32 type. It's erroneous from the DT schema and driver points of view
> > to declare it as boolean.
>

> I think the driver uses it as u32, so what do you mean by "declare" in
> context of a driver?

I meant that both the driver and DT schema expects it to be uint32, while the
dts has got the property as boolean, which is wrong. The same problem has
been fixed in the Amlogic Meson-g12 DT schema example:
https://lore.kernel.org/linux-usb/[email protected]/T/#m225585212162b9f5cccb1a7088850fab8792b7b3

-Sergey

>
> Best regards,
> Krzysztof

2020-10-21 02:59:11

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

On Tue, Oct 20, 2020 at 03:44:04PM +0300, Serge Semin wrote:
> On Tue, Oct 20, 2020 at 02:34:04PM +0200, Krzysztof Kozlowski wrote:
> > On Tue, Oct 20, 2020 at 02:59:35PM +0300, Serge Semin wrote:
> > > In accordance with the DWC USB3 bindings the property is supposed to have
> > > uint32 type. It's erroneous from the DT schema and driver points of view
> > > to declare it as boolean.
> >
>
> > I think the driver uses it as u32, so what do you mean by "declare" in
> > context of a driver?
>
> I meant that both the driver and DT schema expects it to be uint32, while the
> dts has got the property as boolean, which is wrong. The same problem has
> been fixed in the Amlogic Meson-g12 DT schema example:
> https://lore.kernel.org/linux-usb/[email protected]/T/#m225585212162b9f5cccb1a7088850fab8792b7b3

Ah, I got it.

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-10-21 16:38:02

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH 05/29] arm64: dts: amlogic: meson-g12: Set FL-adj property value

On Tue, Oct 20, 2020 at 2:00 PM Serge Semin
<[email protected]> wrote:
>
> In accordance with the DWC USB3 bindings the property is supposed to have
> uint32 type. It's erroneous from the DT schema and driver points of view
> to declare it as boolean. As Neil suggested set it to 0x20 so not break
> the platform and to make the dtbs checker happy.
>
> Link: https://lore.kernel.org/linux-usb/[email protected]/
> Signed-off-by: Serge Semin <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2020-10-22 06:37:07

by Vladimir Zapolskiy

[permalink] [raw]
Subject: Re: [PATCH 10/29] arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name

On 10/20/20 2:59 PM, 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 <[email protected]>
> ---
> arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--

Acked-by: Vladimir Zapolskiy <[email protected]>

--
Best wishes,
Vladimir

2020-10-23 05:40:10

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 07/29] arm: dts: bcm53x: Harmonize EHCI/OHCI DT nodes name

On 10/20/20 4:59 AM, 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 <[email protected]>
> Acked-by: Florian Fainelli <[email protected]>

Applied to devicetree/next after fixing up the subject to be: ARM: dts:
BCM5310X: Harmonize EHCI/OHCI DT nodes name to match prior commits to
the same files. Thanks!
--
Florian

2020-10-27 03:13:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 04/29] arm: dts: exynos: Correct DWC USB3 compatible string

On Tue, Oct 20, 2020 at 02:59:34PM +0300, Serge Semin wrote:
> Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> Use it instead of the deprecated "synopsys" one.
>
> Signed-off-by: Serge Semin <[email protected]>
> ---
> arch/arm/boot/dts/exynos5250.dtsi | 2 +-

Thanks, applied.

Best regards,
Krzysztof

2020-11-09 10:48:32

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 08/29] arm: dts: stm32: Harmonize EHCI/OHCI DT nodes name

Hi Serge

On 10/20/20 2:36 PM, Krzysztof Kozlowski wrote:
> On Tue, Oct 20, 2020 at 02:59:38PM +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 <[email protected]>
>> Acked-by: Amelie Delaunay <[email protected]>
>> ---
>> arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Krzysztof Kozlowski <[email protected]>
>
> Best regards,
> Krzysztof
>

Applied on stm32-next (I just fix cosmetic in commit title).

Thanks.
Alex

2020-11-10 13:19:48

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 03/29] arm: dts: am437x: Correct DWC USB3 compatible string

* Krzysztof Kozlowski <[email protected]> [201020 12:31]:
> On Tue, Oct 20, 2020 at 02:59:33PM +0300, Serge Semin wrote:
> > Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix.
> > Use it instead of the deprecated "synopsys" one.
> >
> > Signed-off-by: Serge Semin <[email protected]>
> > ---
> > arch/arm/boot/dts/am437x-l4.dtsi | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Applying this one into omap-for-v5.11/dt thanks.

Tony

2020-11-10 13:20:35

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 22/29] arm: dts: omap5: Harmonize DWC USB3 DT nodes name

* Krzysztof Kozlowski <[email protected]> [201020 12:41]:
> On Tue, Oct 20, 2020 at 02:59:52PM +0300, Serge Semin wrote:
> > 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 <[email protected]>
> > ---
> > arch/arm/boot/dts/omap5-l4.dtsi | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Krzysztof Kozlowski <[email protected]>

Applying this too into omap-for-v5.11/dt thanks.

Tony