Skip to contentSkip to conversation

arm64: dts: intel: agilex5: enable USB3.1 on SoCDK

PATCH Applied [email protected] 4 participants 10 messages Sep 11 – Sep 21 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v7 cover arm64: dts: intel: agilex5: enable USB3.1 on SoCDK

From: Adrian Ng Ho Yin <[email protected]>

Add the Agilex5 USB3.1 DWC3 controller node and enable it in host mode on the SoCDK board. Place the controller under a simple-bus with a 40-bit dma-ranges window so the DMA/IOMMU stack respects the interconnect address width when SMMU is enabled.

The SoCDK daughter card only exposes the USB3.1 interface, so the unused USB0 (DWC2) board enablement is removed in a follow-up patch.

This DTS series is posted separately from the USB bindings/driver series ("[PATCH v7 0/2] usb: dwc3: add Altera Agilex5 DWC3 support"). Depends on compatible "altr,agilex5-dwc3" from that series:
https://lore.kernel.org/all/[email protected]/

---
changelog:
v6->v7:
* Split out of the USB series into a standalone DTS posting.

USB v7 series:
https://lore.kernel.org/all/[email protected]/

Previous combined series (v6):
https://lore.kernel.org/all/[email protected]/
---

Adrian Ng Ho Yin (2):
arm64: dts: intel: agilex5: add USB3.1 controller node
arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK

 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 35 +++++++++++++++++++
 .../boot/dts/intel/socfpga_agilex5_socdk.dts  |  4 +--
 2 files changed, 37 insertions(+), 2 deletions(-)

base-commit: bc35965f6940a9bf834d54187b6088b8eb09206d

Signature · 1 line
2.49.GIT
#1 lore raw

PATCH v7 1/2 arm64: dts: intel: agilex5: add USB3.1 controller node

From: Adrian Ng Ho Yin <[email protected]>

