aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2016-10-20 07:42:54 -0400
committerKevin Hilman <khilman@baylibre.com>2016-10-20 13:16:39 -0400
commitef8d2ffedf1878e4dc8d19d83371cef8e2457a44 (patch)
tree2484eef3d042e9d23112a9b1895d7cf8b1563b43
parent5a0803bd5ae289fbacd4d207e8c5e6719224ef92 (diff)
ARM64: dts: meson-gxbb: add MMC support
Add binding and basic support for the SD/eMMC controller on Amlogic S905/GXBB devices. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: added nodes for GX, enabled SDIO on P20x] Signed-off-by: Kevin Hilman <khilman@baylibre.com>
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gx.dtsi21
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts88
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi98
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi24
4 files changed, 230 insertions, 1 deletions
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index a6cd953ef7e1..fd1d0deef889 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -203,6 +203,27 @@
203 #address-cells = <2>; 203 #address-cells = <2>;
204 #size-cells = <2>; 204 #size-cells = <2>;
205 ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>; 205 ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
206
207 sd_emmc_a: mmc@70000 {
208 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
209 reg = <0x0 0x70000 0x0 0x2000>;
210 interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>;
211 status = "disabled";
212 };
213
214 sd_emmc_b: mmc@72000 {
215 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
216 reg = <0x0 0x72000 0x0 0x2000>;
217 interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
218 status = "disabled";
219 };
220
221 sd_emmc_c: mmc@74000 {
222 compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
223 reg = <0x0 0x74000 0x0 0x2000>;
224 interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
225 status = "disabled";
226 };
206 }; 227 };
207 }; 228 };
208}; 229};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index a45d1013c225..238fbeacd330 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -85,6 +85,56 @@
85 default-state = "off"; 85 default-state = "off";
86 }; 86 };
87 }; 87 };
88
89 tflash_vdd: regulator-tflash_vdd {
90 /*
91 * signal name from schematics: TFLASH_VDD_EN
92 */
93 compatible = "regulator-fixed";
94
95 regulator-name = "TFLASH_VDD";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
98
99 gpio = <&gpio_ao GPIOAO_12 GPIO_ACTIVE_HIGH>;
100 enable-active-high;
101 };
102
103 tf_io: gpio-regulator-tf_io {
104 compatible = "regulator-gpio";
105
106 regulator-name = "TF_IO";
107 regulator-min-microvolt = <1800000>;
108 regulator-max-microvolt = <3300000>;
109
110 /*
111 * signal name from schematics: TF_3V3N_1V8_EN
112 */
113 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
114 gpios-states = <0>;
115
116 states = <3300000 0
117 1800000 1>;
118 };
119
120 vcc1v8: regulator-vcc1v8 {
121 compatible = "regulator-fixed";
122 regulator-name = "VCC1V8";
123 regulator-min-microvolt = <1800000>;
124 regulator-max-microvolt = <1800000>;
125 };
126
127 vcc3v3: regulator-vcc3v3 {
128 compatible = "regulator-fixed";
129 regulator-name = "VCC3V3";
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
132 };
133
134 emmc_pwrseq: emmc-pwrseq {
135 compatible = "mmc-pwrseq-emmc";
136 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
137 };
88}; 138};
89 139
90&uart_AO { 140&uart_AO {
@@ -127,3 +177,41 @@
127&usb1 { 177&usb1 {
128 status = "okay"; 178 status = "okay";
129}; 179};
180
181/* SD */
182&sd_emmc_b {
183 status = "okay";
184 pinctrl-0 = <&sdcard_pins>;
185 pinctrl-names = "default";
186
187 bus-width = <4>;
188 cap-sd-highspeed;
189 max-frequency = <100000000>;
190 disable-wp;
191
192 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
193 cd-inverted;
194
195 vmmc-supply = <&tflash_vdd>;
196 vqmmc-supply = <&tf_io>;
197};
198
199/* eMMC */
200&sd_emmc_c {
201 status = "okay";
202 pinctrl-0 = <&emmc_pins>;
203 pinctrl-names = "default";
204
205 bus-width = <8>;
206 cap-sd-highspeed;
207 max-frequency = <200000000>;
208 non-removable;
209 disable-wp;
210 cap-mmc-highspeed;
211 mmc-ddr-1_8v;
212 mmc-hs200-1_8v;
213
214 mmc-pwrseq = <&emmc_pwrseq>;
215 vmmc-supply = <&vcc3v3>;
216 vqmmc-supply = <&vcc1v8>;
217};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index 031d69bee16a..86e740fb5969 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -70,6 +70,47 @@
70 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 70 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
71 enable-active-high; 71 enable-active-high;
72 }; 72 };
73
74 vddio_card: gpio-regulator {
75 compatible = "regulator-gpio";
76
77 regulator-name = "VDDIO_CARD";
78 regulator-min-microvolt = <1800000>;
79 regulator-max-microvolt = <3300000>;
80
81 gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
82 gpios-states = <1>;
83
84 /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
85 states = <1800000 0
86 3300000 1>;
87 };
88
89 vddio_boot: regulator-vddio_boot {
90 compatible = "regulator-fixed";
91 regulator-name = "VDDIO_BOOT";
92 regulator-min-microvolt = <1800000>;
93 regulator-max-microvolt = <1800000>;
94 };
95
96 vddao_3v3: regulator-vddao_3v3 {
97 compatible = "regulator-fixed";
98 regulator-name = "VDDAO_3V3";
99 regulator-min-microvolt = <3300000>;
100 regulator-max-microvolt = <3300000>;
101 };
102
103 vcc_3v3: regulator-vcc_3v3 {
104 compatible = "regulator-fixed";
105 regulator-name = "VCC_3V3";
106 regulator-min-microvolt = <3300000>;
107 regulator-max-microvolt = <3300000>;
108 };
109
110 emmc_pwrseq: emmc-pwrseq {
111 compatible = "mmc-pwrseq-emmc";
112 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
113 };
73}; 114};
74 115
75/* This UART is brought out to the DB9 connector */ 116/* This UART is brought out to the DB9 connector */
@@ -107,3 +148,60 @@
107&usb1 { 148&usb1 {
108 status = "okay"; 149 status = "okay";
109}; 150};
151
152/* Wireless SDIO Module */
153&sd_emmc_a {
154 status = "okay";
155 pinctrl-0 = <&sdio_pins>;
156 pinctrl-names = "default";
157 #address-cells = <1>;
158 #size-cells = <0>;
159
160 bus-width = <4>;
161 cap-sd-highspeed;
162 max-frequency = <100000000>;
163
164 non-removable;
165 disable-wp;
166
167 vmmc-supply = <&vddao_3v3>;
168 vqmmc-supply = <&vddio_boot>;
169};
170
171/* SD card */
172&sd_emmc_b {
173 status = "okay";
174 pinctrl-0 = <&sdcard_pins>;
175 pinctrl-names = "default";
176
177 bus-width = <4>;
178 cap-sd-highspeed;
179 max-frequency = <100000000>;
180 disable-wp;
181
182 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
183 cd-inverted;
184
185 vmmc-supply = <&vddao_3v3>;
186 vqmmc-supply = <&vddio_card>;
187};
188
189/* eMMC */
190&sd_emmc_c {
191 status = "okay";
192 pinctrl-0 = <&emmc_pins>;
193 pinctrl-names = "default";
194
195 bus-width = <8>;
196 cap-sd-highspeed;
197 cap-mmc-highspeed;
198 max-frequency = <200000000>;
199 non-removable;
200 disable-wp;
201 mmc-ddr-1_8v;
202 mmc-hs200-1_8v;
203
204 mmc-pwrseq = <&emmc_pwrseq>;
205 vmmc-supply = <&vcc_3v3>;
206 vqmmc-supply = <&vddio_boot>;
207};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index aad639ab0112..22940bbab7ff 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -349,7 +349,8 @@
349 mux { 349 mux {
350 groups = "emmc_nand_d07", 350 groups = "emmc_nand_d07",
351 "emmc_cmd", 351 "emmc_cmd",
352 "emmc_clk"; 352 "emmc_clk",
353 "emmc_ds";
353 function = "emmc"; 354 function = "emmc";
354 }; 355 };
355 }; 356 };
@@ -545,3 +546,24 @@
545 #mbox-cells = <1>; 546 #mbox-cells = <1>;
546 }; 547 };
547}; 548};
549
550&sd_emmc_a {
551 clocks = <&clkc CLKID_SD_EMMC_A>,
552 <&xtal>,
553 <&clkc CLKID_FCLK_DIV2>;
554 clock-names = "core", "clkin0", "clkin1";
555};
556
557&sd_emmc_b {
558 clocks = <&clkc CLKID_SD_EMMC_B>,
559 <&xtal>,
560 <&clkc CLKID_FCLK_DIV2>;
561 clock-names = "core", "clkin0", "clkin1";
562};
563
564&sd_emmc_c {
565 clocks = <&clkc CLKID_SD_EMMC_C>,
566 <&xtal>,
567 <&clkc CLKID_FCLK_DIV2>;
568 clock-names = "core", "clkin0", "clkin1";
569};