aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2018-02-17 14:54:50 -0500
committerMatthias Brugger <matthias.bgg@gmail.com>2018-03-11 16:36:01 -0400
commit2c002a3049f78733211b52e5e65137b292f0e8dd (patch)
tree9d6350003bb3159f0818b13db8296de4579db242
parent0f12d5b3c77af2ba86f69743d362980ec9c9325b (diff)
arm64: dts: mt7622: add mmc related device nodes
add mmc device nodes and proper setup for used pins Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Jimin Wang <jimin.wang@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
-rw-r--r--arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts106
-rw-r--r--arch/arm64/boot/dts/mediatek/mt7622.dtsi20
2 files changed, 126 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
index cc89e2e3c597..45d8655ee423 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -8,6 +8,7 @@
8 8
9/dts-v1/; 9/dts-v1/;
10#include <dt-bindings/input/input.h> 10#include <dt-bindings/input/input.h>
11#include <dt-bindings/gpio/gpio.h>
11 12
12#include "mt7622.dtsi" 13#include "mt7622.dtsi"
13#include "mt6380.dtsi" 14#include "mt6380.dtsi"
@@ -53,6 +54,14 @@
53 reg = <0 0x40000000 0 0x3F000000>; 54 reg = <0 0x40000000 0 0x3F000000>;
54 }; 55 };
55 56
57 reg_1p8v: regulator-1p8v {
58 compatible = "regulator-fixed";
59 regulator-name = "fixed-1.8V";
60 regulator-min-microvolt = <1800000>;
61 regulator-max-microvolt = <1800000>;
62 regulator-always-on;
63 };
64
56 reg_3p3v: regulator-3p3v { 65 reg_3p3v: regulator-3p3v {
57 compatible = "regulator-fixed"; 66 compatible = "regulator-fixed";
58 regulator-name = "fixed-3.3V"; 67 regulator-name = "fixed-3.3V";
@@ -89,6 +98,23 @@
89 function = "emmc", "emmc_rst"; 98 function = "emmc", "emmc_rst";
90 groups = "emmc"; 99 groups = "emmc";
91 }; 100 };
101
102 /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
103 * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
104 * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
105 */
106 conf-cmd-dat {
107 pins = "NDL0", "NDL1", "NDL2",
108 "NDL3", "NDL4", "NDL5",
109 "NDL6", "NDL7", "NRB";
110 input-enable;
111 bias-pull-up;
112 };
113
114 conf-clk {
115 pins = "NCLE";
116 bias-pull-down;
117 };
92 }; 118 };
93 119
94 emmc_pins_uhs: emmc-pins-uhs { 120 emmc_pins_uhs: emmc-pins-uhs {
@@ -96,6 +122,21 @@
96 function = "emmc"; 122 function = "emmc";
97 groups = "emmc"; 123 groups = "emmc";
98 }; 124 };
125
126 conf-cmd-dat {
127 pins = "NDL0", "NDL1", "NDL2",
128 "NDL3", "NDL4", "NDL5",
129 "NDL6", "NDL7", "NRB";
130 input-enable;
131 drive-strength = <4>;
132 bias-pull-up;
133 };
134
135 conf-clk {
136 pins = "NCLE";
137 drive-strength = <4>;
138 bias-pull-down;
139 };
99 }; 140 };
100 141
101 eth_pins: eth-pins { 142 eth_pins: eth-pins {
@@ -194,6 +235,27 @@
194 function = "sd"; 235 function = "sd";
195 groups = "sd_0"; 236 groups = "sd_0";
196 }; 237 };
238
239 /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
240 * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
241 * DAT2, DAT3, CMD, CLK for SD respectively.
242 */
243 conf-cmd-data {
244 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
245 "I2S2_IN","I2S4_OUT";
246 input-enable;
247 drive-strength = <8>;
248 bias-pull-up;
249 };
250 conf-clk {
251 pins = "I2S3_OUT";
252 drive-strength = <12>;
253 bias-pull-down;
254 };
255 conf-cd {
256 pins = "TXD3";
257 bias-pull-up;
258 };
197 }; 259 };
198 260
199 sd0_pins_uhs: sd0-pins-uhs { 261 sd0_pins_uhs: sd0-pins-uhs {
@@ -201,6 +263,18 @@
201 function = "sd"; 263 function = "sd";
202 groups = "sd_0"; 264 groups = "sd_0";
203 }; 265 };
266
267 conf-cmd-data {
268 pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
269 "I2S2_IN","I2S4_OUT";
270 input-enable;
271 bias-pull-up;
272 };
273
274 conf-clk {
275 pins = "I2S3_OUT";
276 bias-pull-down;
277 };
204 }; 278 };
205 279
206 /* Serial NAND is shared pin with SPI-NOR */ 280 /* Serial NAND is shared pin with SPI-NOR */
@@ -311,6 +385,38 @@
311 status = "okay"; 385 status = "okay";
312}; 386};
313 387
388&mmc0 {
389 pinctrl-names = "default", "state_uhs";
390 pinctrl-0 = <&emmc_pins_default>;
391 pinctrl-1 = <&emmc_pins_uhs>;
392 status = "okay";
393 bus-width = <8>;
394 max-frequency = <50000000>;
395 cap-mmc-highspeed;
396 mmc-hs200-1_8v;
397 vmmc-supply = <&reg_3p3v>;
398 vqmmc-supply = <&reg_1p8v>;
399 assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
400 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
401 non-removable;
402};
403
404&mmc1 {
405 pinctrl-names = "default", "state_uhs";
406 pinctrl-0 = <&sd0_pins_default>;
407 pinctrl-1 = <&sd0_pins_uhs>;
408 status = "okay";
409 bus-width = <4>;
410 max-frequency = <50000000>;
411 cap-sd-highspeed;
412 r_smpl = <1>;
413 cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
414 vmmc-supply = <&reg_3p3v>;
415 vqmmc-supply = <&reg_3p3v>;
416 assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
417 assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
418};
419
314&nandc { 420&nandc {
315 pinctrl-names = "default"; 421 pinctrl-names = "default";
316 pinctrl-0 = <&parallel_nand_pins>; 422 pinctrl-0 = <&parallel_nand_pins>;
diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 8cff67d70582..e9d5130df8d1 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -527,6 +527,26 @@
527 status = "disabled"; 527 status = "disabled";
528 }; 528 };
529 529
530 mmc0: mmc@11230000 {
531 compatible = "mediatek,mt7622-mmc";
532 reg = <0 0x11230000 0 0x1000>;
533 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
534 clocks = <&pericfg CLK_PERI_MSDC30_0_PD>,
535 <&topckgen CLK_TOP_MSDC50_0_SEL>;
536 clock-names = "source", "hclk";
537 status = "disabled";
538 };
539
540 mmc1: mmc@11240000 {
541 compatible = "mediatek,mt7622-mmc";
542 reg = <0 0x11240000 0 0x1000>;
543 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
544 clocks = <&pericfg CLK_PERI_MSDC30_1_PD>,
545 <&topckgen CLK_TOP_AXI_SEL>;
546 clock-names = "source", "hclk";
547 status = "disabled";
548 };
549
530 ssusbsys: ssusbsys@1a000000 { 550 ssusbsys: ssusbsys@1a000000 {
531 compatible = "mediatek,mt7622-ssusbsys", 551 compatible = "mediatek,mt7622-ssusbsys",
532 "syscon"; 552 "syscon";