UPSTREAM: ARM: dts: rockchip: remove broken-cd from emmc and sdio
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3036-kylin.dts
1 /*
2  * This file is dual-licensed: you can use it either under the terms
3  * of the GPL or the X11 license, at your option. Note that this dual
4  * licensing only applies to this file, and not this project as a
5  * whole.
6  *
7  *  a) This file is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of the
10  *     License, or (at your option) any later version.
11  *
12  *     This file is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  *  Or, alternatively,
18  *
19  *  b) Permission is hereby granted, free of charge, to any person
20  *     obtaining a copy of this software and associated documentation
21  *     files (the "Software"), to deal in the Software without
22  *     restriction, including without limitation the rights to use,
23  *     copy, modify, merge, publish, distribute, sublicense, and/or
24  *     sell copies of the Software, and to permit persons to whom the
25  *     Software is furnished to do so, subject to the following
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
31  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  *     OTHER DEALINGS IN THE SOFTWARE.
39  */
40
41 /dts-v1/;
42
43 #include "rk3036.dtsi"
44
45 / {
46         model = "Rockchip RK3036 KylinBoard";
47         compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
48
49         leds: gpio-leds {
50                 compatible = "gpio-leds";
51
52                 work {
53                         gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
54                         label = "kylin:red:led";
55                         pinctrl-names = "default";
56                         pinctrl-0 = <&led_ctl>;
57                 };
58         };
59
60         sdio_pwrseq: sdio-pwrseq {
61                 compatible = "mmc-pwrseq-simple";
62                 pinctrl-names = "default";
63                 pinctrl-0 = <&bt_wake_h>;
64
65                 /*
66                  * On the module itself this is one of these (depending
67                  * on the actual card populated):
68                  * - SDIO_RESET_L_WL_REG_ON
69                  * - SDIO_RESET_L_WL_RST
70                  * - SDIO_RESET_L_BT_EN
71                  */
72                 reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>, /* WL_REG_ON */
73                               <&gpio0 27 GPIO_ACTIVE_LOW>, /* WL_RST */
74                               <&gpio2 9  GPIO_ACTIVE_LOW>; /* BT_EN */
75         };
76
77         sound {
78                 compatible = "simple-audio-card";
79                 simple-audio-card,format = "i2s";
80                 simple-audio-card,name = "rockchip,rt5616-codec";
81                 simple-audio-card,mclk-fs = <512>;
82                 simple-audio-card,widgets =
83                         "Microphone", "Microphone Jack",
84                         "Headphone", "Headphone Jack";
85                 simple-audio-card,routing =
86                         "MIC1", "Microphone Jack",
87                         "MIC2", "Microphone Jack",
88                         "Microphone Jack", "micbias1",
89                         "Headphone Jack", "HPOL",
90                         "Headphone Jack", "HPOR";
91
92                 simple-audio-card,cpu {
93                         sound-dai = <&i2s>;
94                 };
95
96                 simple-audio-card,codec {
97                         sound-dai = <&rt5616>;
98                 };
99         };
100
101         vcc_sys: vsys-regulator {
102                 compatible = "regulator-fixed";
103                 regulator-name = "vcc_sys";
104                 regulator-min-microvolt = <5000000>;
105                 regulator-max-microvolt = <5000000>;
106                 regulator-always-on;
107                 regulator-boot-on;
108         };
109 };
110
111 &acodec {
112         status = "okay";
113 };
114
115 &emac {
116         pinctrl-names = "default";
117         pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
118         phy = <&phy0>;
119         phy-reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* PHY_RST */
120         phy-reset-duration = <10>; /* millisecond */
121
122         status = "okay";
123
124         phy0: ethernet-phy@0 {
125                 reg = <0>;
126         };
127 };
128
129 &emmc {
130         status = "okay";
131 };
132
133 &hdmi {
134         status = "okay";
135 };
136
137 &i2c1 {
138         clock-frequency = <400000>;
139
140         status = "okay";
141
142         rk808: pmic@1b {
143                 compatible = "rockchip,rk808";
144                 reg = <0x1b>;
145                 interrupt-parent = <&gpio2>;
146                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
147                 pinctrl-names = "default";
148                 pinctrl-0 = <&pmic_int &global_pwroff>;
149                 rockchip,system-power-controller;
150                 wakeup-source;
151                 #clock-cells = <1>;
152                 clock-output-names = "xin32k", "rk808-clkout2";
153
154                 vcc1-supply = <&vcc_sys>;
155                 vcc2-supply = <&vcc_sys>;
156                 vcc3-supply = <&vcc_sys>;
157                 vcc4-supply = <&vcc_sys>;
158                 vcc6-supply = <&vcc_sys>;
159                 vcc7-supply = <&vcc_sys>;
160                 vcc8-supply = <&vcc_18>;
161                 vcc9-supply = <&vcc_io>;
162                 vcc10-supply = <&vcc_io>;
163                 vcc11-supply = <&vcc_sys>;
164                 vcc12-supply = <&vcc_io>;
165                 vddio-supply = <&vccio_pmu>;
166
167                 regulators {
168                         vdd_cpu: DCDC_REG1 {
169                                 regulator-always-on;
170                                 regulator-boot-on;
171                                 regulator-min-microvolt = <750000>;
172                                 regulator-max-microvolt = <1350000>;
173                                 regulator-name = "vdd_arm";
174                                 regulator-state-mem {
175                                         regulator-off-in-suspend;
176                                 };
177                         };
178
179                         vdd_gpu: DCDC_REG2 {
180                                 regulator-always-on;
181                                 regulator-boot-on;
182                                 regulator-min-microvolt = <850000>;
183                                 regulator-max-microvolt = <1250000>;
184                                 regulator-name = "vdd_gpu";
185                                 regulator-state-mem {
186                                         regulator-on-in-suspend;
187                                         regulator-suspend-microvolt = <1000000>;
188                                 };
189                         };
190
191                         vcc_ddr: DCDC_REG3 {
192                                 regulator-always-on;
193                                 regulator-boot-on;
194                                 regulator-name = "vcc_ddr";
195                                 regulator-state-mem {
196                                         regulator-on-in-suspend;
197                                 };
198                         };
199
200                         vcc_io: DCDC_REG4 {
201                                 regulator-always-on;
202                                 regulator-boot-on;
203                                 regulator-min-microvolt = <3300000>;
204                                 regulator-max-microvolt = <3300000>;
205                                 regulator-name = "vcc_io";
206                                 regulator-state-mem {
207                                         regulator-on-in-suspend;
208                                         regulator-suspend-microvolt = <3300000>;
209                                 };
210                         };
211
212                         vccio_pmu: LDO_REG1 {
213                                 regulator-always-on;
214                                 regulator-boot-on;
215                                 regulator-min-microvolt = <3300000>;
216                                 regulator-max-microvolt = <3300000>;
217                                 regulator-name = "vccio_pmu";
218                                 regulator-state-mem {
219                                         regulator-on-in-suspend;
220                                         regulator-suspend-microvolt = <3300000>;
221                                 };
222                         };
223
224                         vcc_tp: LDO_REG2 {
225                                 regulator-always-on;
226                                 regulator-boot-on;
227                                 regulator-min-microvolt = <3300000>;
228                                 regulator-max-microvolt = <3300000>;
229                                 regulator-name = "vcc_tp";
230                                 regulator-state-mem {
231                                         regulator-off-in-suspend;
232                                 };
233                         };
234
235                         vdd_10: LDO_REG3 {
236                                 regulator-always-on;
237                                 regulator-boot-on;
238                                 regulator-min-microvolt = <1000000>;
239                                 regulator-max-microvolt = <1000000>;
240                                 regulator-name = "vdd_10";
241                                 regulator-state-mem {
242                                         regulator-on-in-suspend;
243                                         regulator-suspend-microvolt = <1000000>;
244                                 };
245                         };
246
247                         vcc18_lcd: LDO_REG4 {
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                                 regulator-min-microvolt = <1800000>;
251                                 regulator-max-microvolt = <1800000>;
252                                 regulator-name = "vcc18_lcd";
253                                 regulator-state-mem {
254                                         regulator-on-in-suspend;
255                                         regulator-suspend-microvolt = <1800000>;
256                                 };
257                         };
258
259                         vccio_sd: LDO_REG5 {
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                                 regulator-min-microvolt = <1800000>;
263                                 regulator-max-microvolt = <3300000>;
264                                 regulator-name = "vccio_sd";
265                                 regulator-state-mem {
266                                         regulator-on-in-suspend;
267                                         regulator-suspend-microvolt = <3300000>;
268                                 };
269                         };
270
271                         vout5: LDO_REG6 {
272                                 regulator-always-on;
273                                 regulator-boot-on;
274                                 regulator-min-microvolt = <1800000>;
275                                 regulator-max-microvolt = <2500000>;
276                                 regulator-name = "vout5";
277                                 regulator-state-mem {
278                                         regulator-on-in-suspend;
279                                         regulator-suspend-microvolt = <1800000>;
280                                 };
281                         };
282
283                         vcc_18: LDO_REG7 {
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-min-microvolt = <1800000>;
287                                 regulator-max-microvolt = <1800000>;
288                                 regulator-name = "vcc_18";
289                                 regulator-state-mem {
290                                         regulator-on-in-suspend;
291                                         regulator-suspend-microvolt = <1800000>;
292                                 };
293                         };
294
295                         vcca_codec: LDO_REG8 {
296                                 regulator-always-on;
297                                 regulator-boot-on;
298                                 regulator-min-microvolt = <1800000>;
299                                 regulator-max-microvolt = <1800000>;
300                                 regulator-name = "vcca_codec";
301                                 regulator-state-mem {
302                                         regulator-on-in-suspend;
303                                         regulator-suspend-microvolt = <1800000>;
304                                 };
305                         };
306
307                         vcc_wl: SWITCH_REG1 {
308                                 regulator-always-on;
309                                 regulator-boot-on;
310                                 regulator-name = "vcc_wl";
311                                 regulator-state-mem {
312                                         regulator-on-in-suspend;
313                                 };
314                         };
315
316                         vcc_lcd: SWITCH_REG2 {
317                                 regulator-always-on;
318                                 regulator-boot-on;
319                                 regulator-name = "vcc_lcd";
320                                 regulator-state-mem {
321                                         regulator-on-in-suspend;
322                                 };
323                         };
324                 };
325         };
326 };
327
328 &i2c2 {
329         status = "okay";
330
331         rt5616: rt5616@1b {
332                 compatible = "rt5616";
333                 reg = <0x1b>;
334                 clocks = <&cru SCLK_I2S_OUT>;
335                 clock-names = "mclk";
336                 #sound-dai-cells = <0>;
337         };
338 };
339
340 &i2s {
341         #sound-dai-cells = <0>;
342         status = "okay";
343 };
344
345 &sdio {
346         status = "okay";
347
348         bus-width = <4>;
349         cap-sd-highspeed;
350         cap-sdio-irq;
351         default-sample-phase = <90>;
352         keep-power-in-suspend;
353         mmc-pwrseq = <&sdio_pwrseq>;
354         non-removable;
355         num-slots = <1>;
356         pinctrl-names = "default";
357         pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
358         sd-uhs-sdr12;
359         sd-uhs-sdr25;
360         sd-uhs-sdr50;
361         sd-uhs-sdr104;
362 };
363
364 &sdmmc {
365         bus-width = <4>;
366         cap-mmc-highspeed;
367         cap-sd-highspeed;
368         card-detect-delay = <200>;
369         disable-wp;
370         num-slots = <1>;
371         pinctrl-names = "default";
372         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
373 };
374
375 &uart0 {
376         status = "okay";
377 };
378
379 &uart2 {
380         status = "okay";
381 };
382
383 &usb_host {
384         status = "okay";
385 };
386
387 &usb_otg {
388         status = "okay";
389 };
390
391 &vop {
392         status = "okay";
393 };
394
395 &vop_mmu {
396         status = "okay";
397 };
398
399 &pinctrl {
400         leds {
401                 led_ctl: led-ctl {
402                         rockchip,pins = <2 30 RK_FUNC_GPIO &pcfg_pull_none>;
403                 };
404         };
405
406         pmic {
407                 pmic_int: pmic-int {
408                         rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
409                 };
410         };
411
412         sdio {
413                 bt_wake_h: bt-wake-h {
414                         rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
415                 };
416         };
417
418         sdmmc {
419                 sdmmc_pwr: sdmmc-pwr {
420                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
421                 };
422         };
423
424         sleep {
425                 global_pwroff: global-pwroff {
426                         rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
427                 };
428         };
429 };