[PATCH] arm64: dts: mediatek: add mmc2 support for mt8365-evk
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Tue Jan 14 02:38:22 PST 2025
Il 10/01/25 12:10, Alexandre Mergnat ha scritto:
> Adds support for the MMC2 interface on the MT8365 EVK board.
> It introduces a fixed regulator for the MMC2 VDD33 supply and configures
> the MMC2 node with a 4-bit bus width, high-speed capabilities, UHS
> modes, and appropriate power supplies. Enabled SDIO IRQ, wakeup source,
> and kept power during suspend for wireless chip functionality.
>
> Signed-off-by: Alexandre Mergnat <amergnat at baylibre.com>
> ---
> arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 85 +++++++++++++++++++++++++++++
> 1 file changed, 85 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
> index 7d90112a7e27..309dc76322d4 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts
> @@ -53,6 +53,15 @@ memory at 40000000 {
> reg = <0 0x40000000 0 0xc0000000>;
> };
>
> + mmc2_vdd33: mmc2_vdd33-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "mmc2_vdd33";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + gpio = <&pio 121 0>;
> + enable-active-high;
> + };
> +
> usb_otg_vbus: regulator-0 {
> compatible = "regulator-fixed";
> regulator-name = "otg_vbus";
> @@ -197,6 +206,28 @@ &mmc1 {
> status = "okay";
> };
>
> +&mmc2 {
> + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
> + bus-width = <4>;
> + cap-sd-highspeed;
> + cap-sdio-irq;
> + hs400-ds-delay = <0x12012>;
> + keep-power-in-suspend;
Why keep-power-in-suspend?
> + max-frequency = <200000000>;
> + non-removable;
> + pinctrl-0 = <&mmc2_default_pins>;
> + pinctrl-1 = <&mmc2_uhs_pins>;
> + pinctrl-names = "default", "state_uhs";
> + sd-uhs-sdr104;
> + sd-uhs-sdr25;
> + sd-uhs-sdr50;
> + vmmc-supply = <&mmc2_vdd33>;
> + vqmmc-supply = <&mt6357_vcn18_reg>;
> + wakeup-source;
> + status = "okay";
> +};
> +
> &mt6357_pmic {
> interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>;
> interrupt-controller;
> @@ -410,6 +441,60 @@ cmd-dat-pins {
> };
> };
>
> + mmc2_default_pins: mmc2-default-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
pinmux is always first, but then:
b ias-pull-....
d rive-strength
Alphabetical order please :-)
Cheers,
Angelo
More information about the linux-arm-kernel
mailing list