arm64: dts: rockchip: add the gmac power domain on rk3399
[cascardo/linux.git] / arch / arm64 / boot / dts / rockchip / rk3399.dtsi
1 /*
2  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This library is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This library is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 #include <dt-bindings/clock/rk3399-cru.h>
44 #include <dt-bindings/gpio/gpio.h>
45 #include <dt-bindings/interrupt-controller/arm-gic.h>
46 #include <dt-bindings/interrupt-controller/irq.h>
47 #include <dt-bindings/pinctrl/rockchip.h>
48 #include <dt-bindings/power/rk3399-power.h>
49 #include <dt-bindings/thermal/thermal.h>
50
51 / {
52         compatible = "rockchip,rk3399";
53
54         interrupt-parent = <&gic>;
55         #address-cells = <2>;
56         #size-cells = <2>;
57
58         aliases {
59                 i2c0 = &i2c0;
60                 i2c1 = &i2c1;
61                 i2c2 = &i2c2;
62                 i2c3 = &i2c3;
63                 i2c4 = &i2c4;
64                 i2c5 = &i2c5;
65                 i2c6 = &i2c6;
66                 i2c7 = &i2c7;
67                 i2c8 = &i2c8;
68                 serial0 = &uart0;
69                 serial1 = &uart1;
70                 serial2 = &uart2;
71                 serial3 = &uart3;
72                 serial4 = &uart4;
73         };
74
75         cpus {
76                 #address-cells = <2>;
77                 #size-cells = <0>;
78
79                 cpu-map {
80                         cluster0 {
81                                 core0 {
82                                         cpu = <&cpu_l0>;
83                                 };
84                                 core1 {
85                                         cpu = <&cpu_l1>;
86                                 };
87                                 core2 {
88                                         cpu = <&cpu_l2>;
89                                 };
90                                 core3 {
91                                         cpu = <&cpu_l3>;
92                                 };
93                         };
94
95                         cluster1 {
96                                 core0 {
97                                         cpu = <&cpu_b0>;
98                                 };
99                                 core1 {
100                                         cpu = <&cpu_b1>;
101                                 };
102                         };
103                 };
104
105                 cpu_l0: cpu@0 {
106                         device_type = "cpu";
107                         compatible = "arm,cortex-a53", "arm,armv8";
108                         reg = <0x0 0x0>;
109                         enable-method = "psci";
110                         #cooling-cells = <2>; /* min followed by max */
111                         clocks = <&cru ARMCLKL>;
112                 };
113
114                 cpu_l1: cpu@1 {
115                         device_type = "cpu";
116                         compatible = "arm,cortex-a53", "arm,armv8";
117                         reg = <0x0 0x1>;
118                         enable-method = "psci";
119                         clocks = <&cru ARMCLKL>;
120                 };
121
122                 cpu_l2: cpu@2 {
123                         device_type = "cpu";
124                         compatible = "arm,cortex-a53", "arm,armv8";
125                         reg = <0x0 0x2>;
126                         enable-method = "psci";
127                         clocks = <&cru ARMCLKL>;
128                 };
129
130                 cpu_l3: cpu@3 {
131                         device_type = "cpu";
132                         compatible = "arm,cortex-a53", "arm,armv8";
133                         reg = <0x0 0x3>;
134                         enable-method = "psci";
135                         clocks = <&cru ARMCLKL>;
136                 };
137
138                 cpu_b0: cpu@100 {
139                         device_type = "cpu";
140                         compatible = "arm,cortex-a72", "arm,armv8";
141                         reg = <0x0 0x100>;
142                         enable-method = "psci";
143                         #cooling-cells = <2>; /* min followed by max */
144                         clocks = <&cru ARMCLKB>;
145                 };
146
147                 cpu_b1: cpu@101 {
148                         device_type = "cpu";
149                         compatible = "arm,cortex-a72", "arm,armv8";
150                         reg = <0x0 0x101>;
151                         enable-method = "psci";
152                         clocks = <&cru ARMCLKB>;
153                 };
154         };
155
156         psci {
157                 compatible = "arm,psci-1.0";
158                 method = "smc";
159         };
160
161         timer {
162                 compatible = "arm,armv8-timer";
163                 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
164                              <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
165                              <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
166                              <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
167         };
168
169         xin24m: xin24m {
170                 compatible = "fixed-clock";
171                 clock-frequency = <24000000>;
172                 clock-output-names = "xin24m";
173                 #clock-cells = <0>;
174         };
175
176         amba {
177                 compatible = "simple-bus";
178                 #address-cells = <2>;
179                 #size-cells = <2>;
180                 ranges;
181
182                 dmac_bus: dma-controller@ff6d0000 {
183                         compatible = "arm,pl330", "arm,primecell";
184                         reg = <0x0 0xff6d0000 0x0 0x4000>;
185                         interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
186                                      <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
187                         #dma-cells = <1>;
188                         clocks = <&cru ACLK_DMAC0_PERILP>;
189                         clock-names = "apb_pclk";
190                 };
191
192                 dmac_peri: dma-controller@ff6e0000 {
193                         compatible = "arm,pl330", "arm,primecell";
194                         reg = <0x0 0xff6e0000 0x0 0x4000>;
195                         interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
196                                      <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
197                         #dma-cells = <1>;
198                         clocks = <&cru ACLK_DMAC1_PERILP>;
199                         clock-names = "apb_pclk";
200                 };
201         };
202
203         sdio0: dwmmc@fe310000 {
204                 compatible = "rockchip,rk3399-dw-mshc",
205                              "rockchip,rk3288-dw-mshc";
206                 reg = <0x0 0xfe310000 0x0 0x4000>;
207                 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
208                 clock-freq-min-max = <400000 150000000>;
209                 clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
210                          <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
211                 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
212                 fifo-depth = <0x100>;
213                 status = "disabled";
214         };
215
216         sdmmc: dwmmc@fe320000 {
217                 compatible = "rockchip,rk3399-dw-mshc",
218                              "rockchip,rk3288-dw-mshc";
219                 reg = <0x0 0xfe320000 0x0 0x4000>;
220                 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
221                 clock-freq-min-max = <400000 150000000>;
222                 clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
223                          <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
224                 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
225                 fifo-depth = <0x100>;
226                 status = "disabled";
227         };
228
229         sdhci: sdhci@fe330000 {
230                 compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
231                 reg = <0x0 0xfe330000 0x0 0x10000>;
232                 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
233                 arasan,soc-ctl-syscon = <&grf>;
234                 assigned-clocks = <&cru SCLK_EMMC>;
235                 assigned-clock-rates = <200000000>;
236                 clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>;
237                 clock-names = "clk_xin", "clk_ahb";
238                 clock-output-names = "emmc_cardclock";
239                 #clock-cells = <0>;
240                 phys = <&emmc_phy>;
241                 phy-names = "phy_arasan";
242                 status = "disabled";
243         };
244
245         usb_host0_ehci: usb@fe380000 {
246                 compatible = "generic-ehci";
247                 reg = <0x0 0xfe380000 0x0 0x20000>;
248                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
249                 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
250                 clock-names = "hclk_host0", "hclk_host0_arb";
251                 phys = <&u2phy0_host>;
252                 phy-names = "usb";
253                 status = "disabled";
254         };
255
256         usb_host0_ohci: usb@fe3a0000 {
257                 compatible = "generic-ohci";
258                 reg = <0x0 0xfe3a0000 0x0 0x20000>;
259                 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
260                 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
261                 clock-names = "hclk_host0", "hclk_host0_arb";
262                 status = "disabled";
263         };
264
265         usb_host1_ehci: usb@fe3c0000 {
266                 compatible = "generic-ehci";
267                 reg = <0x0 0xfe3c0000 0x0 0x20000>;
268                 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
269                 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
270                 clock-names = "hclk_host1", "hclk_host1_arb";
271                 phys = <&u2phy1_host>;
272                 phy-names = "usb";
273                 status = "disabled";
274         };
275
276         usb_host1_ohci: usb@fe3e0000 {
277                 compatible = "generic-ohci";
278                 reg = <0x0 0xfe3e0000 0x0 0x20000>;
279                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
280                 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
281                 clock-names = "hclk_host1", "hclk_host1_arb";
282                 status = "disabled";
283         };
284
285         gic: interrupt-controller@fee00000 {
286                 compatible = "arm,gic-v3";
287                 #interrupt-cells = <3>;
288                 #address-cells = <2>;
289                 #size-cells = <2>;
290                 ranges;
291                 interrupt-controller;
292
293                 reg = <0x0 0xfee00000 0 0x10000>, /* GICD */
294                       <0x0 0xfef00000 0 0xc0000>, /* GICR */
295                       <0x0 0xfff00000 0 0x10000>, /* GICC */
296                       <0x0 0xfff10000 0 0x10000>, /* GICH */
297                       <0x0 0xfff20000 0 0x10000>; /* GICV */
298                 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
299                 its: interrupt-controller@fee20000 {
300                         compatible = "arm,gic-v3-its";
301                         msi-controller;
302                         reg = <0x0 0xfee20000 0x0 0x20000>;
303                 };
304         };
305
306         saradc: saradc@ff100000 {
307                 compatible = "rockchip,rk3399-saradc";
308                 reg = <0x0 0xff100000 0x0 0x100>;
309                 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
310                 #io-channel-cells = <1>;
311                 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
312                 clock-names = "saradc", "apb_pclk";
313                 resets = <&cru SRST_P_SARADC>;
314                 reset-names = "saradc-apb";
315                 status = "disabled";
316         };
317
318         i2c1: i2c@ff110000 {
319                 compatible = "rockchip,rk3399-i2c";
320                 reg = <0x0 0xff110000 0x0 0x1000>;
321                 assigned-clocks = <&cru SCLK_I2C1>;
322                 assigned-clock-rates = <200000000>;
323                 clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
324                 clock-names = "i2c", "pclk";
325                 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
326                 pinctrl-names = "default";
327                 pinctrl-0 = <&i2c1_xfer>;
328                 #address-cells = <1>;
329                 #size-cells = <0>;
330                 status = "disabled";
331         };
332
333         i2c2: i2c@ff120000 {
334                 compatible = "rockchip,rk3399-i2c";
335                 reg = <0x0 0xff120000 0x0 0x1000>;
336                 assigned-clocks = <&cru SCLK_I2C2>;
337                 assigned-clock-rates = <200000000>;
338                 clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
339                 clock-names = "i2c", "pclk";
340                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
341                 pinctrl-names = "default";
342                 pinctrl-0 = <&i2c2_xfer>;
343                 #address-cells = <1>;
344                 #size-cells = <0>;
345                 status = "disabled";
346         };
347
348         i2c3: i2c@ff130000 {
349                 compatible = "rockchip,rk3399-i2c";
350                 reg = <0x0 0xff130000 0x0 0x1000>;
351                 assigned-clocks = <&cru SCLK_I2C3>;
352                 assigned-clock-rates = <200000000>;
353                 clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
354                 clock-names = "i2c", "pclk";
355                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
356                 pinctrl-names = "default";
357                 pinctrl-0 = <&i2c3_xfer>;
358                 #address-cells = <1>;
359                 #size-cells = <0>;
360                 status = "disabled";
361         };
362
363         i2c5: i2c@ff140000 {
364                 compatible = "rockchip,rk3399-i2c";
365                 reg = <0x0 0xff140000 0x0 0x1000>;
366                 assigned-clocks = <&cru SCLK_I2C5>;
367                 assigned-clock-rates = <200000000>;
368                 clocks = <&cru SCLK_I2C5>, <&cru PCLK_I2C5>;
369                 clock-names = "i2c", "pclk";
370                 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
371                 pinctrl-names = "default";
372                 pinctrl-0 = <&i2c5_xfer>;
373                 #address-cells = <1>;
374                 #size-cells = <0>;
375                 status = "disabled";
376         };
377
378         i2c6: i2c@ff150000 {
379                 compatible = "rockchip,rk3399-i2c";
380                 reg = <0x0 0xff150000 0x0 0x1000>;
381                 assigned-clocks = <&cru SCLK_I2C6>;
382                 assigned-clock-rates = <200000000>;
383                 clocks = <&cru SCLK_I2C6>, <&cru PCLK_I2C6>;
384                 clock-names = "i2c", "pclk";
385                 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
386                 pinctrl-names = "default";
387                 pinctrl-0 = <&i2c6_xfer>;
388                 #address-cells = <1>;
389                 #size-cells = <0>;
390                 status = "disabled";
391         };
392
393         i2c7: i2c@ff160000 {
394                 compatible = "rockchip,rk3399-i2c";
395                 reg = <0x0 0xff160000 0x0 0x1000>;
396                 assigned-clocks = <&cru SCLK_I2C7>;
397                 assigned-clock-rates = <200000000>;
398                 clocks = <&cru SCLK_I2C7>, <&cru PCLK_I2C7>;
399                 clock-names = "i2c", "pclk";
400                 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
401                 pinctrl-names = "default";
402                 pinctrl-0 = <&i2c7_xfer>;
403                 #address-cells = <1>;
404                 #size-cells = <0>;
405                 status = "disabled";
406         };
407
408         uart0: serial@ff180000 {
409                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
410                 reg = <0x0 0xff180000 0x0 0x100>;
411                 clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
412                 clock-names = "baudclk", "apb_pclk";
413                 interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
414                 reg-shift = <2>;
415                 reg-io-width = <4>;
416                 pinctrl-names = "default";
417                 pinctrl-0 = <&uart0_xfer>;
418                 status = "disabled";
419         };
420
421         uart1: serial@ff190000 {
422                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
423                 reg = <0x0 0xff190000 0x0 0x100>;
424                 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
425                 clock-names = "baudclk", "apb_pclk";
426                 interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
427                 reg-shift = <2>;
428                 reg-io-width = <4>;
429                 pinctrl-names = "default";
430                 pinctrl-0 = <&uart1_xfer>;
431                 status = "disabled";
432         };
433
434         uart2: serial@ff1a0000 {
435                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
436                 reg = <0x0 0xff1a0000 0x0 0x100>;
437                 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
438                 clock-names = "baudclk", "apb_pclk";
439                 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
440                 reg-shift = <2>;
441                 reg-io-width = <4>;
442                 pinctrl-names = "default";
443                 pinctrl-0 = <&uart2c_xfer>;
444                 status = "disabled";
445         };
446
447         uart3: serial@ff1b0000 {
448                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
449                 reg = <0x0 0xff1b0000 0x0 0x100>;
450                 clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
451                 clock-names = "baudclk", "apb_pclk";
452                 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
453                 reg-shift = <2>;
454                 reg-io-width = <4>;
455                 pinctrl-names = "default";
456                 pinctrl-0 = <&uart3_xfer>;
457                 status = "disabled";
458         };
459
460         spi0: spi@ff1c0000 {
461                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
462                 reg = <0x0 0xff1c0000 0x0 0x1000>;
463                 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
464                 clock-names = "spiclk", "apb_pclk";
465                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
466                 pinctrl-names = "default";
467                 pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
468                 #address-cells = <1>;
469                 #size-cells = <0>;
470                 status = "disabled";
471         };
472
473         spi1: spi@ff1d0000 {
474                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
475                 reg = <0x0 0xff1d0000 0x0 0x1000>;
476                 clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
477                 clock-names = "spiclk", "apb_pclk";
478                 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
479                 pinctrl-names = "default";
480                 pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
481                 #address-cells = <1>;
482                 #size-cells = <0>;
483                 status = "disabled";
484         };
485
486         spi2: spi@ff1e0000 {
487                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
488                 reg = <0x0 0xff1e0000 0x0 0x1000>;
489                 clocks = <&cru SCLK_SPI2>, <&cru PCLK_SPI2>;
490                 clock-names = "spiclk", "apb_pclk";
491                 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
492                 pinctrl-names = "default";
493                 pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
494                 #address-cells = <1>;
495                 #size-cells = <0>;
496                 status = "disabled";
497         };
498
499         spi4: spi@ff1f0000 {
500                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
501                 reg = <0x0 0xff1f0000 0x0 0x1000>;
502                 clocks = <&cru SCLK_SPI4>, <&cru PCLK_SPI4>;
503                 clock-names = "spiclk", "apb_pclk";
504                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
505                 pinctrl-names = "default";
506                 pinctrl-0 = <&spi4_clk &spi4_tx &spi4_rx &spi4_cs0>;
507                 #address-cells = <1>;
508                 #size-cells = <0>;
509                 status = "disabled";
510         };
511
512         spi5: spi@ff200000 {
513                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
514                 reg = <0x0 0xff200000 0x0 0x1000>;
515                 clocks = <&cru SCLK_SPI5>, <&cru PCLK_SPI5>;
516                 clock-names = "spiclk", "apb_pclk";
517                 interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
518                 pinctrl-names = "default";
519                 pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>;
520                 #address-cells = <1>;
521                 #size-cells = <0>;
522                 status = "disabled";
523         };
524
525         thermal-zones {
526                 cpu_thermal: cpu {
527                         polling-delay-passive = <100>;
528                         polling-delay = <1000>;
529
530                         thermal-sensors = <&tsadc 0>;
531
532                         trips {
533                                 cpu_alert0: cpu_alert0 {
534                                         temperature = <70000>;
535                                         hysteresis = <2000>;
536                                         type = "passive";
537                                 };
538                                 cpu_alert1: cpu_alert1 {
539                                         temperature = <75000>;
540                                         hysteresis = <2000>;
541                                         type = "passive";
542                                 };
543                                 cpu_crit: cpu_crit {
544                                         temperature = <95000>;
545                                         hysteresis = <2000>;
546                                         type = "critical";
547                                 };
548                         };
549
550                         cooling-maps {
551                                 map0 {
552                                         trip = <&cpu_alert0>;
553                                         cooling-device =
554                                                 <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
555                                 };
556                                 map1 {
557                                         trip = <&cpu_alert1>;
558                                         cooling-device =
559                                                 <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
560                                                 <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
561                                 };
562                         };
563                 };
564
565                 gpu_thermal: gpu {
566                         polling-delay-passive = <100>;
567                         polling-delay = <1000>;
568
569                         thermal-sensors = <&tsadc 1>;
570
571                         trips {
572                                 gpu_alert0: gpu_alert0 {
573                                         temperature = <75000>;
574                                         hysteresis = <2000>;
575                                         type = "passive";
576                                 };
577                                 gpu_crit: gpu_crit {
578                                         temperature = <95000>;
579                                         hysteresis = <2000>;
580                                         type = "critical";
581                                 };
582                         };
583
584                         cooling-maps {
585                                 map0 {
586                                         trip = <&gpu_alert0>;
587                                         cooling-device =
588                                                 <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
589                                 };
590                         };
591                 };
592         };
593
594         tsadc: tsadc@ff260000 {
595                 compatible = "rockchip,rk3399-tsadc";
596                 reg = <0x0 0xff260000 0x0 0x100>;
597                 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
598                 assigned-clocks = <&cru SCLK_TSADC>;
599                 assigned-clock-rates = <750000>;
600                 clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
601                 clock-names = "tsadc", "apb_pclk";
602                 resets = <&cru SRST_TSADC>;
603                 reset-names = "tsadc-apb";
604                 rockchip,grf = <&grf>;
605                 rockchip,hw-tshut-temp = <95000>;
606                 pinctrl-names = "init", "default", "sleep";
607                 pinctrl-0 = <&otp_gpio>;
608                 pinctrl-1 = <&otp_out>;
609                 pinctrl-2 = <&otp_gpio>;
610                 #thermal-sensor-cells = <1>;
611                 status = "disabled";
612         };
613
614         qos_gmac: qos@ffa5c000 {
615                 compatible = "syscon";
616                 reg = <0x0 0xffa5c000 0x0 0x20>;
617         };
618
619         qos_hdcp: qos@ffa90000 {
620                 compatible = "syscon";
621                 reg = <0x0 0xffa90000 0x0 0x20>;
622         };
623
624         qos_iep: qos@ffa98000 {
625                 compatible = "syscon";
626                 reg = <0x0 0xffa98000 0x0 0x20>;
627         };
628
629         qos_isp0_m0: qos@ffaa0000 {
630                 compatible = "syscon";
631                 reg = <0x0 0xffaa0000 0x0 0x20>;
632         };
633
634         qos_isp0_m1: qos@ffaa0080 {
635                 compatible = "syscon";
636                 reg = <0x0 0xffaa0080 0x0 0x20>;
637         };
638
639         qos_isp1_m0: qos@ffaa8000 {
640                 compatible = "syscon";
641                 reg = <0x0 0xffaa8000 0x0 0x20>;
642         };
643
644         qos_isp1_m1: qos@ffaa8080 {
645                 compatible = "syscon";
646                 reg = <0x0 0xffaa8080 0x0 0x20>;
647         };
648
649         qos_rga_r: qos@ffab0000 {
650                 compatible = "syscon";
651                 reg = <0x0 0xffab0000 0x0 0x20>;
652         };
653
654         qos_rga_w: qos@ffab0080 {
655                 compatible = "syscon";
656                 reg = <0x0 0xffab0080 0x0 0x20>;
657         };
658
659         qos_video_m0: qos@ffab8000 {
660                 compatible = "syscon";
661                 reg = <0x0 0xffab8000 0x0 0x20>;
662         };
663
664         qos_video_m1_r: qos@ffac0000 {
665                 compatible = "syscon";
666                 reg = <0x0 0xffac0000 0x0 0x20>;
667         };
668
669         qos_video_m1_w: qos@ffac0080 {
670                 compatible = "syscon";
671                 reg = <0x0 0xffac0080 0x0 0x20>;
672         };
673
674         qos_vop_big_r: qos@ffac8000 {
675                 compatible = "syscon";
676                 reg = <0x0 0xffac8000 0x0 0x20>;
677         };
678
679         qos_vop_big_w: qos@ffac8080 {
680                 compatible = "syscon";
681                 reg = <0x0 0xffac8080 0x0 0x20>;
682         };
683
684         qos_vop_little: qos@ffad0000 {
685                 compatible = "syscon";
686                 reg = <0x0 0xffad0000 0x0 0x20>;
687         };
688
689         qos_gpu: qos@ffae0000 {
690                 compatible = "syscon";
691                 reg = <0x0 0xffae0000 0x0 0x20>;
692         };
693
694         pmu: power-management@ff310000 {
695                 compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
696                 reg = <0x0 0xff310000 0x0 0x1000>;
697
698                 /*
699                  * Note: RK3399 supports 6 voltage domains including VD_CORE_L,
700                  * VD_CORE_B, VD_CENTER, VD_GPU, VD_LOGIC and VD_PMU.
701                  * Some of the power domains are grouped together for every
702                  * voltage domain.
703                  * The detail contents as below.
704                  */
705                 power: power-controller {
706                         compatible = "rockchip,rk3399-power-controller";
707                         #power-domain-cells = <1>;
708                         #address-cells = <1>;
709                         #size-cells = <0>;
710
711                         /* These power domains are grouped by VD_CENTER */
712                         pd_iep@RK3399_PD_IEP {
713                                 reg = <RK3399_PD_IEP>;
714                                 clocks = <&cru ACLK_IEP>,
715                                          <&cru HCLK_IEP>;
716                                 pm_qos = <&qos_iep>;
717                         };
718                         pd_rga@RK3399_PD_RGA {
719                                 reg = <RK3399_PD_RGA>;
720                                 clocks = <&cru ACLK_RGA>,
721                                          <&cru HCLK_RGA>;
722                                 pm_qos = <&qos_rga_r>,
723                                          <&qos_rga_w>;
724                         };
725                         pd_vcodec@RK3399_PD_VCODEC {
726                                 reg = <RK3399_PD_VCODEC>;
727                                 clocks = <&cru ACLK_VCODEC>,
728                                          <&cru HCLK_VCODEC>;
729                                 pm_qos = <&qos_video_m0>;
730                         };
731                         pd_vdu@RK3399_PD_VDU {
732                                 reg = <RK3399_PD_VDU>;
733                                 clocks = <&cru ACLK_VDU>,
734                                          <&cru HCLK_VDU>;
735                                 pm_qos = <&qos_video_m1_r>,
736                                          <&qos_video_m1_w>;
737                         };
738
739                         /* These power domains are grouped by VD_GPU */
740                         pd_gpu@RK3399_PD_GPU {
741                                 reg = <RK3399_PD_GPU>;
742                                 clocks = <&cru ACLK_GPU>;
743                                 pm_qos = <&qos_gpu>;
744                         };
745
746                         /* These power domains are grouped by VD_LOGIC */
747                         pd_gmac@RK3399_PD_GMAC {
748                                 reg = <RK3399_PD_GMAC>;
749                                 clocks = <&cru ACLK_GMAC>;
750                                 pm_qos = <&qos_gmac>;
751                         };
752                         pd_vio@RK3399_PD_VIO {
753                                 reg = <RK3399_PD_VIO>;
754                                 #address-cells = <1>;
755                                 #size-cells = <0>;
756
757                                 pd_hdcp@RK3399_PD_HDCP {
758                                         reg = <RK3399_PD_HDCP>;
759                                         clocks = <&cru ACLK_HDCP>,
760                                                  <&cru HCLK_HDCP>,
761                                                  <&cru PCLK_HDCP>;
762                                         pm_qos = <&qos_hdcp>;
763                                 };
764                                 pd_isp0@RK3399_PD_ISP0 {
765                                         reg = <RK3399_PD_ISP0>;
766                                         clocks = <&cru ACLK_ISP0>,
767                                                  <&cru HCLK_ISP0>;
768                                         pm_qos = <&qos_isp0_m0>,
769                                                  <&qos_isp0_m1>;
770                                 };
771                                 pd_isp1@RK3399_PD_ISP1 {
772                                         reg = <RK3399_PD_ISP1>;
773                                         clocks = <&cru ACLK_ISP1>,
774                                                  <&cru HCLK_ISP1>;
775                                         pm_qos = <&qos_isp1_m0>,
776                                                  <&qos_isp1_m1>;
777                                 };
778                                 pd_vo@RK3399_PD_VO {
779                                         reg = <RK3399_PD_VO>;
780                                         #address-cells = <1>;
781                                         #size-cells = <0>;
782
783                                         pd_vopb@RK3399_PD_VOPB {
784                                                 reg = <RK3399_PD_VOPB>;
785                                                 clocks = <&cru ACLK_VOP0>,
786                                                          <&cru HCLK_VOP0>;
787                                                 pm_qos = <&qos_vop_big_r>,
788                                                          <&qos_vop_big_w>;
789                                         };
790                                         pd_vopl@RK3399_PD_VOPL {
791                                                 reg = <RK3399_PD_VOPL>;
792                                                 clocks = <&cru ACLK_VOP1>,
793                                                          <&cru HCLK_VOP1>;
794                                                 pm_qos = <&qos_vop_little>;
795                                         };
796                                 };
797                         };
798                 };
799         };
800
801         pmugrf: syscon@ff320000 {
802                 compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
803                 reg = <0x0 0xff320000 0x0 0x1000>;
804                 #address-cells = <1>;
805                 #size-cells = <1>;
806
807                 pmu_io_domains: io-domains {
808                         compatible = "rockchip,rk3399-pmu-io-voltage-domain";
809                         status = "disabled";
810                 };
811         };
812
813         spi3: spi@ff350000 {
814                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
815                 reg = <0x0 0xff350000 0x0 0x1000>;
816                 clocks = <&pmucru SCLK_SPI3_PMU>, <&pmucru PCLK_SPI3_PMU>;
817                 clock-names = "spiclk", "apb_pclk";
818                 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
819                 pinctrl-names = "default";
820                 pinctrl-0 = <&spi3_clk &spi3_tx &spi3_rx &spi3_cs0>;
821                 #address-cells = <1>;
822                 #size-cells = <0>;
823                 status = "disabled";
824         };
825
826         uart4: serial@ff370000 {
827                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
828                 reg = <0x0 0xff370000 0x0 0x100>;
829                 clocks = <&pmucru SCLK_UART4_PMU>, <&pmucru PCLK_UART4_PMU>;
830                 clock-names = "baudclk", "apb_pclk";
831                 interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
832                 reg-shift = <2>;
833                 reg-io-width = <4>;
834                 pinctrl-names = "default";
835                 pinctrl-0 = <&uart4_xfer>;
836                 status = "disabled";
837         };
838
839         i2c0: i2c@ff3c0000 {
840                 compatible = "rockchip,rk3399-i2c";
841                 reg = <0x0 0xff3c0000 0x0 0x1000>;
842                 assigned-clocks = <&pmucru SCLK_I2C0_PMU>;
843                 assigned-clock-rates = <200000000>;
844                 clocks = <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
845                 clock-names = "i2c", "pclk";
846                 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
847                 pinctrl-names = "default";
848                 pinctrl-0 = <&i2c0_xfer>;
849                 #address-cells = <1>;
850                 #size-cells = <0>;
851                 status = "disabled";
852         };
853
854         i2c4: i2c@ff3d0000 {
855                 compatible = "rockchip,rk3399-i2c";
856                 reg = <0x0 0xff3d0000 0x0 0x1000>;
857                 assigned-clocks = <&pmucru SCLK_I2C4_PMU>;
858                 assigned-clock-rates = <200000000>;
859                 clocks = <&pmucru SCLK_I2C4_PMU>, <&pmucru PCLK_I2C4_PMU>;
860                 clock-names = "i2c", "pclk";
861                 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
862                 pinctrl-names = "default";
863                 pinctrl-0 = <&i2c4_xfer>;
864                 #address-cells = <1>;
865                 #size-cells = <0>;
866                 status = "disabled";
867         };
868
869         i2c8: i2c@ff3e0000 {
870                 compatible = "rockchip,rk3399-i2c";
871                 reg = <0x0 0xff3e0000 0x0 0x1000>;
872                 assigned-clocks = <&pmucru SCLK_I2C8_PMU>;
873                 assigned-clock-rates = <200000000>;
874                 clocks = <&pmucru SCLK_I2C8_PMU>, <&pmucru PCLK_I2C8_PMU>;
875                 clock-names = "i2c", "pclk";
876                 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
877                 pinctrl-names = "default";
878                 pinctrl-0 = <&i2c8_xfer>;
879                 #address-cells = <1>;
880                 #size-cells = <0>;
881                 status = "disabled";
882         };
883
884         pwm0: pwm@ff420000 {
885                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
886                 reg = <0x0 0xff420000 0x0 0x10>;
887                 #pwm-cells = <3>;
888                 pinctrl-names = "default";
889                 pinctrl-0 = <&pwm0_pin>;
890                 clocks = <&pmucru PCLK_RKPWM_PMU>;
891                 clock-names = "pwm";
892                 status = "disabled";
893         };
894
895         pwm1: pwm@ff420010 {
896                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
897                 reg = <0x0 0xff420010 0x0 0x10>;
898                 #pwm-cells = <3>;
899                 pinctrl-names = "default";
900                 pinctrl-0 = <&pwm1_pin>;
901                 clocks = <&pmucru PCLK_RKPWM_PMU>;
902                 clock-names = "pwm";
903                 status = "disabled";
904         };
905
906         pwm2: pwm@ff420020 {
907                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
908                 reg = <0x0 0xff420020 0x0 0x10>;
909                 #pwm-cells = <3>;
910                 pinctrl-names = "default";
911                 pinctrl-0 = <&pwm2_pin>;
912                 clocks = <&pmucru PCLK_RKPWM_PMU>;
913                 clock-names = "pwm";
914                 status = "disabled";
915         };
916
917         pwm3: pwm@ff420030 {
918                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
919                 reg = <0x0 0xff420030 0x0 0x10>;
920                 #pwm-cells = <3>;
921                 pinctrl-names = "default";
922                 pinctrl-0 = <&pwm3a_pin>;
923                 clocks = <&pmucru PCLK_RKPWM_PMU>;
924                 clock-names = "pwm";
925                 status = "disabled";
926         };
927
928         pmucru: pmu-clock-controller@ff750000 {
929                 compatible = "rockchip,rk3399-pmucru";
930                 reg = <0x0 0xff750000 0x0 0x1000>;
931                 #clock-cells = <1>;
932                 #reset-cells = <1>;
933                 assigned-clocks = <&pmucru PLL_PPLL>;
934                 assigned-clock-rates = <676000000>;
935         };
936
937         cru: clock-controller@ff760000 {
938                 compatible = "rockchip,rk3399-cru";
939                 reg = <0x0 0xff760000 0x0 0x1000>;
940                 #clock-cells = <1>;
941                 #reset-cells = <1>;
942                 assigned-clocks =
943                         <&cru PLL_GPLL>, <&cru PLL_CPLL>,
944                         <&cru PLL_NPLL>,
945                         <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
946                         <&cru PCLK_PERIHP>,
947                         <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
948                         <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
949                         <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>;
950                 assigned-clock-rates =
951                          <594000000>,  <800000000>,
952                         <1000000000>,
953                          <150000000>,   <75000000>,
954                           <37500000>,
955                          <100000000>,  <100000000>,
956                           <50000000>, <600000000>,
957                          <100000000>,   <50000000>;
958         };
959
960         grf: syscon@ff770000 {
961                 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
962                 reg = <0x0 0xff770000 0x0 0x10000>;
963                 #address-cells = <1>;
964                 #size-cells = <1>;
965
966                 io_domains: io-domains {
967                         compatible = "rockchip,rk3399-io-voltage-domain";
968                         status = "disabled";
969                 };
970
971                 u2phy0: usb2-phy@e450 {
972                         compatible = "rockchip,rk3399-usb2phy";
973                         reg = <0xe450 0x10>;
974                         clocks = <&cru SCLK_USB2PHY0_REF>;
975                         clock-names = "phyclk";
976                         #clock-cells = <0>;
977                         clock-output-names = "clk_usbphy0_480m";
978                         status = "disabled";
979
980                         u2phy0_host: host-port {
981                                 #phy-cells = <0>;
982                                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
983                                 interrupt-names = "linestate";
984                                 status = "disabled";
985                         };
986                 };
987
988                 u2phy1: usb2-phy@e460 {
989                         compatible = "rockchip,rk3399-usb2phy";
990                         reg = <0xe460 0x10>;
991                         clocks = <&cru SCLK_USB2PHY1_REF>;
992                         clock-names = "phyclk";
993                         #clock-cells = <0>;
994                         clock-output-names = "clk_usbphy1_480m";
995                         status = "disabled";
996
997                         u2phy1_host: host-port {
998                                 #phy-cells = <0>;
999                                 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
1000                                 interrupt-names = "linestate";
1001                                 status = "disabled";
1002                         };
1003                 };
1004
1005                 emmc_phy: phy@f780 {
1006                         compatible = "rockchip,rk3399-emmc-phy";
1007                         reg = <0xf780 0x24>;
1008                         clocks = <&sdhci>;
1009                         clock-names = "emmcclk";
1010                         #phy-cells = <0>;
1011                         status = "disabled";
1012                 };
1013         };
1014
1015         watchdog@ff848000 {
1016                 compatible = "snps,dw-wdt";
1017                 reg = <0x0 0xff848000 0x0 0x100>;
1018                 clocks = <&cru PCLK_WDT>;
1019                 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
1020         };
1021
1022         rktimer: rktimer@ff850000 {
1023                 compatible = "rockchip,rk3399-timer";
1024                 reg = <0x0 0xff850000 0x0 0x1000>;
1025                 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
1026                 clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
1027                 clock-names = "pclk", "timer";
1028         };
1029
1030         spdif: spdif@ff870000 {
1031                 compatible = "rockchip,rk3399-spdif";
1032                 reg = <0x0 0xff870000 0x0 0x1000>;
1033                 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
1034                 dmas = <&dmac_bus 7>;
1035                 dma-names = "tx";
1036                 clock-names = "mclk", "hclk";
1037                 clocks = <&cru SCLK_SPDIF_8CH>, <&cru HCLK_SPDIF>;
1038                 pinctrl-names = "default";
1039                 pinctrl-0 = <&spdif_bus>;
1040                 status = "disabled";
1041         };
1042
1043         i2s0: i2s@ff880000 {
1044                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1045                 reg = <0x0 0xff880000 0x0 0x1000>;
1046                 rockchip,grf = <&grf>;
1047                 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
1048                 dmas = <&dmac_bus 0>, <&dmac_bus 1>;
1049                 dma-names = "tx", "rx";
1050                 clock-names = "i2s_clk", "i2s_hclk";
1051                 clocks = <&cru SCLK_I2S0_8CH>, <&cru HCLK_I2S0_8CH>;
1052                 pinctrl-names = "default";
1053                 pinctrl-0 = <&i2s0_8ch_bus>;
1054                 status = "disabled";
1055         };
1056
1057         i2s1: i2s@ff890000 {
1058                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1059                 reg = <0x0 0xff890000 0x0 0x1000>;
1060                 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
1061                 dmas = <&dmac_bus 2>, <&dmac_bus 3>;
1062                 dma-names = "tx", "rx";
1063                 clock-names = "i2s_clk", "i2s_hclk";
1064                 clocks = <&cru SCLK_I2S1_8CH>, <&cru HCLK_I2S1_8CH>;
1065                 pinctrl-names = "default";
1066                 pinctrl-0 = <&i2s1_2ch_bus>;
1067                 status = "disabled";
1068         };
1069
1070         i2s2: i2s@ff8a0000 {
1071                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1072                 reg = <0x0 0xff8a0000 0x0 0x1000>;
1073                 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
1074                 dmas = <&dmac_bus 4>, <&dmac_bus 5>;
1075                 dma-names = "tx", "rx";
1076                 clock-names = "i2s_clk", "i2s_hclk";
1077                 clocks = <&cru SCLK_I2S2_8CH>, <&cru HCLK_I2S2_8CH>;
1078                 status = "disabled";
1079         };
1080
1081         pinctrl: pinctrl {
1082                 compatible = "rockchip,rk3399-pinctrl";
1083                 rockchip,grf = <&grf>;
1084                 rockchip,pmu = <&pmugrf>;
1085                 #address-cells = <2>;
1086                 #size-cells = <2>;
1087                 ranges;
1088
1089                 gpio0: gpio0@ff720000 {
1090                         compatible = "rockchip,gpio-bank";
1091                         reg = <0x0 0xff720000 0x0 0x100>;
1092                         clocks = <&pmucru PCLK_GPIO0_PMU>;
1093                         interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
1094
1095                         gpio-controller;
1096                         #gpio-cells = <0x2>;
1097
1098                         interrupt-controller;
1099                         #interrupt-cells = <0x2>;
1100                 };
1101
1102                 gpio1: gpio1@ff730000 {
1103                         compatible = "rockchip,gpio-bank";
1104                         reg = <0x0 0xff730000 0x0 0x100>;
1105                         clocks = <&pmucru PCLK_GPIO1_PMU>;
1106                         interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
1107
1108                         gpio-controller;
1109                         #gpio-cells = <0x2>;
1110
1111                         interrupt-controller;
1112                         #interrupt-cells = <0x2>;
1113                 };
1114
1115                 gpio2: gpio2@ff780000 {
1116                         compatible = "rockchip,gpio-bank";
1117                         reg = <0x0 0xff780000 0x0 0x100>;
1118                         clocks = <&cru PCLK_GPIO2>;
1119                         interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
1120
1121                         gpio-controller;
1122                         #gpio-cells = <0x2>;
1123
1124                         interrupt-controller;
1125                         #interrupt-cells = <0x2>;
1126                 };
1127
1128                 gpio3: gpio3@ff788000 {
1129                         compatible = "rockchip,gpio-bank";
1130                         reg = <0x0 0xff788000 0x0 0x100>;
1131                         clocks = <&cru PCLK_GPIO3>;
1132                         interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
1133
1134                         gpio-controller;
1135                         #gpio-cells = <0x2>;
1136
1137                         interrupt-controller;
1138                         #interrupt-cells = <0x2>;
1139                 };
1140
1141                 gpio4: gpio4@ff790000 {
1142                         compatible = "rockchip,gpio-bank";
1143                         reg = <0x0 0xff790000 0x0 0x100>;
1144                         clocks = <&cru PCLK_GPIO4>;
1145                         interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
1146
1147                         gpio-controller;
1148                         #gpio-cells = <0x2>;
1149
1150                         interrupt-controller;
1151                         #interrupt-cells = <0x2>;
1152                 };
1153
1154                 pcfg_pull_up: pcfg-pull-up {
1155                         bias-pull-up;
1156                 };
1157
1158                 pcfg_pull_down: pcfg-pull-down {
1159                         bias-pull-down;
1160                 };
1161
1162                 pcfg_pull_none: pcfg-pull-none {
1163                         bias-disable;
1164                 };
1165
1166                 pcfg_pull_none_12ma: pcfg-pull-none-12ma {
1167                         bias-disable;
1168                         drive-strength = <12>;
1169                 };
1170
1171                 pcfg_pull_up_8ma: pcfg-pull-up-8ma {
1172                         bias-pull-up;
1173                         drive-strength = <8>;
1174                 };
1175
1176                 pcfg_pull_down_4ma: pcfg-pull-down-4ma {
1177                         bias-pull-down;
1178                         drive-strength = <4>;
1179                 };
1180
1181                 pcfg_pull_up_2ma: pcfg-pull-up-2ma {
1182                         bias-pull-up;
1183                         drive-strength = <2>;
1184                 };
1185
1186                 pcfg_pull_down_12ma: pcfg-pull-down-12ma {
1187                         bias-pull-down;
1188                         drive-strength = <12>;
1189                 };
1190
1191                 pcfg_pull_none_13ma: pcfg-pull-none-13ma {
1192                         bias-disable;
1193                         drive-strength = <13>;
1194                 };
1195
1196                 clock {
1197                         clk_32k: clk-32k {
1198                                 rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
1199                         };
1200                 };
1201
1202                 i2c0 {
1203                         i2c0_xfer: i2c0-xfer {
1204                                 rockchip,pins =
1205                                         <1 15 RK_FUNC_2 &pcfg_pull_none>,
1206                                         <1 16 RK_FUNC_2 &pcfg_pull_none>;
1207                         };
1208                 };
1209
1210                 i2c1 {
1211                         i2c1_xfer: i2c1-xfer {
1212                                 rockchip,pins =
1213                                         <4 2 RK_FUNC_1 &pcfg_pull_none>,
1214                                         <4 1 RK_FUNC_1 &pcfg_pull_none>;
1215                         };
1216                 };
1217
1218                 i2c2 {
1219                         i2c2_xfer: i2c2-xfer {
1220                                 rockchip,pins =
1221                                         <2 1 RK_FUNC_2 &pcfg_pull_none_12ma>,
1222                                         <2 0 RK_FUNC_2 &pcfg_pull_none_12ma>;
1223                         };
1224                 };
1225
1226                 i2c3 {
1227                         i2c3_xfer: i2c3-xfer {
1228                                 rockchip,pins =
1229                                         <4 17 RK_FUNC_1 &pcfg_pull_none>,
1230                                         <4 16 RK_FUNC_1 &pcfg_pull_none>;
1231                         };
1232                 };
1233
1234                 i2c4 {
1235                         i2c4_xfer: i2c4-xfer {
1236                                 rockchip,pins =
1237                                         <1 12 RK_FUNC_1 &pcfg_pull_none>,
1238                                         <1 11 RK_FUNC_1 &pcfg_pull_none>;
1239                         };
1240                 };
1241
1242                 i2c5 {
1243                         i2c5_xfer: i2c5-xfer {
1244                                 rockchip,pins =
1245                                         <3 11 RK_FUNC_2 &pcfg_pull_none>,
1246                                         <3 10 RK_FUNC_2 &pcfg_pull_none>;
1247                         };
1248                 };
1249
1250                 i2c6 {
1251                         i2c6_xfer: i2c6-xfer {
1252                                 rockchip,pins =
1253                                         <2 10 RK_FUNC_2 &pcfg_pull_none>,
1254                                         <2 9 RK_FUNC_2 &pcfg_pull_none>;
1255                         };
1256                 };
1257
1258                 i2c7 {
1259                         i2c7_xfer: i2c7-xfer {
1260                                 rockchip,pins =
1261                                         <2 8 RK_FUNC_2 &pcfg_pull_none>,
1262                                         <2 7 RK_FUNC_2 &pcfg_pull_none>;
1263                         };
1264                 };
1265
1266                 i2c8 {
1267                         i2c8_xfer: i2c8-xfer {
1268                                 rockchip,pins =
1269                                         <1 21 RK_FUNC_1 &pcfg_pull_none>,
1270                                         <1 20 RK_FUNC_1 &pcfg_pull_none>;
1271                         };
1272                 };
1273
1274                 i2s0 {
1275                         i2s0_8ch_bus: i2s0-8ch-bus {
1276                                 rockchip,pins =
1277                                         <3 24 RK_FUNC_1 &pcfg_pull_none>,
1278                                         <3 25 RK_FUNC_1 &pcfg_pull_none>,
1279                                         <3 26 RK_FUNC_1 &pcfg_pull_none>,
1280                                         <3 27 RK_FUNC_1 &pcfg_pull_none>,
1281                                         <3 28 RK_FUNC_1 &pcfg_pull_none>,
1282                                         <3 29 RK_FUNC_1 &pcfg_pull_none>,
1283                                         <3 30 RK_FUNC_1 &pcfg_pull_none>,
1284                                         <3 31 RK_FUNC_1 &pcfg_pull_none>,
1285                                         <4 0 RK_FUNC_1 &pcfg_pull_none>;
1286                         };
1287                 };
1288
1289                 i2s1 {
1290                         i2s1_2ch_bus: i2s1-2ch-bus {
1291                                 rockchip,pins =
1292                                         <4 3 RK_FUNC_1 &pcfg_pull_none>,
1293                                         <4 4 RK_FUNC_1 &pcfg_pull_none>,
1294                                         <4 5 RK_FUNC_1 &pcfg_pull_none>,
1295                                         <4 6 RK_FUNC_1 &pcfg_pull_none>,
1296                                         <4 7 RK_FUNC_1 &pcfg_pull_none>;
1297                         };
1298                 };
1299
1300                 sleep {
1301                         ap_pwroff: ap-pwroff {
1302                                 rockchip,pins = <1 5 RK_FUNC_1 &pcfg_pull_none>;
1303                         };
1304
1305                         ddrio_pwroff: ddrio-pwroff {
1306                                 rockchip,pins = <0 1 RK_FUNC_1 &pcfg_pull_none>;
1307                         };
1308                 };
1309
1310                 spdif {
1311                         spdif_bus: spdif-bus {
1312                                 rockchip,pins =
1313                                         <4 21 RK_FUNC_1 &pcfg_pull_none>;
1314                         };
1315                 };
1316
1317                 spi0 {
1318                         spi0_clk: spi0-clk {
1319                                 rockchip,pins =
1320                                         <3 6 RK_FUNC_2 &pcfg_pull_up>;
1321                         };
1322                         spi0_cs0: spi0-cs0 {
1323                                 rockchip,pins =
1324                                         <3 7 RK_FUNC_2 &pcfg_pull_up>;
1325                         };
1326                         spi0_cs1: spi0-cs1 {
1327                                 rockchip,pins =
1328                                         <3 8 RK_FUNC_2 &pcfg_pull_up>;
1329                         };
1330                         spi0_tx: spi0-tx {
1331                                 rockchip,pins =
1332                                         <3 5 RK_FUNC_2 &pcfg_pull_up>;
1333                         };
1334                         spi0_rx: spi0-rx {
1335                                 rockchip,pins =
1336                                         <3 4 RK_FUNC_2 &pcfg_pull_up>;
1337                         };
1338                 };
1339
1340                 spi1 {
1341                         spi1_clk: spi1-clk {
1342                                 rockchip,pins =
1343                                         <1 9 RK_FUNC_2 &pcfg_pull_up>;
1344                         };
1345                         spi1_cs0: spi1-cs0 {
1346                                 rockchip,pins =
1347                                         <1 10 RK_FUNC_2 &pcfg_pull_up>;
1348                         };
1349                         spi1_rx: spi1-rx {
1350                                 rockchip,pins =
1351                                         <1 7 RK_FUNC_2 &pcfg_pull_up>;
1352                         };
1353                         spi1_tx: spi1-tx {
1354                                 rockchip,pins =
1355                                         <1 8 RK_FUNC_2 &pcfg_pull_up>;
1356                         };
1357                 };
1358
1359                 spi2 {
1360                         spi2_clk: spi2-clk {
1361                                 rockchip,pins =
1362                                         <2 11 RK_FUNC_1 &pcfg_pull_up>;
1363                         };
1364                         spi2_cs0: spi2-cs0 {
1365                                 rockchip,pins =
1366                                         <2 12 RK_FUNC_1 &pcfg_pull_up>;
1367                         };
1368                         spi2_rx: spi2-rx {
1369                                 rockchip,pins =
1370                                         <2 9 RK_FUNC_1 &pcfg_pull_up>;
1371                         };
1372                         spi2_tx: spi2-tx {
1373                                 rockchip,pins =
1374                                         <2 10 RK_FUNC_1 &pcfg_pull_up>;
1375                         };
1376                 };
1377
1378                 spi3 {
1379                         spi3_clk: spi3-clk {
1380                                 rockchip,pins =
1381                                         <1 17 RK_FUNC_1 &pcfg_pull_up>;
1382                         };
1383                         spi3_cs0: spi3-cs0 {
1384                                 rockchip,pins =
1385                                         <1 18 RK_FUNC_1 &pcfg_pull_up>;
1386                         };
1387                         spi3_rx: spi3-rx {
1388                                 rockchip,pins =
1389                                         <1 15 RK_FUNC_1 &pcfg_pull_up>;
1390                         };
1391                         spi3_tx: spi3-tx {
1392                                 rockchip,pins =
1393                                         <1 16 RK_FUNC_1 &pcfg_pull_up>;
1394                         };
1395                 };
1396
1397                 spi4 {
1398                         spi4_clk: spi4-clk {
1399                                 rockchip,pins =
1400                                         <3 2 RK_FUNC_2 &pcfg_pull_up>;
1401                         };
1402                         spi4_cs0: spi4-cs0 {
1403                                 rockchip,pins =
1404                                         <3 3 RK_FUNC_2 &pcfg_pull_up>;
1405                         };
1406                         spi4_rx: spi4-rx {
1407                                 rockchip,pins =
1408                                         <3 0 RK_FUNC_2 &pcfg_pull_up>;
1409                         };
1410                         spi4_tx: spi4-tx {
1411                                 rockchip,pins =
1412                                         <3 1 RK_FUNC_2 &pcfg_pull_up>;
1413                         };
1414                 };
1415
1416                 spi5 {
1417                         spi5_clk: spi5-clk {
1418                                 rockchip,pins =
1419                                         <2 22 RK_FUNC_2 &pcfg_pull_up>;
1420                         };
1421                         spi5_cs0: spi5-cs0 {
1422                                 rockchip,pins =
1423                                         <2 23 RK_FUNC_2 &pcfg_pull_up>;
1424                         };
1425                         spi5_rx: spi5-rx {
1426                                 rockchip,pins =
1427                                         <2 20 RK_FUNC_2 &pcfg_pull_up>;
1428                         };
1429                         spi5_tx: spi5-tx {
1430                                 rockchip,pins =
1431                                         <2 21 RK_FUNC_2 &pcfg_pull_up>;
1432                         };
1433                 };
1434
1435                 tsadc {
1436                         otp_gpio: otp-gpio {
1437                                 rockchip,pins = <1 6 RK_FUNC_GPIO &pcfg_pull_none>;
1438                         };
1439
1440                         otp_out: otp-out {
1441                                 rockchip,pins = <1 6 RK_FUNC_1 &pcfg_pull_none>;
1442                         };
1443                 };
1444
1445                 uart0 {
1446                         uart0_xfer: uart0-xfer {
1447                                 rockchip,pins =
1448                                         <2 16 RK_FUNC_1 &pcfg_pull_up>,
1449                                         <2 17 RK_FUNC_1 &pcfg_pull_none>;
1450                         };
1451
1452                         uart0_cts: uart0-cts {
1453                                 rockchip,pins =
1454                                         <2 18 RK_FUNC_1 &pcfg_pull_none>;
1455                         };
1456
1457                         uart0_rts: uart0-rts {
1458                                 rockchip,pins =
1459                                         <2 19 RK_FUNC_1 &pcfg_pull_none>;
1460                         };
1461                 };
1462
1463                 uart1 {
1464                         uart1_xfer: uart1-xfer {
1465                                 rockchip,pins =
1466                                         <3 12 RK_FUNC_2 &pcfg_pull_up>,
1467                                         <3 13 RK_FUNC_2 &pcfg_pull_none>;
1468                         };
1469                 };
1470
1471                 uart2a {
1472                         uart2a_xfer: uart2a-xfer {
1473                                 rockchip,pins =
1474                                         <4 8 RK_FUNC_2 &pcfg_pull_up>,
1475                                         <4 9 RK_FUNC_2 &pcfg_pull_none>;
1476                         };
1477                 };
1478
1479                 uart2b {
1480                         uart2b_xfer: uart2b-xfer {
1481                                 rockchip,pins =
1482                                         <4 16 RK_FUNC_2 &pcfg_pull_up>,
1483                                         <4 17 RK_FUNC_2 &pcfg_pull_none>;
1484                         };
1485                 };
1486
1487                 uart2c {
1488                         uart2c_xfer: uart2c-xfer {
1489                                 rockchip,pins =
1490                                         <4 19 RK_FUNC_1 &pcfg_pull_up>,
1491                                         <4 20 RK_FUNC_1 &pcfg_pull_none>;
1492                         };
1493                 };
1494
1495                 uart3 {
1496                         uart3_xfer: uart3-xfer {
1497                                 rockchip,pins =
1498                                         <3 14 RK_FUNC_2 &pcfg_pull_up>,
1499                                         <3 15 RK_FUNC_2 &pcfg_pull_none>;
1500                         };
1501
1502                         uart3_cts: uart3-cts {
1503                                 rockchip,pins =
1504                                         <3 18 RK_FUNC_2 &pcfg_pull_none>;
1505                         };
1506
1507                         uart3_rts: uart3-rts {
1508                                 rockchip,pins =
1509                                         <3 19 RK_FUNC_2 &pcfg_pull_none>;
1510                         };
1511                 };
1512
1513                 uart4 {
1514                         uart4_xfer: uart4-xfer {
1515                                 rockchip,pins =
1516                                         <1 7 RK_FUNC_1 &pcfg_pull_up>,
1517                                         <1 8 RK_FUNC_1 &pcfg_pull_none>;
1518                         };
1519                 };
1520
1521                 uarthdcp {
1522                         uarthdcp_xfer: uarthdcp-xfer {
1523                                 rockchip,pins =
1524                                         <4 21 RK_FUNC_2 &pcfg_pull_up>,
1525                                         <4 22 RK_FUNC_2 &pcfg_pull_none>;
1526                         };
1527                 };
1528
1529                 pwm0 {
1530                         pwm0_pin: pwm0-pin {
1531                                 rockchip,pins =
1532                                         <4 18 RK_FUNC_1 &pcfg_pull_none>;
1533                         };
1534
1535                         vop0_pwm_pin: vop0-pwm-pin {
1536                                 rockchip,pins =
1537                                         <4 18 RK_FUNC_2 &pcfg_pull_none>;
1538                         };
1539                 };
1540
1541                 pwm1 {
1542                         pwm1_pin: pwm1-pin {
1543                                 rockchip,pins =
1544                                         <4 22 RK_FUNC_1 &pcfg_pull_none>;
1545                         };
1546
1547                         vop1_pwm_pin: vop1-pwm-pin {
1548                                 rockchip,pins =
1549                                         <4 18 RK_FUNC_3 &pcfg_pull_none>;
1550                         };
1551                 };
1552
1553                 pwm2 {
1554                         pwm2_pin: pwm2-pin {
1555                                 rockchip,pins =
1556                                         <1 19 RK_FUNC_1 &pcfg_pull_none>;
1557                         };
1558                 };
1559
1560                 pwm3a {
1561                         pwm3a_pin: pwm3a-pin {
1562                                 rockchip,pins =
1563                                         <0 6 RK_FUNC_1 &pcfg_pull_none>;
1564                         };
1565                 };
1566
1567                 pwm3b {
1568                         pwm3b_pin: pwm3b-pin {
1569                                 rockchip,pins =
1570                                         <1 14 RK_FUNC_1 &pcfg_pull_none>;
1571                         };
1572                 };
1573         };
1574 };