[PATCH] drivers: mmc: mtk-sd: disable dma for MT8188 and MT8195

David Lechner dlechner at baylibre.com
Tue Mar 17 15:21:32 CET 2026


On 3/17/26 8:31 AM, Julien Stephan wrote:
> MT8188 and MT8195 SoC should be fully compatible with MT8183, but
> currently dma is not working on these SoC. For now, disable dma.
> Investigation needed.
> 
> Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> ---
>  drivers/mmc/mtk-sd.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
> index 7a4bdee7496..8f93e51599f 100644
> --- a/drivers/mmc/mtk-sd.c
> +++ b/drivers/mmc/mtk-sd.c
> @@ -1989,6 +1989,30 @@ static const struct msdc_compatible mt8189_compat = {
>  	.enhance_rx = true,
>  };
>  
> +/* MT8188 and MT8195 should be fully compatible with MT8183
> + * but currently dma is not working on these SoC.
> + * For now, disable dma. Investigation needed.
> + */
> +static const struct msdc_compatible mt8188_compat = {
> +	.clk_div_bits = 12,
> +	.pad_tune0 = true,
> +	.async_fifo = true,
> +	.data_tune = true,
> +	.busy_check = true,
> +	.stop_clk_fix = true,
> +	.enhance_rx = true,
> +};
> +
> +static const struct msdc_compatible mt8195_compat = {
> +	.clk_div_bits = 12,
> +	.pad_tune0 = true,
> +	.async_fifo = true,
> +	.data_tune = true,
> +	.busy_check = true,
> +	.stop_clk_fix = true,
> +	.enhance_rx = true,
> +};

These are identical to mt8189_compat, so we could reuse that instead of
duplicating it two more times. MT8189 is in the same situation that it
should work, but needs investigation.

And actually mt8189_compat is also duplicate of mt7986_compat, so I probably
shouldn't have added that one and just reused mt7986_compat.

Another approach could be to revert the change that enabled DMA in mt8183_compat
and add a new .compatible = "mediatek,mt8365-mmc" that has DMA enabled since
that is the only board that has been tested where DMA is actually working.

> +
>  static const struct udevice_id msdc_ids[] = {
>  	{ .compatible = "mediatek,mt7620-mmc", .data = (ulong)&mt7620_compat },
>  	{ .compatible = "mediatek,mt7621-mmc", .data = (ulong)&mt7621_compat },
> @@ -2001,6 +2025,8 @@ static const struct udevice_id msdc_ids[] = {
>  	{ .compatible = "mediatek,mt8516-mmc", .data = (ulong)&mt8516_compat },
>  	{ .compatible = "mediatek,mt8183-mmc", .data = (ulong)&mt8183_compat },
>  	{ .compatible = "mediatek,mt8189-mmc", .data = (ulong)&mt8189_compat },
> +	{ .compatible = "mediatek,mt8188-mmc", .data = (ulong)&mt8188_compat },
> +	{ .compatible = "mediatek,mt8195-mmc", .data = (ulong)&mt8195_compat },
>  	{}
>  };
>  
> 
> ---
> base-commit: d31f96cac1e25153779c44f1fe014978f9b06032
> change-id: 20260317-mt8188-mt8195-disable-mmc-disable-dma-b64499a6a47a
> 
> Best regards,



More information about the U-Boot mailing list