linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node
@ 2021-05-21 21:18 Gowtham Tammana
  2021-05-24 15:24 ` Suman Anna
  0 siblings, 1 reply; 4+ messages in thread
From: Gowtham Tammana @ 2021-05-21 21:18 UTC (permalink / raw)
  To: bcousson, tony
  Cc: robh+dt, linux-omap, devicetree, linux-kernel, linux-arm-kernel,
	Grygorii Strashko, Nisanth Menon, Gowtham Tammana

USB4 device node which is defined in [1] is redefined in here
causing boot failures. Remove the duplicated entry and instead extend it
with child node info through corresponding label reference.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/dra7-l4.dtsi#n4132

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
---
 arch/arm/boot/dts/dra74x.dtsi | 69 +++++++++++++----------------------
 1 file changed, 25 insertions(+), 44 deletions(-)

diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
index e1850d6c841a..6410ddbf0fca 100644
--- a/arch/arm/boot/dts/dra74x.dtsi
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -49,50 +49,6 @@ dsp2_system: dsp_system@41500000 {
 			reg = <0x41500000 0x100>;
 		};
 
-		target-module@48940000 {
-			compatible = "ti,sysc-omap4", "ti,sysc";
-			reg = <0x48940000 0x4>,
-			      <0x48940010 0x4>;
-			reg-names = "rev", "sysc";
-			ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>;
-			ti,sysc-midle = <SYSC_IDLE_FORCE>,
-					<SYSC_IDLE_NO>,
-					<SYSC_IDLE_SMART>,
-					<SYSC_IDLE_SMART_WKUP>;
-			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
-					<SYSC_IDLE_NO>,
-					<SYSC_IDLE_SMART>,
-					<SYSC_IDLE_SMART_WKUP>;
-			clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>;
-			clock-names = "fck";
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0x0 0x48940000 0x20000>;
-
-			omap_dwc3_4: omap_dwc3_4@0 {
-				compatible = "ti,dwc3";
-				reg = <0 0x10000>;
-				interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
-				#address-cells = <1>;
-				#size-cells = <1>;
-				utmi-mode = <2>;
-				ranges;
-				status = "disabled";
-				usb4: usb@10000 {
-					compatible = "snps,dwc3";
-					reg = <0x10000 0x17000>;
-					interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
-						     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
-						     <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
-					interrupt-names = "peripheral",
-							  "host",
-							  "otg";
-					maximum-speed = "high-speed";
-					dr_mode = "otg";
-				};
-			};
-		};
-
 		target-module@41501000 {
 			compatible = "ti,sysc-omap2", "ti,sysc";
 			reg = <0x41501000 0x4>,
@@ -224,3 +180,28 @@ &pcie1_ep {
 &pcie2_rc {
 	compatible = "ti,dra746-pcie-rc", "ti,dra7-pcie";
 };
+
+&usb4_tm {
+	omap_dwc3_4: omap_dwc3_4@0 {
+		compatible = "ti,dwc3";
+		reg = <0 0x10000>;
+		interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		utmi-mode = <2>;
+		ranges;
+		status = "disabled";
+		usb4: usb@10000 {
+			compatible = "snps,dwc3";
+			reg = <0x10000 0x17000>;
+			interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "peripheral",
+					  "host",
+					  "otg";
+			maximum-speed = "high-speed";
+			dr_mode = "otg";
+		};
+	};
+};
-- 
2.31.1


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

* Re: [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node
  2021-05-21 21:18 [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node Gowtham Tammana
@ 2021-05-24 15:24 ` Suman Anna
  2021-05-25  6:27   ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Suman Anna @ 2021-05-24 15:24 UTC (permalink / raw)
  To: Gowtham Tammana, bcousson, tony
  Cc: robh+dt, linux-omap, devicetree, linux-kernel, linux-arm-kernel,
	Grygorii Strashko, Nisanth Menon

