[PATCH] dt-bindings: PCI: mediatek-gen3: Allow memory-region for restricted DMA buffer
Chen-Yu Tsai
wenst at chromium.org
Thu May 14 01:12:28 PDT 2026
On Thu, May 14, 2026 at 7:15 AM Rob Herring <robh at kernel.org> wrote:
>
> On Fri, May 08, 2026 at 02:36:32PM +0800, Chen-Yu Tsai wrote:
> > On some SoCs without an IOMMU behind the PCIe controller, the PCIe
> > controller memory access could be limited to a small region by the
> > firmware configuring a memory protection unit. This memory region
> > must be assigned to the PCIe controller so that the OS knows to
> > use that region. Otherwise PCIe devices would not work properly.
> >
>
> What you are describing is dma-ranges. Why not use that?
Answer from yesterday:
I didn't know about it. I was just moving the property from the WiFi
controller node down to the PCIe controller in the other DT patch [1].
Answer from today:
Also, it doesn't work. See my reply to Mani.
ChenYu
> > Allow the memory-region property with one item pointing to a
> > restricted DMA buffer.
> >
> > Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
> > ---
> > This patch compliments another patch that moved the memory-region from
> > the PCIe device to the PCIe controller [1].
> >
> > [1] https://lore.kernel.org/all/20260430120725.241779-1-wenst@chromium.org/
> >
> > Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > index 4db700fc36ba..4a9e41d01628 100644
> > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > @@ -115,6 +115,10 @@ properties:
> > power-domains:
> > maxItems: 1
> >
> > + memory-region:
> > + maxItems: 1
> > + description: phandle to restricted DMA buffer
> > +
> > mediatek,pbus-csr:
> > $ref: /schemas/types.yaml#/definitions/phandle-array
> > items:
> > --
> > 2.54.0.563.g4f69b47b94-goog
> >
More information about the Linux-mediatek
mailing list