USB: support usb otg and host20 functions
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3188.dtsi
1
2 #include "skeleton.dtsi"
3 #include "rk3188-pinctrl.dtsi"
4 #include <dt-bindings/rkfb/rk_fb.h>
5
6
7 / {
8         compatible = "rockchip,rk3188";
9         interrupt-parent = <&gic>;
10         rockchip,sram = <&sram>;
11
12         aliases {
13                 serial0 = &uart0;
14                 serial1 = &uart1;
15                 serial2 = &uart2;
16                 serial3 = &uart3;
17                 i2c0 = &i2c0;
18                 i2c1 = &i2c1;
19                 i2c2 = &i2c2;
20                 i2c3 = &i2c3;
21                 i2c4 = &i2c4;
22                 lcdc0 = &lcdc0;
23                 lcdc1 = &lcdc1;
24         };
25
26         cpus {
27                 #address-cells = <1>;
28                 #size-cells = <0>;
29
30                 cpu@0 {
31                         device_type = "cpu";
32                         compatible = "arm,cortex-a9";
33                         reg = <0>;
34                 };
35                 cpu@1 {
36                         device_type = "cpu";
37                         compatible = "arm,cortex-a9";
38                         reg = <1>;
39                 };
40                 cpu@2 {
41                         device_type = "cpu";
42                         compatible = "arm,cortex-a9";
43                         reg = <2>;
44                 };
45                 cpu@3 {
46                         device_type = "cpu";
47                         compatible = "arm,cortex-a9";
48                         reg = <3>;
49                 };
50         };
51
52         twd-wdt@1013c620 {
53                 compatible = "arm,cortex-a9-twd-wdt";
54                 reg = <0x1013c620 0x20>;
55                 interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
56         };
57
58         gic: interrupt-controller@1013d000 {
59                 compatible = "arm,cortex-a9-gic";
60                 interrupt-controller;
61                 #interrupt-cells = <3>;
62                 reg = <0x1013d000 0x1000>,
63                       <0x1013c100 0x0100>;
64         };
65
66         L2: cache-controller@10138000 {
67                 compatible = "rockchip,pl310-cache", "arm,pl310-cache";
68                 reg = <0x10138000 0x1000>;
69                 cache-unified;
70                 cache-level = <2>;
71                 arm,tag-latency = <1 1 1>;
72                 arm,data-latency = <3 1 2>;
73                 rockchip,prefetch-ctrl = <0x70000003>;
74                 /* L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN */
75                 rockchip,power-ctrl = <0x3>;
76 /*
77                 (0x1 << 0) |    // Full line of write zero behavior Enabled
78                 (0x1 << 25) |   // Round-robin replacement
79                 (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
80                 (0x1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
81                 (0x1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT)
82 */
83                 rockchip,aux-ctrl = <0x72000001 (~0x72000001)>;
84         };
85
86         cpu_axi_bus: cpu_axi_bus@10128000 {
87                 compatible = "rockchip,cpu_axi_bus";
88                 reg = <0x10128000 0x8000>;
89                 qos {
90                         dmac {
91                                 rockchip,offset = <0x1000>;
92                                 rockchip,priority = <0 0>;
93                         };
94                         cpu0 {
95                                 rockchip,offset = <0x2000>;
96                                 rockchip,priority = <0 0>;
97                         };
98                         cpu1r {
99                                 rockchip,offset = <0x2080>;
100                                 rockchip,priority = <0 0>;
101                         };
102                         cpu1w {
103                                 rockchip,offset = <0x2100>;
104                                 rockchip,priority = <0 0>;
105                         };
106                         peri {
107                                 rockchip,offset = <0x4000>;
108                                 rockchip,priority = <2 2>;
109                         };
110                         gpu {
111                                 rockchip,offset = <0x5000>;
112                                 rockchip,priority = <2 1>;
113                         };
114                         vpu {
115                                 rockchip,offset = <0x6000>;
116                         };
117                         vop0 {
118                                 rockchip,offset = <0x7000>;
119                                 rockchip,priority = <3 3>;
120                         };
121                         cif0 {
122                                 rockchip,offset = <0x7080>;
123                         };
124                         ipp {
125                                 rockchip,offset = <0x7100>;
126                         };
127                         vop1 {
128                                 rockchip,offset = <0x7180>;
129                                 rockchip,priority = <3 3>;
130                         };
131                         cif1 {
132                                 rockchip,offset = <0x7200>;
133                         };
134                         rga {
135                                 rockchip,offset = <0x7280>;
136                         };
137                 };
138         };
139
140         bootrom@10120000 {
141                 compatible = "rockchip,bootrom";
142                 reg = <0x10120000 0x4000>;
143         };
144
145         bootram@10080000 {
146                 compatible = "rockchip,bootram";
147                 reg = <0x10080000 0x20>; /* 32 bytes */
148         };
149
150         sram: sram@10080020 {
151                 compatible = "mmio-sram";
152                 reg = <0x10080020 (0x8000 - 0x20)>; /* 32k - 32 */
153                 map-exec;
154         };
155
156         pmu@20004000 {
157                 compatible = "rockchip,pmu";
158                 reg = <0x20004000 0x4000>;
159         };
160
161         timer@20038000 {
162                 compatible = "rockchip,timer";
163                 reg = <0x20038000 0x20>;
164                 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
165                 rockchip,percpu = <0>;
166         };
167
168         timer@20038020 {
169                 compatible = "rockchip,timer";
170                 reg = <0x20038020 0x20>;
171                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
172                 rockchip,percpu = <1>;
173         };
174
175         timer@20038040 {
176                 compatible = "rockchip,timer";
177                 reg = <0x20038040 0x20>;
178                 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
179                 rockchip,percpu = <2>;
180         };
181
182         timer@20038060 {
183                 compatible = "rockchip,timer";
184                 reg = <0x20038060 0x20>;
185                 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
186                 rockchip,percpu = <3>;
187         };
188
189         timer@20038080 {
190                 compatible = "rockchip,timer";
191                 reg = <0x20038080 0x20>;
192                 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
193                 rockchip,broadcast = <1>;
194         };
195
196         timer@200380a0 {
197                 compatible = "rockchip,timer";
198                 reg = <0x200380a0 0x20>;
199                 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
200                 rockchip,clocksource = <1>;
201         };
202
203         amba {
204                 #address-cells = <1>;
205                 #size-cells = <1>;
206                 compatible = "arm,amba-bus";
207                 interrupt-parent = <&gic>;
208                 ranges;
209
210                 pdma0: pdma@20018000 {
211                         compatible = "arm,pl330", "arm,primecell";
212                         reg = <0x20018000 0x4000>;
213                         interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
214                                      <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
215                         #dma-cells = <1>;
216                         #dma-channels = <9>;
217                         #dma-requests = <10>;
218                 };
219
220                 pdma1: pdma@20078000 {
221                         compatible = "arm,pl330", "arm,primecell";
222                         reg = <0x20078000 0x4000>;
223                         interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
224                                      <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
225                         #dma-cells = <1>;
226                         #dma-channels = <7>;
227                         #dma-requests = <14>;
228                 };
229         };
230
231         uart0: serial@10124000 {
232                 compatible = "rockchip,serial";
233                 reg = <0x10124000 0x100>;
234                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
235                 clock-frequency = <24000000>;
236                 reg-shift = <2>;
237                 reg-io-width = <4>;
238                 pinctrl-names = "default";
239                 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
240                 status = "disabled";
241         };
242
243         uart1: serial@10126000 {
244                 compatible = "rockchip,serial";
245                 reg = <0x10126000 0x100>;
246                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
247                 clock-frequency = <24000000>;
248                 reg-shift = <2>;
249                 reg-io-width = <4>;
250                 pinctrl-names = "default";
251                 pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
252                 status = "disabled";
253         };
254
255         uart2: serial@20064000 {
256                 compatible = "rockchip,serial";
257                 reg = <0x20064000 0x100>;
258                 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
259                 clock-frequency = <24000000>;
260                 current-speed = <115200>;
261                 reg-shift = <2>;
262                 reg-io-width = <4>;
263                 pinctrl-names = "default";
264                 pinctrl-0 = <&uart2_xfer>;
265                 status = "disabled";
266         };
267
268         uart3: serial@20068000 {
269                 compatible = "rockchip,serial";
270                 reg = <0x20068000 0x100>;
271                 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
272                 clock-frequency = <24000000>;
273                 reg-shift = <2>;
274                 reg-io-width = <4>;
275                 pinctrl-names = "default";
276                 pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
277                 status = "disabled";
278         };
279
280         fiq-debugger {
281                 compatible = "rockchip,fiq-debugger";
282                 rockchip,serial-id = <2>;
283                 rockchip,signal-irq = <112>;
284                 rockchip,wake-irq = <0>;
285                 status = "disabled";
286         };
287
288         i2c0: i2c@2002d000 {
289                 compatible = "rockchip,rk30-i2c";
290                 reg = <0x2002d000 0x1000>;
291                 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
292                 #address-cells = <1>;
293                 #size-cells = <0>;
294                 pinctrl-names = "default", "gpio";
295                 pinctrl-0 = <&i2c0_sda &i2c0_scl>;
296                 pinctrl-1 = <&i2c0_gpio>;
297                 gpios = <&gpio1 GPIO_D0 GPIO_ACTIVE_LOW>, <&gpio1 GPIO_D1 GPIO_ACTIVE_LOW>;
298                 clocks = <&clk_gates8 4>;
299                 rockchip,check-idle = <1>;
300                 status = "disabled";
301         };
302
303         i2c1: i2c@2002f000 {
304                 compatible = "rockchip,rk30-i2c";
305                 reg = <0x2002f000 0x1000>;
306                 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
307                 #address-cells = <1>;
308                 #size-cells = <0>;
309                 pinctrl-names = "default", "gpio";
310                 pinctrl-0 = <&i2c1_sda &i2c1_scl>;
311                 pinctrl-1 = <&i2c1_gpio>;
312                 gpios = <&gpio1 GPIO_D2 GPIO_ACTIVE_LOW>, <&gpio1 GPIO_D3 GPIO_ACTIVE_LOW>;
313                 clocks = <&clk_gates8 5>;
314                 rockchip,check-idle = <1>;
315                 status = "disabled";
316         };
317
318         i2c2: i2c@20056000 {
319                 compatible = "rockchip,rk30-i2c";
320                 reg = <0x20056000 0x1000>;
321                 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
322                 #address-cells = <1>;
323                 #size-cells = <0>;
324                 pinctrl-names = "default", "gpio";
325                 pinctrl-0 = <&i2c2_sda &i2c2_scl>;
326                 pinctrl-1 = <&i2c2_gpio>;
327                 gpios = <&gpio1 GPIO_D4 GPIO_ACTIVE_LOW>, <&gpio1 GPIO_D5 GPIO_ACTIVE_LOW>;
328                 clocks = <&clk_gates8 6>;
329                 rockchip,check-idle = <1>;
330                 status = "disabled";
331         };
332
333         i2c3: i2c@2005a000 {
334                 compatible = "rockchip,rk30-i2c";
335                 reg = <0x2005a000 0x1000>;
336                 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
337                 #address-cells = <1>;
338                 #size-cells = <0>;
339                 pinctrl-names = "default", "gpio";
340                 pinctrl-0 = <&i2c3_sda &i2c3_scl>;
341                 pinctrl-1 = <&i2c3_gpio>;
342                 gpios = <&gpio3 GPIO_B6 GPIO_ACTIVE_LOW>, <&gpio3 GPIO_B7 GPIO_ACTIVE_LOW>;
343                 clocks = <&clk_gates8 7>;
344                 rockchip,check-idle = <1>;
345                 status = "disabled";
346         };
347
348         i2c4: i2c@2005e000 {
349                 compatible = "rockchip,rk30-i2c";
350                 reg = <0x2005e000 0x1000>;
351                 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
352                 #address-cells = <1>;
353                 #size-cells = <0>;
354                 pinctrl-names = "default", "gpio";
355                 pinctrl-0 = <&i2c4_sda &i2c4_scl>;
356                 pinctrl-1 = <&i2c4_gpio>;
357                 gpios = <&gpio1 GPIO_D6 GPIO_ACTIVE_LOW>, <&gpio1 GPIO_D7 GPIO_ACTIVE_LOW>;
358                 clocks = <&clk_gates8 8>;
359                 rockchip,check-idle = <1>;
360                 status = "disabled";
361         };
362
363         clocks-init{
364                 compatible = "rockchip,clocks-init";
365                 rockchip,clocks-init-parent =
366                         <&clk_core &clk_apll>,  <&aclk_cpu_mux &clk_gpll>,/*FIXME*/
367                         <&aclk_peri_mux &clk_gpll>,     <&clk_i2s_pll_mux &clk_cpll>,
368                         <&clk_uart_pll_mux &clk_gpll>;
369                 rockchip,clocks-init-rate =
370                         <&clk_core 792000000>,  <&clk_gpll 768000000>,
371                         <&clk_cpll 594000000>,  <&aclk_cpu 192000000>,
372                         <&hclk_cpu 96000000>,   <&pclk_cpu 48000000>,
373                         <&pclk_ahb2apb 48000000>,       <&aclk_peri 192000000>,
374                         <&hclk_peri 96000000>,  <&pclk_peri 48000000>,
375                         <&clk_gpu 200000000>;
376         };
377
378         fb: fb{
379                 compatible = "rockchip,rk-fb";
380                 rockchip,disp-mode = <DUAL>;
381         };
382
383         nandc: nandc {
384                 compatible = "rockchip,rk-nandc";
385                 reg = <0x10050000 0x4000>;
386                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
387         };
388
389         lcdc0:lcdc@1010c000 {
390                 compatible = "rockchip,rk3188-lcdc";
391                 rockchip,prop = <PRMRY>;
392                 rochchip,pwr18 = <0>;
393                 reg = <0x1010c000 0x1000>;
394                 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
395                 status = "disabled";
396         };
397
398         lcdc1:lcdc@1010e000 {
399                 compatible = "rockchip,rk3188-lcdc";
400                 rockchip,prop = <EXTEND>;
401                 rockchip,pwr18 = <0>;
402                 reg = <0x1010e000 0x1000>;
403                 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
404                 pinctrl-names = "default", "gpio";
405                 pinctrl-0 = <&lcdc1_lcdc>;
406                 pinctrl-1 = <&lcdc1_gpio>;
407                 status = "disabled";
408         };
409
410         spdif: rockchip-spdif@0x1011e000 {
411                 compatible = "rockchip-spdif";
412                 reg = <0x1011e000 0x2000>;
413                 clocks = <&clk_spdif>;
414                 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
415                 dmas = <&pdma0 8>;
416                 #dma-cells = <1>;
417                 dma-names = "tx";
418                 pinctrl-names = "default";
419                 pinctrl-0 = <&spdif_tx>;
420         };
421
422         i2s1: rockchip-i2s@0x1011a000 {
423                 compatible = "rockchip-i2s";
424                 reg = <0x1011a000 0x2000>;
425                 i2s-id = <1>;
426                 clocks = <&clk_i2s>;
427                 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
428                 dmas = <&pdma0 6>,
429                         <&pdma0 7>;
430                 #dma-cells = <2>;
431                 dma-names = "tx", "rx";
432                 pinctrl-names = "default", "sleep";
433                 pinctrl-0 = <&i2s0_mclk &i2s0_sclk &i2s0_lrckrx &i2s0_lrcktx &i2s0_sdi &i2s0_sdo>;
434                 pinctrl-1 = <&i2s0_gpio>;
435         };
436
437         pwm0: pwm@20030000{
438                 compatible = "rockchip,pwm";
439                 reg = <0x20030000 0x10>; 
440                 #pwm-cells = <2>;
441                 pinctrl-names = "default";
442                 pinctrl-0 = <&pwm0_pin>;
443                 status = "disabled";
444
445         };
446
447         pwm1: pwm@20030010{
448                 compatible = "rockchip,pwm";
449                 reg = <0x20030010 0x10>; /*0x20030000*/
450                 #pwm-cells = <2>;
451                 pinctrl-names = "default";
452                 pinctrl-0 = <&pwm1_pin>;
453                 status = "disabled";
454
455         };
456         pwm2: pwm@20050020{
457                 compatible = "rockchip,pwm";
458                 reg = <0x20050020 0x10>; /*0x20030000*/
459                 #pwm-cells = <2>;
460                 pinctrl-names = "default";
461                 pinctrl-0 = <&pwm2_pin>;
462                 status = "disabled";
463
464         };
465
466         pwm3: pwm@20050030{
467                 compatible = "rockchip,pwm";
468                 reg = <0x20050030 0x10>; /*0x20030000*/
469                 #pwm-cells = <2>;
470                 pinctrl-names = "default";
471                 pinctrl-0 = <&pwm3_pin>;
472                 status = "disabled";
473
474         };
475         dvfs {
476                 vd_cpu:
477                 vd_cpu {
478                         regulator_name="vdd_arm";
479                         suspend_volt=<1000>; //mV
480                         pd_a9 {
481                                 clk_core_dvfs_table:
482                                 clk_core {
483                                         operating-points = <
484                                                 /* KHz    uV */
485                                                 312000 900000
486                                                 504000 950000
487                                                 816000 1000000
488                                                 1008000 1100000
489                                                 1200000 1200000
490                                                 1416000 1300000
491                                                 1608000 1350000
492                                                 >;
493                                 };
494                         };
495                 };
496
497                 vd_core:
498                 vd_core {
499                         regulator_name="vdd_logic";
500                         suspend_volt=<1000>; //mV
501
502                         pd_gpu {
503                                 clk_gpu_dvfs_table:
504                                 clk_gpu {
505                                         operating-points = <
506                                                 /* KHz    uV */
507                                                 200000 1200000
508                                                 300000 1200000
509                                                 400000 1200000
510                                                 >;
511                                 };
512                         };
513
514                         pd_ddr {
515                                 clk_ddr_dvfs_table:
516                                 clk_ddr {
517                                         operating-points = <
518                                                 /* KHz    uV */
519                                                 200000 1200000
520                                                 300000 1200000
521                                                 400000 1200000
522                                                 >;
523                                 };
524                         };
525                 };
526         };
527         ion: ion{
528                 compatible = "rockchip,ion";
529                 #address-cells = <1>;
530                 #size-cells = <0>;
531                 rockchip,ion-heap@1 { /* VIDEO HEAP */
532                         reg = <1>;
533                 };
534         };
535
536         dwc_control_usb: dwc-control-usb@0x200080ac {
537                 compatible = "rockchip,dwc-control-usb";
538                 reg = <0x200080ac 0x4>,
539                       <0x2000810c 0x10>,
540                       <0x2000811c 0x10>;
541                 reg-names = "GRF_SOC_STATUS0",
542                             "GRF_UOC0_BASE",
543                             "GRF_UOC1_BASE";
544                 gpios = <&gpio0 GPIO_C0 GPIO_ACTIVE_LOW>, <&gpio3 GPIO_D5 GPIO_ACTIVE_LOW>;
545         };
546
547         usb@10180000 {
548                 compatible = "rockchip,usb20_otg";
549                 reg = <0x10180000 0x40000>;
550                 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
551                 /*clocks = <&clk_gates1 5>, <&clk_gates5 13>;*/
552                 /*clock-names = "otgphy0", "hclk_otg0"*/
553         };
554
555         usb@101c0000 {
556                 compatible = "rockchip,usb20_host";
557                 reg = <0x101c0000 0x40000>;
558                 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
559                 /*clocks = <&clk_gates1 6>, <&clk_gates7 3>;*/
560                 /*clock-names = "otgphy1", "hclk_otg1"*/
561         };
562
563 };