ARM: rockchip: rk312x add cpu axi bus support
[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                                 rockchip,priority = <3 2>;
88                         };
89                         peri {
90                                 reg = <0x1012c000 0x20>;
91                         };
92                         gpu {
93                                 reg = <0x1012d000 0x20>;
94                         };
95                         vpu {
96                                 reg = <0x1012e000 0x20>;
97                         };
98                         rga {
99                                 reg = <0x1012f000 0x20>;
100                         };
101                         ebc {
102                                 reg = <0x1012f080 0x20>;
103                         };
104                         iep {
105                                 reg = <0x1012f100 0x20>;
106                         };
107                         lcdc {
108                                 reg = <0x1012f180 0x20>;
109                                 rockchip,priority = <3 3>;
110                         };
111                         vip {
112                                 reg = <0x1012f200 0x20>;
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         };
133
134         timer {
135                 compatible = "arm,armv7-timer";
136                 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
137                              <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
138                 clock-frequency = <24000000>;
139         };
140
141         timer@20044000 {
142                 compatible = "rockchip,timer";
143                 reg = <0x20044000 0x20>;
144                 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
145                 rockchip,broadcast = <1>;
146         };
147
148         watchdog: wdt@2004c000 {
149                 compatible = "rockchip,watch dog";
150                 reg = <0x2004c000 0x100>;
151         //      clocks = <&clk_gates7 15>;
152                 clock-names = "pclk_wdt";
153                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
154                 rockchip,irq = <1>;
155                 rockchip,timeout = <60>;
156                 rockchip,atboot = <1>;
157                 rockchip,debug = <0>;
158                 status = "disabled";
159         };
160
161         amba {
162                 #address-cells = <1>;
163                 #size-cells = <1>;
164                 compatible = "arm,amba-bus";
165                 interrupt-parent = <&gic>;
166                 ranges;
167
168                 pdma: pdma@20078000 {
169                         compatible = "arm,pl330", "arm,primecell";
170                         reg = <0x20078000 0x4000>;
171                         interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
172                                      <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
173                         #dma-cells = <1>;
174                 };
175         };
176
177         reset: reset@20000110 {
178                 compatible = "rockchip,reset";
179                 reg = <0x20000110 0x24>;
180                 rockchip,reset-flag = <ROCKCHIP_RESET_HIWORD_MASK>;
181                 #reset-cells = <1>;
182         };
183
184         nandc: nandc@10500000 {
185                 compatible = "rockchip,rk-nandc";
186                 reg = <0x10500000 0x4000>;
187                 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
188                 //pinctrl-names = "default";
189                 //pinctrl-0 = <&nandc_ale &nandc_cle &nandc_wrn &nandc_rdn &nandc_rdy &nandc_cs0 &nandc_data>;
190                 nandc_id = <0>;
191                 clocks = <&clk_nandc>, <&clk_gates5 9>, <&clk_gates10 15>;
192                 clock-names = "clk_nandc", "g_clk_nandc", "hclk_nandc";
193         };
194         
195         nandc0reg: nandc0@10500000 {
196                 compatible = "rockchip,rk-nandc";
197                 reg = <0x10500000 0x4000>;
198         };
199         uart0: serial@20060000 {
200                 compatible = "rockchip,serial";
201                 reg = <0x20060000 0x100>;
202                 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
203                 clock-frequency = <24000000>;
204                 clocks = <&clk_uart0>, <&clk_gates8 0>;
205                 clock-names = "sclk_uart", "pclk_uart";
206                 reg-shift = <2>;
207                 reg-io-width = <4>;
208                 dmas = <&pdma 2>, <&pdma 3>;
209                 #dma-cells = <2>;
210                 pinctrl-names = "default";
211                 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
212                 status = "disabled";
213         };
214
215         uart1: serial@20064000 {
216                 compatible = "rockchip,serial";
217                 reg = <0x20064000 0x100>;
218                 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
219                 clock-frequency = <24000000>;
220                 clocks = <&clk_uart1>, <&clk_gates8 1>;
221                 clock-names = "sclk_uart", "pclk_uart";
222                 reg-shift = <2>;
223                 reg-io-width = <4>;
224                 dmas = <&pdma 4>, <&pdma 5>;
225                 #dma-cells = <2>;
226                 pinctrl-names = "default";
227                 pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
228                 status = "disabled";
229         };
230
231         uart2: serial@20068000 {
232                 compatible = "rockchip,serial";
233                 reg = <0x20068000 0x100>;
234                 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
235                 clock-frequency = <24000000>;
236                 clocks = <&clk_uart2>, <&clk_gates8 2>;
237                 clock-names = "sclk_uart", "pclk_uart";
238                 reg-shift = <2>;
239                 reg-io-width = <4>;
240                 dmas = <&pdma 6>, <&pdma 7>;
241                 #dma-cells = <2>;
242                 pinctrl-names = "default";
243                 pinctrl-0 = <&uart2_xfer>;
244                 status = "disabled";
245         };
246
247         gmac: eth@2008c000 {
248                 compatible = "rockchip,gmac";
249                 reg = <0x2008c000 0x4000>;
250                 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;  /*irq=88*/
251                 interrupt-names = "macirq";
252                 clocks = <&clk_mac_ref>, <&clk_gates2 6>,
253                         <&clk_gates2 7>, <&clk_gates2 4>,
254                         <&clk_gates2 5>,
255                         <&clk_gates10 11>;
256                 clock-names = "clk_mac", "mac_clk_rx",
257                         "mac_clk_tx", "clk_mac_ref",
258                         "clk_mac_refout",
259                         "pclk_mac";
260                 //phy-mode = "rmii";
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_gates4 2>,/*aclk_cpu_peri*/
377
378                                 /*hclk_peri_pre*/
379                                 <&clk_gates4 0>,/*hclk_peri_matrix*/
380                                 <&clk_gates9 13>,/*hclk_usb_peri*/
381                                 <&clk_gates9 14>,/*hclk_peri_arbi*/
382
383                                 /*pclk_peri_pre*/
384                                 <&clk_gates4 1>,/*pclk_peri_axi_matrix*/
385
386                                 /*hclk_vio_pre*/
387                                 <&clk_gates6 12>,/*hclk_vio_niu*/
388                                 <&clk_gates6 1>,/*hclk_lcdc*/
389
390                                 /*aclk_vio0_pre*/
391                                 <&clk_gates6 13>,/*aclk_vio*/
392                                 <&clk_gates6 0>,/*aclk_lcdc*/
393
394                                 /*aclk_vio1_pre*/
395                                 <&clk_gates9 10>,/*aclk_vio1_niu*/
396
397                                 /*UART*/
398                                 <&clk_gates1 12>,
399                                 <&clk_gates1 13>,
400                                 <&clk_gates8 2>,/*pclk_uart2*/
401
402                                 <&clk_gpu>,
403
404                                 /*jtag*/
405                                 <&clk_gates1 3>,/*clk_jtag*/
406
407                                 /*pmu*/
408                                 <&clk_gates1 0>;/*pclk_pmu_pre*/
409         };
410
411         i2c0: i2c@20072000 {
412                 compatible = "rockchip,rk30-i2c";
413                 reg = <0x20072000 0x1000>;
414                 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
415                 #address-cells = <1>;
416                 #size-cells = <0>;
417                 pinctrl-names = "default", "gpio";
418                 pinctrl-0 = <&i2c0_sda &i2c0_scl>;
419                 pinctrl-1 = <&i2c0_gpio>;
420                 gpios = <&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A0 GPIO_ACTIVE_LOW>;
421                 clocks = <&clk_gates8 4>;
422                 rockchip,check-idle = <1>;
423                 status = "disabled";
424         };
425
426         i2c1: i2c@20056000 {
427                 compatible = "rockchip,rk30-i2c";
428                 reg = <0x20056000 0x1000>;
429                 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
430                 #address-cells = <1>;
431                 #size-cells = <0>;
432                 pinctrl-names = "default", "gpio";
433                 pinctrl-0 = <&i2c1_sda &i2c1_scl>;
434                 pinctrl-1 = <&i2c1_gpio>;
435                 gpios = <&gpio0 GPIO_A3 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
436                 clocks = <&clk_gates8 5>;
437                 rockchip,check-idle = <1>;
438                 status = "disabled";
439         };
440
441         i2c2: i2c@2005a000 {
442                 compatible = "rockchip,rk30-i2c";
443                 reg = <0x2005a000 0x1000>;
444                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
445                 #address-cells = <1>;
446                 #size-cells = <0>;
447                 pinctrl-names = "default", "gpio";
448                 pinctrl-0 = <&i2c2_sda &i2c2_scl>;
449                 pinctrl-1 = <&i2c2_gpio>;
450                 gpios = <&gpio2 GPIO_C4 GPIO_ACTIVE_LOW>, <&gpio2 GPIO_C5 GPIO_ACTIVE_LOW>;
451                 clocks = <&clk_gates8 6>;
452                 rockchip,check-idle = <1>;
453                 status = "disabled";
454         };
455
456         i2c3: i2c@2005e000 {
457                 compatible = "rockchip,rk30-i2c";
458                 reg = <0x2005e000 0x1000>;
459                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
460                 #address-cells = <1>;
461                 #size-cells = <0>;
462                 pinctrl-names = "default", "gpio";
463                 pinctrl-0 = <&i2c3_sda &i2c3_scl>;
464                 pinctrl-1 = <&i2c3_gpio>;
465                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A6 GPIO_ACTIVE_LOW>;
466                 clocks = <&clk_gates8 7>;
467                 rockchip,check-idle = <1>;
468                 status = "disabled";
469         };
470
471         i2s0: i2s@10220000 {
472                 compatible = "rockchip-i2s";
473                 reg = <0x10220000 0x1000>;
474                 i2s-id = <0>;
475                 clocks = <&clk_i2s_2ch>, <&clk_i2s_2ch_out>, <&clk_gates7 2>;
476                 clock-names = "i2s_clk", "i2s_mclk", "i2s_hclk";
477                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
478                 dmas = <&pdma 0>, <&pdma 1>;
479                 //#dma-cells = <2>;
480                 dma-names = "tx", "rx";
481                 //pinctrl-names = "default", "sleep";
482                 //pinctrl-0 = <&i2s0_mclk &i2s0_sclk &i2s0_lrckrx &i2s0_lrcktx &i2s0_sdi &i2s0_sdo>;
483                 //pinctrl-1 = <&i2s0_gpio>;
484         };
485
486         i2s1: i2s@10200000 {
487                 compatible = "rockchip-i2s";
488                 reg = <0x10200000 0x1000>;
489                 i2s-id = <1>;
490                 clocks = <&clk_i2s_8ch>, <&clk_gates7 4>;
491                 clock-names = "i2s_clk", "i2s_hclk";
492                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
493                 dmas = <&pdma 14>, <&pdma 15>;
494                 //#dma-cells = <2>;
495                 dma-names = "tx", "rx";
496         };
497
498         spdif: spdif@10204000 {
499                 compatible = "rk312x-spdif";
500                 reg = <0x10204000 0x1000>;
501                 clocks = <&clk_spdif>, <&clk_gates10 9>;
502                 clock-names = "spdif_mclk", "spdif_hclk";
503                 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
504                 dmas = <&pdma 13>;
505                 //#dma-cells = <1>;
506                 dma-names = "tx";
507                 pinctrl-names = "default";
508                 pinctrl-0 = <&spdif_tx>;
509         };      
510
511         dsihost0: mipi@10110000{
512                 compatible = "rockchip,rk32-dsi";
513                 rockchip,prop = <0>;
514                 reg = <0x10110000 0x4000>, <0x20038000 0x4000>;
515                 reg-names = "mipi_dsi_host" ,"mipi_dsi_phy";
516                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
517                 clocks = <&clk_gates2 15>, <&clk_gates5 0> ;//, <&pd_mipidsi>;
518                 clock-names = "clk_mipi_24m", "pclk_mipi_dsi";//, "pd_mipi_dsi";
519                 status = "okay";
520         };
521
522         emmc: rksdmmc@1021c000 {
523                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
524                 reg = <0x1021c000 0x4000>;
525                 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
526                 #address-cells = <1>;
527                 #size-cells = <0>;
528                 //pinctrl-names = "default",,"suspend";
529                 //pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_wp &sd0_pwr &sd0_bus1 &sd0_bus4>;
530                 clocks = <&clk_emmc>, <&clk_gates7 0>;
531                 clock-names = "clk_mmc", "hclk_mmc";
532                 dmas = <&pdma 12>;
533                 dma-names = "dw_mci";
534                 num-slots = <1>;
535                 fifo-depth = <0x100>;
536                 bus-width = <8>;
537         };
538
539
540         sdmmc: rksdmmc@10214000 {
541                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
542                 reg = <0x10214000 0x4000>;
543                 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
544                 #address-cells = <1>;
545                 #size-cells = <0>;
546                 pinctrl-names = "default", "idle";
547                 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_pwren &sdmmc0_dectn &sdmmc0_bus4>;
548                 pinctrl-1 = <&sdmmc0_gpio>;
549                 clocks = <&clk_sdmmc0>, <&clk_gates5 10>;
550                 clock-names = "clk_mmc", "hclk_mmc";
551                 dmas = <&pdma 10>;
552                 dma-names = "dw_mci";
553                 num-slots = <1>;
554                 fifo-depth = <0x100>;
555                 bus-width = <4>;
556         };
557
558         sdio: rksdmmc@10218000 {
559                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
560                 reg = <0x10218000 0x4000>;
561                 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
562                 #address-cells = <1>;
563                 #size-cells = <0>;
564                 pinctrl-names = "default","idle";
565                 pinctrl-0 = <&sdio0_pwren &sdio0_cmd &sdio0_clk &sdio0_bus4>;
566                 pinctrl-1 = <&sdio0_gpio>;
567                 clocks = <&clk_sdio>, <&clk_gates5 11>;
568                 clock-names = "clk_mmc", "hclk_mmc";
569                 dmas = <&pdma 11>;
570                 dma-names = "dw_mci";
571                 num-slots = <1>;
572                 fifo-depth = <0x100>;
573                 bus-width = <4>;
574         };
575
576         adc: adc@2006c000 {
577                 compatible = "rockchip,saradc";
578                 reg = <0x2006c000 0x100>;
579                 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
580                 #io-channel-cells = <1>;
581                 io-channel-ranges;
582                 rockchip,adc-vref = <1800>;
583                 clock-frequency = <1000000>;
584                 clocks = <&clk_saradc>, <&clk_gates7 14>;
585                 clock-names = "saradc", "pclk_saradc";
586                 status = "disabled";
587         };
588
589         pwm0: pwm@20050000 {
590                 compatible = "rockchip,rk-pwm";
591                 reg = <0x20050000 0x10>;
592                 #pwm-cells = <2>;
593                 pinctrl-names = "default";
594                 pinctrl-0 = <&pwm0_pin>;
595                 clocks = <&clk_gates7 10>;
596                 clock-names = "pclk_pwm";
597                 status = "disabled";
598         };
599
600         pwm1: pwm@20050010 {
601                 compatible = "rockchip,rk-pwm";
602                 reg = <0x20050010 0x10>;
603                 #pwm-cells = <2>;
604                 pinctrl-names = "default";
605                 pinctrl-0 = <&pwm1_pin>;
606                 clocks = <&clk_gates7 10>;
607                 clock-names = "pclk_pwm";
608                 status = "disabled";
609         };
610
611         pwm2: pwm@20050020 {
612                 compatible = "rockchip,rk-pwm";
613                 reg = <0x20050020 0x10>;
614                 #pwm-cells = <2>;
615                 pinctrl-names = "default";
616                 pinctrl-0 = <&pwm2_pin>;
617                 clocks = <&clk_gates7 10>;
618                 clock-names = "pclk_pwm";
619                 status = "disabled";
620         };
621
622         pwm3: pwm@20050030 {
623                 compatible = "rockchip,rk-pwm";
624                 reg = <0x20050030 0x10>;
625                 #pwm-cells = <2>;
626                 pinctrl-names = "default";
627                 pinctrl-0 = <&pwm3_pin>;
628                 clocks = <&clk_gates7 10>;
629                 clock-names = "pclk_pwm";
630                 status = "disabled";
631         };
632
633         remotectl: pwm@20050030 {
634                 compatible = "rockchip,remotectl-pwm";
635                 reg = <0x20050030 0x10>;
636                 #pwm-cells = <2>;
637                 pinctrl-names = "default";
638                 pinctrl-0 = <&pwm3_pin>;
639                 clocks = <&clk_gates7 10>;
640                 clock-names = "pclk_pwm";
641                 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
642                 status = "okay";
643         };
644         dwc_control_usb: dwc-control-usb@20008000 {
645                 compatible = "rockchip,rk3126-dwc-control-usb";
646                 reg = <0x20008000 0x4>;
647                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
648                 interrupt-names = "otg_bvalid";
649                 clocks = <&clk_gates9 13>;
650                 clock-names = "hclk_usb_peri";
651                 rockchip,remote_wakeup;
652                 rockchip,usb_irq_wakeup;
653                 resets = <&reset RK3128_RST_USBPOR>;
654                 reset-names = "usbphy_por";
655                 usb_bc{
656                         compatible = "inno,phy";
657                         regbase = &dwc_control_usb;
658                 };
659         };
660
661         usb0: usb@10180000 {
662                 compatible = "rockchip,rk3126_usb20_otg";
663                 reg = <0x10180000 0x40000>;
664                 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
665                 clocks = <&clk_gates1 5>, <&clk_gates5 13>;
666                 clock-names = "clk_usbphy0", "hclk_usb0";
667                 resets = <&reset RK3128_RST_USBOTG0>, <&reset RK3128_RST_USBOTG0>,
668                                 <&reset RK3128_RST_OTGC0>;
669                 reset-names = "otg_ahb", "otg_phy", "otg_controller";
670                 /*0 - Normal, 1 - Force Host, 2 - Force Device*/
671                 rockchip,usb-mode = <0>;
672         };
673
674         usb1: usb@101c0000 {
675                 compatible = "rockchip,rk3126_usb20_host";
676                 reg = <0x101c0000 0x40000>;
677                 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
678                 clocks = <&clk_gates1 6>, <&clk_gates7 3>;
679                 clock-names = "clk_usbphy1", "hclk_usb1";
680                 resets = <&reset RK3128_RST_USBOTG1>, <&reset RK3128_RST_UTMI1>,
681                                 <&reset RK3128_RST_OTGC1>;
682                 reset-names = "host_ahb", "host_phy", "host_controller";
683         };
684
685         fb: fb{
686                 compatible = "rockchip,rk-fb";
687                 rockchip,disp-mode = <ONE_DUAL>;
688         };
689
690         rk_screen: rk_screen{
691                 compatible = "rockchip,screen";
692         };
693
694         lvds: lvds@20038000 {
695                 compatible = "rockchip,rk31xx-lvds";
696                 reg = <0x20038000 0x4000>;
697                 clocks = <&clk_gates5 0>;
698                 clock-names = "pclk_lvds";
699                 pinctrl-names = "lcdc", "sleep";
700                 pinctrl-0 = <&lcdc0_lcdc_d>;
701                 pinctrl-1 = <&lcdc0_lcdc_gpio>;
702         };
703
704         lcdc: lcdc@1010e000 {
705                 compatible = "rockchip,rk312x-lcdc";
706                 rockchip,prop = <PRMRY>;
707                 reg = <0x1010e000 0x2000>;
708                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
709                 clocks = <&clk_gates6 0>, <&dclk_lcdc0>, <&clk_gates6 1>, <&sclk_lcdc0>;
710                 clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc", "sclk_lcdc";
711                 rockchip,iommu-enabled = <1>;
712                 status = "disabled";
713         };
714
715         hdmi: hdmi@20034000 {
716                 compatible = "rockchip,rk312x-hdmi";
717                 reg = <0x20034000 0x4000>;
718                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
719                 rockchip,hdmi_lcdc_source = <0>;
720                 pinctrl-names = "default", "gpio";
721                 pinctrl-0 = <&hdmi_cec &hdmi_sda &hdmi_scl &hdmi_hpd>;
722                 pinctrl-1 = <&hdmi_gpio>;
723                 clocks = <&clk_gates3 8>;
724                 clock-names = "pclk_hdmi";
725                 status = "disabled";
726         };
727
728         tve: tve{
729                 compatible = "rockchip,rk312x-tve";
730                 reg = <0x1010e200 0x100>;
731                 status = "disabled";
732         };
733
734         vpu: vpu_service@10106000 {
735                 compatible = "vpu_service";
736                 iommu_enabled = <1>;
737                 reg = <0x10106000 0x800>;
738                 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
739                 interrupt-names = "irq_enc", "irq_dec";
740                 clocks = <&clk_vdpu>, <&hclk_vdpu>;
741                 clock-names = "aclk_vcodec", "hclk_vcodec";
742                 name = "vpu_service";
743                 status = "okay";
744         };
745
746         hevc: hevc_service@10104000 {
747                 compatible = "rockchip,hevc_service";
748                 iommu_enabled = <1>;
749                 reg = <0x10104000 0x400>;
750                 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
751                 interrupt-names = "irq_dec";
752                 clocks = <&clk_vdpu>, <&hclk_vdpu>, <&clk_hevc_core>;
753                 clock-names = "aclk_vcodec", "hclk_vcodec", "clk_core";
754                 name = "hevc_service";
755                 status = "okay";
756         };
757
758         iep: iep@10108000 {
759                 compatible = "rockchip,iep";
760                 iommu_enabled = <1>;
761                 reg = <0x10108000 0x800>;
762                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
763                 clocks = <&clk_gates9 8>, <&clk_gates9 7>;
764                 clock-names = "aclk_iep", "hclk_iep";
765                 status = "okay";
766         };
767         
768         rga: rga@1010c000 {
769                 compatible = "rockchip,rk312x-rga";
770                 reg = <0x1010c000 0x1000>;
771                 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
772                 clocks = <&clk_gates0 11>, <&clk_gates1 4>;
773                 clock-names = "hclk_rga", "aclk_rga";
774                 status = "okay";
775         };
776
777   vop_mmu {
778                 dbgname = "vop";
779                 compatible = "iommu,vop_mmu";
780                 reg = <0x1010e300 0x100>;
781                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
782                 interrupt-names = "vop_mmu";
783           };
784
785           hevc_mmu {
786                 dbgname = "hevc";
787                 compatible = "iommu,hevc_mmu";
788                 reg = <0x10104440 0x100>,
789                       <0x10104480 0x100>;
790                 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
791                 interrupt-names = "hevc_mmu";
792           };
793
794           vpu_mmu {
795                 dbgname = "vpu";
796                 compatible = "iommu,vpu_mmu";
797                 reg = <0x10104800 0x100>;
798                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
799                 interrupt-names = "vpu_mmu";
800           };
801
802           iep_mmu {
803                 dbgname = "iep";
804                 compatible = "iommu,iep_mmu";
805                 reg = <0x10108800 0x100>;
806                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
807                 interrupt-names = "iep_mmu";
808           };
809
810           dvfs {
811                 temp-limit-enable = <0>;
812                 target-temp = <80>;
813
814                 vd_arm: vd_arm {
815                         regulator_name = "vdd_arm";
816                         pd_core {
817                                 clk_core_dvfs_table: clk_core {
818                                         operating-points = <
819                                                 /* KHz    uV */
820                                                 312000 1100000
821                                                 504000 1100000
822                                                 816000 1100000
823                                                 1008000 1100000
824                                                 >;
825                                         temp-channel = <1>;
826                                         normal-temp-limit = <
827                                         /*delta-temp    delta-freq*/
828                                                 3       96000
829                                                 6       144000
830                                                 9       192000
831                                                 15      384000
832                                                 >;
833                                         performance-temp-limit = <
834                                                 /*temp    freq*/
835                                                 110     816000
836                                                 >;
837                                         status = "okay";
838                                         regu-mode-table = <
839                                                 /*freq     mode*/
840                                                 1008000    4
841                                                 0          3
842                                         >;
843                                         regu-mode-en = <0>;
844                                 };
845                         };
846                 };
847
848                 vd_logic: vd_logic {
849                         regulator_name = "vdd_logic";
850                         pd_ddr {
851                                 clk_ddr_dvfs_table: clk_ddr {
852                                         operating-points = <
853                                                 /* KHz    uV */
854                                                 200000 1200000
855                                                 300000 1200000
856                                                 400000 1200000
857                                                 >;
858                                         status = "disabled";
859                                 };
860                         };
861
862                         pd_gpu {
863                                 clk_gpu_dvfs_table: clk_gpu {
864                                         operating-points = <
865                                                 /* KHz    uV */
866                                                 200000 1200000
867                                                 300000 1200000
868                                                 400000 1200000
869                                                 >;
870                                         status = "okay";
871                                         regu-mode-table = <
872                                                 /*freq     mode*/
873                                                 200000     4
874                                                 0          3
875                                         >;
876                                         regu-mode-en = <0>;
877                                 };
878                         };
879                 };
880         };
881         ion {
882                 compatible = "rockchip,ion";
883                 #address-cells = <1>;
884                 #size-cells = <0>;
885
886                 ion_cma: rockchip,ion-heap@1 { /* CMA HEAP */
887                         compatible = "rockchip,ion-reserve";
888                         rockchip,ion_heap = <1>;
889                         reg = <0x00000000 0x10000000>; /* 256MB */
890                 };
891                 rockchip,ion-heap@3 { /* VMALLOC HEAP */
892                         rockchip,ion_heap = <3>;
893                 };
894         };
895         cif: cif@1010a000 {
896              compatible = "rockchip,cif";
897              reg = <0x1010a000 0x2000>;
898              interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
899              clocks = <&clk_gates3 3>,<&clk_gates6 5>,<&clk_gates6 4>,<&clk_cif0_in>,<&clk_cif_out>;
900              clock-names = "pd_cif0", "aclk_cif0","hclk_cif0","cif0_in","cif0_out";
901              status = "okay";
902              };
903
904         codec_hdmi_spdif: codec-hdmi-spdif {
905                 compatible = "hdmi-spdif";
906         };
907
908         rockchip-hdmi-spdif {
909                 compatible = "rockchip-hdmi-spdif";
910                 dais {
911                         dai0 {
912                                 audio-codec = <&codec_hdmi_spdif>;
913                                 i2s-controller = <&spdif>;
914                         };
915                 };
916         };
917
918         rockchip-audio {
919                 compatible = "audio-rk312x";
920                 dais {
921                         dai0 {
922                                 audio-codec = <&codec>;
923                                 i2s-controller = <&i2s1>;
924                                 format = "i2s";
925                                 //continuous-clock;
926                                 //bitclock-inversion;
927                                 //frame-inversion;
928                                 //bitclock-master;
929                                 //frame-master;
930                         };
931                         dai1 {
932                                 audio-codec = <&codec>;
933                                 i2s-controller = <&i2s1>;
934                                 format = "i2s";
935                                 //continuous-clock;
936                                 //bitclock-inversion;
937                                 //frame-inversion;
938                                 //bitclock-master;
939                                 //frame-master;
940                         };
941                 };
942         };
943 };