From patchwork Tue Mar 7 13:17:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13163611 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3506C678D4 for ; Tue, 7 Mar 2023 13:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ufsw4XH+ymJeNToBizlpO21FJz4gVLB1ZLmKTtZwxj0=; b=VHD0iUFirSM9ci xUjBc9ZcBL1hC55grabuTy84IT47IbifYD4+ReAHgklGDNAaVEbdWfWPKsEEgJS+WmqjVL1EMIDHp vJs028Fgw86I0A2L0nEB1nET6FQl8sM3iUztywtU3W7fDeGlIH9AkOpYAyMzOEvfTW8v4lZI0wUHG R3iHWUiNrue4bN4bIrXR8SC7oRLX1q2mCb1ky0BNQyC0hLR1ESSxu7rBKxnkO9MPhKNTR1SAiq29e tmYukXale2YE+zE+jsSVluRMMx1iRYXD5b4IbP4H8zhC3yxF1rfoFiVpbory5fEvJZpzXbrxPPKGY Ag5H6efRAthhb4JfnSOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXpb-000Zp7-L6; Tue, 07 Mar 2023 13:58:20 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXe9-000UzR-3n for linux-arm-kernel@bombadil.infradead.org; Tue, 07 Mar 2023 13:46:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=PLrF8Lyon+lRRcj4/8IUgpbSTKbpVT3/7eOKhJdTSN4=; b=hGtU1BwD0I32lI3V666TQ4gInV EQVYyF/AYqIiK5y8PmOjG5HmAIBFGZmDuuiiSewq6wGBrf8ny16kuNCEa8Hq+8uRtwPPFUNaYQuLZ uHfr8uWrGqWcgIVsRKxHdEBuz/Bz5vcBrGitUNxw9wJf9O2wsl5hYuv7QgqyySQ3D1e002GHBAO2V 2uQm/+vBNFoAfpfiMZwG5OhDl9LnYoNzzjWbwiCAsHtk7/SY+6rZZNVlPc64ltiKIPoP7Jrg2K2JR Ml5fbIz9oTruA/rk81eMGVkY0DdKvFdo2vnfcsvR6Bdxv+ZxUaQrMzyMgk/BF6+pyI5azFXJRl/00 yN3vDZfA==; Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pZXCn-00H3BP-0S for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 13:18:15 +0000 Received: by mail-wm1-x32c.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so10369848wmb.5 for ; Tue, 07 Mar 2023 05:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678195091; 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=PLrF8Lyon+lRRcj4/8IUgpbSTKbpVT3/7eOKhJdTSN4=; b=wb+RgBUkEuRY+hKAiWUOlOl7QtxJXniM3HE3nTXu95DL4zm00qCTqqql3dT1Oacal1 PJ5W5dUlmyJjobXgrqG2Afo5skJBLFcOcRpXeMBonuvQsHPWGm038xNNOfO8gjGPVQeC f1e5eiCXSVmv79z4S5ZE6twk0YEXajzJZPwAH0Y0YJ3uSmSETtNna3EBOUPObem04DgW Iw0PUohV4/GaimqO9zlzB2vABmD0jVZJNaWXryZZGQBonniJFggKdE1H5qJIUg/qfzO5 S7eDrV9iHsa66wKjF5NxjDVVJlc1cKQ2pI3CqBcfpI1D1QX2yji9OE/3W7CGO9H3KYjV iZUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678195091; 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=PLrF8Lyon+lRRcj4/8IUgpbSTKbpVT3/7eOKhJdTSN4=; b=zgRuHtLD2HQeiJNnl/LPyqeioQfADaVg2HQifs819ikqpOYpo9r2uW0TbEX1Tk++zC S3MibNXYH2eF0tW6mXuyiUDMCr26j0XGq22WJVG73ADM31rvsAnl9iKSG/CPhC4k9XsU 6KgHZTLLUonPnHkZ9aO2bCoTFPDDNPlvHA3HHf3MyHcbnMDWupeyO3Pw5Osz1f7TeHrL bZ9J+p0OYy8GS4RI/Tv6fbChzyymZlHUGGOhGY8aLXe+zqZQp/wS1HlImvGMWhntQ8GU KYDoNIoEgRhiEru6Jz9VP0uGwvlOrcyV/LH5pce6HFVBFBIFR5djn9eIyT+VWRsSme4s NQvQ== X-Gm-Message-State: AO0yUKXIOVAv/94iOreDxty0CQ9Yjj0qYoS4beqiHyDc5gXYsMdv+zeP hVo8Jr5ssVakZupOSMHOUjbTEQ== X-Google-Smtp-Source: AK7set+e6Vi5onnL4uhoDo3Ml0k6sl1Cu/rHLXvGgYRU2tIEdvpwgke0JtDsAvPFU9zMg7sCw1kKHQ== X-Received: by 2002:a05:600c:4f0c:b0:3e2:1368:e3a0 with SMTP id l12-20020a05600c4f0c00b003e21368e3a0mr12631189wmq.18.1678195090908; Tue, 07 Mar 2023 05:18:10 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id hu21-20020a05600ca29500b003eaee9e0d22sm12986242wmb.33.2023.03.07.05.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:18:10 -0800 (PST) From: Alexandre Mergnat Date: Tue, 07 Mar 2023 14:17:39 +0100 Subject: [PATCH v2 10/18] arm64: dts: mediatek: add mmc support for mt8365-evk MIME-Version: 1.0 Message-Id: <20230203-evk-board-support-v2-10-6ec7cdb10ccf@baylibre.com> References: <20230203-evk-board-support-v2-0-6ec7cdb10ccf@baylibre.com> In-Reply-To: <20230203-evk-board-support-v2-0-6ec7cdb10ccf@baylibre.com> To: =?unknown-8bit?q?Zhiyong_Tao_=3Czhiyong=2Etao=40mediatek=2Ecom=3E=2C_Gue?= =?unknown-8bit?q?nter_Roeck_=3Clinux=40roeck-us=2Enet=3E=2C_Linus_Walleij_?= =?unknown-8bit?q?=3Clinus=2Ewalleij=40linaro=2Eorg=3E=2C?= =?unknown-8bit?q?_Bernhard_Rosenkr=C3=A4nzer_=3Cbero=40baylibre=2Ecom=3E=2C_?= =?unknown-8bit?q?AngeloGioacchino_Del_Regno_=3Cangelogioacchino=2Edelregno?= =?unknown-8bit?q?=40collabora=2Ecom=3E=2C?= =?unknown-8bit?q?_Ulf_Hansson_=3Culf=2Ehansson=40linaro=2Eorg=3E=2C_Wim_Van_?= =?unknown-8bit?q?Sebroeck_=3Cwim=40linux-watchdog=2Eorg=3E=2C?= =?unknown-8bit?q?_Krzysztof_Kozlowski_=3Ckrzysztof=2Ekozlowski+dt=40linaro?= =?unknown-8bit?q?=2Eorg=3E=2C_Chaotian_Jing_=3Cchaotian=2Ejing=40mediatek?= =?unknown-8bit?q?=2Ecom=3E=2C?= =?unknown-8bit?q?_Rob_Herring_=3Crobh+dt=40kernel=2Eorg=3E=2C_Wenbin_Mei_=3C?= =?unknown-8bit?q?wenbin=2Emei=40mediatek=2Ecom=3E=2C_Matthias_Brugger_=3Cma?= =?unknown-8bit?q?tthias=2Ebgg=40gmail=2Ecom=3E?= Cc: linux-mmc@vger.kernel.org, Alexandre Bailon , devicetree@vger.kernel.org, Amjad Ouled-Ameur , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org, Alexandre Mergnat , linux-mediatek@lists.infradead.org, Fabien Parent X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4900; i=amergnat@baylibre.com; h=from:subject:message-id; bh=FUvX4Y67PWFG8krX65sQgwyrwAHkOa5g9vcgPs+bb7A=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkBzmF1flymczK0c644lziXoPxw6UphNp4tJcYIBHB sYXsAe2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZAc5hQAKCRArRkmdfjHURZDvD/ 0RAz6KKvNuYMOaCJVO+YlwFHQUl7ufVeRqAQ2nUoP5miqPvR5GZQtPOzLqHo3sDVi1ZORFGkquGz/+ gLhpjCQm5oeUJeIxO+P1iDuo2HzPYUED09/OZtMZjA++LKyB2skEsy0h0akW0gE+5oav+IDl3EYagF Mh8QzZRRBAuQrGrbadno2PvFIo/KTQVOiqr/32uu1J0bxJuXs531UBykd2cpunQrJASu6/1b2Qk0jd MYxdbplii8e24onYbJNAiqFnwUHgMTqsk5pFQadEJnekEbioWUW1Dk3TH3cjvwLGVChogK4+f2cOlP uX9xhyCkX6G0zp/L9jYxqoVfRevcKE7DH/iKqarbeKOtoG3odm95ShE3YLsceOi07IA5Zzhvg85fNe y0phjAXbkE3q/jbhqgTJ543mEr6JqZyVoFz52t+oaETITDpMOs6rwOz3a94+8Sm073eS/G4LBXLaPp JxP7lk7+g1rhyRw3G+yR5xn0wNZ9l+bk/dzv0CU/4nj6j9peOseXFSB6GLWkbNXJLu75TDNJY6QR6o PnenTfT2QMVnPCr9WBNjZafATu7zqOR5uK1fVBCVMvhRVvY+G+pqNtNDTG5+KFP7KJ+e3Sr0N0zIc+ MQDlZsAh4gIPRH7xRJ9waPPqs1clC6chfhOqVRHjiteht53x2EhRMkd6sLOQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_131813_363923_3C0DEBF2 X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 2f88562c638a..b5d018686cbe 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -97,6 +97,42 @@ &i2c0 { #size-cells = <0>; }; +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + cap-mmc-hw-reset; + no-sdio; + no-sd; + hs400-ds-delay = <0x12012>; + vmmc-supply = <&mt6357_vemc_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; + non-removable; + status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_default_pins>; + pinctrl-1 = <&mmc1_uhs_pins>; + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>; + bus-width = <4>; + max-frequency = <200000000>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&mt6357_vmch_reg>; + vqmmc-supply = <&mt6357_vio18_reg>; + status = "okay"; +}; + &mt6357_pmic { interrupt-parent = <&pio>; interrupts = <145 IRQ_TYPE_LEVEL_HIGH>; @@ -123,6 +159,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 = ,