On 5/21/21 4:18 PM, Gowtham Tammana wrote:
> USB4 device node which is defined in [1] is redefined in here
> causing boot failures. Remove the duplicated entry and instead extend it
> with child node info through corresponding label reference.
> 
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/dra7-l4.dtsi#n4132

Gowtham,
It is preferable to reference the commit SHA instead of line number references
like above (they will change). Please also use a Fixes: for this, so it can be
applied onto stable kernels as well.

> 
> Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
> ---
>  arch/arm/boot/dts/dra74x.dtsi | 69 +++++++++++++----------------------
>  1 file changed, 25 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
> index e1850d6c841a..6410ddbf0fca 100644
> --- a/arch/arm/boot/dts/dra74x.dtsi
> +++ b/arch/arm/boot/dts/dra74x.dtsi
> @@ -49,50 +49,6 @@ dsp2_system: dsp_system@41500000 {
>  			reg = <0x41500000 0x100>;
>  		};
>  
> -		target-module@48940000 {
> -			compatible = "ti,sysc-omap4", "ti,sysc";
> -			reg = <0x48940000 0x4>,
> -			      <0x48940010 0x4>;
> -			reg-names = "rev", "sysc";
> -			ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>;
> -			ti,sysc-midle = <SYSC_IDLE_FORCE>,
> -					<SYSC_IDLE_NO>,
> -					<SYSC_IDLE_SMART>,
> -					<SYSC_IDLE_SMART_WKUP>;
> -			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> -					<SYSC_IDLE_NO>,
> -					<SYSC_IDLE_SMART>,
> -					<SYSC_IDLE_SMART_WKUP>;
> -			clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>;
> -			clock-names = "fck";
> -			#address-cells = <1>;
> -			#size-cells = <1>;
> -			ranges = <0x0 0x48940000 0x20000>;
> -
> -			omap_dwc3_4: omap_dwc3_4@0 {
> -				compatible = "ti,dwc3";
> -				reg = <0 0x10000>;
> -				interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
> -				#address-cells = <1>;
> -				#size-cells = <1>;
> -				utmi-mode = <2>;
> -				ranges;
> -				status = "disabled";
> -				usb4: usb@10000 {
> -					compatible = "snps,dwc3";
> -					reg = <0x10000 0x17000>;
> -					interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
> -						     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
> -						     <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
> -					interrupt-names = "peripheral",
> -							  "host",
> -							  "otg";
> -					maximum-speed = "high-speed";
> -					dr_mode = "otg";
> -				};
> -			};
> -		};
> -
>  		target-module@41501000 {
>  			compatible = "ti,sysc-omap2", "ti,sysc";
>  			reg = <0x41501000 0x4>,
> @@ -224,3 +180,28 @@ &pcie1_ep {
>  &pcie2_rc {
>  	compatible = "ti,dra746-pcie-rc", "ti,dra7-pcie";
>  };
> +
> +&usb4_tm {
> +	omap_dwc3_4: omap_dwc3_4@0 {
> +		compatible = "ti,dwc3";
> +		reg = <0 0x10000>;
> +		interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		utmi-mode = <2>;
> +		ranges;
> +		status = "disabled";
> +		usb4: usb@10000 {
> +			compatible = "snps,dwc3";
> +			reg = <0x10000 0x17000>;
> +			interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "peripheral",
> +					  "host",
> +					  "otg";
> +			maximum-speed = "high-speed";
> +			dr_mode = "otg";
> +		};
> +	};
> +};

Tony,

This can be fixed in couple of different ways, and I see there have been
different commits that have ultimately caused this.
 6b14eb4705d6 ("ARM: dts: DRA7: Move USB_OTG 4 to dra74x.dtsi")
 549fce068a31 ("ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data"
 bcbb63b80284 (ARM: dts: dra7: Separate AM57 dtsi files")
 c7b72abca61e ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3")

Would you prefer that we just drop the USB4 target-module reference in
dra7-l4.dtsi following the first commit?

regards
Suman


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

* Re: [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node
  2021-05-24 15:24 ` Suman Anna
@ 2021-05-25  6:27   ` Tony Lindgren
  2021-05-26 17:23     ` [EXTERNAL] " Tammana, Gowtham
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2021-05-25  6:27 UTC (permalink / raw)
  To: Suman Anna
  Cc: Gowtham Tammana, bcousson, robh+dt, linux-omap, devicetree,
	linux-kernel, linux-arm-kernel, Grygorii Strashko, Nisanth Menon

* Suman Anna <s-anna@ti.com> [210524 15:24]:
> This can be fixed in couple of different ways, and I see there have been
> different commits that have ultimately caused this.
>  6b14eb4705d6 ("ARM: dts: DRA7: Move USB_OTG 4 to dra74x.dtsi")
>  549fce068a31 ("ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data"
>  bcbb63b80284 (ARM: dts: dra7: Separate AM57 dtsi files")
>  c7b72abca61e ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3")
> 
> Would you prefer that we just drop the USB4 target-module reference in
> dra7-l4.dtsi following the first commit?

Looking at commit 549fce068a31 above, we have dra7-l4.dtsi define a module
at 0x48940000. But maybe the module is only used for dwc on dra74x?

If this controller instance is on all dra7 SoCs, then it should be in
dra7-l4.dtsi. If the controller instance is only on dra74x, it should be
only in dra74x.dtsi file.

Sorry sounds like I have confused some hardware differences along the
way.

Regards,

Tony

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

* RE: [EXTERNAL] Re: [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node
  2021-05-25  6:27   ` Tony Lindgren
@ 2021-05-26 17:23     ` Tammana, Gowtham
  0 siblings, 0 replies; 4+ messages in thread
From: Tammana, Gowtham @ 2021-05-26 17:23 UTC (permalink / raw)
  To: Tony Lindgren, Anna, Suman
  Cc: bcousson, robh+dt, linux-omap, devicetree, linux-kernel,
	linux-arm-kernel, Strashko, Grygorii, Menon, Nishanth



>-----Original Message-----
>From: Tony Lindgren <tony@atomide.com>
>Sent: Tuesday, May 25, 2021 1:28 AM
>
>* Suman Anna <s-anna@ti.com> [210524 15:24]:
>> This can be fixed in couple of different ways, and I see there have been
>> different commits that have ultimately caused this.
>>  6b14eb4705d6 ("ARM: dts: DRA7: Move USB_OTG 4 to dra74x.dtsi")
>>  549fce068a31 ("ARM: dts: dra7: Add l4 interconnect hierarchy and ti-
>sysc data"
>>  bcbb63b80284 (ARM: dts: dra7: Separate AM57 dtsi files")
>>  c7b72abca61e ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3")
>>
>> Would you prefer that we just drop the USB4 target-module reference in
>> dra7-l4.dtsi following the first commit?
>
>Looking at commit 549fce068a31 above, we have dra7-l4.dtsi define a module
>at 0x48940000. But maybe the module is only used for dwc on dra74x?
>
>If this controller instance is on all dra7 SoCs, then it should be in
>dra7-l4.dtsi. If the controller instance is only on dra74x, it should be
>only in dra74x.dtsi file.
>
>Sorry sounds like I have confused some hardware differences along the
>way.

Thanks for the review. The controller instance is seen only in dra74x, pushed
a v2 based on the above suggestion.

Thanks,
Gowtham


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

end of thread, other threads:[~2021-05-26 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 21:18 [PATCH] ARM: dts: DRA7x: Fix duplicate USB4 device node Gowtham Tammana
2021-05-24 15:24 ` Suman Anna
2021-05-25  6:27   ` Tony Lindgren
2021-05-26 17:23     ` [EXTERNAL] " Tammana, Gowtham

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).