From: sashiko-bot@kernel.org
To: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 4/7] arm64: dts: mediatek: mt8186: Add and use UART AP_DMA controller
Date: Wed, 01 Jul 2026 12:49:06 +0000 [thread overview]
Message-ID: <20260701124907.660D71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701121929.19374-5-angelogioacchino.delregno@collabora.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The `apdma` node provides an incorrect number of cells in its `interrupts` property (3 instead of 4) and likely incorrect polarity, breaking DT parsing and interrupt registration.
- [Medium] Incorrect fallback compatible string `mediatek,mt6577-uart-dma` violates the DT binding schema and silently restricts DMA capabilities to 32 bits.
--
commit 9cc7e542a995507ace5b082f09a644dd3e616c00
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
arm64: dts: mediatek: mt8186: Add and use UART AP_DMA controller
This SoC has a DMA controller (AP_DMA) that provides one channel for each data
direction (transmit and receive) for all of the UART controllers in the SoC.
This commit adds the UART DMA controller and assigns the right channels to each
of the three UART controllers to increase data TX/RX efficiency.
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> index b91f88ffae0e8..7b25c51b1b457 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> @@ -1142,6 +1142,22 @@ systimer: timer@10017000 {
> clocks = <&clk13m>;
> };
>
> + apdma: dma-controller@10200d80 {
> + compatible = "mediatek,mt8186-uart-dma", "mediatek,mt6577-uart-dma";
[Severity: Medium]
Does this fallback compatible string restrict the DMA bitmask?
According to the mediatek,uart-dma.yaml binding, mediatek,mt8186-uart-dma
should fall back to mediatek,mt6835-uart-dma.
Because the mtk-uart-apdma driver uses the matched compatible string to
configure the DMA mask, falling back to mt6577 restricts the controller
to 32 bits instead of the 34 bits provided by mt6835.
Could using mt6577-uart-dma here force hardware with more than 4GB of RAM
to use SWIOTLB bounce buffering for UART DMA transfers?
> + reg = <0 0x10200d80 0 0x80>, <0 0x10200e00 0 0x80>,
> + <0 0x10200e80 0 0x80>, <0 0x10200f00 0 0x80>,
> + <0 0x10200f80 0 0x80>, <0 0x10201000 0 0x80>;
> + interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 377 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 378 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 379 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 380 IRQ_TYPE_LEVEL_LOW>,
> + <GIC_SPI 381 IRQ_TYPE_LEVEL_LOW>;
[Severity: High]
Are these interrupts missing the 4th cell?
The root interrupt controller (&gic) requires 4 cells (#interrupt-cells = <4>),
but only 3 cells are provided here for each interrupt.
The missing 4th cell will cause parsing to consume parts of the next
interrupt as the 4th cell of the current one, corrupting the entire
interrupt mapping for this device.
Additionally, GIC SPIs on MT8186 are almost exclusively active-high
(IRQ_TYPE_LEVEL_HIGH). Is IRQ_TYPE_LEVEL_LOW functionally correct for
this controller?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701121929.19374-1-angelogioacchino.delregno@collabora.com?part=4
next prev parent reply other threads:[~2026-07-01 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 12:19 [PATCH 0/7] dts: Add and use UART AP_DMA controller on MTK SoCs AngeloGioacchino Del Regno
2026-07-01 12:19 ` [PATCH 1/7] arm64: dts: mediatek: mt6795: Remove deprecated UART DMA property AngeloGioacchino Del Regno
2026-07-01 12:19 ` [PATCH 2/7] arm64: dts: mediatek: mt8173: Add and use UART AP_DMA controller AngeloGioacchino Del Regno
2026-07-01 12:35 ` sashiko-bot
2026-07-01 12:19 ` [PATCH 3/7] arm64: dts: mediatek: mt8183: " AngeloGioacchino Del Regno
2026-07-01 12:19 ` [PATCH 4/7] arm64: dts: mediatek: mt8186: " AngeloGioacchino Del Regno
2026-07-01 12:49 ` sashiko-bot [this message]
2026-07-01 12:19 ` [PATCH 5/7] arm64: dts: mediatek: mt8188: " AngeloGioacchino Del Regno
2026-07-01 12:57 ` sashiko-bot
2026-07-01 12:19 ` [PATCH 6/7] arm64: dts: mediatek: mt8192: " AngeloGioacchino Del Regno
2026-07-01 12:19 ` [PATCH 7/7] arm64: dts: mediatek: mt8195: " AngeloGioacchino Del Regno
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=20260701124907.660D71F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=angelogioacchino.delregno@collabora.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