Re: [PATCH v2] riscv: dts: spacemit: k1: give each PCIe port its own DMA window

From: Yixun Lan

Date: Wed Dec 02 2026 - 20:57:04 EST


On Thu, 12 Nov 2026 21:31:58 -0500, Vlad Banea wrote:
> On K1 a PCIe master only sees DDR: bus addresses 0-2 GB map to CPU
> 0-2 GB and bus 2-16 GB to CPU 4-18 GB. A root port does not forward
> upstream an inbound access that falls inside its own memory window, so
> dma-ranges must skip each port's own outbound window; the other ports'
> windows reach memory.
>
> The shared pcie-bus skips all three windows, bus 0x8000_0000-0xb7ff_ffff,
> which leaves CPU addresses 0x1_0000_0000-0x1_37ff_ffff unreachable from
> every port. Give each port its own bus that skips only its own window.
> On boards with more than 2 GB of RAM, each port can then reach another
> 512-640 MB without SWIOTLB bouncing.
>
> [...]

Applied to SpacemiT SoC tree at 'dt-for-next' branch, thanks!

[1/1] riscv: dts: spacemit: k1: Assign PCIe port its own DMA window
commit: 35ecd04bc97e15cdad049cfcdee43418e68fd280

https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git

(With slightly ajdust the commit message)

Best regards,
--
Yixun Lan <dlan@xxxxxxxxxx>