FROMLIST: ARM: dts: rockchip: add eDP/panel display device nodes for rk3288-evb
[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,cpu {
98                         sound-dai = <&i2s>;
99                 };
100
101                 simple-audio-card,codec {
102                         sound-dai = <&rt5616>;
103                 };
104         };
105
106         vcc_sys: vsys-regulator {
107                 compatible = "regulator-fixed";
108                 regulator-name = "vcc_sys";
109                 regulator-min-microvolt = <5000000>;
110                 regulator-max-microvolt = <5000000>;
111                 regulator-always-on;
112                 regulator-boot-on;
113         };
114 };
115
116 &acodec {
117         status = "okay";
118 };
119
120 &emac {
121         pinctrl-names = "default";
122         pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
123         phy = <&phy0>;
124         phy-reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* PHY_RST */
125         phy-reset-duration = <10>; /* millisecond */
126
127         status = "okay";
128
129         phy0: ethernet-phy@0 {
130                 reg = <0>;
131         };
132 };
133
134 &emmc {
135         status = "okay";
136 };
137
138 &hdmi {
139         status = "okay";
140 };
141
142 &hdmi_sound {
143         status = "okay";
144 };
145
146 &i2c1 {
147         clock-frequency = <400000>;
148
149         status = "okay";
150
151         rk808: pmic@1b {
152                 compatible = "rockchip,rk808";
153                 reg = <0x1b>;
154                 interrupt-parent = <&gpio2>;
155                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
156                 pinctrl-names = "default";
157                 pinctrl-0 = <&pmic_int &global_pwroff>;
158                 rockchip,system-power-controller;
159                 wakeup-source;
160                 #clock-cells = <1>;
161                 clock-output-names = "xin32k", "rk808-clkout2";
162
163                 vcc1-supply = <&vcc_sys>;
164                 vcc2-supply = <&vcc_sys>;
165                 vcc3-supply = <&vcc_sys>;
166                 vcc4-supply = <&vcc_sys>;
167                 vcc6-supply = <&vcc_sys>;
168                 vcc7-supply = <&vcc_sys>;
169                 vcc8-supply = <&vcc_18>;
170                 vcc9-supply = <&vcc_io>;
171                 vcc10-supply = <&vcc_io>;
172                 vcc11-supply = <&vcc_sys>;
173                 vcc12-supply = <&vcc_io>;
174                 vddio-supply = <&vccio_pmu>;
175
176                 regulators {
177                         vdd_cpu: DCDC_REG1 {
178                                 regulator-always-on;
179                                 regulator-boot-on;
180                                 regulator-min-microvolt = <750000>;
181                                 regulator-max-microvolt = <1350000>;
182                                 regulator-name = "vdd_arm";
183                                 regulator-state-mem {
184                                         regulator-off-in-suspend;
185                                 };
186                         };
187
188                         vdd_gpu: DCDC_REG2 {
189                                 regulator-always-on;
190                                 regulator-boot-on;
191                                 regulator-min-microvolt = <850000>;
192                                 regulator-max-microvolt = <1250000>;
193                                 regulator-name = "vdd_gpu";
194                                 regulator-state-mem {
195                                         regulator-on-in-suspend;
196                                         regulator-suspend-microvolt = <1000000>;
197                                 };
198                         };
199
200                         vcc_ddr: DCDC_REG3 {
201                                 regulator-always-on;
202                                 regulator-boot-on;
203                                 regulator-name = "vcc_ddr";
204                                 regulator-state-mem {
205                                         regulator-on-in-suspend;
206                                 };
207                         };
208
209                         vcc_io: DCDC_REG4 {
210                                 regulator-always-on;
211                                 regulator-boot-on;
212                                 regulator-min-microvolt = <3300000>;
213                                 regulator-max-microvolt = <3300000>;
214                                 regulator-name = "vcc_io";
215                                 regulator-state-mem {
216                                         regulator-on-in-suspend;
217                                         regulator-suspend-microvolt = <3300000>;
218                                 };
219                         };
220
221                         vccio_pmu: LDO_REG1 {
222                                 regulator-always-on;
223                                 regulator-boot-on;
224                                 regulator-min-microvolt = <3300000>;
225                                 regulator-max-microvolt = <3300000>;
226                                 regulator-name = "vccio_pmu";
227                                 regulator-state-mem {
228                                         regulator-on-in-suspend;
229                                         regulator-suspend-microvolt = <3300000>;
230                                 };
231                         };
232
233                         vcc_tp: LDO_REG2 {
234                                 regulator-always-on;
235                                 regulator-boot-on;
236                                 regulator-min-microvolt = <3300000>;
237                                 regulator-max-microvolt = <3300000>;
238                                 regulator-name = "vcc_tp";
239                                 regulator-state-mem {
240                                         regulator-off-in-suspend;
241                                 };
242                         };
243
244                         vdd_10: LDO_REG3 {
245                                 regulator-always-on;
246                                 regulator-boot-on;
247                                 regulator-min-microvolt = <1000000>;
248                                 regulator-max-microvolt = <1000000>;
249                                 regulator-name = "vdd_10";
250                                 regulator-state-mem {
251                                         regulator-on-in-suspend;
252                                         regulator-suspend-microvolt = <1000000>;
253                                 };
254                         };
255
256                         vcc18_lcd: LDO_REG4 {
257                                 regulator-always-on;
258                                 regulator-boot-on;
259                                 regulator-min-microvolt = <1800000>;
260                                 regulator-max-microvolt = <1800000>;
261                                 regulator-name = "vcc18_lcd";
262                                 regulator-state-mem {
263                                         regulator-on-in-suspend;
264                                         regulator-suspend-microvolt = <1800000>;
265                                 };
266                         };
267
268                         vccio_sd: LDO_REG5 {
269                                 regulator-always-on;
270                                 regulator-boot-on;
271                                 regulator-min-microvolt = <1800000>;
272                                 regulator-max-microvolt = <3300000>;
273                                 regulator-name = "vccio_sd";
274                                 regulator-state-mem {
275                                         regulator-on-in-suspend;
276                                         regulator-suspend-microvolt = <3300000>;
277                                 };
278                         };
279
280                         vout5: LDO_REG6 {
281                                 regulator-always-on;
282                                 regulator-boot-on;
283                                 regulator-min-microvolt = <1800000>;
284                                 regulator-max-microvolt = <2500000>;
285                                 regulator-name = "vout5";
286                                 regulator-state-mem {
287                                         regulator-on-in-suspend;
288                                         regulator-suspend-microvolt = <1800000>;
289                                 };
290                         };
291
292                         vcc_18: LDO_REG7 {
293                                 regulator-always-on;
294                                 regulator-boot-on;
295                                 regulator-min-microvolt = <1800000>;
296                                 regulator-max-microvolt = <1800000>;
297                                 regulator-name = "vcc_18";
298                                 regulator-state-mem {
299                                         regulator-on-in-suspend;
300                                         regulator-suspend-microvolt = <1800000>;
301                                 };
302                         };
303
304                         vcca_codec: LDO_REG8 {
305                                 regulator-always-on;
306                                 regulator-boot-on;
307                                 regulator-min-microvolt = <1800000>;
308                                 regulator-max-microvolt = <1800000>;
309                                 regulator-name = "vcca_codec";
310                                 regulator-state-mem {
311                                         regulator-on-in-suspend;
312                                         regulator-suspend-microvolt = <1800000>;
313                                 };
314                         };
315
316                         vcc_wl: SWITCH_REG1 {
317                                 regulator-always-on;
318                                 regulator-boot-on;
319                                 regulator-name = "vcc_wl";
320                                 regulator-state-mem {
321                                         regulator-on-in-suspend;
322                                 };
323                         };
324
325                         vcc_lcd: SWITCH_REG2 {
326                                 regulator-always-on;
327                                 regulator-boot-on;
328                                 regulator-name = "vcc_lcd";
329                                 regulator-state-mem {
330                                         regulator-on-in-suspend;
331                                 };
332                         };
333                 };
334         };
335 };
336
337 &i2c2 {
338         status = "okay";
339
340         rt5616: rt5616@1b {
341                 compatible = "rt5616";
342                 reg = <0x1b>;
343                 clocks = <&cru SCLK_I2S_OUT>;
344                 clock-names = "mclk";
345                 #sound-dai-cells = <0>;
346         };
347 };
348
349 &i2s {
350         #sound-dai-cells = <0>;
351         status = "okay";
352 };
353
354 &sdio {
355         status = "okay";
356
357         bus-width = <4>;
358         cap-sd-highspeed;
359         cap-sdio-irq;
360         default-sample-phase = <90>;
361         keep-power-in-suspend;
362         mmc-pwrseq = <&sdio_pwrseq>;
363         non-removable;
364         num-slots = <1>;
365         pinctrl-names = "default";
366         pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
367         sd-uhs-sdr12;
368         sd-uhs-sdr25;
369         sd-uhs-sdr50;
370         sd-uhs-sdr104;
371 };
372
373 &sdmmc {
374         bus-width = <4>;
375         cap-mmc-highspeed;
376         cap-sd-highspeed;
377         card-detect-delay = <200>;
378         disable-wp;
379         num-slots = <1>;
380         pinctrl-names = "default";
381         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
382 };
383
384 &uart0 {
385         status = "okay";
386 };
387
388 &uart2 {
389         status = "okay";
390 };
391
392 &usb_host {
393         status = "okay";
394 };
395
396 &usb_otg {
397         status = "okay";
398 };
399
400 &vop {
401         status = "okay";
402 };
403
404 &vop_mmu {
405         status = "okay";
406 };
407
408 &pinctrl {
409         leds {
410                 led_ctl: led-ctl {
411                         rockchip,pins = <2 30 RK_FUNC_GPIO &pcfg_pull_none>;
412                 };
413         };
414
415         pmic {
416                 pmic_int: pmic-int {
417                         rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
418                 };
419         };
420
421         sdio {
422                 bt_wake_h: bt-wake-h {
423                         rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
424                 };
425         };
426
427         sdmmc {
428                 sdmmc_pwr: sdmmc-pwr {
429                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
430                 };
431         };
432
433         sleep {
434                 global_pwroff: global-pwroff {
435                         rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
436                 };
437         };
438 };