Add a DTS node for the Synopsys DWC3 USB3.1 controller on the Agilex5 SoC. Place it under a simple-bus with a 40-bit dma-ranges window (#address-cells = 2) to match the USB DMA address width of the interconnect. Enable it in host mode on the SoCDK board.

ref and suspend both use AGILEX5_USB31_SUSPEND_CLK because they share the same hardware clock source on this SoC.

---
 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 35 +++++++++++++++++++
 .../boot/dts/intel/socfpga_agilex5_socdk.dts  |  5 +++
 2 files changed, 40 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +35 -0
index f54767d1526e..523f722a2a64 100644
@@ -493,6 +493,41 @@ usb0: usb@10b00000 {
 			status = "disabled";
 		};
 
+		usb31_bus: usb-bus@11000000 {
+			compatible = "simple-bus";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x11000000 0x0 0x100000>;
+			/*
+			 * USB interconnect DMA is limited to 40-bit addresses
+			 * (1 TiB window from 0).
+			 */
+			dma-ranges = <0x0 0x0 0x0 0x100 0x0>;
+
+			usb31: usb@0 {
+				compatible = "altr,agilex5-dwc3";
+				reg = <0x0 0x0 0x0 0x100000>;
+				interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+				/*
+				 * ref and suspend share the same hardware
+				 * source; reuse the published suspend clock ID.
+				 */
+				clocks = <&clkmgr AGILEX5_USB31_BUS_CLK_EARLY>,
+					 <&clkmgr AGILEX5_USB31_SUSPEND_CLK>,
+					 <&clkmgr AGILEX5_USB31_SUSPEND_CLK>;
+				clock-names = "bus_early", "ref", "suspend";
+				resets = <&rst USB1_RESET>, <&rst USB1_OCP_RESET>;
+				reset-names = "core", "ecc";
+				iommus = <&smmu 7>;
+				phys = <&usbphy0>, <&usbphy0>;
+				phy-names = "usb2-phy", "usb3-phy";
+				maximum-speed = "super-speed";
+				snps,dis_u2_susphy_quirk;
+				snps,dis_u3_susphy_quirk;
+				status = "disabled";
+			};
+		};
+
 		watchdog0: watchdog@10d00200 {
 			compatible = "snps,dw-wdt";
 			reg = <0x10d00200 0x100>;
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts +5 -0
index 1e9b87d96765..aa9294494421 100644
@@ -109,6 +109,11 @@ &usb0 {
 	disable-over-current;
 };
 
+&usb31 {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &watchdog0 {
 	status = "okay";
 };
Signature · 1 line
2.49.GIT
#2 lore raw

Re: [PATCH v7 1/2] arm64: dts: intel: agilex5: add USB3.1 controller node

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Missing fallback compatible string prevents the DWC3 controller from probing. - [Medium]…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing fallback compatible string prevents the DWC3 controller from probing.
- [Medium] Devicetree Topology / Address Space Overflow in DMA ranges mapping. --

commit f5eee55ab58207528984fe03c0204fcdede698dd

Author: Adrian Ng Ho Yin <[email protected]>
Date:   Fri Sep 11 09:09:24 2026 +0000

arm64: dts: intel: agilex5: add USB3.1 controller node

This commit adds a devicetree node for the Synopsys DWC3 USB3.1 controller on the Agilex5 SoC. It places the controller under a simple-bus with a 40-bit dma-ranges window to match the interconnect's DMA address width. The controller is also enabled in host mode for the SoCDK board.

Quoted 8 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +0 -0
index f54767d1526e1..523f722a2a642 100644
@@ -493,6 +493,41 @@ usb0: usb@10b00000 {
 			status = "disabled";
 		};
 

arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi usb0: usb@10b00000 { · line 505

Quoted 10 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +10 -0
+		usb31_bus: usb-bus@11000000 {
+			compatible = "simple-bus";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x11000000 0x0 0x100000>;
+			/*
+			 * USB interconnect DMA is limited to 40-bit addresses
+			 * (1 TiB window from 0).
+			 */
+			dma-ranges = <0x0 0x0 0x0 0x100 0x0>;

[Severity: Medium]
Does this dma-ranges mapping structurally overflow the parent bus?

This property specifies a 1 TiB window (0x100 0x0) and maps it into the parent bus which only has 32-bit address capacity. Since a 32-bit bus can mathematically only address up to 4 GB, could this cause DMA configuration failures or silent truncations depending on how the OF core parses the tree?

arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi usb0: usb@10b00000 { · line 508

Quoted 3 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +3 -0
+
+			usb31: usb@0 {
+				compatible = "altr,agilex5-dwc3";

[Severity: High]
Will the USB subsystem fail to bind to this device without a generic fallback?

This node specifies a SoC-specific compatible string but does not include a generic fallback string like "snps,dwc3". Because there is no matching driver in the kernel for "altr,agilex5-dwc3", won't the DWC3 core driver silently ignore this node and leave the controller unprobed?

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH v7 1/2] arm64: dts: intel: agilex5: add USB3.1 controller node

Quoted 38 lines · On 9/11/2026 5:19 PM, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing fallback compatible string prevents the DWC3 controller from probing.
- [Medium] Devicetree Topology / Address Space Overflow in DMA ranges mapping. --

commit f5eee55ab58207528984fe03c0204fcdede698dd

Author: Adrian Ng Ho Yin <[email protected]>
Date:   Fri Sep 11 09:09:24 2026 +0000

arm64: dts: intel: agilex5: add USB3.1 controller node

This commit adds a devicetree node for the Synopsys DWC3 USB3.1 controller on the Agilex5 SoC. It places the controller under a simple-bus with a 40-bit dma-ranges window to match the interconnect's DMA address width. The controller is also enabled in host mode for the SoCDK board.

Quoted 8 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +0 -0
index f54767d1526e1..523f722a2a642 100644
@@ -493,6 +493,41 @@ usb0: usb@10b00000 {
  			status = "disabled";
  		};
 

arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi usb0: usb@10b00000 { · line 505

Quoted 10 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +10 -0
+		usb31_bus: usb-bus@11000000 {
+			compatible = "simple-bus";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x11000000 0x0 0x100000>;
+			/*
+			 * USB interconnect DMA is limited to 40-bit addresses
+			 * (1 TiB window from 0).
+			 */
+			dma-ranges = <0x0 0x0 0x0 0x100 0x0>;

[Severity: Medium]
Does this dma-ranges mapping structurally overflow the parent bus?

Quoted 4 lines

This property specifies a 1 TiB window (0x100 0x0) and maps it into the parent bus which only has 32-bit address capacity. Since a 32-bit bus can mathematically only address up to 4 GB, could this cause DMA configuration failures or silent truncations depending on how the OF core parses the tree?

Disagree because: the entry matches DT cell rules for this bus, and the size describes the DMA interconnect aperture, not soc MMIO capacity.

usb31_bus: #address-cells=<2>,#size-cells=<2>; parent soc: #address-cells=<1> => dma-ranges cells = 2 + 1 + 2:
<0x0 0x0 0x0 0x100 0x0> /* child DMA, parent CPU, 1 TiB size */

OF parses this by cell counts (of_dma_get_range); it does not truncate the size to the parent's 32-bit MMIO window. Same 40-bit dma-ranges pattern is already used by dma-bus@10db0000 in this dtsi.

Quoted 8 lines

arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi usb0: usb@10b00000 { · line 508

Quoted 4 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +3 -0
+
+			usb31: usb@0 {
+				compatible = "altr,agilex5-dwc3";

[Severity: High]
Will the USB subsystem fail to bind to this device without a generic fallback?

Quoted 5 lines

This node specifies a SoC-specific compatible string but does not include a generic fallback string like "snps,dwc3". Because there is no matching driver in the kernel for "altr,agilex5-dwc3", won't the DWC3 core driver silently ignore this node and leave the controller unprobed?

Disagree because: Agilex5 uses the dwc3-generic-plat path with a dedicated compatible, not a glue parent + child "snps,dwc3" node.

Adding "snps,dwc3" would violate the binding and could make drivers/usb/dwc3 core match the same node. Probe does not require a generic fallback here.

Quoted 2 lines

[ ... ]

#4 lore raw

Re: [PATCH v7 1/2] arm64: dts: intel: agilex5: add USB3.1 controller node

In reply to [email protected]
Quoted 21 lines · On 11/09/2026 11:09, [email protected] wrote:

From: Adrian Ng Ho Yin <[email protected]>

Add a DTS node for the Synopsys DWC3 USB3.1 controller on the Agilex5 SoC. Place it under a simple-bus with a 40-bit dma-ranges window (#address-cells = 2) to match the USB DMA address width of the interconnect. Enable it in host mode on the SoCDK board.

ref and suspend both use AGILEX5_USB31_SUSPEND_CLK because they share the same hardware clock source on this SoC.

---
 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 35 +++++++++++++++++++
 .../boot/dts/intel/socfpga_agilex5_socdk.dts  |  5 +++
 2 files changed, 40 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +0 -0
index f54767d1526e..523f722a2a64 100644

arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi usb0: usb@10b00000 { · line 496

Quoted 4 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +1 -0
@@ -493,6 +493,41 @@ usb0: usb@10b00000 {
 			status = "disabled";
 		};
 
+		usb31_bus: usb-bus@11000000 {

No, USB bus is not a simple bus. You probably wanted simple bus or any other approved, but not discouraged names from simple-bus.

Don't come up with own naming.

Best regards,
Krzysztof

#5 lore raw

PATCH v7 2/2 arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK

In reply to [email protected]

From: Adrian Ng Ho Yin <[email protected]>

The Agilex5 SoCDK daughter card only provides a USB3.1 interface (USB1). USB0 is not connected or used on this board. Remove the USB0 node to avoid unnecessary initialization and potential resource conflicts.

---
 arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts | 5 -----
 1 file changed, 5 deletions(-)
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts +0 -5
index aa9294494421..c48867cc3043 100644
@@ -104,11 +104,6 @@ &uart0 {
 	status = "okay";
 };
 
-&usb0 {
-	status = "okay";
-	disable-over-current;
-};
-
 &usb31 {
 	dr_mode = "host";
 	status = "okay";
Signature · 1 line
2.49.GIT
Applied
#6 lore raw
In reply to [email protected]
Quoted 23 lines · On 9/11/26 04:09, [email protected] wrote:

From: Adrian Ng Ho Yin <[email protected]>

Add the Agilex5 USB3.1 DWC3 controller node and enable it in host mode on the SoCDK board. Place the controller under a simple-bus with a 40-bit dma-ranges window so the DMA/IOMMU stack respects the interconnect address width when SMMU is enabled.

The SoCDK daughter card only exposes the USB3.1 interface, so the unused USB0 (DWC2) board enablement is removed in a follow-up patch.

This DTS series is posted separately from the USB bindings/driver series ("[PATCH v7 0/2] usb: dwc3: add Altera Agilex5 DWC3 support"). Depends on compatible "altr,agilex5-dwc3" from that series:
https://lore.kernel.org/all/[email protected]/

---
changelog:
v6->v7:
* Split out of the USB series into a standalone DTS posting.

USB v7 series:
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

Previous combined series (v6):
https://lore.kernel.org/all/[email protected]/
---

Adrian Ng Ho Yin (2):
arm64: dts: intel: agilex5: add USB3.1 controller node
arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK

Applied!

Thanks,
Dinh

#7 lore raw

v8 cover arm64: dts: intel: agilex5: enable USB3.1 on SoCDK

In reply to [email protected]

Add the Agilex5 USB3.1 DWC3 controller node and enable it in host mode on the SoCDK board. Place the controller under a simple-bus with a 40-bit dma-ranges window so the DMA/IOMMU stack respects the interconnect address width when SMMU is enabled.

The SoCDK daughter card only exposes the USB3.1 interface, so the unused USB0 (DWC2) board enablement is removed in a follow-up patch.

This DTS series is posted separately from the USB bindings/driver series ("[PATCH v7 0/2] usb: dwc3: add Altera Agilex5 DWC3 support"). Depends on compatible "altr,agilex5-dwc3" from that series.

---
changelog:
v7->v8:
* Rename simple-bus wrapper node from usb-bus@11000000 to bus@11000000 (Krzysztof Kozlowski). Use an approved simple-bus node name; do not invent usb-bus.

v6->v7:
* Split out of the USB series into a standalone DTS posting.

Previous DTS series (v7):
https://lore.kernel.org/all/[email protected]/

Previous combined series (v6):
https://lore.kernel.org/all/[email protected]/
---

Adrian Ng Ho Yin (2):
arm64: dts: intel: agilex5: add USB3.1 controller node
arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK

 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 35 +++++++++++++++++++
 .../boot/dts/intel/socfpga_agilex5_socdk.dts  |  4 +--
 2 files changed, 37 insertions(+), 2 deletions(-)

base-commit: 93f51579e7df248780214094418f205253383cc5

Signature · 1 line
2.49.GIT
#8 lore raw

PATCH v8 1/2 arm64: dts: intel: agilex5: add USB3.1 controller node

Add a DTS node for the Synopsys DWC3 USB3.1 controller on the Agilex5 SoC. Place it under a simple-bus with a 40-bit dma-ranges window (#address-cells = 2) to match the USB DMA address width of the interconnect. Enable it in host mode on the SoCDK board.

ref and suspend both use AGILEX5_USB31_SUSPEND_CLK because they share the same hardware clock source on this SoC.

---
changelog:
v7->v8:
* Rename simple-bus wrapper node from usb-bus@11000000 to bus@11000000 per Krzysztof Kozlowski review (use approved simple-bus node name).

 .../arm64/boot/dts/intel/socfpga_agilex5.dtsi | 35 +++++++++++++++++++
 .../boot/dts/intel/socfpga_agilex5_socdk.dts  |  5 +++
 2 files changed, 40 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +35 -0
index f54767d1526e..63a8f8f0c5c3 100644
@@ -493,6 +493,41 @@ usb0: usb@10b00000 {
 			status = "disabled";
 		};
 
+		usb31_bus: bus@11000000 {
+			compatible = "simple-bus";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x11000000 0x0 0x100000>;
+			/*
+			 * USB interconnect DMA is limited to 40-bit addresses
+			 * (1 TiB window from 0).
+			 */
+			dma-ranges = <0x0 0x0 0x0 0x100 0x0>;
+
+			usb31: usb@0 {
+				compatible = "altr,agilex5-dwc3";
+				reg = <0x0 0x0 0x0 0x100000>;
+				interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+				/*
+				 * ref and suspend share the same hardware
+				 * source; reuse the published suspend clock ID.
+				 */
+				clocks = <&clkmgr AGILEX5_USB31_BUS_CLK_EARLY>,
+					 <&clkmgr AGILEX5_USB31_SUSPEND_CLK>,
+					 <&clkmgr AGILEX5_USB31_SUSPEND_CLK>;
+				clock-names = "bus_early", "ref", "suspend";
+				resets = <&rst USB1_RESET>, <&rst USB1_OCP_RESET>;
+				reset-names = "core", "ecc";
+				iommus = <&smmu 7>;
+				phys = <&usbphy0>, <&usbphy0>;
+				phy-names = "usb2-phy", "usb3-phy";
+				maximum-speed = "super-speed";
+				snps,dis_u2_susphy_quirk;
+				snps,dis_u3_susphy_quirk;
+				status = "disabled";
+			};
+		};
+
 		watchdog0: watchdog@10d00200 {
 			compatible = "snps,dw-wdt";
 			reg = <0x10d00200 0x100>;
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts +5 -0
index 1e9b87d96765..aa9294494421 100644
@@ -109,6 +109,11 @@ &usb0 {
 	disable-over-current;
 };
 
+&usb31 {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &watchdog0 {
 	status = "okay";
 };
Signature · 1 line
2.49.GIT
#9 lore raw

PATCH v8 2/2 arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK

In reply to Adrian Ng Ho Yin

The Agilex5 SoCDK daughter card only provides a USB3.1 interface (USB1). USB0 is not connected or used on this board. Remove the USB0 node to avoid unnecessary initialization and potential resource conflicts.

---
 arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts | 5 -----
 1 file changed, 5 deletions(-)
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dts +0 -5
index aa9294494421..c48867cc3043 100644
@@ -104,11 +104,6 @@ &uart0 {
 	status = "okay";
 };
 
-&usb0 {
-	status = "okay";
-	disable-over-current;
-};
-
 &usb31 {
 	dr_mode = "host";
 	status = "okay";
Signature · 1 line
2.49.GIT