From patchwork Fri Mar 31 17:54:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13196442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E862FC76196 for ; Fri, 31 Mar 2023 17:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232659AbjCaRzw (ORCPT ); Fri, 31 Mar 2023 13:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbjCaRzn (ORCPT ); Fri, 31 Mar 2023 13:55:43 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC80822E9D for ; Fri, 31 Mar 2023 10:55:40 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso15888895wms.1 for ; Fri, 31 Mar 2023 10:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680285339; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=eEqKdJ/cRRwoQx7sfrrkI2nxtWfAGamDLYnb1lO/djg=; b=tVPD7Mu6GPd936gPUMTulx9mKMNrVheETZKTNRpF3YEJU8bjaMDvVTir44rnSEgxf6 fsJJP0oa/cTUFMdYeg0pBclwxC/wU2rwEyIQfpfx+waLZJ8SbsqFrmvdWYbiL0W0rQAr yjS0rI762JZt/f6h3XxSOEe5e0eiDLCCRdCRwH6leYY1k9HiXwYVUqRYubYcvmgGeeac hZwZCAG0ye3rJW/iWzHHXss4P+nClM7/RfA79b/FHmsCt1sQnDD6irPzIMIagDctOrzE UJI8l03QxIbjAkcz8b4ITu6Z7w6bRge/2FWBbr5xH/29pzgLjjxBFl4BDzwQ4cRjINZH UyVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680285339; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eEqKdJ/cRRwoQx7sfrrkI2nxtWfAGamDLYnb1lO/djg=; b=zN4dT+AfTrfswQp9FydZvcOxDOuE1tRxBmjUcoTf5H1EXwtAiBLOFps+iYj0TQjJ48 fqHCoLAE9C6lRwPrxaeSabiZwo5zREF9F1U1MAyFpbb4QV1p/+llfGak4eo+H3Qyji+r vcTaCo1NrzzNIQSwcwe7/5bE5uk+s+CfFpDLdieakfLrOJRFCYAyXN09JcS8t6+s6Fwy d9pN/Q2FckVD3/djjoxhdmBMBIc4i1lDc9FmAQ1uYtdlbbn6C7lXIqjyaM30kHCGc7F2 04C8bZjWq4KMSwCfa+LXcFikVFKalopyPqfjTfwTadrY0BCslwlQ4pBFZCTM3W3WD1G5 0G1Q== X-Gm-Message-State: AO0yUKU3zr/Vs1sjw9vFBiKsP7ACTIjx94OyW9tfPJifTOtL8VXNOuuB 1b/Jpo3cKvZFECZWaIjJd2tyqA== X-Google-Smtp-Source: AK7set+PcyMjlMi2k0dOLnWAodlIA/RHEMeEYoy3JRA1EVWGiqsJtVfC5R6kYgaTqIsJ7OqIMGTUGg== X-Received: by 2002:a05:600c:20d:b0:3ee:672d:caae with SMTP id 13-20020a05600c020d00b003ee672dcaaemr21701293wmi.36.1680285339282; Fri, 31 Mar 2023 10:55:39 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id 1-20020a05600c22c100b003eeb1d6a470sm3370171wmg.13.2023.03.31.10.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 10:55:38 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 31 Mar 2023 19:54:49 +0200 Subject: [PATCH v4 05/11] arm64: dts: mediatek: add mmc support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v4-5-5cffe66a38c0@baylibre.com> References: <20230203-evk-board-support-v4-0-5cffe66a38c0@baylibre.com> In-Reply-To: <20230203-evk-board-support-v4-0-5cffe66a38c0@baylibre.com> To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Chaotian Jing , Ulf Hansson , Wenbin Mei , Linus Walleij , Zhiyong Tao , =?utf-8?q?Bernhard_Rosenkr=C3=A4nze?= =?utf-8?q?r?= Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-mmc@vger.kernel.org, linux-gpio@vger.kernel.org, Alexandre Bailon , Fabien Parent , Amjad Ouled-Ameur , Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4904; i=amergnat@baylibre.com; h=from:subject:message-id; bh=BN8bTib7fvPNr/LKVqArOJTqhPRat6Z9u+9b+IKGQWo=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkJx6Ue0pNXCByGaW40PrlB0Qvu275uRnxwtVDAgN2 kv5uifKJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZCcelAAKCRArRkmdfjHURaR+EA CcEAacfu2Fw+LL+12biCmeL02cEynkdp7DYTz2PKzy+ZUMzuA8ArmBSVNT5+7RheszCsY3wnrSkUYl 53g9jxSnT79arrk5H5cNOalpNMZr0CLNpJNEeCG6SPdMzi08BzhxJwdVpFSePIc53qMsHVrT72EQGh Amzyzikh67DJiTJffkNOoVZ21vq+43YpPrRxTBzqXMDDZ0N78+m8w1pSQmR24k+XLSX7cS+brgB5mY yeJKXGs9ZaxvHcWk/JoD8ZNK/0SyayosDgC0bUYk1EdIkYt439OG2YY12vG7PCQU8RTf5KlCe4ik4N ik+4H92GDibiyE84P07aBPrVuwst6gbIh8VdP/hd7Xh6KiyWfc2R+fhcp+EGE0uGiX5v2WMSUrL9PI uaCvmFcm2fWyPOluSn05VB9aoo+STgqDnkEYbpkf+t0W9EpaaopYZ9ZNPiuD4K3csVtePYc3v/ORIM vQWt6+QLbV9d/CDQCdq3S/J7YVDQDyjYdW1RQlrLMG8gTmDU/nzIeoWOxo5MT/GXqv/wjXNlY9B4u2 40Ff/1sHUQgY3CkpHrnD5+M1sUTcT9Vg5loAQcoaq0CmF6PE5Rpey9+BIkxV9MUNlVuTD7iq15XJfh 83ldFpUwidQxIPygtFkNiZfz4K0T1Km9jyFQBwe87pct/svjohgPQFE3/3xQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org - Add EMMC support on mmc0 (internal memory) - Add SD-UHS support on mmc1 (external memory) Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index a238bd0092d2..cd920d09c3fe 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -95,6 +95,42 @@ &i2c0 { status = "okay"; }; +&mmc0 { + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; + bus-width = <8>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay = <0x12012>; + max-frequency = <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sd; + no-sdio; + non-removable; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + +&mmc1 { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; + max-frequency = <200000000>; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + sd-uhs-sdr104; + sd-uhs-sdr50; + vmmc-supply = <&mt6357_vmch_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + &mt6357_pmic { interrupts-extended = <&pio 145 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; @@ -118,6 +154,108 @@ pins { }; }; + mmc0_default_pins: mmc0-default-pins { + clk-pins { + pinmux = ; + bias-pull-down; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + bias-pull-up; + }; + + rst-pins { + pinmux = ; + bias-pull-up; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + ds-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + rst-pins { + pinmux = ; + drive-strength = ; + bias-pull-up; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + cd-pins { + pinmux = ; + bias-pull-up; + }; + + clk-pins { + pinmux = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + bias-pull-up = ; + }; + }; + + mmc1_uhs_pins: mmc1-uhs-pins { + clk-pins { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + cmd-dat-pins { + pinmux = , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = ,