From patchwork Fri Jan 12 09:46:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13518125 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 D19B3C4706C for ; Fri, 12 Jan 2024 09:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8iPDIrB/eMq+eo4a2avQsGGX37iL6bRK9h6vCw5haOo=; b=xtG+NAez3qIxjBqQa0LyouVOAH yq5lEAdw+pkIc3fNoMzU9AIe1zJ6eDQ7DX74nxdF5iLkn9sAzTVZ2GSX4Vj/bUhWNxeBBNRdigaZC 594yHZlvtYSwVY5kSQjkvpwnRQ78uHDEQOhwSZMC7bmXJCpVif6jqx7lc6dnsUh4JwCMv+UI1NJb/ QWbLi93MM6ofrfhMhCaVpWx20Vr2aUpebtiFqcx06pnETbyKOs7ftfQoREQI/Dn7aY8pNeDgiWWM2 /MJszUSVYLoNVtOzU+749cFgc1bg//pDBwKfdS98v0sxjr5Io0WBOsbypqfZS/4OB5tp+cRFjDUw1 9TYngFbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rOE7z-002NOk-17; Fri, 12 Jan 2024 09:47:03 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rOE7j-002N9s-2j; Fri, 12 Jan 2024 09:46:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705052806; bh=xzl9gPWaWLVwF43xwbktPogCDQkqXUy+iSHTpf7+QEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KX1/i9G5+CviCWZxLYvfavQ6cB3zo4pP9ZJH7JQKHMHvXHA0Ekb2KEsB9z8sazd2v qu3EZle3ivZ0jkXOmTBdmOiSbAuCxF3yveaKb0t3V6AcTNVigZDoPZdB9mWSYhMkc8 iHOqpGdnvc5CQtm+6wJ4f69ZDKRYG/yT6gZkZWy6ezHQkFj4TOGEl9vfHqVF4nnbh8 ZR7xFu1T+RJerAU3rbvhR70eNHE7JLJ07O8yEIe8xrBMsqnGk+M//JkBE6uxY5xytT 8ZsRr2w7gaPu7wiZNHSU0bDLCFzhrFFdu+dAnYmsjEpIyegJmKcazMFLs2fNKOk24q r0Q6f2kPX5hGA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (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 madrid.collaboradmins.com (Postfix) with ESMTPSA id D3DA5378202D; Fri, 12 Jan 2024 09:46:45 +0000 (UTC) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, hsinyi@chromium.org, nfraprado@collabora.com, macpaul.lin@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 08/15] arm64: dts: mediatek: radxa-nio-12l: Add support for eMMC and MicroSD Date: Fri, 12 Jan 2024 10:46:25 +0100 Message-ID: <20240112094632.66310-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112094632.66310-1-angelogioacchino.delregno@collabora.com> References: <20240112094632.66310-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-20240112_014648_009563_A7E520AA X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Enable and properly configure the MMC0/1 controllers to add support for the eMMC and MicroSD slot (respectively) found on this board. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt8395-radxa-nio-12l.dts | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts index 3b8880db49ff..8492cf52413f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts +++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts @@ -276,6 +276,44 @@ mt6360_ldo7: ldo7 { }; }; +/* MMC0 Controller: eMMC (HS400). Power lines are shared with UFS! */ +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_default_pins>; + pinctrl-1 = <&mmc0_uhs_pins>; + bus-width = <8>; + max-frequency = <200000000>; + hs400-ds-delay = <0x14c11>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sdio; + no-sd; + non-removable; + vmmc-supply = <&mt6359_vemc_1_ldo_reg>; + vqmmc-supply = <&mt6359_vufs_ldo_reg>; + status = "okay"; +}; + +/* MMC1 Controller: MicroSD card slot */ +&mmc1 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc1_default_pins>, <&mmc1_pins_detect>; + pinctrl-1 = <&mmc1_default_pins>; + bus-width = <4>; + max-frequency = <200000000>; + cap-sd-highspeed; + cd-gpios = <&pio 129 GPIO_ACTIVE_LOW>; + no-mmc; + no-sdio; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&mt6360_ldo5>; + vqmmc-supply = <&mt6360_ldo3>; + status = "okay"; +}; + &mt6359_vaud18_ldo_reg { regulator-always-on; }; @@ -427,6 +465,96 @@ pins { }; }; + mmc0_default_pins: mmc0-default-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <6>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + bias-pull-up = ; + drive-strength = <6>; + input-enable; + }; + + pins-rst { + pinmux = ; + bias-pull-up = ; + drive-strength = <6>; + }; + }; + + mmc0_uhs_pins: mmc0-uhs-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + , + , + , + , + ; + bias-pull-up = ; + drive-strength = <8>; + input-enable; + }; + + pins-ds { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-rst { + pinmux = ; + bias-pull-up = ; + drive-strength = <8>; + }; + }; + + mmc1_default_pins: mmc1-default-pins { + pins-clk { + pinmux = ; + bias-pull-down = ; + drive-strength = <8>; + }; + + pins-cmd-dat { + pinmux = , + , + , + , + ; + bias-pull-up = ; + drive-strength = <8>; + input-enable; + }; + }; + + mmc1_pins_detect: mmc1-detect-pins { + pins-insert { + pinmux = ; + bias-pull-up; + }; + }; + mt6360_pins: mt6360-pins { pins-irq { pinmux = ,