ecdc3dc45908a0615da1201df0b9a893e2f27604
[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         sram: sram@10080000 {
72                 compatible = "mmio-sram";
73                 reg = <0x10080000 0x2000>;
74                 map-exec;
75         };
76
77         timer {
78                 compatible = "arm,armv7-timer";
79                 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
80                              <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
81                 clock-frequency = <24000000>;
82         };
83
84         timer@20044000 {
85                 compatible = "rockchip,timer";
86                 reg = <0x20044000 0x20>;
87                 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
88                 rockchip,broadcast = <1>;
89         };
90
91         watchdog: wdt@2004c000 {
92                 compatible = "rockchip,watch dog";
93                 reg = <0x2004c000 0x100>;
94         //      clocks = <&clk_gates7 15>;
95                 clock-names = "pclk_wdt";
96                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
97                 rockchip,irq = <1>;
98                 rockchip,timeout = <60>;
99                 rockchip,atboot = <1>;
100                 rockchip,debug = <0>;
101                 status = "disabled";
102         };
103
104         amba {
105                 #address-cells = <1>;
106                 #size-cells = <1>;
107                 compatible = "arm,amba-bus";
108                 interrupt-parent = <&gic>;
109                 ranges;
110
111                 pdma: pdma@20078000 {
112                         compatible = "arm,pl330", "arm,primecell";
113                         reg = <0x20078000 0x4000>;
114                         interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
115                                      <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
116                         #dma-cells = <1>;
117                 };
118         };
119
120         reset: reset@20000110 {
121                 compatible = "rockchip,reset";
122                 reg = <0x20000110 0x24>;
123                 rockchip,reset-flag = <ROCKCHIP_RESET_HIWORD_MASK>;
124                 #reset-cells = <1>;
125         };
126
127         nandc: nandc@10500000 {
128                 compatible = "rockchip,rk-nandc";
129                 reg = <0x10500000 0x4000>;
130                 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
131                 //pinctrl-names = "default";
132                 //pinctrl-0 = <&nandc_ale &nandc_cle &nandc_wrn &nandc_rdn &nandc_rdy &nandc_cs0 &nandc_data>;
133                 nandc_id = <0>;
134                 clocks = <&clk_nandc>, <&clk_gates5 9>, <&clk_gates10 15>;
135                 clock-names = "clk_nandc", "g_clk_nandc", "hclk_nandc";
136         };
137         
138         nandc0reg: nandc0@10500000 {
139                 compatible = "rockchip,rk-nandc";
140                 reg = <0x10500000 0x4000>;
141         };
142         uart0: serial@20060000 {
143                 compatible = "rockchip,serial";
144                 reg = <0x20060000 0x100>;
145                 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
146                 clock-frequency = <24000000>;
147                 clocks = <&clk_uart0>, <&clk_gates8 0>;
148                 clock-names = "sclk_uart", "pclk_uart";
149                 reg-shift = <2>;
150                 reg-io-width = <4>;
151                 dmas = <&pdma 2>, <&pdma 3>;
152                 #dma-cells = <2>;
153                 pinctrl-names = "default";
154                 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
155                 status = "disabled";
156         };
157
158         uart1: serial@20064000 {
159                 compatible = "rockchip,serial";
160                 reg = <0x20064000 0x100>;
161                 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
162                 clock-frequency = <24000000>;
163                 clocks = <&clk_uart1>, <&clk_gates8 1>;
164                 clock-names = "sclk_uart", "pclk_uart";
165                 reg-shift = <2>;
166                 reg-io-width = <4>;
167                 dmas = <&pdma 4>, <&pdma 5>;
168                 #dma-cells = <2>;
169                 pinctrl-names = "default";
170                 pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
171                 status = "disabled";
172         };
173
174         uart2: serial@20068000 {
175                 compatible = "rockchip,serial";
176                 reg = <0x20068000 0x100>;
177                 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
178                 clock-frequency = <24000000>;
179                 clocks = <&clk_uart2>, <&clk_gates8 2>;
180                 clock-names = "sclk_uart", "pclk_uart";
181                 reg-shift = <2>;
182                 reg-io-width = <4>;
183                 dmas = <&pdma 6>, <&pdma 7>;
184                 #dma-cells = <2>;
185                 pinctrl-names = "default";
186                 pinctrl-0 = <&uart2_xfer>;
187                 status = "disabled";
188         };
189
190         fiq-debugger {
191                 compatible = "rockchip,fiq-debugger";
192                 rockchip,serial-id = <2>;
193                 rockchip,signal-irq = <106>;
194                 rockchip,wake-irq = <0>;
195                 status = "disabled";
196         };
197
198         clocks-init{
199                 compatible = "rockchip,clocks-init";
200                 rockchip,clocks-init-parent =
201                         <&clk_core &clk_apll>, <&aclk_cpu &clk_gpll_div2>,
202                         <&aclk_peri &clk_gpll_div2>, <&clk_uart0_pll &clk_gpll>,
203                         <&clk_uart2_pll &clk_gpll>, <&clk_i2s_2ch_pll &clk_gpll>,
204                         <&clk_i2s_8ch_pll &clk_gpll>, <&clk_spdif_pll &clk_gpll>,
205                         <&clk_vepu &clk_gpll_div2>, <&clk_vdpu &clk_gpll_div2>,
206                         <&clk_hevc_core &clk_gpll>, <&aclk_vio0_pre &clk_gpll_div2>,
207                         <&aclk_vio1_pre &clk_gpll_div2>, <&hclk_vio_pre &clk_gpll_div2>,
208                         <&sclk_lcdc0 &clk_cpll>, <&clk_gpu &clk_gpll_div2>,
209                         <&clk_cif_pll &clk_gpll_div2>, <&dclk_ebc &clk_gpll_div2>,
210                         <&clk_emmc &clk_gpll_div2>, <&clk_sdio &clk_gpll_div2>,
211                         <&clk_sfc &clk_gpll_div2>, <&clk_sdmmc0 &clk_gpll_div2>,
212                         <&clk_tsp &clk_gpll_div2>, <&clk_nandc &clk_gpll_div2>,
213                         <&clk_mac_pll &clk_cpll>;
214                 rockchip,clocks-init-rate =
215                         <&clk_core 816000000>, <&clk_gpll 594000000>,
216                         <&clk_cpll 400000000>, <&aclk_cpu 300000000>,
217                         <&hclk_cpu_pre 150000000>, <&pclk_cpu_pre 75000000>,
218                         <&aclk_peri 300000000>, <&hclk_peri_pre 150000000>,
219                         <&pclk_peri_pre 75000000>, <&clk_gpu 300000000>,
220                         <&aclk_vio0_pre 300000000>, <&hclk_vio_pre 150000000>,
221                         <&aclk_vio1_pre 300000000>, <&clk_vepu 300000000>,
222                         <&clk_vdpu 300000000>, <&clk_hevc_core 200000000>,
223                         <&clk_mac_ref 50000000>;
224         /*      rockchip,clocks-uboot-has-init =
225                         <&aclk_vio1>;*/
226         };
227         gpu {
228                 compatible = "arm,mali400";
229                 reg = <0x10091000 0x200>,
230                       <0x10090000 0x100>,
231                       <0x10093000 0x100>,
232                       <0x10098000 0x1100>,
233                       <0x10094000 0x100>,
234                       <0x1009A000 0x1100>,
235                       <0x10095000 0x100>;
236                 
237                 reg-names = "Mali_L2",
238                             "Mali_GP",
239                             "Mali_GP_MMU",
240                             "Mali_PP0",
241                             "Mali_PP0_MMU",
242                             "Mali_PP1",
243                             "Mali_PP1_MMU";
244
245                 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
246                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
247                              <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
248                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
249                              <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
250                              <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
251                 
252                 interrupt-names = "Mali_GP_IRQ",
253                                   "Mali_GP_MMU_IRQ",
254                                   "Mali_PP0_IRQ",
255                                   "Mali_PP0_MMU_IRQ",
256                                   "Mali_PP1_IRQ",
257                                   "Mali_PP1_MMU_IRQ";
258           };
259
260         clocks-enable {
261                 compatible = "rockchip,clocks-enable";
262                 clocks =
263                                 /*PD_CORE*/
264                                 <&clk_gates0 6>,<&clk_gates0 0>,
265                                 <&clk_gates0 7>,
266
267                                 /*PD_CPU*/
268                                 <&clk_gates0 1>, <&clk_gates0 3>,
269                                 <&clk_gates0 4>, <&clk_gates0 5>,
270                                 <&clk_gates0 12>,
271
272                                 /*TIMER*/
273                                 <&clk_gates10 3>, <&clk_gates10 4>,
274                                 <&clk_gates10 5>, <&clk_gates10 6>,
275                                 <&clk_gates10 7>, <&clk_gates10 8>,
276
277                                 /*PD_PERI*/
278                                 <&clk_gates2 0>, <&hclk_peri_pre>,
279                                 <&pclk_peri_pre>, <&clk_gates2 1>,
280
281                                 /*aclk_cpu_pre*/
282                                 <&clk_gates4 12>,/*aclk_intmem*/
283                                 <&clk_gates4 10>,/*aclk_strc_sys*/
284
285                                 /*hclk_cpu_pre*/
286                                 <&clk_gates5 6>,/*hclk_rom*/
287                                 <&clk_gates3 5>,/*hclk_crypto*/
288
289                                 /*pclk_cpu_pre*/
290                                 <&clk_gates5 4>,/*pclk_grf*/
291                                 <&clk_gates5 7>,/*pclk_ddrupctl*/
292                                 <&clk_gates5 14>,/*pclk_acodec*/
293                                 <&clk_gates3 8>,/*pclk_hdmi*/
294
295                                 /*aclk_peri_pre*/
296                                 <&clk_gates10 10>,/*aclk_gmac*/
297                                 <&clk_gates4 3>,/*aclk_peri_axi_matrix*/
298                                 <&clk_gates5 1>,/*aclk_dmac2*/
299                                 <&clk_gates9 15>,/*aclk_peri_niu*/
300                                 <&clk_gates4 2>,/*aclk_cpu_peri*/
301
302                                 /*hclk_peri_pre*/
303                                 <&clk_gates4 0>,/*hclk_peri_matrix*/
304                                 <&clk_gates9 13>,/*hclk_usb_peri*/
305                                 <&clk_gates9 14>,/*hclk_peri_arbi*/
306
307                                 /*pclk_peri_pre*/
308                                 <&clk_gates4 1>,/*pclk_peri_axi_matrix*/
309
310                                 /*hclk_vio_pre*/
311                                 <&clk_gates6 12>,/*hclk_vio_niu*/
312                                 <&clk_gates6 1>,/*hclk_lcdc*/
313
314                                 /*aclk_vio0_pre*/
315                                 <&clk_gates6 13>,/*aclk_vio*/
316                                 <&clk_gates6 0>,/*aclk_lcdc*/
317
318                                 /*aclk_vio1_pre*/
319                                 <&clk_gates9 10>,/*aclk_vio1_niu*/
320
321                                 /*UART*/
322                                 <&clk_gates1 12>,
323                                 <&clk_gates1 13>,
324                                 <&clk_gates8 2>,/*pclk_uart2*/
325
326                                 <&clk_gpu>,
327
328                                 /*jtag*/
329                                 <&clk_gates1 3>,/*clk_jtag*/
330
331                                 /*pmu*/
332                                 <&clk_gates1 0>;/*pclk_pmu_pre*/
333         };
334
335         i2c0: i2c@20072000 {
336                 compatible = "rockchip,rk30-i2c";
337                 reg = <0x20072000 0x1000>;
338                 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
339                 #address-cells = <1>;
340                 #size-cells = <0>;
341                 pinctrl-names = "default", "gpio";
342                 pinctrl-0 = <&i2c0_sda &i2c0_scl>;
343                 pinctrl-1 = <&i2c0_gpio>;
344                 gpios = <&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A0 GPIO_ACTIVE_LOW>;
345                 clocks = <&clk_gates8 4>;
346                 rockchip,check-idle = <1>;
347                 status = "disabled";
348         };
349
350         i2c1: i2c@20056000 {
351                 compatible = "rockchip,rk30-i2c";
352                 reg = <0x20056000 0x1000>;
353                 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
354                 #address-cells = <1>;
355                 #size-cells = <0>;
356                 pinctrl-names = "default", "gpio";
357                 pinctrl-0 = <&i2c1_sda &i2c1_scl>;
358                 pinctrl-1 = <&i2c1_gpio>;
359                 gpios = <&gpio0 GPIO_A3 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
360                 clocks = <&clk_gates8 5>;
361                 rockchip,check-idle = <1>;
362                 status = "disabled";
363         };
364
365         i2c2: i2c@2005a000 {
366                 compatible = "rockchip,rk30-i2c";
367                 reg = <0x2005a000 0x1000>;
368                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
369                 #address-cells = <1>;
370                 #size-cells = <0>;
371                 pinctrl-names = "default", "gpio";
372                 pinctrl-0 = <&i2c2_sda &i2c2_scl>;
373                 pinctrl-1 = <&i2c2_gpio>;
374                 gpios = <&gpio2 GPIO_C4 GPIO_ACTIVE_LOW>, <&gpio2 GPIO_C5 GPIO_ACTIVE_LOW>;
375                 clocks = <&clk_gates8 6>;
376                 rockchip,check-idle = <1>;
377                 status = "disabled";
378         };
379
380         i2c3: i2c@2005e000 {
381                 compatible = "rockchip,rk30-i2c";
382                 reg = <0x2005e000 0x1000>;
383                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
384                 #address-cells = <1>;
385                 #size-cells = <0>;
386                 pinctrl-names = "default", "gpio";
387                 pinctrl-0 = <&i2c3_sda &i2c3_scl>;
388                 pinctrl-1 = <&i2c3_gpio>;
389                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>, <&gpio0 GPIO_A6 GPIO_ACTIVE_LOW>;
390                 clocks = <&clk_gates8 7>;
391                 rockchip,check-idle = <1>;
392                 status = "disabled";
393         };
394
395         i2s0: i2s@10220000 {
396                 compatible = "rockchip-i2s";
397                 reg = <0x10220000 0x1000>;
398                 i2s-id = <0>;
399                 clocks = <&clk_i2s_2ch>, <&clk_i2s_2ch_out>, <&clk_gates7 2>;
400                 clock-names = "i2s_clk", "i2s_mclk", "i2s_hclk";
401                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
402                 dmas = <&pdma 0>, <&pdma 1>;
403                 //#dma-cells = <2>;
404                 dma-names = "tx", "rx";
405                 //pinctrl-names = "default", "sleep";
406                 //pinctrl-0 = <&i2s0_mclk &i2s0_sclk &i2s0_lrckrx &i2s0_lrcktx &i2s0_sdi &i2s0_sdo>;
407                 //pinctrl-1 = <&i2s0_gpio>;
408         };
409
410         i2s1: i2s@10200000 {
411                 compatible = "rockchip-i2s";
412                 reg = <0x10200000 0x1000>;
413                 i2s-id = <1>;
414                 clocks = <&clk_i2s_8ch>, <&clk_gates7 4>;
415                 clock-names = "i2s_clk", "i2s_hclk";
416                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
417                 dmas = <&pdma 14>, <&pdma 15>;
418                 //#dma-cells = <2>;
419                 dma-names = "tx", "rx";
420         };
421
422         spdif: spdif@10204000 {
423                 compatible = "rockchip-spdif";
424                 reg = <0x10204000 0x1000>;
425                 clocks = <&clk_spdif>, <&clk_gates10 8>;
426                 clock-names = "spdif_8ch_mclk", "spdif_hclk";
427                 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
428                 dmas = <&pdma 13>;
429                 //#dma-cells = <1>;
430                 dma-names = "tx";
431                 //pinctrl-names = "default";
432                 //pinctrl-0 = <&spdif_tx>;
433         };
434
435         dsihost0: mipi@10110000{
436                 compatible = "rockchip,rk32-dsi";
437                 rockchip,prop = <0>;
438                 reg = <0x10110000 0x4000>, <0x20038000 0x4000>;
439                 reg-names = "mipi_dsi_host" ,"mipi_dsi_phy";
440                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
441                 clocks = <&clk_gates2 15>, <&clk_gates5 0> ;//, <&pd_mipidsi>;
442                 clock-names = "clk_mipi_24m", "pclk_mipi_dsi";//, "pd_mipi_dsi";
443                 status = "okay";
444         };
445
446         emmc: rksdmmc@1021c000 {
447                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
448                 reg = <0x1021c000 0x4000>;
449                 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
450                 #address-cells = <1>;
451                 #size-cells = <0>;
452                 //pinctrl-names = "default",,"suspend";
453                 //pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_wp &sd0_pwr &sd0_bus1 &sd0_bus4>;
454                 clocks = <&clk_emmc>, <&clk_gates7 0>;
455                 clock-names = "clk_mmc", "hclk_mmc";
456                 dmas = <&pdma 12>;
457                 dma-names = "dw_mci";
458                 num-slots = <1>;
459                 fifo-depth = <0x100>;
460                 bus-width = <8>;
461         };
462
463
464         sdmmc: rksdmmc@10214000 {
465                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
466                 reg = <0x10214000 0x4000>;
467                 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
468                 #address-cells = <1>;
469                 #size-cells = <0>;
470                 pinctrl-names = "default", "idle";
471                 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_pwren &sdmmc0_dectn &sdmmc0_bus4>;
472                 pinctrl-1 = <&sdmmc0_gpio>;
473                 clocks = <&clk_sdmmc0>, <&clk_gates5 10>;
474                 clock-names = "clk_mmc", "hclk_mmc";
475                 dmas = <&pdma 10>;
476                 dma-names = "dw_mci";
477                 num-slots = <1>;
478                 fifo-depth = <0x100>;
479                 bus-width = <4>;
480         };
481
482         sdio: rksdmmc@10218000 {
483                 compatible = "rockchip,rk_mmc", "rockchip,rk312x-sdmmc";
484                 reg = <0x10218000 0x4000>;
485                 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
486                 #address-cells = <1>;
487                 #size-cells = <0>;
488                 pinctrl-names = "default","idle";
489                 pinctrl-0 = <&sdio0_pwren &sdio0_cmd>;
490                 pinctrl-1 = <&sdio0_gpio>;
491                 clocks = <&clk_sdio>, <&clk_gates5 11>;
492                 clock-names = "clk_mmc", "hclk_mmc";
493                 dmas = <&pdma 11>;
494                 dma-names = "dw_mci";
495                 num-slots = <1>;
496                 fifo-depth = <0x100>;
497                 bus-width = <4>;
498         };
499
500         adc: adc@2006c000 {
501                 compatible = "rockchip,saradc";
502                 reg = <0x2006c000 0x100>;
503                 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
504                 #io-channel-cells = <1>;
505                 io-channel-ranges;
506                 rockchip,adc-vref = <1800>;
507                 clock-frequency = <1000000>;
508                 clocks = <&clk_saradc>, <&clk_gates7 14>;
509                 clock-names = "saradc", "pclk_saradc";
510                 status = "disabled";
511         };
512
513         pwm0: pwm@20050000 {
514                 compatible = "rockchip,rk-pwm";
515                 reg = <0x20050000 0x10>;
516                 #pwm-cells = <2>;
517                 pinctrl-names = "default";
518                 pinctrl-0 = <&pwm0_pin>;
519                 clocks = <&clk_gates7 10>;
520                 clock-names = "pclk_pwm";
521                 status = "disabled";
522         };
523
524         pwm1: pwm@20050010 {
525                 compatible = "rockchip,rk-pwm";
526                 reg = <0x20050010 0x10>;
527                 #pwm-cells = <2>;
528                 pinctrl-names = "default";
529                 pinctrl-0 = <&pwm1_pin>;
530                 clocks = <&clk_gates7 10>;
531                 clock-names = "pclk_pwm";
532                 status = "disabled";
533         };
534
535         pwm2: pwm@20050020 {
536                 compatible = "rockchip,rk-pwm";
537                 reg = <0x20050020 0x10>;
538                 #pwm-cells = <2>;
539                 pinctrl-names = "default";
540                 pinctrl-0 = <&pwm2_pin>;
541                 clocks = <&clk_gates7 10>;
542                 clock-names = "pclk_pwm";
543                 status = "disabled";
544         };
545
546         pwm3: pwm@20050030 {
547                 compatible = "rockchip,rk-pwm";
548                 reg = <0x20050030 0x10>;
549                 #pwm-cells = <2>;
550                 pinctrl-names = "default";
551                 pinctrl-0 = <&pwm3_pin>;
552                 clocks = <&clk_gates7 10>;
553                 clock-names = "pclk_pwm";
554                 status = "disabled";
555         };
556
557         remotectl: pwm@20050030 {
558                 compatible = "rockchip,remotectl-pwm";
559                 reg = <0x20050030 0x10>;
560                 #pwm-cells = <2>;
561                 pinctrl-names = "default";
562                 pinctrl-0 = <&pwm3_pin>;
563                 clocks = <&clk_gates7 10>;
564                 clock-names = "pclk_pwm";
565                 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
566                 status = "okay";
567         };
568         dwc_control_usb: dwc-control-usb@20008000 {
569                 compatible = "rockchip,rk3126-dwc-control-usb";
570                 reg = <0x20008000 0x4>;
571                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
572                 interrupt-names = "otg_bvalid";
573                 clocks = <&clk_gates9 13>;
574                 clock-names = "hclk_usb_peri";
575                 rockchip,remote_wakeup;
576                 rockchip,usb_irq_wakeup;
577                 resets = <&reset RK3128_RST_USBPOR>;
578                 reset-names = "usbphy_por";
579                 usb_bc{
580                         compatible = "inno,phy";
581                         regbase = &dwc_control_usb;
582                 };
583         };
584
585         usb0: usb@10180000 {
586                 compatible = "rockchip,rk3126_usb20_otg";
587                 reg = <0x10180000 0x40000>;
588                 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
589                 clocks = <&clk_gates1 5>, <&clk_gates5 13>;
590                 clock-names = "clk_usbphy0", "hclk_usb0";
591                 resets = <&reset RK3128_RST_USBOTG0>, <&reset RK3128_RST_USBOTG0>,
592                                 <&reset RK3128_RST_OTGC0>;
593                 reset-names = "otg_ahb", "otg_phy", "otg_controller";
594                 /*0 - Normal, 1 - Force Host, 2 - Force Device*/
595                 rockchip,usb-mode = <0>;
596         };
597
598         usb1: usb@101c0000 {
599                 compatible = "rockchip,rk3126_usb20_host";
600                 reg = <0x101c0000 0x40000>;
601                 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
602                 clocks = <&clk_gates1 6>, <&clk_gates7 3>;
603                 clock-names = "clk_usbphy1", "hclk_usb1";
604                 resets = <&reset RK3128_RST_USBOTG1>, <&reset RK3128_RST_UTMI1>,
605                                 <&reset RK3128_RST_OTGC1>;
606                 reset-names = "host_ahb", "host_phy", "host_controller";
607         };
608
609         fb: fb{
610                 compatible = "rockchip,rk-fb";
611                 rockchip,disp-mode = <ONE_DUAL>;
612         };
613
614         rk_screen: rk_screen{
615                 compatible = "rockchip,screen";
616         };
617
618         lvds: lvds@20038000 {
619                 compatible = "rockchip,rk31xx-lvds";
620                 reg = <0x20038000 0x4000>;
621                 clocks = <&clk_gates5 0>;
622                 clock-names = "pclk_lvds";
623                 pinctrl-names = "lcdc", "sleep";
624                 pinctrl-0 = <&lcdc0_lcdc_d>;
625                 pinctrl-1 = <&lcdc0_lcdc_gpio>;
626         };
627
628         lcdc: lcdc@1010e000 {
629                 compatible = "rockchip,rk312x-lcdc";
630                 rockchip,prop = <PRMRY>;
631                 reg = <0x1010e000 0x2000>;
632                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
633                 clocks = <&clk_gates6 0>, <&dclk_lcdc0>, <&clk_gates6 1>, <&sclk_lcdc0>;
634                 clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc", "sclk";
635                 rockchip,iommu-enabled = <1>;
636                 status = "disabled";
637         };
638
639         hdmi: hdmi@20034000 {
640                 compatible = "rockchip,rk312x-hdmi";
641                 reg = <0x20034000 0x4000>;
642                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
643                 rockchip,hdmi_lcdc_source = <0>;
644                 pinctrl-names = "default", "gpio";
645                 pinctrl-0 = <&hdmi_cec &hdmi_sda &hdmi_scl &hdmi_hpd>;
646                 pinctrl-1 = <&hdmi_gpio>;
647                 clocks = <&clk_gates3 8>;
648                 clock-names = "pclk_hdmi";
649                 status = "disabled";
650         };
651
652         tve: tve{
653                 compatible = "rockchip,rk312x-tve";
654                 reg = <0x1010e200 0x100>;
655                 status = "disabled";
656         };
657
658         vpu: vpu_service@10106000 {
659                 compatible = "vpu_service";
660                 iommu_enabled = <1>;
661                 reg = <0x10106000 0x800>;
662                 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
663                 interrupt-names = "irq_enc", "irq_dec";
664                 clocks = <&clk_vdpu>, <&hclk_vdpu>;
665                 clock-names = "aclk_vcodec", "hclk_vcodec";
666                 name = "vpu_service";
667                 status = "okay";
668         };
669
670         hevc: hevc_service@10104000 {
671                 compatible = "rockchip,hevc_service";
672                 iommu_enabled = <1>;
673                 reg = <0x10104000 0x400>;
674                 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
675                 interrupt-names = "irq_dec";
676                 clocks = <&clk_vdpu>, <&hclk_vdpu>, <&clk_hevc_core>;
677                 clock-names = "aclk_vcodec", "hclk_vcodec", "clk_core";
678                 name = "hevc_service";
679                 status = "okay";
680         };
681
682         iep: iep@10108000 {
683                 compatible = "rockchip,iep";
684                 iommu_enabled = <1>;
685                 reg = <0x10108000 0x800>;
686                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
687                 clocks = <&clk_gates9 8>, <&clk_gates9 7>;
688                 clock-names = "aclk_iep", "hclk_iep";
689                 status = "okay";
690         };
691         
692         rga: rga@1010c000 {
693                 compatible = "rockchip,rga_drv";
694                 reg = <0x1010c000 0x1000>;
695                 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
696                 clocks = <&clk_gates0 11>, <&clk_gates1 4>;
697                 clock-names = "hclk_rga", "aclk_rga";
698                 status = "okay";
699         };
700
701   vop_mmu {
702                 dbgname = "vop";
703                 compatible = "iommu,vop_mmu";
704                 reg = <0x1010e300 0x100>;
705                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
706                 interrupt-names = "vop_mmu";
707           };
708
709           hevc_mmu {
710                 dbgname = "hevc";
711                 compatible = "iommu,hevc_mmu";
712                 reg = <0x10104440 0x100>,
713                       <0x10104480 0x100>;
714                 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
715                 interrupt-names = "hevc_mmu";
716           };
717
718           vpu_mmu {
719                 dbgname = "vpu";
720                 compatible = "iommu,vpu_mmu";
721                 reg = <0x10104800 0x100>;
722                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
723                 interrupt-names = "vpu_mmu";
724           };
725
726           iep_mmu {
727                 dbgname = "iep";
728                 compatible = "iommu,iep_mmu";
729                 reg = <0x10108800 0x100>;
730                 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
731                 interrupt-names = "iep_mmu";
732           };
733
734           dvfs {
735                 temp-limit-enable = <0>;
736                 target-temp = <80>;
737
738                 vd_arm: vd_arm {
739                         regulator_name = "vdd_arm";
740                         pd_core {
741                                 clk_core_dvfs_table: clk_core {
742                                         operating-points = <
743                                                 /* KHz    uV */
744                                                 312000 1100000
745                                                 504000 1100000
746                                                 816000 1100000
747                                                 1008000 1100000
748                                                 >;
749                                         temp-channel = <1>;
750                                         normal-temp-limit = <
751                                         /*delta-temp    delta-freq*/
752                                                 3       96000
753                                                 6       144000
754                                                 9       192000
755                                                 15      384000
756                                                 >;
757                                         performance-temp-limit = <
758                                                 /*temp    freq*/
759                                                 110     816000
760                                                 >;
761                                         status = "okay";
762                                         regu-mode-table = <
763                                                 /*freq     mode*/
764                                                 1008000    4
765                                                 0          3
766                                         >;
767                                         regu-mode-en = <0>;
768                                 };
769                         };
770                 };
771
772                 vd_logic: vd_logic {
773                         regulator_name = "vdd_logic";
774                         pd_ddr {
775                                 clk_ddr_dvfs_table: clk_ddr {
776                                         operating-points = <
777                                                 /* KHz    uV */
778                                                 200000 1200000
779                                                 300000 1200000
780                                                 400000 1200000
781                                                 >;
782                                         status = "disabled";
783                                 };
784                         };
785
786                         pd_gpu {
787                                 clk_gpu_dvfs_table: clk_gpu {
788                                         operating-points = <
789                                                 /* KHz    uV */
790                                                 200000 1200000
791                                                 300000 1200000
792                                                 400000 1200000
793                                                 >;
794                                         status = "okay";
795                                         regu-mode-table = <
796                                                 /*freq     mode*/
797                                                 200000     4
798                                                 0          3
799                                         >;
800                                         regu-mode-en = <0>;
801                                 };
802                         };
803                 };
804         };
805         ion {
806                 compatible = "rockchip,ion";
807                 #address-cells = <1>;
808                 #size-cells = <0>;
809
810                 ion_cma: rockchip,ion-heap@1 { /* CMA HEAP */
811                         compatible = "rockchip,ion-reserve";
812                         rockchip,ion_heap = <1>;
813                         reg = <0x00000000 0x10000000>; /* 256MB */
814                 };
815                 rockchip,ion-heap@3 { /* VMALLOC HEAP */
816                         rockchip,ion_heap = <3>;
817                 };
818         };
819         cif: cif@1010a000 {
820              compatible = "rockchip,cif";
821              reg = <0x1010a000 0x2000>;
822              interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
823              clocks = <&clk_gates3 3>,<&clk_gates6 5>,<&clk_gates6 4>,<&clk_cif0_in>,<&clk_cif_out>;
824              clock-names = "pd_cif0", "aclk_cif0","hclk_cif0","cif0_in","cif0_out";
825              status = "okay";
826              };
827 };