Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[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         memory {
50                 device_type = "memory";
51                 reg = <0x60000000 0x20000000>;
52         };
53
54         leds: gpio-leds {
55                 compatible = "gpio-leds";
56
57                 work {
58                         gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
59                         label = "kylin:red:led";
60                         pinctrl-names = "default";
61                         pinctrl-0 = <&led_ctl>;
62                 };
63         };
64
65         sdio_pwrseq: sdio-pwrseq {
66                 compatible = "mmc-pwrseq-simple";
67                 pinctrl-names = "default";
68                 pinctrl-0 = <&bt_wake_h>;
69
70                 /*
71                  * On the module itself this is one of these (depending
72                  * on the actual card populated):
73                  * - SDIO_RESET_L_WL_REG_ON
74                  * - SDIO_RESET_L_WL_RST
75                  * - SDIO_RESET_L_BT_EN
76                  */
77                 reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>, /* WL_REG_ON */
78                               <&gpio0 27 GPIO_ACTIVE_LOW>, /* WL_RST */
79                               <&gpio2 9  GPIO_ACTIVE_LOW>; /* BT_EN */
80         };
81
82         sound {
83                 compatible = "simple-audio-card";
84                 simple-audio-card,format = "i2s";
85                 simple-audio-card,name = "rockchip,rt5616-codec";
86                 simple-audio-card,mclk-fs = <512>;
87                 simple-audio-card,widgets =
88                         "Microphone", "Microphone Jack",
89                         "Headphone", "Headphone Jack";
90                 simple-audio-card,routing =
91                         "MIC1", "Microphone Jack",
92                         "MIC2", "Microphone Jack",
93                         "Microphone Jack", "micbias1",
94                         "Headphone Jack", "HPOL",
95                         "Headphone Jack", "HPOR";
96
97                 simple-audio-card,dai-link@0 {
98                         format = "i2s";
99                         cpu {
100                                 sound-dai = <&i2s>;
101                         };
102
103                         codec {
104                                 sound-dai = <&rt5616>;
105                         };
106                 };
107
108                 simple-audio-card,dai-link@1 {
109                         format = "i2s";
110                         cpu {
111                                 sound-dai = <&i2s>;
112                         };
113
114                         codec {
115                                 sound-dai = <&hdmi>;
116                         };
117                 };
118         };
119
120         vcc_sys: vsys-regulator {
121                 compatible = "regulator-fixed";
122                 regulator-name = "vcc_sys";
123                 regulator-min-microvolt = <5000000>;
124                 regulator-max-microvolt = <5000000>;
125                 regulator-always-on;
126                 regulator-boot-on;
127         };
128 };
129
130 &acodec {
131         status = "okay";
132 };
133
134 &emac {
135         pinctrl-names = "default";
136         pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
137         phy = <&phy0>;
138         phy-reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* PHY_RST */
139         phy-reset-duration = <10>; /* millisecond */
140
141         status = "okay";
142
143         phy0: ethernet-phy@0 {
144                 reg = <0>;
145         };
146 };
147
148 &emmc {
149         status = "okay";
150 };
151
152 &gpu {
153         status = "okay";
154         mali-supply = <&vdd_gpu>;
155 };
156
157 &hdmi {
158         status = "okay";
159 };
160
161 &i2c1 {
162         clock-frequency = <400000>;
163
164         status = "okay";
165
166         rk808: pmic@1b {
167                 compatible = "rockchip,rk808";
168                 reg = <0x1b>;
169                 interrupt-parent = <&gpio2>;
170                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
171                 pinctrl-names = "default";
172                 pinctrl-0 = <&pmic_int &global_pwroff>;
173                 rockchip,system-power-controller;
174                 wakeup-source;
175                 #clock-cells = <1>;
176                 clock-output-names = "xin32k", "rk808-clkout2";
177
178                 vcc1-supply = <&vcc_sys>;
179                 vcc2-supply = <&vcc_sys>;
180                 vcc3-supply = <&vcc_sys>;
181                 vcc4-supply = <&vcc_sys>;
182                 vcc6-supply = <&vcc_sys>;
183                 vcc7-supply = <&vcc_sys>;
184                 vcc8-supply = <&vcc_18>;
185                 vcc9-supply = <&vcc_io>;
186                 vcc10-supply = <&vcc_io>;
187                 vcc11-supply = <&vcc_sys>;
188                 vcc12-supply = <&vcc_io>;
189                 vddio-supply = <&vccio_pmu>;
190
191                 regulators {
192                         vdd_cpu: DCDC_REG1 {
193                                 regulator-always-on;
194                                 regulator-boot-on;
195                                 regulator-min-microvolt = <1250000>;
196                                 regulator-max-microvolt = <1250000>;
197                                 regulator-name = "vdd_arm";
198                                 regulator-state-mem {
199                                         regulator-off-in-suspend;
200                                 };
201                         };
202
203                         vdd_gpu: DCDC_REG2 {
204                                 regulator-always-on;
205                                 regulator-boot-on;
206                                 regulator-min-microvolt = <850000>;
207                                 regulator-max-microvolt = <1250000>;
208                                 regulator-name = "vdd_gpu";
209                                 regulator-state-mem {
210                                         regulator-on-in-suspend;
211                                         regulator-suspend-microvolt = <1000000>;
212                                 };
213                         };
214
215                         vcc_ddr: DCDC_REG3 {
216                                 regulator-always-on;
217                                 regulator-boot-on;
218                                 regulator-name = "vcc_ddr";
219                                 regulator-state-mem {
220                                         regulator-on-in-suspend;
221                                 };
222                         };
223
224                         vcc_io: DCDC_REG4 {
225                                 regulator-always-on;
226                                 regulator-boot-on;
227                                 regulator-min-microvolt = <3300000>;
228                                 regulator-max-microvolt = <3300000>;
229                                 regulator-name = "vcc_io";
230                                 regulator-state-mem {
231                                         regulator-on-in-suspend;
232                                         regulator-suspend-microvolt = <3300000>;
233                                 };
234                         };
235
236                         vccio_pmu: LDO_REG1 {
237                                 regulator-always-on;
238                                 regulator-boot-on;
239                                 regulator-min-microvolt = <3300000>;
240                                 regulator-max-microvolt = <3300000>;
241                                 regulator-name = "vccio_pmu";
242                                 regulator-state-mem {
243                                         regulator-on-in-suspend;
244                                         regulator-suspend-microvolt = <3300000>;
245                                 };
246                         };
247
248                         vcc_tp: LDO_REG2 {
249                                 regulator-always-on;
250                                 regulator-boot-on;
251                                 regulator-min-microvolt = <3300000>;
252                                 regulator-max-microvolt = <3300000>;
253                                 regulator-name = "vcc_tp";
254                                 regulator-state-mem {
255                                         regulator-off-in-suspend;
256                                 };
257                         };
258
259                         vdd_10: LDO_REG3 {
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                                 regulator-min-microvolt = <1000000>;
263                                 regulator-max-microvolt = <1000000>;
264                                 regulator-name = "vdd_10";
265                                 regulator-state-mem {
266                                         regulator-on-in-suspend;
267                                         regulator-suspend-microvolt = <1000000>;
268                                 };
269                         };
270
271                         vcc18_lcd: LDO_REG4 {
272                                 regulator-always-on;
273                                 regulator-boot-on;
274                                 regulator-min-microvolt = <1800000>;
275                                 regulator-max-microvolt = <1800000>;
276                                 regulator-name = "vcc18_lcd";
277                                 regulator-state-mem {
278                                         regulator-on-in-suspend;
279                                         regulator-suspend-microvolt = <1800000>;
280                                 };
281                         };
282
283                         vccio_sd: LDO_REG5 {
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-min-microvolt = <1800000>;
287                                 regulator-max-microvolt = <3300000>;
288                                 regulator-name = "vccio_sd";
289                                 regulator-state-mem {
290                                         regulator-on-in-suspend;
291                                         regulator-suspend-microvolt = <3300000>;
292                                 };
293                         };
294
295                         vout5: LDO_REG6 {
296                                 regulator-always-on;
297                                 regulator-boot-on;
298                                 regulator-min-microvolt = <1800000>;
299                                 regulator-max-microvolt = <2500000>;
300                                 regulator-name = "vout5";
301                                 regulator-state-mem {
302                                         regulator-on-in-suspend;
303                                         regulator-suspend-microvolt = <1800000>;
304                                 };
305                         };
306
307                         vcc_18: LDO_REG7 {
308                                 regulator-always-on;
309                                 regulator-boot-on;
310                                 regulator-min-microvolt = <1800000>;
311                                 regulator-max-microvolt = <1800000>;
312                                 regulator-name = "vcc_18";
313                                 regulator-state-mem {
314                                         regulator-on-in-suspend;
315                                         regulator-suspend-microvolt = <1800000>;
316                                 };
317                         };
318
319                         vcca_codec: LDO_REG8 {
320                                 regulator-always-on;
321                                 regulator-boot-on;
322                                 regulator-min-microvolt = <1800000>;
323                                 regulator-max-microvolt = <1800000>;
324                                 regulator-name = "vcca_codec";
325                                 regulator-state-mem {
326                                         regulator-on-in-suspend;
327                                         regulator-suspend-microvolt = <1800000>;
328                                 };
329                         };
330
331                         vcc_wl: SWITCH_REG1 {
332                                 regulator-always-on;
333                                 regulator-boot-on;
334                                 regulator-name = "vcc_wl";
335                                 regulator-state-mem {
336                                         regulator-on-in-suspend;
337                                 };
338                         };
339
340                         vcc_lcd: SWITCH_REG2 {
341                                 regulator-always-on;
342                                 regulator-boot-on;
343                                 regulator-name = "vcc_lcd";
344                                 regulator-state-mem {
345                                         regulator-on-in-suspend;
346                                 };
347                         };
348                 };
349         };
350 };
351
352 &i2c2 {
353         status = "okay";
354
355         rt5616: rt5616@1b {
356                 compatible = "rt5616";
357                 reg = <0x1b>;
358                 clocks = <&cru SCLK_I2S_OUT>;
359                 clock-names = "mclk";
360                 #sound-dai-cells = <0>;
361         };
362 };
363
364 &i2s {
365         #sound-dai-cells = <0>;
366         status = "okay";
367 };
368
369 &sdio {
370         status = "okay";
371
372         bus-width = <4>;
373         cap-sd-highspeed;
374         cap-sdio-irq;
375         default-sample-phase = <90>;
376         keep-power-in-suspend;
377         mmc-pwrseq = <&sdio_pwrseq>;
378         non-removable;
379         num-slots = <1>;
380         pinctrl-names = "default";
381         pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
382         sd-uhs-sdr12;
383         sd-uhs-sdr25;
384         sd-uhs-sdr50;
385         sd-uhs-sdr104;
386 };
387
388 &sdmmc {
389         bus-width = <4>;
390         cap-mmc-highspeed;
391         cap-sd-highspeed;
392         card-detect-delay = <200>;
393         disable-wp;
394         num-slots = <1>;
395         pinctrl-names = "default";
396         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
397 };
398
399 &uart0 {
400         status = "okay";
401 };
402
403 &uart2 {
404         status = "okay";
405 };
406
407 &usb_host {
408         status = "okay";
409 };
410
411 &usb_otg {
412         status = "okay";
413 };
414
415 &vop {
416         status = "okay";
417 };
418
419 &vpu {
420         status = "okay";
421 };
422
423 &vop_mmu {
424         status = "okay";
425 };
426
427 &pinctrl {
428         leds {
429                 led_ctl: led-ctl {
430                         rockchip,pins = <2 30 RK_FUNC_GPIO &pcfg_pull_none>;
431                 };
432         };
433
434         pmic {
435                 pmic_int: pmic-int {
436                         rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
437                 };
438         };
439
440         sdio {
441                 bt_wake_h: bt-wake-h {
442                         rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
443                 };
444         };
445
446         sdmmc {
447                 sdmmc_pwr: sdmmc-pwr {
448                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
449                 };
450         };
451
452         sleep {
453                 global_pwroff: global-pwroff {
454                         rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
455                 };
456         };
457 };