* [PATCH 0/3] usb: dwc3: add fsl,ls-dwc3 glue layer support
@ 2024-07-10 23:02 Frank Li
2024-07-10 23:02 ` [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer Frank Li
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Frank Li @ 2024-07-10 23:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo
Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel, imx,
Frank Li
Add freescale layerscape dwc3 usb glue layer support.
Create binding doc for fsl,ls-dwc3.
Add compatible string fsl,ls1028a-dwc3 in dwc3-of-simple.c
Passdown software managed node property snps,gsbuscfg0-reqinfo.
Update dts to support dwc3 glue layer and enable dma-coherent.
Based on usb-next
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Shawn Guo <shawnguo@kernel.org>
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: imx@lists.linux.dev
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Frank Li (3):
dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer
usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3
arm64: dts: layerscape: move dwc3 usb under glue layer node
.../devicetree/bindings/usb/fsl,ls-dwc3.yaml | 50 ++++++++++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 +++++++++++--------
drivers/usb/dwc3/dwc3-of-simple.c | 22 ++++++++++
3 files changed, 98 insertions(+), 17 deletions(-)
---
base-commit: e60284b63245b84c3ae352427ed5ff8b79266b91
change-id: 20240710-ls-dwc-01ac03f3828a
Best regards,
---
Frank Li <Frank.Li@nxp.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer
2024-07-10 23:02 [PATCH 0/3] usb: dwc3: add fsl,ls-dwc3 glue layer support Frank Li
@ 2024-07-10 23:02 ` Frank Li
2024-07-12 9:24 ` Krzysztof Kozlowski
2024-07-10 23:02 ` [PATCH 2/3] usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3 Frank Li
2024-07-10 23:02 ` [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node Frank Li
2 siblings, 1 reply; 9+ messages in thread
From: Frank Li @ 2024-07-10 23:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo
Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel, imx,
Frank Li
Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer.
Layerscape supports DMA coherent bus fabric. It needs to pass down a
software-managed property to the DWC3 core.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../devicetree/bindings/usb/fsl,ls-dwc3.yaml | 50 ++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml b/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml
new file mode 100644
index 0000000000000..e79416122d12b
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/fsl,ls-dwc3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale layerscape DWC3 USB controller
+
+maintainers:
+ - Frank Li <Frank.Li@nxp.com>
+
+properties:
+ compatible:
+ const: fsl,ls1028a-dwc3
+
+ ranges: true
+
+ '#address-cells':
+ enum: [ 1, 2 ]
+
+ '#size-cells':
+ enum: [ 1, 2 ]
+
+# Required child node:
+
+patternProperties:
+ "^usb@[0-9a-f]+$":
+ $ref: snps,dwc3.yaml#
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ usb {
+ compatible = "fsl,ls1028a-dwc3";
+ ranges;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ usb@31000000 {
+ compatible = "snps,dwc3";
+ reg = <0x31000000 0x10000>;
+ interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+ dr_mode = "peripheral";
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3
2024-07-10 23:02 [PATCH 0/3] usb: dwc3: add fsl,ls-dwc3 glue layer support Frank Li
2024-07-10 23:02 ` [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer Frank Li
@ 2024-07-10 23:02 ` Frank Li
2024-07-10 23:02 ` [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node Frank Li
2 siblings, 0 replies; 9+ messages in thread
From: Frank Li @ 2024-07-10 23:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo
Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel, imx,
Frank Li
Add compatible string fsl,ls1028a-dwc3 and create a software managed node
property 'snps,gsbuscfg0-reqinfo' to enable cache snoop if dma is coherent.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/usb/dwc3/dwc3-of-simple.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index be7be00ecb349..0aa21ddd93cda 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -18,6 +18,7 @@
#include <linux/dma-mapping.h>
#include <linux/clk.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
@@ -52,6 +53,26 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
if (of_device_is_compatible(np, "rockchip,rk3399-dwc3"))
simple->need_reset = true;
+ if (of_device_is_compatible(np, "fsl,ls1028a-dwc3")) {
+ struct device_node *np = dev->of_node;
+ struct property_entry props[2] = {};
+ int prop_idx = 0, ret = 0;
+ struct device_node *dwc3_np __free(device_node)
+ = of_get_compatible_child(np, "snps,dwc3");
+
+ if (!dwc3_np)
+ return dev_err_probe(dev, -ENODEV, "failed to find dwc3 core child\n");
+
+ if (of_dma_is_coherent(dwc3_np))
+ props[prop_idx++] = PROPERTY_ENTRY_U16("snps,gsbuscfg0-reqinfo", 0x2222);
+
+ if (prop_idx)
+ ret = device_create_managed_software_node(dev, props, NULL);
+
+ if (ret)
+ return ret;
+ }
+
simple->resets = of_reset_control_array_get_optional_exclusive(np);
if (IS_ERR(simple->resets)) {
ret = PTR_ERR(simple->resets);
@@ -174,6 +195,7 @@ static const struct of_device_id of_dwc3_simple_match[] = {
{ .compatible = "hisilicon,hi3670-dwc3" },
{ .compatible = "hisilicon,hi3798mv200-dwc3" },
{ .compatible = "intel,keembay-dwc3" },
+ { .compatible = "fsl,ls1028a-dwc3" },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, of_dwc3_simple_match);
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node
2024-07-10 23:02 [PATCH 0/3] usb: dwc3: add fsl,ls-dwc3 glue layer support Frank Li
2024-07-10 23:02 ` [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer Frank Li
2024-07-10 23:02 ` [PATCH 2/3] usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3 Frank Li
@ 2024-07-10 23:02 ` Frank Li
2024-07-11 21:38 ` Rob Herring
2 siblings, 1 reply; 9+ messages in thread
From: Frank Li @ 2024-07-10 23:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo
Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel, imx,
Frank Li
New usb glue layer driver support enable dma-coherent. So put dwc3 usb node
under glue layer node and enable dma-coherent.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 ++++++++++++++++----------
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
index 70b8731029c4e..24b937032480f 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -615,24 +615,33 @@ gpio3: gpio@2320000 {
little-endian;
};
- usb0: usb@3100000 {
- compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
- reg = <0x0 0x3100000 0x0 0x10000>;
- interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
- snps,dis_rxdet_inp3_quirk;
- snps,quirk-frame-length-adjustment = <0x20>;
- snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
- status = "disabled";
- };
+ usb {
+ compatible = "fsl,ls1028a-dwc3";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ usb0: usb@3100000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x3100000 0x0 0x10000>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+ dma-coherent;
+ snps,dis_rxdet_inp3_quirk;
+ snps,quirk-frame-length-adjustment = <0x20>;
+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+ status = "disabled";
+ };
- usb1: usb@3110000 {
- compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
- reg = <0x0 0x3110000 0x0 0x10000>;
- interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
- snps,dis_rxdet_inp3_quirk;
- snps,quirk-frame-length-adjustment = <0x20>;
- snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
- status = "disabled";
+ usb1: usb@3110000 {
+ compatible = "snps,dwc3";
+ reg = <0x0 0x3110000 0x0 0x10000>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+ dma-coherent;
+ snps,dis_rxdet_inp3_quirk;
+ snps,quirk-frame-length-adjustment = <0x20>;
+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+ status = "disabled";
+ };
};
sata: sata@3200000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node
2024-07-10 23:02 ` [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node Frank Li
@ 2024-07-11 21:38 ` Rob Herring
2024-07-30 15:48 ` Frank Li
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2024-07-11 21:38 UTC (permalink / raw)
To: Frank Li
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Thinh Nguyen, Shawn Guo, linux-usb, devicetree, linux-kernel,
linux-arm-kernel, imx
On Wed, Jul 10, 2024 at 07:02:24PM -0400, Frank Li wrote:
> New usb glue layer driver support enable dma-coherent. So put dwc3 usb node
> under glue layer node and enable dma-coherent.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 ++++++++++++++++----------
> 1 file changed, 26 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> index 70b8731029c4e..24b937032480f 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> @@ -615,24 +615,33 @@ gpio3: gpio@2320000 {
> little-endian;
> };
>
> - usb0: usb@3100000 {
> - compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
> - reg = <0x0 0x3100000 0x0 0x10000>;
> - interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> - snps,dis_rxdet_inp3_quirk;
> - snps,quirk-frame-length-adjustment = <0x20>;
> - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> - status = "disabled";
> - };
> + usb {
> + compatible = "fsl,ls1028a-dwc3";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
No, the existing way is preferred unless you have actual glue/wrapper
registers. Plus this breaks compatibility.
> +
> + usb0: usb@3100000 {
> + compatible = "snps,dwc3";
> + reg = <0x0 0x3100000 0x0 0x10000>;
> + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> + dma-coherent;
> + snps,dis_rxdet_inp3_quirk;
> + snps,quirk-frame-length-adjustment = <0x20>;
> + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> + status = "disabled";
> + };
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer
2024-07-10 23:02 ` [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer Frank Li
@ 2024-07-12 9:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-12 9:24 UTC (permalink / raw)
To: Frank Li, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo
Cc: linux-usb, devicetree, linux-kernel, linux-arm-kernel, imx
On 11/07/2024 01:02, Frank Li wrote:
> Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer.
>
> Layerscape supports DMA coherent bus fabric. It needs to pass down a
> software-managed property to the DWC3 core.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> .../devicetree/bindings/usb/fsl,ls-dwc3.yaml | 50 ++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml b/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml
> new file mode 100644
> index 0000000000000..e79416122d12b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/fsl,ls-dwc3.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/fsl,ls-dwc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale layerscape DWC3 USB controller
> +
> +maintainers:
> + - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> + compatible:
> + const: fsl,ls1028a-dwc3
Responding also here, so Greg won't pick it up: as Rob explained,
without reg this is an useless placeholder/wrapper, so instead go
without the wrapper node.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node
2024-07-11 21:38 ` Rob Herring
@ 2024-07-30 15:48 ` Frank Li
2024-08-07 0:41 ` Thinh Nguyen
0 siblings, 1 reply; 9+ messages in thread
From: Frank Li @ 2024-07-30 15:48 UTC (permalink / raw)
To: Rob Herring
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Thinh Nguyen, Shawn Guo, linux-usb, devicetree, linux-kernel,
linux-arm-kernel, imx
On Thu, Jul 11, 2024 at 03:38:46PM -0600, Rob Herring wrote:
> On Wed, Jul 10, 2024 at 07:02:24PM -0400, Frank Li wrote:
> > New usb glue layer driver support enable dma-coherent. So put dwc3 usb node
> > under glue layer node and enable dma-coherent.
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> > arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 ++++++++++++++++----------
> > 1 file changed, 26 insertions(+), 17 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > index 70b8731029c4e..24b937032480f 100644
> > --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > @@ -615,24 +615,33 @@ gpio3: gpio@2320000 {
> > little-endian;
> > };
> >
> > - usb0: usb@3100000 {
> > - compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
> > - reg = <0x0 0x3100000 0x0 0x10000>;
> > - interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> > - snps,dis_rxdet_inp3_quirk;
> > - snps,quirk-frame-length-adjustment = <0x20>;
> > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> > - status = "disabled";
> > - };
> > + usb {
> > + compatible = "fsl,ls1028a-dwc3";
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
>
> No, the existing way is preferred unless you have actual glue/wrapper
> registers. Plus this breaks compatibility.
Actually, it has glue layer, such as wakeup controller. Remote wakeup have
not implement at layerscape platform yet. But this register distribute to
difference place with other module misc controller registers. It is
difference for difference chips. I can think deep how to handle this.
but anyways, it will break compatibility. I have not find good way to
keep compatibility and add glue layer, such as wakeup support.
Frank
>
> > +
> > + usb0: usb@3100000 {
> > + compatible = "snps,dwc3";
> > + reg = <0x0 0x3100000 0x0 0x10000>;
> > + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> > + dma-coherent;
> > + snps,dis_rxdet_inp3_quirk;
> > + snps,quirk-frame-length-adjustment = <0x20>;
> > + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> > + status = "disabled";
> > + };
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node
2024-07-30 15:48 ` Frank Li
@ 2024-08-07 0:41 ` Thinh Nguyen
2024-08-07 14:30 ` Frank Li
0 siblings, 1 reply; 9+ messages in thread
From: Thinh Nguyen @ 2024-08-07 0:41 UTC (permalink / raw)
To: Frank Li
Cc: Rob Herring, Greg Kroah-Hartman, Krzysztof Kozlowski,
Conor Dooley, Thinh Nguyen, Shawn Guo, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev
Hi Frank,
On Tue, Jul 30, 2024, Frank Li wrote:
> On Thu, Jul 11, 2024 at 03:38:46PM -0600, Rob Herring wrote:
> > On Wed, Jul 10, 2024 at 07:02:24PM -0400, Frank Li wrote:
> > > New usb glue layer driver support enable dma-coherent. So put dwc3 usb node
> > > under glue layer node and enable dma-coherent.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 ++++++++++++++++----------
> > > 1 file changed, 26 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > index 70b8731029c4e..24b937032480f 100644
> > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > @@ -615,24 +615,33 @@ gpio3: gpio@2320000 {
> > > little-endian;
> > > };
> > >
> > > - usb0: usb@3100000 {
> > > - compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
> > > - reg = <0x0 0x3100000 0x0 0x10000>;
> > > - interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> > > - snps,dis_rxdet_inp3_quirk;
> > > - snps,quirk-frame-length-adjustment = <0x20>;
> > > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> > > - status = "disabled";
> > > - };
> > > + usb {
> > > + compatible = "fsl,ls1028a-dwc3";
> > > + #address-cells = <2>;
> > > + #size-cells = <2>;
> > > + ranges;
> >
> > No, the existing way is preferred unless you have actual glue/wrapper
> > registers. Plus this breaks compatibility.
>
> Actually, it has glue layer, such as wakeup controller. Remote wakeup have
> not implement at layerscape platform yet. But this register distribute to
> difference place with other module misc controller registers. It is
> difference for difference chips. I can think deep how to handle this.
>
> but anyways, it will break compatibility. I have not find good way to
> keep compatibility and add glue layer, such as wakeup support.
>
> Frank
>
Will this impact how the rest of the series look? If so, I'll wait until
you resolve this issue and review the rest.
BR,
Thinh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node
2024-08-07 0:41 ` Thinh Nguyen
@ 2024-08-07 14:30 ` Frank Li
0 siblings, 0 replies; 9+ messages in thread
From: Frank Li @ 2024-08-07 14:30 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Rob Herring, Greg Kroah-Hartman, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev
On Wed, Aug 07, 2024 at 12:41:09AM +0000, Thinh Nguyen wrote:
> Hi Frank,
>
> On Tue, Jul 30, 2024, Frank Li wrote:
> > On Thu, Jul 11, 2024 at 03:38:46PM -0600, Rob Herring wrote:
> > > On Wed, Jul 10, 2024 at 07:02:24PM -0400, Frank Li wrote:
> > > > New usb glue layer driver support enable dma-coherent. So put dwc3 usb node
> > > > under glue layer node and enable dma-coherent.
> > > >
> > > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > > ---
> > > > arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 43 ++++++++++++++++----------
> > > > 1 file changed, 26 insertions(+), 17 deletions(-)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > > index 70b8731029c4e..24b937032480f 100644
> > > > --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> > > > @@ -615,24 +615,33 @@ gpio3: gpio@2320000 {
> > > > little-endian;
> > > > };
> > > >
> > > > - usb0: usb@3100000 {
> > > > - compatible = "fsl,ls1028a-dwc3", "snps,dwc3";
> > > > - reg = <0x0 0x3100000 0x0 0x10000>;
> > > > - interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
> > > > - snps,dis_rxdet_inp3_quirk;
> > > > - snps,quirk-frame-length-adjustment = <0x20>;
> > > > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> > > > - status = "disabled";
> > > > - };
> > > > + usb {
> > > > + compatible = "fsl,ls1028a-dwc3";
> > > > + #address-cells = <2>;
> > > > + #size-cells = <2>;
> > > > + ranges;
> > >
> > > No, the existing way is preferred unless you have actual glue/wrapper
> > > registers. Plus this breaks compatibility.
> >
> > Actually, it has glue layer, such as wakeup controller. Remote wakeup have
> > not implement at layerscape platform yet. But this register distribute to
> > difference place with other module misc controller registers. It is
> > difference for difference chips. I can think deep how to handle this.
> >
> > but anyways, it will break compatibility. I have not find good way to
> > keep compatibility and add glue layer, such as wakeup support.
> >
> > Frank
> >
>
> Will this impact how the rest of the series look? If so, I'll wait until
> you resolve this issue and review the rest.
Rob:
I checked many dwc3-of-simple.c compatible string, which have not
'reg' and just have some clocks and reset.
Is it okay to add missed clock and fsl,rcpm for usb wakeup support
in gluelayer node?
Frank
>
> BR,
> Thinh
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-08-07 14:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 23:02 [PATCH 0/3] usb: dwc3: add fsl,ls-dwc3 glue layer support Frank Li
2024-07-10 23:02 ` [PATCH 1/3] dt-bindings: usb: Add fsl,ls-dwc3.yaml for layerscape usb3 glue layer Frank Li
2024-07-12 9:24 ` Krzysztof Kozlowski
2024-07-10 23:02 ` [PATCH 2/3] usb: dwc3: of-simple: Add compatible string fsl,ls1028a-dwc3 Frank Li
2024-07-10 23:02 ` [PATCH 3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node Frank Li
2024-07-11 21:38 ` Rob Herring
2024-07-30 15:48 ` Frank Li
2024-08-07 0:41 ` Thinh Nguyen
2024-08-07 14:30 ` Frank Li
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).