Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk312x.dtsi
1 #include <dt-bindings/interrupt-controller/arm-gic.h>
2 #include <dt-bindings/suspend/rockchip-pm.h>
3 #include <dt-bindings/sensor-dev.h>
4 #include <dt-bindings/clock/rk_system_status.h>
5 #include <dt-bindings/rkfb/rk_fb.h>
6
7 #include "skeleton.dtsi"
8 #include "rk312x-clocks.dtsi"
9 #include "rk312x-pinctrl.dtsi"
10
11 / {
12         compatible = "rockchip,rk312x";
13         rockchip,sram = <&sram>;
14         interrupt-parent = <&gic>;
15
16         aliases {
17                 serial0 = &uart0;
18                 serial1 = &uart1;
19                 serial2 = &uart2;
20                 i2c0 = &i2c0;
21                 i2c1 = &i2c1;
22                 i2c2 = &i2c2;
23                 i2c3 = &i2c3;
24                 lcdc = &lcdc;
25                 spi0 = &spi0;
26         };
27
28         cpus {
29                 #address-cells = <1>;
30                 #size-cells = <0>;
31
32                 cpu@0 {
33                         device_type = "cpu";
34                         compatible = "arm,cortex-a7";
35                         reg = <0xf00>;
36                 };
37                 cpu@1 {
38                         device_type = "cpu";
39                         compatible = "arm,cortex-a7";
40                         reg = <0xf01>;
41                 };
42                 cpu@2 {
43                         device_type = "cpu";
44                         compatible = "arm,cortex-a7";
45                         reg = <0xf02>;
46                 };
47                 cpu@3 {
48                         device_type = "cpu";
49                         compatible = "arm,cortex-a7";
50                         reg = <0xf03>;
51                 };
52         };
53
54         gic: interrupt-controller@10139000 {
55                 compatible = "arm,cortex-a15-gic";
56                 interrupt-controller;
57                 #interrupt-cells = <3>;
58                 #address-cells = <0>;
59                 reg = <0x10139000 0x1000>,
60                       <0x1013a000 0x1000>;
61         };
62
63         arm-pmu {
64                 compatible = "arm,cortex-a7-pmu";
65                 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
66                              <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
67                              <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
68                              <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
69         };
70
71         cpu_axi_bus: cpu_axi_bus {
72                 compatible = "rockchip,cpu_axi_bus";
73                 #address-cells = <1>;
74                 #size-cells = <1>;
75                 ranges;
76
77                 qos {
78                         #address-cells = <1>;
79                         #size-cells = <1>;
80                         ranges;
81
82                         crypto {
83                                 reg = <0x10128080 0x20>;
84                         };
85                         core {
86                                 reg = <0x1012a000 0x20>;
87                         };
88                         peri {
89                                 reg = <0x1012c000 0x20>;
90                         };
91                         gpu {
92                                 reg = <0x1012d000 0x20>;
93                         };
94                         vpu {
95                                 reg = <0x1012e000 0x20>;
96                         };
97                         rga {
98                                 reg = <0x1012f000 0x20>;
99                         };
100                         ebc {
101                                 reg = <0x1012f080 0x20>;
102                         };
103                         iep {
104                                 reg = <0x1012f100 0x20>;
105                         };
106                         lcdc {
107                                 reg = <0x1012f180 0x20>;
108                                 rockchip,priority = <3 3>;
109                         };
110                         vip {
111                                 reg = <0x1012f200 0x20>;
112                                 rockchip,priority = <3 3>;
113                         };
114                 };
115
116                 msch {
117                         #address-cells = <1>;
118                         #size-cells = <1>;
119                         ranges;
120
121                         msch@10128000 {
122                                 reg = <0x10128000 0x20>;
123                                 rockchip,read-latency = <0x3f>;
124                         };
125                 };
126         };
127
128         sram: sram@10080000 {
129                 compatible = "mmio-sram";
130                 reg = <0x10080000 0x2000>;
131                 map-exec;
132                 map-cacheable;
133         };
134
135         timer {
136                 compatible = "arm,armv7-timer";
137                 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
138                              <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
139                 clock-frequency = <24000000>;
140         };
141
142         timer@20044000 {
143                 compatible = "rockchip,timer";
144                 reg = <0x20044000 0x20>;
145                 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
146                 rockchip,broadcast = <1>;
147         };
148
149         watchdog: wdt@2004c000 {
150                 compatible = "rockchip,watch dog";
151                 reg = <0x2004c000 0x100>;
152         //      clocks = <&clk_gates7 15>;
153                 clock-names = "pclk_wdt";
154                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
155                 rockchip,irq = <1>;
156                 rockchip,timeout = <60>;
157                 rockchip,atboot = <1>;
158                 rockchip,debug = <0>;
159                 status = "disabled";
160         };
161
162         amba {
163                 #address-cells = <1>;
164                 #size-cells = <1>;
165                 compatible = "arm,amba-bus";
166                 interrupt-parent = <&gic>;
167                 ranges;
168
169                 pdma: pdma@20078000 {
170                         compatible = "arm,pl330", "arm,primecell";
171                         reg = <0x20078000 0x4000>;
172                         interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
173                                      <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
174                         #dma-cells = <1>;
175                 };
176         };
177
178         reset: reset@20000110 {
179                 compatible = "rockchip,reset";
180                 reg = <0x20000110 0x24>;
181                 rockchip,reset-flag = <ROCKCHIP_RESET_HIWORD_MASK>;
182                 #reset-cells = <1>;
183         };
184
185         nandc: nandc@10500000 {
186                 compatible = "rockchip,rk-nandc";
187                 reg = <0x10500000 0x4000>;
188                 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
189                 //pinctrl-names = "default";
190                 //pinctrl-0 = <&nandc_ale &nandc_cle &nandc_wrn &nandc_rdn &nandc_rdy &nandc_cs0 &nandc_data>;
191                 nandc_id = <0>;
192                 clocks = <&clk_nandc>, <&clk_gates5 9>, <&clk_gates10 15>;
193                 clock-names = "clk_nandc", "g_clk_nandc", "hclk_nandc";
194         };
195         
196         nandc0reg: nandc0@10500000 {
197                 compatible = "rockchip,rk-nandc";
198                 reg = <0x10500000 0x4000>;
199         };
200         uart0: serial@20060000 {
201                 compatible = "rockchip,serial";
202                 reg = <0x20060000 0x100>;
203                 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
204                 clock-frequency = <24000000>;
205                 clocks = <&clk_uart0>, <&clk_gates8 0>;
206                 clock-names = "sclk_uart", "pclk_uart";
207                 reg-shift = <2>;
208                 reg-io-width = <4>;
209                 dmas = <&pdma 2>, <&pdma 3>;
210                 #dma-cells = <2>;
211                 pinctrl-names = "default";
212                 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
213                 status = "disabled";
214         };
215
216         uart1: serial@20064000 {
217                 compatible = "rockchip,serial";
218                 reg = <0x20064000 0x100>;
219                 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
220                 clock-frequency = <24000000>;
221                 clocks = <&clk_uart1>, <&clk_gates8 1>;
222                 clock-names = "sclk_uart", "pclk_uart";
223                 reg-shift = <2>;
224                 reg-io-width = <4>;
225                 dmas = <&pdma 4>, <&pdma 5>;
226                 #dma-cells = <2>;
227                 pinctrl-names = "default";
228                 pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
229                 status = "disabled";
230         };
231
232         uart2: serial@20068000 {
233                 compatible = "rockchip,serial";
234                 reg = <0x20068000 0x100>;
235                 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
236                 clock-frequency = <24000000>;
237                 clocks = <&clk_uart2>, <&clk_gates8 2>;
238                 clock-names = "sclk_uart", "pclk_uart";
239                 reg-shift = <2>;
240                 reg-io-width = <4>;
241                 dmas = <&pdma 6>, <&pdma 7>;
242                 #dma-cells = <2>;
243                 pinctrl-names = "default";
244                 pinctrl-0 = <&uart2_xfer>;
245                 status = "disabled";
246         };
247
248         gmac: eth@2008c000 {
249                 compatible = "rockchip,rk312x-gmac";
250                 reg = <0x2008c000 0x4000>;
251                 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;  /*irq=88*/
252                 interrupt-names = "macirq";
253                 clocks = <&clk_mac_ref>, <&clk_gates2 6>,
254                         <&clk_gates2 7>, <&clk_gates2 4>,
255                         <&clk_gates2 5>, <&clk_gates10 10>,
256                         <&clk_gates10 11>;
257                 clock-names = "clk_mac", "mac_clk_rx",
258                         "mac_clk_tx", "clk_mac_ref",
259                         "clk_mac_refout", "aclk_mac",
260                         "pclk_mac";
261                 phy-mode = "rgmii";
262                 pinctrl-names = "default";
263                 pinctrl-0 = <&gmac_rxdv &gmac_txclk &gmac_crs &gmac_rxclk &gmac_mdio &gmac_txen &gmac_clk &gmac_rxer &gmac_rxd1 &gmac_rxd0 &gmac_txd1 &gmac_txd0 &gmac_rxd3 &gmac_rxd2 &gmac_txd2 &gmac_txd3 &gmac_col_gpio &gmac_mdc>;
264         };
265
266         fiq-debugger {
267                 compatible = "rockchip,fiq-debugger";
268                 rockchip,serial-id = <2>;
269                 rockchip,signal-irq = <106>;
270                 rockchip,wake-irq = <0>;
271                 status = "disabled";
272         };
273
274         clocks-init{
275                 compatible = "rockchip,clocks-init";
276                 rockchip,clocks-init-parent =
277                         <&clk_core &clk_apll>, <&aclk_cpu &clk_gpll_div2>,
278                         <&aclk_peri &clk_gpll_div2>, <&clk_uart0_pll &clk_gpll>,
279                         <&clk_uart2_pll &clk_gpll>, <&clk_i2s_2ch_pll &clk_gpll>,
280                         <&clk_i2s_8ch_pll &clk_gpll>, <&clk_spdif_pll &clk_gpll>,
281                         <&clk_vepu &clk_gpll_div2>, <&clk_vdpu &clk_gpll_div2>,
282                         <&clk_hevc_core &clk_gpll>, <&aclk_vio0_pre &clk_gpll_div2>,
283                         <&aclk_vio1_pre &clk_gpll_div2>, <&hclk_vio_pre &clk_gpll_div2>,
284                         <&sclk_lcdc0 &clk_cpll>, <&clk_gpu &clk_gpll_div2>,
285                         <&clk_cif_pll &clk_gpll_div2>, <&dclk_ebc &clk_gpll_div2>,
286                         <&clk_emmc &clk_gpll_div2>, <&clk_sdio &clk_gpll_div2>,
287                         <&clk_sfc &clk_gpll_div2>, <&clk_sdmmc0 &clk_gpll_div2>,
288                         <&clk_tsp &clk_gpll_div2>, <&clk_nandc &clk_gpll_div2>,
289                         <&clk_mac_pll &clk_cpll>;
290                 rockchip,clocks-init-rate =
291                         <&clk_core 816000000>, <&clk_gpll 594000000>,
292                         <&clk_cpll 400000000>, <&aclk_cpu 300000000>,
293                         <&hclk_cpu_pre 150000000>, <&pclk_cpu_pre 75000000>,
294                         <&aclk_peri 300000000>, <&hclk_peri_pre 150000000>,
295                         <&pclk_peri_pre 75000000>, <&clk_gpu 300000000>,
296                         <&aclk_vio0_pre 300000000>, <&hclk_vio_pre 150000000>,
297                         <&aclk_vio1_pre 300000000>, <&clk_vepu 300000000>,
298                         <&clk_vdpu 300000000>, <&clk_hevc_core 200000000>,
299                         <&clk_mac_ref 125000000>;
300         /*      rockchip,clocks-uboot-has-init =
301                         <&aclk_vio1>;*/
302         };
303         gpu {
304                 compatible = "arm,mali400";
305                 reg = <0x10091000 0x200>,
306                       <0x10090000 0x100>,
307                       <0x10093000 0x100>,
308                       <0x10098000 0x1100>,
309                       <0x10094000 0x100>,
310                       <0x1009A000 0x1100>,
311                       <0x10095000 0x100>;
312                 
313                 reg-names = "Mali_L2",
314                             "Mali_GP",
315                             "Mali_GP_MMU",
316                             "Mali_PP0",
317                             "Mali_PP0_MMU",
318                             "Mali_PP1",
319                             "Mali_PP1_MMU";
320
321                 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
322                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
323                              <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
324                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
325                              <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
326                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
327                 
328                 interrupt-names = "Mali_GP_IRQ",
329                                   "Mali_GP_MMU_IRQ",
330                                   "Mali_PP0_IRQ",
331                                   "Mali_PP0_MMU_IRQ",
332                                   "Mali_PP1_IRQ",
333                                   "Mali_PP1_MMU_IRQ";
334           };
335
336         clocks-enable {
337                 compatible = "rockchip,clocks-enable";
338                 clocks =
339                                 /*PD_CORE*/
340                                 <&clk_gates0 6>,<&clk_gates0 0>,
341                                 <&clk_gates0 7>,
342
343                                 /*PD_CPU*/
344                                 <&clk_gates0 1>, <&clk_gates0 3>,
345                                 <&clk_gates0 4>, <&clk_gates0 5>,
346                                 <&clk_gates0 12>,
347
348                                 /*TIMER*/
349                                 <&clk_gates10 3>, <&clk_gates10 4>,
350                                 <&clk_gates10 5>, <&clk_gates10 6>,
351                                 <&clk_gates10 7>, <&clk_gates10 8>,
352
353                                 /*PD_PERI*/
354                                 <&clk_gates2 0>, <&hclk_peri_pre>,
355                                 <&pclk_peri_pre>, <&clk_gates2 1>,
356
357                                 /*aclk_cpu_pre*/
358                                 <&clk_gates4 12>,/*aclk_intmem*/
359                                 <&clk_gates4 10>,/*aclk_strc_sys*/
360
361                                 /*hclk_cpu_pre*/
362                                 //<&clk_gates5 6>,/*hclk_rom*/
363                                 <&clk_gates3 5>,/*hclk_crypto*/
364
365                                 /*pclk_cpu_pre*/
366                                 <&clk_gates5 4>,/*pclk_grf*/
367                                 <&clk_gates5 7>,/*pclk_ddrupctl*/
368                                 //<&clk_gates5 14>,/*pclk_acodec*/
369                                 //<&clk_gates3 8>,/*pclk_hdmi*/
370
371                                 /*aclk_peri_pre*/
372                                 //<&clk_gates10 10>,/*aclk_gmac*/
373                                 <&clk_gates4 3>,/*aclk_peri_axi_matrix*/
374                                 <&clk_gates5 1>,/*aclk_dmac2*/
375                                 <&clk_gates9 15>,/*aclk_peri_niu*/
376                                 <&clk_gates9 2>,/*g_pclk_pmu*/
377                                 <&clk_gates9 3>,/*g_pclk_pmu_noc*/
378                                 <&clk_gates4 2>,/*aclk_cpu_peri*/
379
380                                 /*hclk_peri_pre*/
381                                 <&clk_gates4 0>,/*hclk_peri_matrix*/
382                                 //<&clk_gates9 13>,/*hclk_usb_peri*/
383                                 <&clk_gates9 14>,/*hclk_peri_arbi*/
384
385                                 /*pclk_peri_pre*/
386                                 <&clk_gates4 1>,/*pclk_peri_axi_matrix*/
387
388                                 /*hclk_vio_pre*/
389                                 //<&clk_gates6 12>,/*hclk_vio_niu*/
390                                 //<&clk_gates6 1>,/*hclk_lcdc*/
391
392                                 /*aclk_vio0_pre*/
393                                 //<&clk_gates6 13>,/*aclk_vio*/
394                                 //<&clk_gates6 0>,/*aclk_lcdc*/
395
396                                 /*aclk_vio1_pre*/
397                                 //<&clk_gates9 10>,/*aclk_vio1_niu*/
398
399                                 /*UART*/
400                                 <&clk_gates1 12>,
401                                 <&clk_gates1 13>,
402                                 <&clk_gates8 2>,/*pclk_uart2*/
403
404                                 //<&clk_gpu>,
405
406                                 /*jtag*/
407                                 //<&clk_gates1 3>,/*clk_jtag*/
408
409                                 /*pmu*/
410                                 <&clk_gates1 0>;/*pclk_pmu_pre*/
411         };
412
413         i2c0: i2c@20072000 {
414                 compatible = "rockchip,rk30-i2c";
415                 reg = <0x20072000 0x1000>;
416                 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
417                 #address-cells = <1>;
418                 #size-cells = <0>;
419                 pinctrl-names = "default", "gpio";
420                 pinctrl-0 = <&i2c0_sda &i2c0_scl>;
421                 pinctrl-1 = <&i2c0_gpio>;
422                 gpios = <&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A0 GPIO_ACTIVE_LOW>;
423                 clocks = <&clk_gates8 4>;
424                 rockchip,check-idle = <1>;
425                 status = "disabled";
426         };
427
428         i2c1: i2c@20056000 {
429                 compatible = "rockchip,rk30-i2c";
430                 reg = <0x20056000 0x1000>;
431                 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
432                 #address-cells = <1>;
433                 #size-cells = <0>;
434                 pinctrl-names = "default", "gpio";
435                 pinctrl-0 = <&i2c1_sda &i2c1_scl>;
436                 pinctrl-1 = <&i2c1_gpio>;
437                 gpios = <&gpio0 GPIO_A3 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
438                 clocks = <&clk_gates8 5>;
439                 rockchip,check-idle = <1>;
440                 status = "disabled";
441         };
442
443         i2c2: i2c@2005a000 {
444                 compatible = "rockchip,rk30-i2c";
445                 reg = <0x2005a000 0x1000>;
446                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
447                 #address-cells = <1>;
448                 #size-cells = <0>;
449                 pinctrl-names = "default", "gpio";
450                 pinctrl-0 = <&i2c2_sda &i2c2_scl>;
451                 pinctrl-1 = <&i2c2_gpio>;
452                 gpios = <&gpio2 GPIO_C4 GPIO_ACTIVE_LOW>, <&gpio2 GPIO_C5 GPIO_ACTIVE_LOW>;
453                 clocks = <&clk_gates8 6>;
454                 rockchip,check-idle = <1>;
455                 status = "disabled";
456         };
457
458         i2c3: i2c@2005e000 {
459                 compatible = "rockchip,rk30-i2c";
460                 reg = <0x2005e000 0x1000>;
461                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
462                 #address-cells = <1>;
463                 #size-cells = <0>;
464                 pinctrl-names = "default", "gpio";
465                 pinctrl-0 = <&i2c3_sda &i2c3_scl>;
466                 pinctrl-1 = <&i2c3_gpio>;
467                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A6 GPIO_ACTIVE_LOW>;
468                 clocks = <&clk_gates8 7>;
469                 rockchip,check-idle = <1>;
470                 status = "disabled";
471         };
472
473         i2s0: i2s@10220000 {
474                 compatible = "rockchip-i2s";
475                 reg = <0x10220000 0x1000>;
476                 i2s-id = <0>;
477                 clocks = <&clk_i2s_2ch>, <&clk_i2s_2ch_out>, <&clk_gates7 2>;
478                 clock-names = "i2s_clk", "i2s_mclk", "i2s_hclk";
479                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
480                 dmas = <&pdma 0>, <&pdma 1>;
481                 //#dma-cells = <2>;
482                 dma-names = "tx", "rx";
483                 //pinctrl-names = "default", "sleep";
484                 //pinctrl-0 = <&i2s0_mclk &i2s0_sclk &i2s0_lrckrx &i2s0_lrcktx &i2s0_sdi &i2s0_sdo>;
485                 //pinctrl-1 = <&i2s0_gpio>;
486                 status = "disabled";
487         };
488
489         i2s1: i2s@10200000 {
490                 compatible = "rockchip-i2s";
491                 reg = <0x10200000 0x1000>;
492                 i2s-id = <1>;
493                 clocks = <&clk_i2s_8ch>, <&clk_gates7 4>;
494                 clock-names = "i2s_clk", "i2s_hclk";
495                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
496                 dmas = <&pdma 14>, <&pdma 15>;
497                 //#dma-cells = <2>;
498                 dma-names = "tx", "rx";
499         };
500
501         spdif: spdif@10204000 {
502                 compatible = "rockchip-spdif";
503                 reg = <0x10204000 0x1000>;
504                 clocks = <&clk_spdif>, <&clk_gates10 9>;
505                 clock-names = "spdif_mclk", "spdif_hclk";
506                 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
507                 dmas = <&pdma 13>;
508                 //#dma-cells = <1>;
509                 dma-names = "tx";
510                 pinctrl-names = "default";
511                 pinctrl-0 = <&spdif_tx>;
512         };      
513
514         dsihost0: mipi@10110000{
515                 compatible = "rockchip,rk312x-dsi";
516                 rockchip,prop = <0>;
517                 reg = <0x10110000 0x4000>, <0x20038000 0x4000>;
518                 reg-names = "mipi_dsi_host" ,"mipi_dsi_phy";
519                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
520                 clocks = <&clk_gates2 15>, <&clk_gates5 0>, <&clk_gates9 6>, <&clk_gates9 5>, <&pd_mipidsi>;
521                 clock-names = "clk_mipi_24m", "pclk_mipi_dsi", "pclk_mipi_dsi_host", "hclk_vio_h2p", "pd_mipi_dsi";
522                 status = "okay";
523         };
524
525         emmc: rksdmmc@1021c000 {
526                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
527                 reg = <0x1021c000 0x4000>;
528                 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
529                 #address-cells = <1>;
530                 #size-cells = <0>;
531                 //pinctrl-names = "default",,"suspend";
532                 //pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_wp &sd0_pwr &sd0_bus1 &sd0_bus4>;
533                 clocks = <&clk_emmc>, <&clk_gates7 0>;
534                 clock-names = "clk_mmc", "hclk_mmc";
535                 dmas = <&pdma 12>;
536                 dma-names = "dw_mci";
537                 num-slots = <1>;
538                 fifo-depth = <0x100>;
539                 bus-width = <8>;
540         };
541
542
543         sdmmc: rksdmmc@10214000 {
544                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
545                 reg = <0x10214000 0x4000>;
546                 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
547                 #address-cells = <1>;
548                 #size-cells = <0>;
549                 pinctrl-names = "default", "idle";
550                 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd  &sdmmc0_dectn &sdmmc0_bus4>;
551                 pinctrl-1 = <&sdmmc0_gpio>;
552                 clocks = <&clk_sdmmc0>, <&clk_gates5 10>;
553                 clock-names = "clk_mmc", "hclk_mmc";
554                 dmas = <&pdma 10>;
555                 dma-names = "dw_mci";
556                 num-slots = <1>;
557                 fifo-depth = <0x100>;
558                 bus-width = <4>;
559         };
560
561         sdio: rksdmmc@10218000 {
562                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
563                 reg = <0x10218000 0x4000>;
564                 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
565                 #address-cells = <1>;
566                 #size-cells = <0>;
567                 pinctrl-names = "default","idle";
568                 pinctrl-0 = <&sdio0_pwren &sdio0_cmd &sdio0_clk &sdio0_bus4>;
569                 pinctrl-1 = <&sdio0_gpio>;
570                 clocks = <&clk_sdio>, <&clk_gates5 11>;
571                 clock-names = "clk_mmc", "hclk_mmc";
572                 dmas = <&pdma 11>;
573                 dma-names = "dw_mci";
574                 num-slots = <1>;
575                 fifo-depth = <0x100>;
576                 bus-width = <4>;
577         };
578         
579         spi0: spi@20074000 {
580                 compatible = "rockchip,rockchip-spi";
581                 reg = <0x20074000 0x1000>;
582                 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
583                 #address-cells = <1>;
584                 #size-cells = <0>;
585                 pinctrl-names = "default";
586                 pinctrl-0 = <&spi0_txd_mux0 &spi0_rxd_mux0 &spi0_clk_mux0 &spi0_cs0_mux0 &spi0_cs1_mux0>;
587                 //pinctrl-0 = <&spi0_txd_mux1 &spi0_rxd_mux1 &spi0_clk_mux1 &spi0_cs0_mux1 &spi0_cs1_mux1>;
588                 //pinctrl-0 = <&spi0_txd_mux2 &spi0_rxd_mux2 &spi0_clk_mux2 &spi0_cs0_mux2>;
589                 rockchip,spi-src-clk = <0>;
590                 num-cs = <2>;
591                 clocks =<&clk_spi0>, <&clk_gates7 12>;
592                 clock-names = "spi","pclk_spi0";
593                 //dmas = <&pdma 8>, <&pdma 9>;
594                 //#dma-cells = <2>;
595                 //dma-names = "tx", "rx";
596                 status = "disabled";
597         };
598
599         adc: adc@2006c000 {
600                 compatible = "rockchip,saradc";
601                 reg = <0x2006c000 0x100>;
602                 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
603                 #io-channel-cells = <1>;
604                 io-channel-ranges;
605                 rockchip,adc-vref = <1800>;
606                 clock-frequency = <1000000>;
607                 clocks = <&clk_saradc>, <&clk_gates7 14>;
608                 clock-names = "saradc", "pclk_saradc";
609                 status = "disabled";
610         };
611
612         pwm0: pwm@20050000 {
613                 compatible = "rockchip,rk-pwm";
614                 reg = <0x20050000 0x10>;
615                 #pwm-cells = <2>;
616                 pinctrl-names = "default";
617                 pinctrl-0 = <&pwm0_pin>;
618                 clocks = <&clk_gates7 10>;
619                 clock-names = "pclk_pwm";
620                 status = "disabled";
621         };
622
623         pwm1: pwm@20050010 {
624                 compatible = "rockchip,rk-pwm";
625                 reg = <0x20050010 0x10>;
626                 #pwm-cells = <2>;
627                 pinctrl-names = "default";
628                 pinctrl-0 = <&pwm1_pin>;
629                 clocks = <&clk_gates7 10>;
630                 clock-names = "pclk_pwm";
631                 status = "disabled";
632         };
633
634         pwm2: pwm@20050020 {
635                 compatible = "rockchip,rk-pwm";
636                 reg = <0x20050020 0x10>;
637                 #pwm-cells = <2>;
638                 pinctrl-names = "default";
639                 pinctrl-0 = <&pwm2_pin>;
640                 clocks = <&clk_gates7 10>;
641                 clock-names = "pclk_pwm";
642                 status = "disabled";
643         };
644
645         pwm3: pwm@20050030 {
646                 compatible = "rockchip,rk-pwm";
647                 reg = <0x20050030 0x10>;
648                 #pwm-cells = <2>;
649                 pinctrl-names = "default";
650                 pinctrl-0 = <&pwm3_pin>;
651                 clocks = <&clk_gates7 10>;
652                 clock-names = "pclk_pwm";
653                 status = "disabled";
654         };
655
656         remotectl: pwm@20050030 {
657                 compatible = "rockchip,remotectl-pwm";
658                 reg = <0x20050030 0x10>;
659                 #pwm-cells = <2>;
660                 pinctrl-names = "default";
661                 pinctrl-0 = <&pwm3_pin>;
662                 clocks = <&clk_gates7 10>;
663                 clock-names = "pclk_pwm";
664                 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
665                 status = "okay";
666         };
667         dwc_control_usb: dwc-control-usb@20008000 {
668                 compatible = "rockchip,rk3126-dwc-control-usb";
669                 reg = <0x20008000 0x4>;
670                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
671                 interrupt-names = "otg_bvalid";
672                 clocks = <&clk_gates9 13>;
673                 clock-names = "hclk_usb_peri";
674                 rockchip,remote_wakeup;
675                 rockchip,usb_irq_wakeup;
676                 resets = <&reset RK3128_RST_USBPOR>;
677                 reset-names = "usbphy_por";
678                 usb_bc{
679                         compatible = "inno,phy";
680                         regbase = &dwc_control_usb;
681                         rk_usb,bvalid     = <0x14c  5 1>;
682                         rk_usb,iddig      = <0x14c  8 1>;
683                         rk_usb,vdmsrcen   = <0x184 12 1>;
684                         rk_usb,vdpsrcen   = <0x184 11 1>;
685                         rk_usb,rdmpden    = <0x184 10 1>;
686                         rk_usb,idpsrcen   = <0x184  9 1>;
687                         rk_usb,idmsinken  = <0x184  8 1>;
688                         rk_usb,idpsinken  = <0x184  7 1>;
689                         rk_usb,dpattach   = <0x2c0  7 1>;
690                         rk_usb,cpdet      = <0x2c0  6 1>;
691                         rk_usb,dcpattach  = <0x2c0  5 1>;
692                 };
693         };
694
695         usb0: usb@10180000 {
696                 compatible = "rockchip,rk3126_usb20_otg";
697                 reg = <0x10180000 0x40000>;
698                 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
699                 clocks = <&clk_gates1 5>, <&clk_gates5 13>;
700                 clock-names = "clk_usbphy0", "hclk_usb0";
701                 resets = <&reset RK3128_RST_USBOTG0>, <&reset RK3128_RST_UTMI0>,
702                                 <&reset RK3128_RST_OTGC0>;
703                 reset-names = "otg_ahb", "otg_phy", "otg_controller";
704                 /*0 - Normal, 1 - Force Host, 2 - Force Device*/
705                 rockchip,usb-mode = <0>;
706         };
707
708         usb1: usb@101c0000 {
709                 compatible = "rockchip,rk3126_usb20_host";
710                 reg = <0x101c0000 0x40000>;
711                 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
712                 clocks = <&clk_gates1 6>, <&clk_gates10 14>;
713                 clock-names = "clk_usbphy1", "hclk_usb1";
714                 resets = <&reset RK3128_RST_USBOTG1>, <&reset RK3128_RST_UTMI1>,
715                                 <&reset RK3128_RST_OTGC1>;
716                 reset-names = "host_ahb", "host_phy", "host_controller";
717         };
718
719         fb: fb{
720                 compatible = "rockchip,rk-fb";
721                 rockchip,disp-mode = <ONE_DUAL>;
722         };
723
724         rk_screen: rk_screen{
725                 compatible = "rockchip,screen";
726         };
727
728         lvds: lvds@20038000 {
729                 compatible = "rockchip,rk31xx-lvds";
730                 reg = <0x20038000 0x4000>;
731                 clocks = <&clk_gates5 0>;
732                 clock-names = "pclk_lvds";
733                 status = "disabled";
734         };
735
736         lcdc: lcdc@1010e000 {
737                 compatible = "rockchip,rk312x-lcdc";
738                 rockchip,prop = <PRMRY>;
739                 reg = <0x1010e000 0x1000>;
740                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
741                 clocks = <&clk_gates6 0>, <&dclk_lcdc0>, <&clk_gates6 1>, <&sclk_lcdc0>, <&pd_vop>, <&clk_cpll>;
742                 clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc", "sclk_lcdc", "pd_lcdc", "sclk_pll";
743                 rockchip,iommu-enabled = <1>;
744                 status = "disabled";
745         };
746
747         hdmi: hdmi@20034000 {
748                 compatible = "rockchip,rk312x-hdmi";
749                 reg = <0x20034000 0x4000>;
750                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
751                 rockchip,hdmi_lcdc_source = <0>;
752                 pinctrl-names = "default", "gpio";
753                 pinctrl-0 = <&hdmi_cec &hdmi_sda &hdmi_scl &hdmi_hpd>;
754                 pinctrl-1 = <&hdmi_gpio>;
755                 clocks = <&clk_gates3 8>, <&pd_hdmi>;
756                 clock-names = "pclk_hdmi", "pd_hdmi";
757                 status = "disabled";
758         };
759
760         tve: tve{
761                 compatible = "rockchip,rk312x-tve";
762                 reg = <0x1010e200 0x100>;
763                 status = "disabled";
764         };
765
766         vpu: vpu_service@10106000 {
767                 compatible = "vpu_service";
768                 iommu_enabled = <1>;
769                 reg = <0x10106000 0x800>;
770                 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
771                 interrupt-names = "irq_enc", "irq_dec";
772                 clocks = <&clk_vdpu>, <&hclk_vdpu>;
773                 clock-names = "aclk_vcodec", "hclk_vcodec";
774                 name = "vpu_service";
775                 status = "okay";
776         };
777
778         hevc: hevc_service@10104000 {
779                 compatible = "rockchip,hevc_service";
780                 iommu_enabled = <1>;
781                 reg = <0x10104000 0x400>;
782                 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
783                 interrupt-names = "irq_dec";
784                 clocks = <&clk_vdpu>, <&hclk_vdpu>, <&clk_hevc_core>;
785                 clock-names = "aclk_vcodec", "hclk_vcodec", "clk_core";
786                 name = "hevc_service";
787                 status = "okay";
788         };
789
790         iep: iep@10108000 {
791                 compatible = "rockchip,iep";
792                 iommu_enabled = <1>;
793                 reg = <0x10108000 0x800>;
794                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
795                 clocks = <&clk_gates9 8>, <&clk_gates9 7>;
796                 clock-names = "aclk_iep", "hclk_iep";
797                 status = "okay";
798         };
799         
800         rga: rga@1010c000 {
801                 compatible = "rockchip,rk312x-rga";
802                 reg = <0x1010c000 0x1000>;
803                 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
804                 clocks = <&clk_gates6 10>, <&clk_gates6 11>;
805                 clock-names = "hclk_rga", "aclk_rga";
806                 status = "okay";
807         };
808
809   vop_mmu {
810                 dbgname = "vop";
811                 compatible = "rockchip,vop_mmu";
812                 reg = <0x1010e300 0x100>;
813                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
814                 interrupt-names = "vop_mmu";
815           };
816
817           hevc_mmu {
818                 dbgname = "hevc";
819                 compatible = "rockchip,hevc_mmu";
820                 reg = <0x10104440 0x40>,
821                       <0x10104480 0x40>;
822                 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
823                 interrupt-names = "hevc_mmu";
824           };
825
826           vpu_mmu {
827                 dbgname = "vpu";
828                 compatible = "rockchip,vpu_mmu";
829                 reg = <0x10106800 0x100>;
830                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
831                 interrupt-names = "vpu_mmu";
832           };
833
834           iep_mmu {
835                 dbgname = "iep";
836                 compatible = "rockchip,iep_mmu";
837                 reg = <0x10108800 0x100>;
838                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
839                 interrupt-names = "iep_mmu";
840           };
841
842           dvfs {
843                 vd_arm: vd_arm {
844                         regulator_name = "vdd_arm";
845                         pd_core {
846                                 clk_core_dvfs_table: clk_core {
847                                         operating-points = <
848                                                 /* KHz    uV */
849                                                 312000 1100000
850                                                 504000 1100000
851                                                 816000 1100000
852                                                 1008000 1100000
853                                                 >;
854                                         temp-limit-enable = <0>;
855                                         target-temp = <80>;
856                                         temp-channel = <1>;
857                                         normal-temp-limit = <
858                                         /*delta-temp    delta-freq*/
859                                                 3       96000
860                                                 6       144000
861                                                 9       192000
862                                                 15      384000
863                                                 >;
864                                         performance-temp-limit = <
865                                                 /*temp    freq*/
866                                                 110     816000
867                                                 >;
868                                         status = "okay";
869                                         regu-mode-table = <
870                                                 /*freq     mode*/
871                                                 1008000    4
872                                                 0          3
873                                         >;
874                                         regu-mode-en = <0>;
875                                 };
876                         };
877                 };
878
879                 vd_logic: vd_logic {
880                         regulator_name = "vdd_logic";
881                         pd_ddr {
882                                 clk_ddr_dvfs_table: clk_ddr {
883                                         operating-points = <
884                                                 /* KHz    uV */
885                                                 200000 1200000
886                                                 300000 1200000
887                                                 400000 1200000
888                                                 >;
889                                         status = "disabled";
890                                 };
891                         };
892
893                         pd_gpu {
894                                 clk_gpu_dvfs_table: clk_gpu {
895                                         operating-points = <
896                                                 /* KHz    uV */
897                                                 200000 1200000
898                                                 300000 1200000
899                                                 400000 1200000
900                                                 >;
901                                         status = "okay";
902                                         regu-mode-table = <
903                                                 /*freq     mode*/
904                                                 200000     4
905                                                 0          3
906                                         >;
907                                         regu-mode-en = <0>;
908                                 };
909                         };
910                 };
911         };
912         ion {
913                 compatible = "rockchip,ion";
914                 #address-cells = <1>;
915                 #size-cells = <0>;
916
917                 ion_cma: rockchip,ion-heap@1 { /* CMA HEAP */
918                         compatible = "rockchip,ion-reserve";
919                         rockchip,ion_heap = <1>;
920                         reg = <0x00000000 0x800000>; /* 8MB */
921                 };
922                 rockchip,ion-heap@3 { /* VMALLOC HEAP */
923                         rockchip,ion_heap = <3>;
924                 };
925         };
926         cif: cif@1010a000 {
927              compatible = "rockchip,cif";
928              reg = <0x1010a000 0x2000>;
929              interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
930              clocks = <&pd_vip>,<&clk_gates6 5>,<&clk_gates6 4>,<&clk_cif0_in>,<&clk_cif_out>;
931              clock-names = "pd_cif0", "aclk_cif0","hclk_cif0","cif0_in","cif0_out";
932              status = "okay";
933              };
934
935         codec_hdmi_spdif: codec-hdmi-spdif {
936                 compatible = "hdmi-spdif";
937         };
938
939         rockchip-hdmi-spdif {
940                 compatible = "rockchip-hdmi-spdif";
941                 dais {
942                         dai0 {
943                                 audio-codec = <&codec_hdmi_spdif>;
944                                 i2s-controller = <&spdif>;
945                         };
946                 };
947         };
948         codec: codec@20030000 {
949                 compatible = "rk312x-codec";
950                 reg = <0x20030000 0x4000>;
951                 //pinctrl-names = "default";
952                 //pinctrl-0 = <&i2s_gpio>;
953                 boot_depop = <1>;
954                 pa_enable_time = <1000>;
955                 clocks = <&clk_gates5 14>;
956                 clock-names = "g_pclk_acodec";
957         };
958         rockchip-audio {
959                 compatible = "audio-rk312x";
960                 dais {
961                         dai0 {
962                                 audio-codec = <&codec>;
963                                 i2s-controller = <&i2s1>;
964                                 format = "i2s";
965                                 //continuous-clock;
966                                 //bitclock-inversion;
967                                 //frame-inversion;
968                                 //bitclock-master;
969                                 //frame-master;
970                         };
971                         dai1 {
972                                 audio-codec = <&codec>;
973                                 i2s-controller = <&i2s1>;
974                                 format = "i2s";
975                                 //continuous-clock;
976                                 //bitclock-inversion;
977                                 //frame-inversion;
978                                 //bitclock-master;
979                                 //frame-master;
980                         };
981                 };
982         };
983         rockchip_suspend {
984                 rockchip,ctrbits = <
985                         (0
986                         |RKPM_CTR_PWR_DMNS
987                         |RKPM_CTR_GTCLKS
988                         |RKPM_CTR_PLLS
989                         |RKPM_CTR_ARMOFF_LPMD
990                         )
991                 >;
992                 rockchip,pmic-suspend_gpios = <
993                        GPIO1_A1
994                         >;
995         };
996 };