Received: by 10.223.176.5 with SMTP id f5csp464641wra; Tue, 6 Feb 2018 01:55:44 -0800 (PST) X-Google-Smtp-Source: AH8x224CD67pyov54X+93fqDXDXvMNK5WIy4ix7TtLz8Bv/f3Jz+LNBPTK3uvPzdnP7Qx71+p7JW X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr1855212plg.268.1517910944610; Tue, 06 Feb 2018 01:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517910944; cv=none; d=google.com; s=arc-20160816; b=rZtenIdI6vjIQhGfWem3QgsAt9nb8HWSaNdSU0TGLHLCzQCbnUpWBdwl+iQBV4nhjC 2iDk9NbH7Yj87G99KCA6Ix/eoep65EQaaVSt7JJGFKJvruru1++s+XbX+FfBqppy1J97 hvwLQMoRVnheInXbCMP/93lfcRv9KkA3zGadPAhRz7QiGbVxu+F5ssjZ/DwZ277ZX1GD G4Yn/A99gy5gDjWw5E3MPCp0c7ZP7wzdOPSRlNxDw5aw/aEzuR0vWFW+vo/LQmDsvJMe jvJoyQO0SGfbcan3ZBdVBJJ4UikrRS24oyC3OrGy24hIoTawt1ITYdHh5FZ3hsk1O643 TE3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=zv1nVhdaA0qgn9mtWvgsEJl7j4wOL2/D2DsAoHqxxlY=; b=uEsmOmeey7p04whD6mLjArMZoLAr0l+aWg6lfUFI00cm1bm1buLdkq4fZl35t0bDBl R1uY/8ZYvl00d+Gv5dCwI3rnCEO1Jhun1PUadSCs+mlgw80XVGZB2GEEvCm1AY7IHb9p k80OVUlNDQLN6NKNHrfCyEPA0OgapPJluPJkVHdN13l+N6LQJGOy43LntfEf//sZE2JS d+S65dF76rjy4Nkt4FFH4nmf9xvKKHrommOAR/fyQ93LQcgQ5fxAobgQ9P+8sLxkwuKl Ia8JvzkTaIKyBZrSAWT6TT4+uope08nktrIwLo6yxc6yg/6uWz6EcTFfW/E06rb6qQgH sv9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10-v6si6481503plm.539.2018.02.06.01.55.30; Tue, 06 Feb 2018 01:55:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752792AbeBFJyH (ORCPT + 99 others); Tue, 6 Feb 2018 04:54:07 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:41482 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752640AbeBFJxe (ORCPT ); Tue, 6 Feb 2018 04:53:34 -0500 X-UUID: 4821aa2250b84b34891584a4743e44f9-20180206 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1717795475; Tue, 06 Feb 2018 17:53:30 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 6 Feb 2018 17:53:28 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 6 Feb 2018 17:53:28 +0800 From: To: , , , , CC: , , Sean Wang , Jimin Wang Subject: [PATCH v2 16/16] arm64: dts: mt7622: add mmc related device nodes Date: Tue, 6 Feb 2018 17:53:05 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang add mmc device nodes and proper setup for used pins Signed-off-by: Sean Wang Signed-off-by: Jimin Wang --- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 106 +++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 20 +++++ 2 files changed, 126 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts index 5746cb3..b858df6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -8,6 +8,7 @@ /dts-v1/; #include +#include #include "mt7622.dtsi" #include "mt6380.dtsi" @@ -53,6 +54,14 @@ reg = <0 0x40000000 0 0x3F000000>; }; + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; @@ -89,6 +98,23 @@ function = "emmc", "emmc_rst"; groups = "emmc"; }; + + /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7", + * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4, + * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively + */ + conf-cmd-dat { + pins = "NDL0", "NDL1", "NDL2", + "NDL3", "NDL4", "NDL5", + "NDL6", "NDL7", "NRB"; + input-enable; + bias-pull-up; + }; + + conf-clk { + pins = "NCLE"; + bias-pull-down; + }; }; emmc_pins_uhs: emmc-pins-uhs { @@ -96,6 +122,21 @@ function = "emmc"; groups = "emmc"; }; + + conf-cmd-dat { + pins = "NDL0", "NDL1", "NDL2", + "NDL3", "NDL4", "NDL5", + "NDL6", "NDL7", "NRB"; + input-enable; + drive-strength = <4>; + bias-pull-up; + }; + + conf-clk { + pins = "NCLE"; + drive-strength = <4>; + bias-pull-down; + }; }; eth_pins: eth-pins { @@ -194,6 +235,27 @@ function = "sd"; groups = "sd_0"; }; + + /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN", + * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1, + * DAT2, DAT3, CMD, CLK for SD respectively. + */ + conf-cmd-data { + pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN", + "I2S2_IN","I2S4_OUT"; + input-enable; + drive-strength = <8>; + bias-pull-up; + }; + conf-clk { + pins = "I2S3_OUT"; + drive-strength = <12>; + bias-pull-down; + }; + conf-cd { + pins = "TXD3"; + bias-pull-up; + }; }; sd0_pins_uhs: sd0-pins-uhs { @@ -201,6 +263,18 @@ function = "sd"; groups = "sd_0"; }; + + conf-cmd-data { + pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN", + "I2S2_IN","I2S4_OUT"; + input-enable; + bias-pull-up; + }; + + conf-clk { + pins = "I2S3_OUT"; + bias-pull-down; + }; }; /* Serial NAND is shared pin with SPI-NOR */ @@ -311,6 +385,38 @@ status = "okay"; }; +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&emmc_pins_default>; + pinctrl-1 = <&emmc_pins_uhs>; + status = "okay"; + bus-width = <8>; + max-frequency = <50000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>; + non-removable; +}; + +&mmc1 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&sd0_pins_default>; + pinctrl-1 = <&sd0_pins_uhs>; + status = "okay"; + bus-width = <4>; + max-frequency = <50000000>; + cap-sd-highspeed; + r_smpl = <1>; + cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_3p3v>; + assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>; + assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>; +}; + &nandc { pinctrl-names = "default"; pinctrl-0 = <¶llel_nand_pins>; diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index ed7ee78..177a651 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -524,6 +524,26 @@ status = "disabled"; }; + mmc0: mmc@11230000 { + compatible = "mediatek,mt7622-mmc"; + reg = <0 0x11230000 0 0x1000>; + interrupts = ; + clocks = <&pericfg CLK_PERI_MSDC30_0_PD>, + <&topckgen CLK_TOP_MSDC50_0_SEL>; + clock-names = "source", "hclk"; + status = "disabled"; + }; + + mmc1: mmc@11240000 { + compatible = "mediatek,mt7622-mmc"; + reg = <0 0x11240000 0 0x1000>; + interrupts = ; + clocks = <&pericfg CLK_PERI_MSDC30_1_PD>, + <&topckgen CLK_TOP_AXI_SEL>; + clock-names = "source", "hclk"; + status = "disabled"; + }; + ssusbsys: ssusbsys@1a000000 { compatible = "mediatek,mt7622-ssusbsys", "syscon"; -- 2.7.4