From: sashiko-bot@kernel.org
To: "Adrian Ng Ho Yin" <adrian.ho.yin.ng@altera.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/4] arm64: dts: intel: agilex5: add USB3.1 controller node
Date: Fri, 04 Sep 2026 09:06:28 +0000 [thread overview]
Message-ID: <20260904090628.9D28F1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <f479477d21c3f8a3eeecd24cd34ce936c52a9201.1788503540.git.adrian.ho.yin.ng@altera.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The `usb31_bus` node maps a 40-bit (1 TiB) `dma-ranges` window into its parent bus (`soc@0`), but the parent has `#address-cells = <1>`, meaning it only supports a 32-bit (4 GiB) address space. This structurally overflows the parent's address capacity.
- [Medium] The `usb31` node uses an undocumented compatible string `altr,agilex5-dwc3` without providing a generic fallback (e.g., `snps,dwc3`).
--
commit 8d2a3618a07e5a6f14a501007e87cb0d96e62264
Author: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
arm64: dts: intel: agilex5: add USB3.1 controller node
This commit adds a DTS 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 USB DMA address width of the interconnect.
> diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> index f54767d1526e1..523f722a2a642 100644
> --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
> @@ -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>;
[Severity: High]
Does this dma-ranges mapping structurally overflow the parent bus's
addressing capabilities? The usb31_bus node maps a 40-bit (1 TiB) window
into its parent node (soc@0). However, the soc@0 parent sets
#address-cells = <1>, which only supports a 32-bit (4 GiB) address space.
Because of this mismatch, device tree parsing and DMA address translation
will fail or truncate for addresses beyond 4 GiB, as the 1 TiB translation
window mathematically exceeds the 32-bit maximum of the parent.
> +
> + usb31: usb@0 {
> + compatible = "altr,agilex5-dwc3";
[Severity: Medium]
Could this break device tree schema validation and backwards compatibility?
The compatible string "altr,agilex5-dwc3" doesn't provide a generic
fallback like "snps,dwc3".
Without a generic fallback string, older kernels without explicit support
for "altr,agilex5-dwc3" will completely fail to probe the generic DWC3
driver.
> + reg = <0x0 0x0 0x0 0x100000>;
> + interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1788503540.git.adrian.ho.yin.ng@altera.com?part=2
next prev parent reply other threads:[~2026-09-04 9:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 8:46 [PATCH v4 0/4] Add USB3.1 support for Agilex5 Adrian Ng Ho Yin
2026-09-04 8:46 ` [PATCH v4 1/4] dt-bindings: usb: add Altera Agilex5 DWC3 controller Adrian Ng Ho Yin
2026-09-04 15:19 ` Conor Dooley
2026-09-04 8:46 ` [PATCH v4 2/4] arm64: dts: intel: agilex5: add USB3.1 controller node Adrian Ng Ho Yin
2026-09-04 9:06 ` sashiko-bot [this message]
2026-09-04 8:46 ` [PATCH v4 3/4] arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK Adrian Ng Ho Yin
2026-09-04 8:46 ` [PATCH v4 4/4] usb: dwc3: add Altera Agilex5 support to generic platform driver Adrian Ng Ho Yin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260904090628.9D28F1F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=adrian.ho.yin.ng@altera.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox