From patchwork Thu Jun 30 15:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12901982 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 D66D6C43334 for ; Thu, 30 Jun 2022 15:36:47 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R70dkHShdHYE6qzEVK/9hunPlTpdvfhvZM0S2xEIm20=; b=uK8k1klBH1YvQB oa3ZHu8nk7uIlqNSJ62HO4nOuGmQ004ylVo81hNY901HSG400urIA1FHdopGTGiQoY3QnaM6SvPft 8VLknkiVHGzqqY4a62IH6t0aZCUmcm3OwCdS88RpA/jeUtKvGjzeYTMlFS+sbJt0Jj+rr8mg4J5AB HoHIffcNTVYZmDJkgD96Noz7ldG1ZRRUcdhkgaQHtH5twz4cqaQQKQ2RmyfCDtDmeZhhEuQbviFlc cj24Nv5PnfMyNYpS7CVud0GKri1EhdAzM7J5ns9PRqLhkAg3I6UxD+fnFQdkXPDgXcZWBsJK6oNF4 KIkP67i9snrGo7mUPJwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6wCo-000JdQ-G6; Thu, 30 Jun 2022 15:35:47 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6wAc-000IX1-Nv; Thu, 30 Jun 2022 15:33:32 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 06AFF660196F; Thu, 30 Jun 2022 16:33:27 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656603208; bh=1JcXT52lGvmiujq9SlqH/7EhbMPvCM0k/ja4Nuch5SQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MStz7IyII9DzXfU97xk5lFFREtC79isX3YyBn+IxjN546cX9WP5HRcygO0CA1aFdJ QMKQctJrXAxaaeTSa8eoMjZm2TkxSb0JAS3YHtiU6Xim1Z9ag2wyxRqmg/prWrHt3G bvKWGKDPEqeC5TD1HX7cL2MhX6RClvgQIZKnyrYr9phDO3Z85LTwTHqLxAgL7dU9o+ AIdaqn1khwyFx+JLvjKlQ/snzz0wHLp+6/ml+RKUShLkrHMoY5Pwe0plEo/dEJV99g 5Hy3iagK2pttNsCKDfpP+68jNPxi4VN4vAaYIZB2Jdb7vatx3dD6z6SptxKiIb55GU Xtlr36TkYi7pg== From: AngeloGioacchino Del Regno To: robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, hsinyi@chromium.org, nfraprado@collabora.com, allen-kh.cheng@mediatek.com, gtk3@inbox.ru, luca@z3ntu.xyz, sam.shih@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org Subject: [PATCH 05/11] arm64: dts: mediatek: cherry: Add support for internal eMMC storage Date: Thu, 30 Jun 2022 17:33:10 +0200 Message-Id: <20220630153316.308767-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220630153316.308767-1-angelogioacchino.delregno@collabora.com> References: <20220630153316.308767-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_083331_005163_457A7F78 X-CRM114-Status: GOOD ( 10.26 ) 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 mtk-sd controller and pin configuration to enable the internal eMMC storage: now it is possible to mount a rootfs located at the internal storage. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: NĂ­colas F. R. A. Prado --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 091338f7d5ff..8c4b492f774f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -9,6 +9,7 @@ / { aliases { + mmc0 = &mmc0; serial0 = &uart0; }; @@ -87,6 +88,26 @@ ppvar_sys: regulator-ppvar-sys { }; }; +&mmc0 { + status = "okay"; + + bus-width = <8>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + hs400-ds-delay = <0x14c11>; + max-frequency = <200000000>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sdio; + no-sd; + non-removable; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + vmmc-supply = <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply = <&mt6359_vufs_ldo_reg>; +}; + /* for CPU-L */ &mt6359_vcore_buck_reg { regulator-always-on; @@ -123,6 +144,72 @@ &mt6359_vufs_ldo_reg { regulator-always-on; }; +&pio { + mmc0_pins_default: mmc0-default-pins { + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins-rst { + pinmux = ; + drive-strength = ; + bias-pull-up = ; + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + input-enable; + drive-strength = ; + bias-pull-up = ; + }; + + pins-clk { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins-ds { + pinmux = ; + drive-strength = ; + bias-pull-down = ; + }; + + pins-rst { + pinmux = ; + drive-strength = ; + bias-pull-up = ; + }; + }; +}; + &pmic { interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; };