All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Junzhong Pan" <panjunzhong@linux.spacemit.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 6/9] riscv: dts: spacemit: add USB2.0 controller nodes for K1
Date: Tue, 08 Sep 2026 10:10:02 +0000	[thread overview]
Message-ID: <20260908101002.8EFCB1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908-b4-spacemit-k1-usb2-v2-6-f07342ffa051@linux.spacemit.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The `storage-bus` device tree node lacks a `dma-ranges` mapping to system RAM, which breaks DMA functionality for the newly added USB2.0 controllers.
--

commit 45555a07cc8ff1f0aa27f21fd3042e46e3d7b6eb
Author: Junzhong Pan <panjunzhong@linux.spacemit.com>

riscv: dts: spacemit: add USB2.0 controller nodes for K1

This commit adds the ChipIdea USB2.0 controller and PHY nodes for the
SpacemiT K1 SoC. It includes configurations for both a Dual-Role and a
Host-Only controller.

> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
> index 3fabfd34114b2..22896e757dbb5 100644
> --- a/arch/riscv/boot/dts/spacemit/k1.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
[ ... ]
> @@ -1301,6 +1317,30 @@ storage-bus {
>  			#size-cells = <2>;
>  			dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x0 0x80000000>;
>  
> +			usb2_0: usb@c0900000 {
> +				compatible = "spacemit,k1-usb2";

[Severity: High]
This isn't a bug introduced by this patch, but placing these new DMA masters
into the storage-bus node exposes a pre-existing flaw in the bus's
dma-ranges configuration.

The parent storage-bus defines its dma-ranges as restricting DMA to
physical addresses between 0x0 and 0x7FFFFFFF (MMIO space). However,
system RAM starts at 4GB (0x100000000).

Will this prevent the newly added ChipIdea USB2.0 controllers from functioning?
Because there is no reachable RAM mapped in the parent bus, the generic DMA
framework will limit the USB controllers' bus_dma_limit to 0x7FFFFFFF,
causing DMA map operations or SWIOTLB allocations to fail when probing the
driver or triggering data transfers.

> +				reg = <0x0 0xc0900000 0x0 0x4100>;
> +				interrupts = <105>;
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-b4-spacemit-k1-usb2-v2-0-f07342ffa051@linux.spacemit.com?part=6

  reply	other threads:[~2026-09-08 10:10 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  9:48 [PATCH v2 0/9] Add SpacemiT K1 USB2.0 controllers support Junzhong Pan
2026-09-08  9:48 ` Junzhong Pan
2026-09-08  9:48 ` [PATCH v2 1/9] dt-bindings: usb: ci-hdrc-usb2: add spacemit,k1-usb2 compatible Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08  9:48 ` [PATCH v2 2/9] dt-bindings: usb: ci-hdrc-usb2: require clocks and resets for spacemit,k1-usb2 Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 17:50   ` Conor Dooley
2026-09-08 17:50     ` Conor Dooley
2026-09-09 12:29     ` Junzhong Pan
2026-09-09 12:29       ` Junzhong Pan
2026-09-08  9:48 ` [PATCH v2 3/9] usb: chipidea: usb2: use devm_clk_get_optional_enabled() Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08  9:55   ` sashiko-bot
2026-09-08 10:01   ` Junzhong Pan
2026-09-08 10:01     ` Junzhong Pan
2026-09-08  9:48 ` [PATCH v2 4/9] usb: chipidea: usb2: add optional reset support Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 10:00   ` sashiko-bot
2026-09-08  9:48 ` [PATCH v2 5/9] usb: chipidea: usb2: add SpacemiT K1 support Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 10:05   ` sashiko-bot
2026-09-08 13:11   ` Troy Mitchell
2026-09-08 13:11     ` Troy Mitchell
2026-09-08  9:48 ` [PATCH v2 6/9] riscv: dts: spacemit: add USB2.0 controller nodes for K1 Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 10:10   ` sashiko-bot [this message]
2026-09-08  9:48 ` [PATCH v2 7/9] riscv: dts: spacemit: enable USB2.0 controllers on BananaPi F3 Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 13:11   ` Troy Mitchell
2026-09-08 13:11     ` Troy Mitchell
2026-09-08  9:48 ` [PATCH v2 8/9] riscv: dts: spacemit: enable USB2.0 controllers on OrangePi RV2 Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-13  8:33   ` Ze Huang
2026-09-13  8:33     ` Ze Huang
2026-09-08  9:48 ` [PATCH v2 9/9] riscv: defconfig: enable ChipIdea USB controller support Junzhong Pan
2026-09-08  9:48   ` Junzhong Pan
2026-09-08 22:07   ` Yixun Lan
2026-09-08 22:07     ` Yixun Lan
2026-09-09 12:31     ` Junzhong Pan
2026-09-09 12:31       ` Junzhong Pan

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=20260908101002.8EFCB1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=panjunzhong@linux.spacemit.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.