From 34b43ab5e151399eb14ce53468377c376f34e305 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 16 Mar 2026 16:55:14 -0500 Subject: [PATCH] arm: dts: mt8371: add SD card nodes Add SD card nodes to the MT8371 Genio common and MT8189 SoC device tree files. This is coming from what has been submitted upstream in Linux [1]. The process is going slow, so we a copy in U-Boot until we can switch to CONFIG_OF_UPSTREAM. Link: https://lore.kernel.org/linux-mediatek/20251203-add-mediatek-genio-520-720-evk-v1-0-df794b2a30ae@collabora.com/ [1] Reviewed-by: Julien Stephan Link: https://patch.msgid.link/20260316-mtk-ext-mmc-boot-v1-1-1aae51a44705@baylibre.com Signed-off-by: David Lechner --- arch/arm/dts/mt8189.dtsi | 12 +++++ arch/arm/dts/mt8371-genio-common.dtsi | 67 +++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/arch/arm/dts/mt8189.dtsi b/arch/arm/dts/mt8189.dtsi index 3aafb9b151f..d246be63293 100644 --- a/arch/arm/dts/mt8189.dtsi +++ b/arch/arm/dts/mt8189.dtsi @@ -191,6 +191,18 @@ status = "disabled"; }; + mmc1: mmc@11240000 { + compatible = "mediatek,mt8189-mmc"; + reg = <0 0x11240000 0 0x1000>, + <0 0x11d80000 0 0x1000>; + clocks = <&topckgen_clk CLK_TOP_MSDC30_1_SEL>, + <&pericfg_ao_clk CLK_PERAO_MSDC1_H>, + <&pericfg_ao_clk CLK_PERAO_MSDC1>; + clock-names = "source", "hclk", "source_cg"; + interrupts = ; + status = "disabled"; + }; + clock-controller@1000c000 { compatible = "mediatek,mt8189-apmixedsys", "syscon"; reg = <0 0x1000c000 0 0x1000>; diff --git a/arch/arm/dts/mt8371-genio-common.dtsi b/arch/arm/dts/mt8371-genio-common.dtsi index c6aa22b7d10..58322193aef 100644 --- a/arch/arm/dts/mt8371-genio-common.dtsi +++ b/arch/arm/dts/mt8371-genio-common.dtsi @@ -4,6 +4,8 @@ * Author: Macpaul Lin */ +#include + #include "mt8189.dtsi" #include "mt8189-pinfunc.h" #include "mt6359.dtsi" @@ -94,6 +96,23 @@ status = "okay"; }; +&mmc1 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&pio 2 GPIO_ACTIVE_HIGH>; + max-frequency = <200000000>; + no-mmc; + no-sdio; + sd-uhs-sdr50; + sd-uhs-sdr104; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + vmmc-supply = <&mt6359_vpa_buck_reg>; + vqmmc-supply = <&mt6359_vsim1_ldo_reg>; + status = "okay"; +}; + &mt6359_vufs_ldo_reg { regulator-always-on; }; @@ -162,6 +181,54 @@ }; }; + mmc1_default_pins: mmc1-default-pins { + pins-clk { + pinmux = ; + drive-strength = <6>; + bias-pull-down = ; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = <6>; + bias-pull-up = ; + }; + + pins-insert { + pinmux = ; + bias-pull-up; + }; + }; + + mmc1_uhs_pins: mmc1-uhs-pins { + pins-clk { + pinmux = ; + drive-strength = <8>; + bias-pull-down = ; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = <8>; + bias-pull-up = ; + }; + + pins-insert { + pinmux = ; + bias-pull-up; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = ,