Received: by 10.223.185.116 with SMTP id b49csp2087762wrg; Sat, 17 Feb 2018 11:57:47 -0800 (PST) X-Google-Smtp-Source: AH8x224aF678cfHAkFE9FcrlE4PXB2raFYnNnanq8Mf8tHnB/uQFG0nCzGAWCpJLvM1NPRcNRt1U X-Received: by 10.98.251.5 with SMTP id x5mr10022255pfm.18.1518897467878; Sat, 17 Feb 2018 11:57:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518897467; cv=none; d=google.com; s=arc-20160816; b=H1tTgFHNHr8Jb6VPcgkzDFNISEU6lYklcSvz4DYLOaEDO7oBYNeUSCgS9hr04tSWWB g3WS4qJI3AJk6+rZvfXq83woxSoEv2kf13Vbnlw8pDldboxS9QcTQOFLcrcb0rceDXQC 0lN2AFJ2coC4s20Qel1HMqxZJgOg1r8+ydlx0xmBa2m2EYS8SjFxzbkdBpaR0P7CHQae mUhA240JWpp/4HLUSnyNj44uodIegwwqj6ozPoIm/7obdF3IjKVH1IAmzt4l6V8UPgah 3uM5V8bJ6QupdTVdWmbyGO8H54x6yE4IrK9vNzz4yJ6i6YIp0SCGv1ACzBZgHMzcw+Bi fZAw== 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=AZqHBTH6oarQ2tF77FSZcT2isUQishkV1hPsHCZ+fv0=; b=Z7455DzGos05RJNnRGMxy/8Cw1HQ5MlPAtvvAiIoQq5jOB6XsQg6ezSxFfM3UHB1mc Bq05ff4LxcrdwRhQv5vjX3I7QUSrmvVjF9SivOgENcl6tEGLkrmBUymRUZL4BlWqGUx8 P29ZhE89hF5W4cC0M+n6oImBT4Yai2Cv0raw7Dj0OJrfvGqMO1Ux0g/USv7d0ra1VNzj gqcXwYROrfXp2nlHWRi6lun4+DhvlkeSJEw7YD7ulEJzOXLhgCpZ96+iLqtzL89B4Gby qCWZt2ggPdfMJZj1A1TD6ShUujWmZMyOyShqI1Vc0Uqnc0GIgXMOsUvsMn2gozRQShAX I7GA== 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 u76si2241873pgb.725.2018.02.17.11.57.33; Sat, 17 Feb 2018 11:57:47 -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 S1751377AbeBQTzi (ORCPT + 99 others); Sat, 17 Feb 2018 14:55:38 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:14702 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751318AbeBQTzK (ORCPT ); Sat, 17 Feb 2018 14:55:10 -0500 X-UUID: 81ea3f9a049a4296bbbe0c7030aa0412-20180218 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1513568465; Sun, 18 Feb 2018 03:55:04 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 18 Feb 2018 03:55:03 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sun, 18 Feb 2018 03:55:03 +0800 From: To: , , , , CC: , , Sean Wang , Jimin Wang Subject: [PATCH v3 15/15] arm64: dts: mt7622: add mmc related device nodes Date: Sun, 18 Feb 2018 03:54:50 +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 cc89e2e..45d8655 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 ffb934b..0f1ebddd 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -527,6 +527,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