From nobody Wed Nov 13 08:33:00 2024 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 86474C433FE for ; Sun, 6 Nov 2022 08:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbiKFIu7 (ORCPT ); Sun, 6 Nov 2022 03:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiKFIur (ORCPT ); Sun, 6 Nov 2022 03:50:47 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6358EEE1B; Sun, 6 Nov 2022 01:50:45 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 4C6693FF80; Sun, 6 Nov 2022 08:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I8pt2+KmqRWBiHp3P2XuLLNWs+iO8ZecH+1EyBWArlU=; b=r/k7pfO0LxpxO2HYL9nmgH66BQmhBFgTP7mwqdG+/v2s+UpY5uS2YnNcP+JltFrepeRgtn pnlGMgPUjsH7onTquyff4lTuybZ0ZrJxadlTKFHXk64/HglgpXSBoz3j2GNYm/Dxzn1jQa cu63YlJTFp/mUxZvV9QeEp5MDcr+Iu0= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 886BD36054A; Sun, 6 Nov 2022 08:50:42 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Shih Subject: [RFC v3 05/11] arm64: dts: mt7986: add mmc related device nodes Date: Sun, 6 Nov 2022 09:50:28 +0100 Message-Id: <20221106085034.12582-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 107ad7f6-3751-41d1-8083-e99b67535d1e Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds mmc support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- v3: - fix pullups/pulldowns for mt7986a-rfb to have generic bias-pull-* v2: - update mmc-node because clocks changed --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 87 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 ++++ 2 files changed, 102 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 2b5d7ea31b4d..e1a0331aaa5f 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -5,6 +5,8 @@ */ =20 /dts-v1/; +#include + #include "mt7986a.dtsi" =20 / { @@ -24,6 +26,15 @@ memory@40000000 { reg =3D <0 0x40000000 0 0x40000000>; }; =20 + reg_1p8v: regulator-1p8v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-1.8V"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + }; + reg_3p3v: regulator-3p3v { compatible =3D "regulator-fixed"; regulator-name =3D "fixed-3.3V"; @@ -76,7 +87,83 @@ switch: switch@0 { }; }; =20 +&mmc0 { + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; + bus-width =3D <8>; + max-frequency =3D <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay =3D <0x14014>; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status =3D "okay"; +}; + &pio { + mmc0_pins_default: mmc0-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 1c7a973c28ca..32c26b239ae6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -284,6 +284,21 @@ ssusb: usb@11200000 { status =3D "disabled"; }; =20 + mmc0: mmc@11230000 { + compatible =3D "mediatek,mt7986-mmc"; + reg =3D <0 0x11230000 0 0x1000>, + <0 0x11c20000 0 0x1000>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&infracfg CLK_INFRA_MSDC_HCK_CK>, + <&infracfg CLK_INFRA_MSDC_CK>, + <&infracfg CLK_INFRA_MSDC_133M_CK>, + <&infracfg CLK_INFRA_MSDC_66M_CK>; + clock-names =3D "source", "hclk", "source_cg", "bus_clk", + "sys_cg"; + status =3D "disabled"; + }; + usb_phy: t-phy@11e10000 { compatible =3D "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; --=20 2.34.1