diff mbox series

[3/3] arm64: dts: layerscape: move dwc3 usb under glue layer node

Message ID 20240710-ls-dwc-v1-3-62f8cbed31d7@nxp.com (mailing list archive)
State New
Headers show
Series usb: dwc3: add fsl,ls-dwc3 glue layer support | expand

Commit Message

Frank Li July 10, 2024, 11:02 p.m. UTC
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(-)

Comments

Rob Herring (Arm) July 11, 2024, 9:38 p.m. UTC | #1
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";
> +			};
Frank Li July 30, 2024, 3:48 p.m. UTC | #2
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";
> > +			};
Thinh Nguyen Aug. 7, 2024, 12:41 a.m. UTC | #3
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
Frank Li Aug. 7, 2024, 2:30 p.m. UTC | #4
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
diff mbox series

Patch

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 {