arm64: dts: rockchip: add cpuinfo support for rk3399-android
[firefly-linux-kernel-4.4.55.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/soc/rockchip,boot-mode.h>
50 #include <dt-bindings/suspend/rockchip-rk3399.h>
51 #include <dt-bindings/thermal/thermal.h>
52
53 #include "rk3399-dram-default-timing.dtsi"
54
55 / {
56         compatible = "rockchip,rk3399";
57
58         interrupt-parent = <&gic>;
59         #address-cells = <2>;
60         #size-cells = <2>;
61
62         aliases {
63                 i2c0 = &i2c0;
64                 i2c1 = &i2c1;
65                 i2c2 = &i2c2;
66                 i2c3 = &i2c3;
67                 i2c4 = &i2c4;
68                 i2c5 = &i2c5;
69                 i2c6 = &i2c6;
70                 i2c7 = &i2c7;
71                 i2c8 = &i2c8;
72                 serial0 = &uart0;
73                 serial1 = &uart1;
74                 serial2 = &uart2;
75                 serial3 = &uart3;
76                 serial4 = &uart4;
77         };
78
79         cpus {
80                 #address-cells = <2>;
81                 #size-cells = <0>;
82
83                 cpu-map {
84                         cluster0 {
85                                 core0 {
86                                         cpu = <&cpu_l0>;
87                                 };
88                                 core1 {
89                                         cpu = <&cpu_l1>;
90                                 };
91                                 core2 {
92                                         cpu = <&cpu_l2>;
93                                 };
94                                 core3 {
95                                         cpu = <&cpu_l3>;
96                                 };
97                         };
98
99                         cluster1 {
100                                 core0 {
101                                         cpu = <&cpu_b0>;
102                                 };
103                                 core1 {
104                                         cpu = <&cpu_b1>;
105                                 };
106                         };
107                 };
108
109                 cpu_l0: cpu@0 {
110                         device_type = "cpu";
111                         compatible = "arm,cortex-a53", "arm,armv8";
112                         reg = <0x0 0x0>;
113                         enable-method = "psci";
114                         #cooling-cells = <2>; /* min followed by max */
115                         dynamic-power-coefficient = <100>;
116                         clocks = <&cru ARMCLKL>;
117                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
118                 };
119
120                 cpu_l1: cpu@1 {
121                         device_type = "cpu";
122                         compatible = "arm,cortex-a53", "arm,armv8";
123                         reg = <0x0 0x1>;
124                         enable-method = "psci";
125                         clocks = <&cru ARMCLKL>;
126                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
127                 };
128
129                 cpu_l2: cpu@2 {
130                         device_type = "cpu";
131                         compatible = "arm,cortex-a53", "arm,armv8";
132                         reg = <0x0 0x2>;
133                         enable-method = "psci";
134                         clocks = <&cru ARMCLKL>;
135                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
136                 };
137
138                 cpu_l3: cpu@3 {
139                         device_type = "cpu";
140                         compatible = "arm,cortex-a53", "arm,armv8";
141                         reg = <0x0 0x3>;
142                         enable-method = "psci";
143                         clocks = <&cru ARMCLKL>;
144                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
145                 };
146
147                 cpu_b0: cpu@100 {
148                         device_type = "cpu";
149                         compatible = "arm,cortex-a72", "arm,armv8";
150                         reg = <0x0 0x100>;
151                         enable-method = "psci";
152                         #cooling-cells = <2>; /* min followed by max */
153                         dynamic-power-coefficient = <436>;
154                         clocks = <&cru ARMCLKB>;
155                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
156                 };
157
158                 cpu_b1: cpu@101 {
159                         device_type = "cpu";
160                         compatible = "arm,cortex-a72", "arm,armv8";
161                         reg = <0x0 0x101>;
162                         enable-method = "psci";
163                         clocks = <&cru ARMCLKB>;
164                         cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
165                 };
166
167                 idle-states {
168                         entry-method = "psci";
169
170                         CPU_SLEEP: cpu-sleep {
171                                 compatible = "arm,idle-state";
172                                 local-timer-stop;
173                                 arm,psci-suspend-param = <0x0010000>;
174                                 entry-latency-us = <120>;
175                                 exit-latency-us = <250>;
176                                 min-residency-us = <900>;
177                         };
178
179                         CLUSTER_SLEEP: cluster-sleep {
180                                 compatible = "arm,idle-state";
181                                 local-timer-stop;
182                                 arm,psci-suspend-param = <0x1010000>;
183                                 entry-latency-us = <400>;
184                                 exit-latency-us = <500>;
185                                 min-residency-us = <2000>;
186                         };
187                 };
188         };
189
190         cpu_avs: cpu-avs {
191                 cluster0-avs {
192                         cluster-id = <0>;
193                         min-volt = <800000>; /* uV */
194                         min-freq = <408000>; /* KHz */
195                         leakage-adjust-volt = <
196                         /*  mA        mA         uV */
197                             0         254        0
198                         >;
199                         nvmem-cells = <&cpul_leakage>;
200                         nvmem-cell-names = "cpu_leakage";
201                 };
202                 cluster1-avs {
203                         cluster-id = <1>;
204                         min-volt = <800000>; /* uV */
205                         min-freq = <408000>; /* KHz */
206                         leakage-adjust-volt = <
207                         /*  mA        mA         uV */
208                             0         254        0
209                         >;
210                         nvmem-cells = <&cpub_leakage>;
211                         nvmem-cell-names = "cpu_leakage";
212                 };
213         };
214
215         pmu_a53 {
216                 compatible = "arm,cortex-a53-pmu";
217                 interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW &ppi_cluster0>;
218         };
219
220         pmu_a72 {
221                 compatible = "arm,cortex-a72-pmu";
222                 interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW &ppi_cluster1>;
223         };
224
225         psci {
226                 compatible = "arm,psci-1.0";
227                 method = "smc";
228         };
229
230         timer {
231                 compatible = "arm,armv8-timer";
232                 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW 0>,
233                              <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW 0>,
234                              <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW 0>,
235                              <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW 0>;
236         };
237
238         xin24m: xin24m {
239                 compatible = "fixed-clock";
240                 clock-frequency = <24000000>;
241                 clock-output-names = "xin24m";
242                 #clock-cells = <0>;
243         };
244
245         amba {
246                 compatible = "arm,amba-bus";
247                 #address-cells = <2>;
248                 #size-cells = <2>;
249                 ranges;
250
251                 dmac_bus: dma-controller@ff6d0000 {
252                         compatible = "arm,pl330", "arm,primecell";
253                         reg = <0x0 0xff6d0000 0x0 0x4000>;
254                         interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
255                                      <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
256                         #dma-cells = <1>;
257                         clocks = <&cru ACLK_DMAC0_PERILP>;
258                         clock-names = "apb_pclk";
259                         peripherals-req-type-burst;
260                 };
261
262                 dmac_peri: dma-controller@ff6e0000 {
263                         compatible = "arm,pl330", "arm,primecell";
264                         reg = <0x0 0xff6e0000 0x0 0x4000>;
265                         interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
266                                      <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
267                         #dma-cells = <1>;
268                         clocks = <&cru ACLK_DMAC1_PERILP>;
269                         clock-names = "apb_pclk";
270                         peripherals-req-type-burst;
271                 };
272         };
273
274         gmac: ethernet@fe300000 {
275                 compatible = "rockchip,rk3399-gmac";
276                 reg = <0x0 0xfe300000 0x0 0x10000>;
277                 rockchip,grf = <&grf>;
278                 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
279                 interrupt-names = "macirq";
280                 clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX>,
281                          <&cru SCLK_MAC_TX>, <&cru SCLK_MACREF>,
282                          <&cru SCLK_MACREF_OUT>, <&cru ACLK_GMAC>,
283                          <&cru PCLK_GMAC>;
284                 clock-names = "stmmaceth", "mac_clk_rx",
285                               "mac_clk_tx", "clk_mac_ref",
286                               "clk_mac_refout", "aclk_mac",
287                               "pclk_mac";
288                 resets = <&cru SRST_A_GMAC>;
289                 reset-names = "stmmaceth";
290                 power-domains = <&power RK3399_PD_GMAC>;
291                 status = "disabled";
292         };
293
294         sdio0: dwmmc@fe310000 {
295                 compatible = "rockchip,rk3399-dw-mshc",
296                              "rockchip,rk3288-dw-mshc";
297                 reg = <0x0 0xfe310000 0x0 0x4000>;
298                 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH 0>;
299                 clock-freq-min-max = <400000 150000000>;
300                 clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
301                          <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
302                 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
303                 fifo-depth = <0x100>;
304                 power-domains = <&power RK3399_PD_SDIOAUDIO>;
305                 status = "disabled";
306         };
307
308         sdmmc: dwmmc@fe320000 {
309                 compatible = "rockchip,rk3399-dw-mshc",
310                              "rockchip,rk3288-dw-mshc";
311                 reg = <0x0 0xfe320000 0x0 0x4000>;
312                 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
313                 clock-freq-min-max = <400000 150000000>;
314                 clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
315                          <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
316                 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
317                 fifo-depth = <0x100>;
318                 power-domains = <&power RK3399_PD_SD>;
319                 status = "disabled";
320         };
321
322         sdhci: sdhci@fe330000 {
323                 compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
324                 reg = <0x0 0xfe330000 0x0 0x10000>;
325                 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
326                 arasan,soc-ctl-syscon = <&grf>;
327                 assigned-clocks = <&cru SCLK_EMMC>;
328                 assigned-clock-rates = <200000000>;
329                 clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>;
330                 clock-names = "clk_xin", "clk_ahb";
331                 clock-output-names = "emmc_cardclock";
332                 #clock-cells = <0>;
333                 phys = <&emmc_phy>;
334                 phy-names = "phy_arasan";
335                 power-domains = <&power RK3399_PD_EMMC>;
336                 status = "disabled";
337         };
338
339         usb_host0_ehci: usb@fe380000 {
340                 compatible = "generic-ehci";
341                 reg = <0x0 0xfe380000 0x0 0x20000>;
342                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH 0>;
343                 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
344                          <&cru SCLK_USBPHY0_480M_SRC>;
345                 clock-names = "hclk_host0", "hclk_host0_arb", "usbphy0_480m";
346                 phys = <&u2phy0_host>;
347                 phy-names = "usb";
348                 power-domains = <&power RK3399_PD_PERIHP>;
349                 status = "disabled";
350         };
351
352         usb_host0_ohci: usb@fe3a0000 {
353                 compatible = "generic-ohci";
354                 reg = <0x0 0xfe3a0000 0x0 0x20000>;
355                 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH 0>;
356                 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
357                          <&cru SCLK_USBPHY0_480M_SRC>;
358                 clock-names = "hclk_host0", "hclk_host0_arb", "usbphy0_480m";
359                 phys = <&u2phy0_host>;
360                 phy-names = "usb";
361                 power-domains = <&power RK3399_PD_PERIHP>;
362                 status = "disabled";
363         };
364
365         usb_host1_ehci: usb@fe3c0000 {
366                 compatible = "generic-ehci";
367                 reg = <0x0 0xfe3c0000 0x0 0x20000>;
368                 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH 0>;
369                 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
370                          <&cru SCLK_USBPHY1_480M_SRC>;
371                 clock-names = "hclk_host1", "hclk_host1_arb", "usbphy1_480m";
372                 phys = <&u2phy1_host>;
373                 phy-names = "usb";
374                 power-domains = <&power RK3399_PD_PERIHP>;
375                 status = "disabled";
376         };
377
378         usb_host1_ohci: usb@fe3e0000 {
379                 compatible = "generic-ohci";
380                 reg = <0x0 0xfe3e0000 0x0 0x20000>;
381                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH 0>;
382                 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>,
383                          <&cru SCLK_USBPHY1_480M_SRC>;
384                 clock-names = "hclk_host1", "hclk_host1_arb", "usbphy1_480m";
385                 phys = <&u2phy1_host>;
386                 phy-names = "usb";
387                 power-domains = <&power RK3399_PD_PERIHP>;
388                 status = "disabled";
389         };
390
391         usbdrd3_0: usb@fe800000 {
392                 compatible = "rockchip,rk3399-dwc3";
393                 clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>,
394                          <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>;
395                 clock-names = "ref_clk", "suspend_clk",
396                               "bus_clk", "grf_clk";
397                 power-domains = <&power RK3399_PD_USB3>;
398                 resets = <&cru SRST_A_USB3_OTG0>;
399                 reset-names = "usb3-otg";
400                 #address-cells = <2>;
401                 #size-cells = <2>;
402                 ranges;
403                 status = "disabled";
404                 usbdrd_dwc3_0: dwc3@fe800000 {
405                         compatible = "snps,dwc3";
406                         reg = <0x0 0xfe800000 0x0 0x100000>;
407                         interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
408                         dr_mode = "otg";
409                         phys = <&u2phy0_otg>, <&tcphy0_usb3>;
410                         phy-names = "usb2-phy", "usb3-phy";
411                         phy_type = "utmi_wide";
412                         snps,dis_enblslpm_quirk;
413                         snps,dis-u2-freeclk-exists-quirk;
414                         snps,dis_u2_susphy_quirk;
415                         snps,dis-del-phy-power-chg-quirk;
416                         snps,xhci-slow-suspend-quirk;
417                         status = "disabled";
418                 };
419         };
420
421         usbdrd3_1: usb@fe900000 {
422                 compatible = "rockchip,rk3399-dwc3";
423                 clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>,
424                          <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>;
425                 clock-names = "ref_clk", "suspend_clk",
426                               "bus_clk", "grf_clk";
427                 power-domains = <&power RK3399_PD_USB3>;
428                 resets = <&cru SRST_A_USB3_OTG1>;
429                 reset-names = "usb3-otg";
430                 #address-cells = <2>;
431                 #size-cells = <2>;
432                 ranges;
433                 status = "disabled";
434                 usbdrd_dwc3_1: dwc3@fe900000 {
435                         compatible = "snps,dwc3";
436                         reg = <0x0 0xfe900000 0x0 0x100000>;
437                         interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
438                         dr_mode = "host";
439                         phys = <&u2phy1_otg>, <&tcphy1_usb3>;
440                         phy-names = "usb2-phy", "usb3-phy";
441                         phy_type = "utmi_wide";
442                         snps,dis_enblslpm_quirk;
443                         snps,dis-u2-freeclk-exists-quirk;
444                         snps,dis_u2_susphy_quirk;
445                         snps,dis-del-phy-power-chg-quirk;
446                         snps,xhci-slow-suspend-quirk;
447                         status = "disabled";
448                 };
449         };
450
451         cdn_dp: dp@fec00000 {
452                 compatible = "rockchip,rk3399-cdn-dp";
453                 reg = <0x0 0xfec00000 0x0 0x100000>;
454                 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
455                 clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>,
456                          <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>;
457                 clock-names = "core-clk", "pclk", "spdif", "grf";
458                 assigned-clocks = <&cru SCLK_DP_CORE>;
459                 assigned-clock-rates = <100000000>;
460                 power-domains = <&power RK3399_PD_HDCP>;
461                 phys = <&tcphy0_dp>, <&tcphy1_dp>;
462                 resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>,
463                          <&cru SRST_P_UPHY0_APB>, <&cru SRST_DP_CORE>;
464                 reset-names = "spdif", "dptx", "apb", "core";
465                 rockchip,grf = <&grf>;
466                 #address-cells = <1>;
467                 #size-cells = <0>;
468                 #sound-dai-cells = <1>;
469                 status = "disabled";
470
471                 ports {
472                         #address-cells = <1>;
473                         #size-cells = <0>;
474
475                         dp_in: port {
476                                 #address-cells = <1>;
477                                 #size-cells = <0>;
478                                 dp_in_vopb: endpoint@0 {
479                                         reg = <0>;
480                                         remote-endpoint = <&vopb_out_dp>;
481                                 };
482
483                                 dp_in_vopl: endpoint@1 {
484                                         reg = <1>;
485                                         remote-endpoint = <&vopl_out_dp>;
486                                 };
487                         };
488                 };
489         };
490
491         gic: interrupt-controller@fee00000 {
492                 compatible = "arm,gic-v3";
493                 #interrupt-cells = <4>;
494                 #address-cells = <2>;
495                 #size-cells = <2>;
496                 ranges;
497                 interrupt-controller;
498
499                 reg = <0x0 0xfee00000 0 0x10000>, /* GICD */
500                       <0x0 0xfef00000 0 0xc0000>, /* GICR */
501                       <0x0 0xfff00000 0 0x10000>, /* GICC */
502                       <0x0 0xfff10000 0 0x10000>, /* GICH */
503                       <0x0 0xfff20000 0 0x10000>; /* GICV */
504                 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
505                 its: interrupt-controller@fee20000 {
506                         compatible = "arm,gic-v3-its";
507                         msi-controller;
508                         reg = <0x0 0xfee20000 0x0 0x20000>;
509                 };
510
511                 ppi-partitions {
512                         ppi_cluster0: interrupt-partition-0 {
513                                 affinity = <&cpu_l0 &cpu_l1 &cpu_l2 &cpu_l3>;
514                         };
515
516                         ppi_cluster1: interrupt-partition-1 {
517                                 affinity = <&cpu_b0 &cpu_b1>;
518                         };
519                 };
520         };
521
522         saradc: saradc@ff100000 {
523                 compatible = "rockchip,rk3399-saradc";
524                 reg = <0x0 0xff100000 0x0 0x100>;
525                 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH 0>;
526                 #io-channel-cells = <1>;
527                 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
528                 clock-names = "saradc", "apb_pclk";
529                 resets = <&cru SRST_P_SARADC>;
530                 reset-names = "saradc-apb";
531                 status = "disabled";
532         };
533
534         i2c0: i2c@ff3c0000 {
535                 compatible = "rockchip,rk3399-i2c";
536                 reg = <0x0 0xff3c0000 0x0 0x1000>;
537                 clocks =  <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
538                 clock-names = "i2c", "pclk";
539                 interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH 0>;
540                 pinctrl-names = "default";
541                 pinctrl-0 = <&i2c0_xfer>;
542                 #address-cells = <1>;
543                 #size-cells = <0>;
544                 status = "disabled";
545         };
546
547         i2c1: i2c@ff110000 {
548                 compatible = "rockchip,rk3399-i2c";
549                 reg = <0x0 0xff110000 0x0 0x1000>;
550                 clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
551                 clock-names = "i2c", "pclk";
552                 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH 0>;
553                 pinctrl-names = "default";
554                 pinctrl-0 = <&i2c1_xfer>;
555                 #address-cells = <1>;
556                 #size-cells = <0>;
557                 status = "disabled";
558         };
559
560         i2c2: i2c@ff120000 {
561                 compatible = "rockchip,rk3399-i2c";
562                 reg = <0x0 0xff120000 0x0 0x1000>;
563                 clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
564                 clock-names = "i2c", "pclk";
565                 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH 0>;
566                 pinctrl-names = "default";
567                 pinctrl-0 = <&i2c2_xfer>;
568                 #address-cells = <1>;
569                 #size-cells = <0>;
570                 status = "disabled";
571         };
572
573         i2c3: i2c@ff130000 {
574                 compatible = "rockchip,rk3399-i2c";
575                 reg = <0x0 0xff130000 0x0 0x1000>;
576                 clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
577                 clock-names = "i2c", "pclk";
578                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH 0>;
579                 pinctrl-names = "default";
580                 pinctrl-0 = <&i2c3_xfer>;
581                 #address-cells = <1>;
582                 #size-cells = <0>;
583                 status = "disabled";
584         };
585
586         i2c5: i2c@ff140000 {
587                 compatible = "rockchip,rk3399-i2c";
588                 reg = <0x0 0xff140000 0x0 0x1000>;
589                 clocks = <&cru SCLK_I2C5>, <&cru PCLK_I2C5>;
590                 clock-names = "i2c", "pclk";
591                 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH 0>;
592                 pinctrl-names = "default";
593                 pinctrl-0 = <&i2c5_xfer>;
594                 #address-cells = <1>;
595                 #size-cells = <0>;
596                 status = "disabled";
597         };
598
599         i2c6: i2c@ff150000 {
600                 compatible = "rockchip,rk3399-i2c";
601                 reg = <0x0 0xff150000 0x0 0x1000>;
602                 clocks = <&cru SCLK_I2C6>, <&cru PCLK_I2C6>;
603                 clock-names = "i2c", "pclk";
604                 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH 0>;
605                 pinctrl-names = "default";
606                 pinctrl-0 = <&i2c6_xfer>;
607                 #address-cells = <1>;
608                 #size-cells = <0>;
609                 status = "disabled";
610         };
611
612         i2c7: i2c@ff160000 {
613                 compatible = "rockchip,rk3399-i2c";
614                 reg = <0x0 0xff160000 0x0 0x1000>;
615                 clocks = <&cru SCLK_I2C7>, <&cru PCLK_I2C7>;
616                 clock-names = "i2c", "pclk";
617                 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH 0>;
618                 pinctrl-names = "default";
619                 pinctrl-0 = <&i2c7_xfer>;
620                 #address-cells = <1>;
621                 #size-cells = <0>;
622                 status = "disabled";
623         };
624
625         uart0: serial@ff180000 {
626                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
627                 reg = <0x0 0xff180000 0x0 0x100>;
628                 clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
629                 clock-names = "baudclk", "apb_pclk";
630                 interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH 0>;
631                 reg-shift = <2>;
632                 reg-io-width = <4>;
633                 pinctrl-names = "default";
634                 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
635                 status = "disabled";
636         };
637
638         uart1: serial@ff190000 {
639                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
640                 reg = <0x0 0xff190000 0x0 0x100>;
641                 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
642                 clock-names = "baudclk", "apb_pclk";
643                 interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH 0>;
644                 reg-shift = <2>;
645                 reg-io-width = <4>;
646                 pinctrl-names = "default";
647                 pinctrl-0 = <&uart1_xfer>;
648                 status = "disabled";
649         };
650
651         uart2: serial@ff1a0000 {
652                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
653                 reg = <0x0 0xff1a0000 0x0 0x100>;
654                 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
655                 clock-names = "baudclk", "apb_pclk";
656                 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH 0>;
657                 reg-shift = <2>;
658                 reg-io-width = <4>;
659                 pinctrl-names = "default";
660                 pinctrl-0 = <&uart2c_xfer>;
661                 status = "disabled";
662         };
663
664         uart3: serial@ff1b0000 {
665                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
666                 reg = <0x0 0xff1b0000 0x0 0x100>;
667                 clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
668                 clock-names = "baudclk", "apb_pclk";
669                 interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>;
670                 reg-shift = <2>;
671                 reg-io-width = <4>;
672                 pinctrl-names = "default";
673                 pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
674                 status = "disabled";
675         };
676
677         spi0: spi@ff1c0000 {
678                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
679                 reg = <0x0 0xff1c0000 0x0 0x1000>;
680                 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
681                 clock-names = "spiclk", "apb_pclk";
682                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH 0>;
683                 pinctrl-names = "default";
684                 pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
685                 #address-cells = <1>;
686                 #size-cells = <0>;
687                 status = "disabled";
688         };
689
690         spi1: spi@ff1d0000 {
691                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
692                 reg = <0x0 0xff1d0000 0x0 0x1000>;
693                 clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
694                 clock-names = "spiclk", "apb_pclk";
695                 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH 0>;
696                 pinctrl-names = "default";
697                 pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
698                 #address-cells = <1>;
699                 #size-cells = <0>;
700                 status = "disabled";
701         };
702
703         spi2: spi@ff1e0000 {
704                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
705                 reg = <0x0 0xff1e0000 0x0 0x1000>;
706                 clocks = <&cru SCLK_SPI2>, <&cru PCLK_SPI2>;
707                 clock-names = "spiclk", "apb_pclk";
708                 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH 0>;
709                 pinctrl-names = "default";
710                 pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
711                 #address-cells = <1>;
712                 #size-cells = <0>;
713                 status = "disabled";
714         };
715
716         spi4: spi@ff1f0000 {
717                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
718                 reg = <0x0 0xff1f0000 0x0 0x1000>;
719                 clocks = <&cru SCLK_SPI4>, <&cru PCLK_SPI4>;
720                 clock-names = "spiclk", "apb_pclk";
721                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH 0>;
722                 pinctrl-names = "default";
723                 pinctrl-0 = <&spi4_clk &spi4_tx &spi4_rx &spi4_cs0>;
724                 #address-cells = <1>;
725                 #size-cells = <0>;
726                 status = "disabled";
727         };
728
729         spi5: spi@ff200000 {
730                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
731                 reg = <0x0 0xff200000 0x0 0x1000>;
732                 clocks = <&cru SCLK_SPI5>, <&cru PCLK_SPI5>;
733                 clock-names = "spiclk", "apb_pclk";
734                 interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH 0>;
735                 pinctrl-names = "default";
736                 pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>;
737                 #address-cells = <1>;
738                 #size-cells = <0>;
739                 status = "disabled";
740         };
741
742         thermal_zones: thermal-zones {
743                 soc_thermal: soc-thermal {
744                         polling-delay-passive = <20>; /* milliseconds */
745                         polling-delay = <1000>; /* milliseconds */
746                         sustainable-power = <1000>; /* milliwatts */
747
748                         thermal-sensors = <&tsadc 0>;
749
750                         trips {
751                                 threshold: trip-point@0 {
752                                         temperature = <70000>; /* millicelsius */
753                                         hysteresis = <2000>; /* millicelsius */
754                                         type = "passive";
755                                 };
756                                 target: trip-point@1 {
757                                         temperature = <85000>; /* millicelsius */
758                                         hysteresis = <2000>; /* millicelsius */
759                                         type = "passive";
760                                 };
761                                 soc_crit: soc-crit {
762                                         temperature = <95000>; /* millicelsius */
763                                         hysteresis = <2000>; /* millicelsius */
764                                         type = "critical";
765                                 };
766                         };
767
768                         cooling-maps {
769                                 map0 {
770                                         trip = <&target>;
771                                         cooling-device =
772                                                 <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
773                                         contribution = <4096>;
774                                 };
775                                 map1 {
776                                         trip = <&target>;
777                                         cooling-device =
778                                                 <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
779                                         contribution = <1024>;
780                                 };
781                                 map2 {
782                                         trip = <&target>;
783                                         cooling-device =
784                                                 <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
785                                         contribution = <4096>;
786                                 };
787                         };
788                 };
789
790                 gpu_thermal: gpu-thermal {
791                         polling-delay-passive = <100>; /* milliseconds */
792                         polling-delay = <1000>; /* milliseconds */
793
794                         thermal-sensors = <&tsadc 1>;
795                 };
796         };
797
798         tsadc: tsadc@ff260000 {
799                 compatible = "rockchip,rk3399-tsadc";
800                 reg = <0x0 0xff260000 0x0 0x100>;
801                 interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH 0>;
802                 rockchip,grf = <&grf>;
803                 clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
804                 clock-names = "tsadc", "apb_pclk";
805                 assigned-clocks = <&cru SCLK_TSADC>;
806                 assigned-clock-rates = <750000>;
807                 resets = <&cru SRST_TSADC>;
808                 reset-names = "tsadc-apb";
809                 pinctrl-names = "init", "default", "sleep";
810                 pinctrl-0 = <&otp_gpio>;
811                 pinctrl-1 = <&otp_out>;
812                 pinctrl-2 = <&otp_gpio>;
813                 #thermal-sensor-cells = <1>;
814                 rockchip,hw-tshut-temp = <95000>;
815                 status = "disabled";
816         };
817
818         qos_emmc: qos@ffa58000 {
819                 compatible = "syscon";
820                 reg = <0x0 0xffa58000 0x0 0x20>;
821         };
822
823         qos_gmac: qos@ffa5c000 {
824                 compatible = "syscon";
825                 reg = <0x0 0xffa5c000 0x0 0x20>;
826         };
827
828         qos_pcie: qos@ffa60080 {
829                 compatible = "syscon";
830                 reg = <0x0 0xffa60080 0x0 0x20>;
831         };
832
833         qos_usb_host0: qos@ffa60100 {
834                 compatible = "syscon";
835                 reg = <0x0 0xffa60100 0x0 0x20>;
836         };
837
838         qos_usb_host1: qos@ffa60180 {
839                 compatible = "syscon";
840                 reg = <0x0 0xffa60180 0x0 0x20>;
841         };
842
843         qos_usb_otg0: qos@ffa70000 {
844                 compatible = "syscon";
845                 reg = <0x0 0xffa70000 0x0 0x20>;
846         };
847
848         qos_usb_otg1: qos@ffa70080 {
849                 compatible = "syscon";
850                 reg = <0x0 0xffa70080 0x0 0x20>;
851         };
852
853         qos_sd: qos@ffa74000 {
854                 compatible = "syscon";
855                 reg = <0x0 0xffa74000 0x0 0x20>;
856         };
857
858         qos_sdioaudio: qos@ffa76000 {
859                 compatible = "syscon";
860                 reg = <0x0 0xffa76000 0x0 0x20>;
861         };
862
863         qos_hdcp: qos@ffa90000 {
864                 compatible = "syscon";
865                 reg = <0x0 0xffa90000 0x0 0x20>;
866         };
867
868         qos_iep: qos@ffa98000 {
869                 compatible = "syscon";
870                 reg = <0x0 0xffa98000 0x0 0x20>;
871         };
872
873         qos_isp0_m0: qos@ffaa0000 {
874                 compatible = "syscon";
875                 reg = <0x0 0xffaa0000 0x0 0x20>;
876         };
877
878         qos_isp0_m1: qos@ffaa0080 {
879                 compatible = "syscon";
880                 reg = <0x0 0xffaa0080 0x0 0x20>;
881         };
882
883         qos_isp1_m0: qos@ffaa8000 {
884                 compatible = "syscon";
885                 reg = <0x0 0xffaa8000 0x0 0x20>;
886         };
887
888         qos_isp1_m1: qos@ffaa8080 {
889                 compatible = "syscon";
890                 reg = <0x0 0xffaa8080 0x0 0x20>;
891         };
892
893         qos_rga_r: qos@ffab0000 {
894                 compatible = "syscon";
895                 reg = <0x0 0xffab0000 0x0 0x20>;
896         };
897
898         qos_rga_w: qos@ffab0080 {
899                 compatible = "syscon";
900                 reg = <0x0 0xffab0080 0x0 0x20>;
901         };
902
903         qos_video_m0: qos@ffab8000 {
904                 compatible = "syscon";
905                 reg = <0x0 0xffab8000 0x0 0x20>;
906         };
907
908         qos_video_m1_r: qos@ffac0000 {
909                 compatible = "syscon";
910                 reg = <0x0 0xffac0000 0x0 0x20>;
911         };
912
913         qos_video_m1_w: qos@ffac0080 {
914                 compatible = "syscon";
915                 reg = <0x0 0xffac0080 0x0 0x20>;
916         };
917
918         qos_vop_big_r: qos@ffac8000 {
919                 compatible = "syscon";
920                 reg = <0x0 0xffac8000 0x0 0x20>;
921         };
922
923         qos_vop_big_w: qos@ffac8080 {
924                 compatible = "syscon";
925                 reg = <0x0 0xffac8080 0x0 0x20>;
926         };
927
928         qos_vop_little: qos@ffad0000 {
929                 compatible = "syscon";
930                 reg = <0x0 0xffad0000 0x0 0x20>;
931         };
932
933         qos_perihp: qos@ffad8080 {
934                 compatible = "syscon";
935                 reg = <0x0 0xffad8080 0x0 0x20>;
936         };
937
938         qos_gpu: qos@ffae0000 {
939                 compatible = "syscon";
940                 reg = <0x0 0xffae0000 0x0 0x20>;
941         };
942
943         pmu: power-management@ff310000 {
944                 compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
945                 reg = <0x0 0xff310000 0x0 0x1000>;
946
947                 /*
948                  * Note: RK3399 supports 6 voltage domains including VD_CORE_L,
949                  * VD_CORE_B, VD_CENTER, VD_GPU, VD_LOGIC and VD_PMU.
950                  * Some of the power domains are grouped together for every
951                  * voltage domain.
952                  * The detail contents as below.
953                  */
954                 power: power-controller {
955                         compatible = "rockchip,rk3399-power-controller";
956                         #power-domain-cells = <1>;
957                         #address-cells = <1>;
958                         #size-cells = <0>;
959
960                         /* These power domains are grouped by VD_CENTER */
961                         pd_iep@RK3399_PD_IEP {
962                                 reg = <RK3399_PD_IEP>;
963                                 clocks = <&cru ACLK_IEP>,
964                                          <&cru HCLK_IEP>;
965                                 pm_qos = <&qos_iep>;
966                         };
967                         pd_rga@RK3399_PD_RGA {
968                                 reg = <RK3399_PD_RGA>;
969                                 clocks = <&cru ACLK_RGA>,
970                                          <&cru HCLK_RGA>;
971                                 pm_qos = <&qos_rga_r>,
972                                          <&qos_rga_w>;
973                         };
974                         pd_vcodec@RK3399_PD_VCODEC {
975                                 reg = <RK3399_PD_VCODEC>;
976                                 clocks = <&cru ACLK_VCODEC>,
977                                          <&cru HCLK_VCODEC>;
978                                 pm_qos = <&qos_video_m0>;
979                         };
980                         pd_vdu@RK3399_PD_VDU {
981                                 reg = <RK3399_PD_VDU>;
982                                 clocks = <&cru ACLK_VDU>,
983                                          <&cru HCLK_VDU>;
984                                 pm_qos = <&qos_video_m1_r>,
985                                          <&qos_video_m1_w>;
986                         };
987
988                         /* These power domains are grouped by VD_GPU */
989                         pd_gpu@RK3399_PD_GPU {
990                                 reg = <RK3399_PD_GPU>;
991                                 clocks = <&cru ACLK_GPU>;
992                                 pm_qos = <&qos_gpu>;
993                         };
994
995                         /* These power domains are grouped by VD_LOGIC */
996                         pd_edp@RK3399_PD_EDP {
997                                 reg = <RK3399_PD_EDP>;
998                                 clocks = <&cru PCLK_EDP_CTRL>;
999                         };
1000                         pd_emmc@RK3399_PD_EMMC {
1001                                 reg = <RK3399_PD_EMMC>;
1002                                 clocks = <&cru ACLK_EMMC>;
1003                                 pm_qos = <&qos_emmc>;
1004                         };
1005                         pd_gmac@RK3399_PD_GMAC {
1006                                 reg = <RK3399_PD_GMAC>;
1007                                 clocks = <&cru ACLK_GMAC>,
1008                                          <&cru PCLK_GMAC>;
1009                                 pm_qos = <&qos_gmac>;
1010                         };
1011                         pd_perihp@RK3399_PD_PERIHP {
1012                                 reg = <RK3399_PD_PERIHP>;
1013                                 #address-cells = <1>;
1014                                 #size-cells = <0>;
1015                                 clocks = <&cru ACLK_PERIHP>;
1016                                 pm_qos = <&qos_perihp>,
1017                                          <&qos_pcie>,
1018                                          <&qos_usb_host0>,
1019                                          <&qos_usb_host1>;
1020
1021                                 pd_sd@RK3399_PD_SD {
1022                                         reg = <RK3399_PD_SD>;
1023                                         clocks = <&cru HCLK_SDMMC>,
1024                                                  <&cru SCLK_SDMMC>;
1025                                         pm_qos = <&qos_sd>;
1026                                 };
1027                         };
1028                         pd_sdioaudio@RK3399_PD_SDIOAUDIO {
1029                                 reg = <RK3399_PD_SDIOAUDIO>;
1030                                 clocks = <&cru HCLK_SDIO>;
1031                                 pm_qos = <&qos_sdioaudio>;
1032                         };
1033                         pd_usb3@RK3399_PD_USB3 {
1034                                 reg = <RK3399_PD_USB3>;
1035                                 clocks = <&cru ACLK_USB3>;
1036                                 pm_qos = <&qos_usb_otg0>,
1037                                          <&qos_usb_otg1>;
1038                         };
1039                         pd_vio@RK3399_PD_VIO {
1040                                 reg = <RK3399_PD_VIO>;
1041                                 #address-cells = <1>;
1042                                 #size-cells = <0>;
1043
1044                                 pd_hdcp@RK3399_PD_HDCP {
1045                                         reg = <RK3399_PD_HDCP>;
1046                                         clocks = <&cru ACLK_HDCP>,
1047                                                  <&cru HCLK_HDCP>,
1048                                                  <&cru PCLK_HDCP>;
1049                                         pm_qos = <&qos_hdcp>;
1050                                 };
1051                                 pd_isp0@RK3399_PD_ISP0 {
1052                                         reg = <RK3399_PD_ISP0>;
1053                                         clocks = <&cru ACLK_ISP0>,
1054                                                  <&cru HCLK_ISP0>;
1055                                         pm_qos = <&qos_isp0_m0>,
1056                                                  <&qos_isp0_m1>;
1057                                 };
1058                                 pd_isp1@RK3399_PD_ISP1 {
1059                                         reg = <RK3399_PD_ISP1>;
1060                                         clocks = <&cru ACLK_ISP1>,
1061                                                  <&cru HCLK_ISP1>;
1062                                         pm_qos = <&qos_isp1_m0>,
1063                                                  <&qos_isp1_m1>;
1064                                 };
1065                                 pd_tcpc0@RK3399_PD_TCPC0 {
1066                                         reg = <RK3399_PD_TCPD0>;
1067                                         clocks = <&cru SCLK_UPHY0_TCPDCORE>,
1068                                                  <&cru SCLK_UPHY0_TCPDPHY_REF>;
1069                                 };
1070                                 pd_tcpc1@RK3399_PD_TCPC1 {
1071                                         reg = <RK3399_PD_TCPD1>;
1072                                         clocks = <&cru SCLK_UPHY1_TCPDCORE>,
1073                                                  <&cru SCLK_UPHY1_TCPDPHY_REF>;
1074                                 };
1075                                 pd_vo@RK3399_PD_VO {
1076                                         reg = <RK3399_PD_VO>;
1077                                         #address-cells = <1>;
1078                                         #size-cells = <0>;
1079
1080                                         pd_vopb@RK3399_PD_VOPB {
1081                                                 reg = <RK3399_PD_VOPB>;
1082                                                 clocks = <&cru ACLK_VOP0>,
1083                                                          <&cru HCLK_VOP0>;
1084                                                 pm_qos = <&qos_vop_big_r>,
1085                                                          <&qos_vop_big_w>;
1086                                         };
1087                                         pd_vopl@RK3399_PD_VOPL {
1088                                                 reg = <RK3399_PD_VOPL>;
1089                                                 clocks = <&cru ACLK_VOP1>,
1090                                                          <&cru HCLK_VOP1>;
1091                                                 pm_qos = <&qos_vop_little>;
1092                                         };
1093                                 };
1094                         };
1095                 };
1096         };
1097
1098         pmugrf: syscon@ff320000 {
1099                 compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
1100                 reg = <0x0 0xff320000 0x0 0x1000>;
1101                 #address-cells = <1>;
1102                 #size-cells = <1>;
1103
1104                 pmu_io_domains: io-domains {
1105                         compatible = "rockchip,rk3399-pmu-io-voltage-domain";
1106                         status = "disabled";
1107                 };
1108
1109                 reboot-mode {
1110                         compatible = "syscon-reboot-mode";
1111                         offset = <0x300>;
1112                         mode-bootloader = <BOOT_BL_DOWNLOAD>;
1113                         mode-charge = <BOOT_CHARGING>;
1114                         mode-fastboot = <BOOT_FASTBOOT>;
1115                         mode-loader = <BOOT_BL_DOWNLOAD>;
1116                         mode-normal = <BOOT_NORMAL>;
1117                         mode-recovery = <BOOT_RECOVERY>;
1118                         mode-ums = <BOOT_UMS>;
1119                 };
1120
1121                 pmu_pvtm: pmu-pvtm {
1122                         compatible = "rockchip,rk3399-pmu-pvtm";
1123                         clocks = <&pmucru SCLK_PVTM_PMU>;
1124                         clock-names = "pmu";
1125                         status = "disabled";
1126                 };
1127         };
1128
1129         spi3: spi@ff350000 {
1130                 compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
1131                 reg = <0x0 0xff350000 0x0 0x1000>;
1132                 clocks = <&pmucru SCLK_SPI3_PMU>, <&pmucru PCLK_SPI3_PMU>;
1133                 clock-names = "spiclk", "apb_pclk";
1134                 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH 0>;
1135                 pinctrl-names = "default";
1136                 pinctrl-0 = <&spi3_clk &spi3_tx &spi3_rx &spi3_cs0>;
1137                 #address-cells = <1>;
1138                 #size-cells = <0>;
1139                 status = "disabled";
1140         };
1141
1142         uart4: serial@ff370000 {
1143                 compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
1144                 reg = <0x0 0xff370000 0x0 0x100>;
1145                 clocks = <&pmucru SCLK_UART4_PMU>, <&pmucru PCLK_UART4_PMU>;
1146                 clock-names = "baudclk", "apb_pclk";
1147                 interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH 0>;
1148                 reg-shift = <2>;
1149                 reg-io-width = <4>;
1150                 pinctrl-names = "default";
1151                 pinctrl-0 = <&uart4_xfer>;
1152                 status = "disabled";
1153         };
1154
1155         i2c4: i2c@ff3d0000 {
1156                 compatible = "rockchip,rk3399-i2c";
1157                 reg = <0x0 0xff3d0000 0x0 0x1000>;
1158                 clocks = <&pmucru SCLK_I2C4_PMU>, <&pmucru PCLK_I2C4_PMU>;
1159                 clock-names = "i2c", "pclk";
1160                 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH 0>;
1161                 pinctrl-names = "default";
1162                 pinctrl-0 = <&i2c4_xfer>;
1163                 #address-cells = <1>;
1164                 #size-cells = <0>;
1165                 status = "disabled";
1166         };
1167
1168         i2c8: i2c@ff3e0000 {
1169                 compatible = "rockchip,rk3399-i2c";
1170                 reg = <0x0 0xff3e0000 0x0 0x1000>;
1171                 clocks = <&pmucru SCLK_I2C8_PMU>, <&pmucru PCLK_I2C8_PMU>;
1172                 clock-names = "i2c", "pclk";
1173                 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH 0>;
1174                 pinctrl-names = "default";
1175                 pinctrl-0 = <&i2c8_xfer>;
1176                 #address-cells = <1>;
1177                 #size-cells = <0>;
1178                 status = "disabled";
1179         };
1180
1181         pcie_phy: phy@e220 {
1182                 compatible = "rockchip,rk3399-pcie-phy";
1183                 #phy-cells = <0>;
1184                 rockchip,grf = <&grf>;
1185                 clocks = <&cru SCLK_PCIEPHY_REF>;
1186                 clock-names = "refclk";
1187                 resets = <&cru SRST_PCIEPHY>;
1188                 reset-names = "phy";
1189                 status = "disabled";
1190         };
1191
1192         pcie0: pcie@f8000000 {
1193                 compatible = "rockchip,rk3399-pcie";
1194                 #address-cells = <3>;
1195                 #size-cells = <2>;
1196                 aspm-no-l0s;
1197                 clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
1198                          <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
1199                 clock-names = "aclk", "aclk-perf",
1200                               "hclk", "pm";
1201                 bus-range = <0x0 0x1>;
1202                 max-link-speed = <1>;
1203                 linux,pci-domain = <0>;
1204                 msi-map = <0x0 &its 0x0 0x1000>;
1205                 interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
1206                              <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
1207                              <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
1208                 interrupt-names = "sys", "legacy", "client";
1209                 #interrupt-cells = <1>;
1210                 interrupt-map-mask = <0 0 0 7>;
1211                 interrupt-map = <0 0 0 1 &pcie0_intc 0>,
1212                                 <0 0 0 2 &pcie0_intc 1>,
1213                                 <0 0 0 3 &pcie0_intc 2>,
1214                                 <0 0 0 4 &pcie0_intc 3>;
1215                 phys = <&pcie_phy>;
1216                 phy-names = "pcie-phy";
1217                 ranges = <0x82000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
1218                           0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
1219                 reg = <0x0 0xf8000000 0x0 0x2000000>,
1220                       <0x0 0xfd000000 0x0 0x1000000>;
1221                 reg-names = "axi-base", "apb-base";
1222                 resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
1223                          <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
1224                          <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
1225                          <&cru SRST_A_PCIE>;
1226                 reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
1227                               "pm", "pclk", "aclk";
1228                 status = "disabled";
1229                 pcie0_intc: interrupt-controller {
1230                         interrupt-controller;
1231                         #address-cells = <0>;
1232                         #interrupt-cells = <1>;
1233                 };
1234         };
1235
1236         pwm0: pwm@ff420000 {
1237                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
1238                 reg = <0x0 0xff420000 0x0 0x10>;
1239                 #pwm-cells = <3>;
1240                 pinctrl-names = "default";
1241                 pinctrl-0 = <&pwm0_pin>;
1242                 clocks = <&pmucru PCLK_RKPWM_PMU>;
1243                 clock-names = "pwm";
1244                 status = "disabled";
1245         };
1246
1247         pwm1: pwm@ff420010 {
1248                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
1249                 reg = <0x0 0xff420010 0x0 0x10>;
1250                 #pwm-cells = <3>;
1251                 pinctrl-names = "default";
1252                 pinctrl-0 = <&pwm1_pin>;
1253                 clocks = <&pmucru PCLK_RKPWM_PMU>;
1254                 clock-names = "pwm";
1255                 status = "disabled";
1256         };
1257
1258         pwm2: pwm@ff420020 {
1259                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
1260                 reg = <0x0 0xff420020 0x0 0x10>;
1261                 #pwm-cells = <3>;
1262                 pinctrl-names = "default";
1263                 pinctrl-0 = <&pwm2_pin>;
1264                 clocks = <&pmucru PCLK_RKPWM_PMU>;
1265                 clock-names = "pwm";
1266                 status = "disabled";
1267         };
1268
1269         pwm3: pwm@ff420030 {
1270                 compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
1271                 reg = <0x0 0xff420030 0x0 0x10>;
1272                 #pwm-cells = <3>;
1273                 pinctrl-names = "default";
1274                 pinctrl-0 = <&pwm3a_pin>;
1275                 clocks = <&pmucru PCLK_RKPWM_PMU>;
1276                 clock-names = "pwm";
1277                 status = "disabled";
1278         };
1279
1280         dfi: dfi@ff630000 {
1281                 reg = <0x00 0xff630000 0x00 0x4000>;
1282                 compatible = "rockchip,rk3399-dfi";
1283                 rockchip,pmu = <&pmugrf>;
1284                 clocks = <&cru PCLK_DDR_MON>;
1285                 clock-names = "pclk_ddr_mon";
1286                 status = "disabled";
1287         };
1288
1289         dmc: dmc {
1290                 compatible = "rockchip,rk3399-dmc";
1291                 devfreq-events = <&dfi>;
1292                 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
1293                 clocks = <&cru SCLK_DDRCLK>;
1294                 clock-names = "dmc_clk";
1295                 ddr_timing = <&ddr_timing>;
1296                 status = "disabled";
1297         };
1298
1299         vpu: vpu_service@ff650000 {
1300                 compatible = "rockchip,vpu_service";
1301                 rockchip,grf = <&grf>;
1302                 iommus = <&vpu_mmu>;
1303                 iommu_enabled = <1>;
1304                 reg = <0x0 0xff650000 0x0 0x800>;
1305                 interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH 0>,
1306                              <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH 0>;
1307                 interrupt-names = "irq_dec", "irq_enc";
1308                 clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
1309                 clock-names = "aclk_vcodec", "hclk_vcodec";
1310                 resets = <&cru SRST_H_VCODEC>, <&cru SRST_A_VCODEC>;
1311                 reset-names = "video_h", "video_a";
1312                 power-domains = <&power RK3399_PD_VCODEC>;
1313                 name = "vpu_service";
1314                 dev_mode = <0>;
1315                 /* 0 means ion, 1 means drm */
1316                 allocator = <1>;
1317                 status = "disabled";
1318         };
1319
1320         vpu_mmu: iommu@ff650800 {
1321                 compatible = "rockchip,iommu";
1322                 reg = <0x0 0xff650800 0x0 0x40>;
1323                 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH 0>;
1324                 interrupt-names = "vpu_mmu";
1325                 clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
1326                 clock-names = "aclk", "hclk";
1327                 power-domains = <&power RK3399_PD_VCODEC>;
1328                 #iommu-cells = <0>;
1329         };
1330
1331         rkvdec: rkvdec@ff660000 {
1332                 compatible = "rockchip,rkvdec";
1333                 rockchip,grf = <&grf>;
1334                 iommus = <&vdec_mmu>;
1335                 iommu_enabled = <1>;
1336                 reg = <0x0 0xff660000 0x0 0x400>;
1337                 interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
1338                 interrupt-names = "irq_dec";
1339                 clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
1340                          <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
1341                 clock-names = "aclk_vcodec", "hclk_vcodec",
1342                               "clk_cabac", "clk_core";
1343                 resets = <&cru SRST_H_VDU>, <&cru SRST_A_VDU>;
1344                 reset-names = "video_h", "video_a";
1345                 power-domains = <&power RK3399_PD_VDU>;
1346                 dev_mode = <2>;
1347                 name = "rkvdec";
1348                 /* 0 means ion, 1 means drm */
1349                 allocator = <1>;
1350                 status = "disabled";
1351         };
1352
1353         vdec_mmu: iommu@ff660480 {
1354                 compatible = "rockchip,iommu";
1355                 reg = <0x0 0xff660480 0x0 0x40>, <0x0 0xff6604c0 0x0 0x40>;
1356                 interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH 0>;
1357                 interrupt-names = "vdec_mmu";
1358                 clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
1359                 clock-names = "aclk", "hclk";
1360                 power-domains = <&power RK3399_PD_VDU>;
1361                 #iommu-cells = <0>;
1362         };
1363
1364         iep: iep@ff670000 {
1365                 compatible = "rockchip,iep";
1366                 iommu_enabled = <1>;
1367                 iommus = <&iep_mmu>;
1368                 reg = <0x0 0xff670000 0x0 0x800>;
1369                 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH 0>;
1370                 clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;
1371                 clock-names = "aclk_iep", "hclk_iep";
1372                 power-domains = <&power RK3399_PD_IEP>;
1373                 allocator = <1>;
1374                 version = <2>;
1375                 status = "disabled";
1376         };
1377
1378         iep_mmu: iommu@ff670800 {
1379                 compatible = "rockchip,iommu";
1380                 reg = <0x0 0xff670800 0x0 0x40>;
1381                 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH 0>;
1382                 interrupt-names = "iep_mmu";
1383                 #iommu-cells = <0>;
1384                 status = "disabled";
1385         };
1386
1387         rga: rga@ff680000 {
1388                 compatible = "rockchip,rk3399-rga";
1389                 reg = <0x0 0xff680000 0x0 0x10000>;
1390                 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH 0>;
1391                 interrupt-names = "rga";
1392                 clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>;
1393                 clock-names = "aclk", "hclk", "sclk";
1394                 resets = <&cru SRST_RGA_CORE>, <&cru SRST_A_RGA>, <&cru SRST_H_RGA>;
1395                 reset-names = "core", "axi", "ahb";
1396                 power-domains = <&power RK3399_PD_RGA>;
1397                 status = "disabled";
1398         };
1399
1400         efuse0: efuse@ff690000 {
1401                 compatible = "rockchip,rk3399-efuse";
1402                 reg = <0x0 0xff690000 0x0 0x80>;
1403                 #address-cells = <1>;
1404                 #size-cells = <1>;
1405                 clocks = <&cru PCLK_EFUSE1024NS>;
1406                 clock-names = "pclk_efuse";
1407
1408                 /* Data cells */
1409                 efuse_id: id {
1410                         reg = <0x07 0x10>;
1411                 };
1412                 cpul_leakage: cpul-leakage {
1413                         reg = <0x1a 0x1>;
1414                 };
1415                 cpub_leakage: cpub-leakage {
1416                         reg = <0x17 0x1>;
1417                 };
1418                 gpu_leakage: gpu-leakage {
1419                         reg = <0x18 0x1>;
1420                 };
1421                 center_leakage: center-leakage {
1422                         reg = <0x19 0x1>;
1423                 };
1424                 logic_leakage: logic-leakage {
1425                         reg = <0x1b 0x1>;
1426                 };
1427                 wafer_info: wafer-info {
1428                         reg = <0x1c 0x1>;
1429                 };
1430         };
1431
1432         pmucru: pmu-clock-controller@ff750000 {
1433                 compatible = "rockchip,rk3399-pmucru";
1434                 reg = <0x0 0xff750000 0x0 0x1000>;
1435                 #clock-cells = <1>;
1436                 #reset-cells = <1>;
1437                 assigned-clocks = <&pmucru PLL_PPLL>;
1438                 assigned-clock-rates = <676000000>;
1439         };
1440
1441         cru: clock-controller@ff760000 {
1442                 compatible = "rockchip,rk3399-cru";
1443                 reg = <0x0 0xff760000 0x0 0x1000>;
1444                 #clock-cells = <1>;
1445                 #reset-cells = <1>;
1446                 assigned-clocks =
1447                         <&cru ACLK_VOP0>, <&cru HCLK_VOP0>,
1448                         <&cru ACLK_VOP1>, <&cru HCLK_VOP1>,
1449                         <&cru ARMCLKL>, <&cru ARMCLKB>,
1450                         <&cru PLL_GPLL>, <&cru PLL_CPLL>,
1451                         <&cru ACLK_GPU>, <&cru PLL_NPLL>,
1452                         <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
1453                         <&cru PCLK_PERIHP>,
1454                         <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
1455                         <&cru PCLK_PERILP0>,
1456                         <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>;
1457                 assigned-clock-rates =
1458                          <400000000>,  <200000000>,
1459                          <400000000>,  <200000000>,
1460                          <816000000>, <816000000>,
1461                          <594000000>,  <800000000>,
1462                          <200000000>, <1000000000>,
1463                          <150000000>,   <75000000>,
1464                           <37500000>,
1465                          <100000000>,  <100000000>,
1466                           <50000000>,
1467                          <100000000>,   <50000000>;
1468         };
1469
1470         grf: syscon@ff770000 {
1471                 compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
1472                 reg = <0x0 0xff770000 0x0 0x10000>;
1473                 #address-cells = <1>;
1474                 #size-cells = <1>;
1475
1476                 io_domains: io-domains {
1477                         compatible = "rockchip,rk3399-io-voltage-domain";
1478                         status = "disabled";
1479                 };
1480
1481                 emmc_phy: phy@f780 {
1482                         compatible = "rockchip,rk3399-emmc-phy";
1483                         reg = <0xf780 0x24>;
1484                         clocks = <&sdhci>;
1485                         clock-names = "emmcclk";
1486                         #phy-cells = <0>;
1487                         status = "disabled";
1488                 };
1489
1490                 u2phy0: usb2-phy@e450 {
1491                         compatible = "rockchip,rk3399-usb2phy";
1492                         reg = <0xe450 0x10>;
1493                         clocks = <&cru SCLK_USB2PHY0_REF>;
1494                         clock-names = "phyclk";
1495                         #clock-cells = <0>;
1496                         clock-output-names = "clk_usbphy0_480m";
1497                         status = "disabled";
1498
1499                         u2phy0_otg: otg-port {
1500                                 #phy-cells = <0>;
1501                                 interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
1502                                              <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
1503                                              <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
1504                                 interrupt-names = "otg-bvalid", "otg-id",
1505                                                   "linestate";
1506                                 status = "disabled";
1507                         };
1508
1509                         u2phy0_host: host-port {
1510                                 #phy-cells = <0>;
1511                                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
1512                                 interrupt-names = "linestate";
1513                                 status = "disabled";
1514                         };
1515                 };
1516
1517                 u2phy1: usb2-phy@e460 {
1518                         compatible = "rockchip,rk3399-usb2phy";
1519                         reg = <0xe460 0x10>;
1520                         clocks = <&cru SCLK_USB2PHY1_REF>;
1521                         clock-names = "phyclk";
1522                         #clock-cells = <0>;
1523                         clock-output-names = "clk_usbphy1_480m";
1524                         status = "disabled";
1525
1526                         u2phy1_otg: otg-port {
1527                                 #phy-cells = <0>;
1528                                 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH 0>,
1529                                              <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH 0>,
1530                                              <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH 0>;
1531                                 interrupt-names = "otg-bvalid", "otg-id",
1532                                                   "linestate";
1533                                 status = "disabled";
1534                         };
1535
1536                         u2phy1_host: host-port {
1537                                 #phy-cells = <0>;
1538                                 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH 0>;
1539                                 interrupt-names = "linestate";
1540                                 status = "disabled";
1541                         };
1542                 };
1543
1544                 pvtm: pvtm {
1545                         compatible = "rockchip,rk3399-pvtm";
1546                         clocks = <&cru SCLK_PVTM_CORE_L>,
1547                                  <&cru SCLK_PVTM_CORE_B>,
1548                                  <&cru SCLK_PVTM_GPU>,
1549                                  <&cru SCLK_PVTM_DDR>;
1550                         clock-names = "core_l", "core_b", "gpu", "ddr";
1551                         status = "disabled";
1552                 };
1553         };
1554
1555         tcphy0: phy@ff7c0000 {
1556                 compatible = "rockchip,rk3399-typec-phy";
1557                 reg = <0x0 0xff7c0000 0x0 0x40000>;
1558                 rockchip,grf = <&grf>;
1559                 #phy-cells = <1>;
1560                 clocks = <&cru SCLK_UPHY0_TCPDCORE>,
1561                          <&cru SCLK_UPHY0_TCPDPHY_REF>;
1562                 clock-names = "tcpdcore", "tcpdphy-ref";
1563                 assigned-clocks = <&cru SCLK_UPHY0_TCPDCORE>;
1564                 assigned-clock-rates = <50000000>;
1565                 power-domains = <&power RK3399_PD_TCPD0>;
1566                 resets = <&cru SRST_UPHY0>,
1567                          <&cru SRST_UPHY0_PIPE_L00>,
1568                          <&cru SRST_P_UPHY0_TCPHY>;
1569                 reset-names = "uphy", "uphy-pipe", "uphy-tcphy";
1570                 rockchip,typec-conn-dir = <0xe580 0 16>;
1571                 rockchip,usb3tousb2-en = <0xe580 3 19>;
1572                 rockchip,usb3-host-disable = <0x2434 0 16>;
1573                 rockchip,usb3-host-port = <0x2434 12 28>;
1574                 rockchip,external-psm = <0xe588 14 30>;
1575                 rockchip,pipe-status = <0xe5c0 0 0>;
1576                 rockchip,uphy-dp-sel = <0x6268 19 19>;
1577                 status = "disabled";
1578
1579                 tcphy0_dp: dp-port {
1580                         #phy-cells = <0>;
1581                 };
1582
1583                 tcphy0_usb3: usb3-port {
1584                         #phy-cells = <0>;
1585                 };
1586         };
1587
1588         tcphy1: phy@ff800000 {
1589                 compatible = "rockchip,rk3399-typec-phy";
1590                 reg = <0x0 0xff800000 0x0 0x40000>;
1591                 rockchip,grf = <&grf>;
1592                 #phy-cells = <1>;
1593                 clocks = <&cru SCLK_UPHY1_TCPDCORE>,
1594                          <&cru SCLK_UPHY1_TCPDPHY_REF>;
1595                 clock-names = "tcpdcore", "tcpdphy-ref";
1596                 assigned-clocks = <&cru SCLK_UPHY1_TCPDCORE>;
1597                 assigned-clock-rates = <50000000>;
1598                 power-domains = <&power RK3399_PD_TCPD1>;
1599                 resets = <&cru SRST_UPHY1>,
1600                          <&cru SRST_UPHY1_PIPE_L00>,
1601                          <&cru SRST_P_UPHY1_TCPHY>;
1602                 reset-names = "uphy", "uphy-pipe", "uphy-tcphy";
1603                 rockchip,typec-conn-dir = <0xe58c 0 16>;
1604                 rockchip,usb3tousb2-en = <0xe58c 3 19>;
1605                 rockchip,usb3-host-disable = <0x2444 0 16>;
1606                 rockchip,usb3-host-port = <0x2444 12 28>;
1607                 rockchip,external-psm = <0xe594 14 30>;
1608                 rockchip,pipe-status = <0xe5c0 16 16>;
1609                 rockchip,uphy-dp-sel = <0x6268 3 19>;
1610                 status = "disabled";
1611
1612                 tcphy1_dp: dp-port {
1613                         #phy-cells = <0>;
1614                 };
1615
1616                 tcphy1_usb3: usb3-port {
1617                         #phy-cells = <0>;
1618                 };
1619         };
1620
1621         watchdog@ff848000 {
1622                 compatible = "snps,dw-wdt";
1623                 reg = <0x0 0xff848000 0x0 0x100>;
1624                 clocks = <&cru PCLK_WDT>;
1625                 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH 0>;
1626         };
1627
1628         rktimer: rktimer@ff850000 {
1629                 compatible = "rockchip,rk3399-timer";
1630                 reg = <0x0 0xff850000 0x0 0x1000>;
1631                 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>;
1632                 clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
1633                 clock-names = "pclk", "timer";
1634         };
1635
1636         spdif: spdif@ff870000 {
1637                 compatible = "rockchip,rk3399-spdif";
1638                 reg = <0x0 0xff870000 0x0 0x1000>;
1639                 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>;
1640                 dmas = <&dmac_bus 7>;
1641                 dma-names = "tx";
1642                 clock-names = "mclk", "hclk";
1643                 clocks = <&cru SCLK_SPDIF_8CH>, <&cru HCLK_SPDIF>;
1644                 pinctrl-names = "default";
1645                 pinctrl-0 = <&spdif_bus>;
1646                 power-domains = <&power RK3399_PD_SDIOAUDIO>;
1647                 status = "disabled";
1648         };
1649
1650         i2s0: i2s@ff880000 {
1651                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1652                 reg = <0x0 0xff880000 0x0 0x1000>;
1653                 rockchip,grf = <&grf>;
1654                 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH 0>;
1655                 dmas = <&dmac_bus 0>, <&dmac_bus 1>;
1656                 dma-names = "tx", "rx";
1657                 clock-names = "i2s_clk", "i2s_hclk";
1658                 clocks = <&cru SCLK_I2S0_8CH>, <&cru HCLK_I2S0_8CH>;
1659                 pinctrl-names = "default";
1660                 pinctrl-0 = <&i2s0_8ch_bus>;
1661                 power-domains = <&power RK3399_PD_SDIOAUDIO>;
1662                 status = "disabled";
1663         };
1664
1665         i2s1: i2s@ff890000 {
1666                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1667                 reg = <0x0 0xff890000 0x0 0x1000>;
1668                 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH 0>;
1669                 dmas = <&dmac_bus 2>, <&dmac_bus 3>;
1670                 dma-names = "tx", "rx";
1671                 clock-names = "i2s_clk", "i2s_hclk";
1672                 clocks = <&cru SCLK_I2S1_8CH>, <&cru HCLK_I2S1_8CH>;
1673                 pinctrl-names = "default";
1674                 pinctrl-0 = <&i2s1_2ch_bus>;
1675                 power-domains = <&power RK3399_PD_SDIOAUDIO>;
1676                 status = "disabled";
1677         };
1678
1679         i2s2: i2s@ff8a0000 {
1680                 compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
1681                 reg = <0x0 0xff8a0000 0x0 0x1000>;
1682                 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH 0>;
1683                 dmas = <&dmac_bus 4>, <&dmac_bus 5>;
1684                 dma-names = "tx", "rx";
1685                 clock-names = "i2s_clk", "i2s_hclk";
1686                 clocks = <&cru SCLK_I2S2_8CH>, <&cru HCLK_I2S2_8CH>;
1687                 power-domains = <&power RK3399_PD_SDIOAUDIO>;
1688                 status = "disabled";
1689         };
1690
1691         gpu: gpu@ff9a0000 {
1692                 compatible = "arm,malit860",
1693                              "arm,malit86x",
1694                              "arm,malit8xx",
1695                              "arm,mali-midgard";
1696
1697                 reg = <0x0 0xff9a0000 0x0 0x10000>;
1698
1699                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>,
1700                              <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
1701                              <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
1702                 interrupt-names = "GPU", "JOB", "MMU";
1703
1704                 clocks = <&cru ACLK_GPU>;
1705                 clock-names = "clk_mali";
1706                 #cooling-cells = <2>; /* min followed by max */
1707                 power-domains = <&power RK3399_PD_GPU>;
1708                 power-off-delay-ms = <200>;
1709                 status = "disabled";
1710
1711                 gpu_power_model: power_model {
1712                         compatible = "arm,mali-simple-power-model";
1713                         voltage = <900>;
1714                         frequency = <500>;
1715                         static-power = <300>;
1716                         dynamic-power = <396>;
1717                         ts = <32000 4700 (-80) 2>;
1718                         thermal-zone = "gpu-thermal";
1719                 };
1720         };
1721
1722         vopl: vop@ff8f0000 {
1723                 compatible = "rockchip,rk3399-vop-lit";
1724                 reg = <0x0 0xff8f0000 0x0 0x3efc>;
1725                 interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH 0>;
1726                 clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>;
1727                 clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
1728                 resets = <&cru SRST_A_VOP1>, <&cru SRST_H_VOP1>, <&cru SRST_D_VOP1>;
1729                 reset-names = "axi", "ahb", "dclk";
1730                 power-domains = <&power RK3399_PD_VOPL>;
1731                 iommus = <&vopl_mmu>;
1732                 status = "disabled";
1733
1734                 vopl_out: port {
1735                         #address-cells = <1>;
1736                         #size-cells = <0>;
1737
1738                         vopl_out_mipi: endpoint@0 {
1739                                 reg = <0>;
1740                                 remote-endpoint = <&mipi_in_vopl>;
1741                         };
1742
1743                         vopl_out_edp: endpoint@1 {
1744                                 reg = <1>;
1745                                 remote-endpoint = <&edp_in_vopl>;
1746                         };
1747
1748                         vopl_out_hdmi: endpoint@2 {
1749                                 reg = <2>;
1750                                 remote-endpoint = <&hdmi_in_vopl>;
1751                         };
1752
1753                         vopl_out_dp: endpoint@3 {
1754                                 reg = <3>;
1755                                 remote-endpoint = <&dp_in_vopl>;
1756                         };
1757                 };
1758         };
1759
1760         vop1_pwm: voppwm@ff8f01a0 {
1761                 compatible = "rockchip,vop-pwm";
1762                 reg = <0x0 0xff8f01a0 0x0 0x10>;
1763                 #pwm-cells = <3>;
1764                 pinctrl-names = "default";
1765                 pinctrl-0 = <&vop1_pwm_pin>;
1766                 clocks = <&cru SCLK_VOP1_PWM>;
1767                 clock-names = "pwm";
1768                 status = "disabled";
1769         };
1770
1771         vopl_mmu: iommu@ff8f3f00 {
1772                 compatible = "rockchip,iommu";
1773                 reg = <0x0 0xff8f3f00 0x0 0x100>;
1774                 interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH 0>;
1775                 interrupt-names = "vopl_mmu";
1776                 clocks = <&cru ACLK_VOP1>, <&cru HCLK_VOP1>;
1777                 clock-names = "aclk", "hclk";
1778                 power-domains = <&power RK3399_PD_VOPL>;
1779                 #iommu-cells = <0>;
1780                 status = "disabled";
1781         };
1782
1783         vopb: vop@ff900000 {
1784                 compatible = "rockchip,rk3399-vop-big";
1785                 reg = <0x0 0xff900000 0x0 0x3efc>;
1786                 interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH 0>;
1787                 clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
1788                 clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
1789                 resets = <&cru SRST_A_VOP0>, <&cru SRST_H_VOP0>, <&cru SRST_D_VOP0>;
1790                 reset-names = "axi", "ahb", "dclk";
1791                 power-domains = <&power RK3399_PD_VOPB>;
1792                 iommus = <&vopb_mmu>;
1793                 status = "disabled";
1794
1795                 vopb_out: port {
1796                         #address-cells = <1>;
1797                         #size-cells = <0>;
1798
1799                         vopb_out_edp: endpoint@0 {
1800                                 reg = <0>;
1801                                 remote-endpoint = <&edp_in_vopb>;
1802                         };
1803
1804                         vopb_out_mipi: endpoint@1 {
1805                                 reg = <1>;
1806                                 remote-endpoint = <&mipi_in_vopb>;
1807                         };
1808
1809                         vopb_out_hdmi: endpoint@2 {
1810                                 reg = <2>;
1811                                 remote-endpoint = <&hdmi_in_vopb>;
1812                         };
1813
1814                         vopb_out_dp: endpoint@3 {
1815                                 reg = <3>;
1816                                 remote-endpoint = <&dp_in_vopb>;
1817                         };
1818                 };
1819         };
1820
1821         vop0_pwm: voppwm@ff9001a0 {
1822                 compatible = "rockchip,vop-pwm";
1823                 reg = <0x0 0xff9001a0 0x0 0x10>;
1824                 #pwm-cells = <3>;
1825                 pinctrl-names = "default";
1826                 pinctrl-0 = <&vop0_pwm_pin>;
1827                 clocks = <&cru SCLK_VOP0_PWM>;
1828                 clock-names = "pwm";
1829                 status = "disabled";
1830         };
1831
1832         vopb_mmu: iommu@ff903f00 {
1833                 compatible = "rockchip,iommu";
1834                 reg = <0x0 0xff903f00 0x0 0x100>;
1835                 interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH 0>;
1836                 interrupt-names = "vopb_mmu";
1837                 clocks = <&cru ACLK_VOP0>, <&cru HCLK_VOP0>;
1838                 clock-names = "aclk", "hclk";
1839                 power-domains = <&power RK3399_PD_VOPB>;
1840                 #iommu-cells = <0>;
1841                 status = "disabled";
1842         };
1843
1844         isp0_mmu: iommu@ff914000 {
1845                 compatible = "rockchip,iommu";
1846                 reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
1847                 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
1848                 interrupt-names = "isp0_mmu";
1849                 #iommu-cells = <0>;
1850                 clocks = <&cru ACLK_ISP0_NOC>, <&cru HCLK_ISP0_NOC>;
1851                 clock-names = "aclk", "hclk";
1852                 power-domains = <&power RK3399_PD_ISP0>;
1853                 rk_iommu,disable_reset_quirk;
1854                 status = "disabled";
1855         };
1856
1857         isp1_mmu: iommu@ff924000 {
1858                 compatible = "rockchip,iommu";
1859                 reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>;
1860                 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
1861                 interrupt-names = "isp1_mmu";
1862                 #iommu-cells = <0>;
1863                 clocks = <&cru ACLK_ISP1_NOC>, <&cru HCLK_ISP1_NOC>;
1864                 clock-names = "aclk", "hclk";
1865                 power-domains = <&power RK3399_PD_ISP1>;
1866                 rk_iommu,disable_reset_quirk;
1867                 status = "disabled";
1868         };
1869
1870         hdmi: hdmi@ff940000 {
1871                 compatible = "rockchip,rk3399-dw-hdmi";
1872                 reg = <0x0 0xff940000 0x0 0x20000>;
1873                 reg-io-width = <4>;
1874                 rockchip,grf = <&grf>;
1875                 pinctrl-names = "default";
1876                 pinctrl-0 = <&hdmi_i2c_xfer>;
1877                 power-domains = <&power RK3399_PD_HDCP>;
1878                 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
1879                 clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_SFR>, <&cru PLL_VPLL>, <&cru PCLK_VIO_GRF>;
1880                 clock-names = "iahb", "isfr", "vpll", "grf";
1881                 status = "disabled";
1882
1883                 ports {
1884                         hdmi_in: port {
1885                                 #address-cells = <1>;
1886                                 #size-cells = <0>;
1887                                 hdmi_in_vopb: endpoint@0 {
1888                                         reg = <0>;
1889                                         remote-endpoint = <&vopb_out_hdmi>;
1890                                 };
1891                                 hdmi_in_vopl: endpoint@1 {
1892                                         reg = <1>;
1893                                         remote-endpoint = <&vopl_out_hdmi>;
1894                                 };
1895                         };
1896                 };
1897         };
1898
1899         mipi_dsi: mipi@ff960000 {
1900                 compatible = "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi";
1901                 reg = <0x0 0xff960000 0x0 0x8000>;
1902                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH 0>;
1903                 clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI0>,
1904                          <&cru SCLK_DPHY_TX0_CFG>;
1905                 clock-names = "ref", "pclk", "phy_cfg";
1906                 power-domains = <&power RK3399_PD_VIO>;
1907                 rockchip,grf = <&grf>;
1908                 #address-cells = <1>;
1909                 #size-cells = <0>;
1910                 status = "disabled";
1911
1912                 ports {
1913                         #address-cells = <1>;
1914                         #size-cells = <0>;
1915                         reg = <1>;
1916
1917                         mipi_in: port {
1918                                 #address-cells = <1>;
1919                                 #size-cells = <0>;
1920
1921                                 mipi_in_vopb: endpoint@0 {
1922                                         reg = <0>;
1923                                         remote-endpoint = <&vopb_out_mipi>;
1924                                 };
1925                                 mipi_in_vopl: endpoint@1 {
1926                                         reg = <1>;
1927                                         remote-endpoint = <&vopl_out_mipi>;
1928                                 };
1929                         };
1930                 };
1931         };
1932
1933         edp: edp@ff970000 {
1934                 compatible = "rockchip,rk3399-edp";
1935                 reg = <0x0 0xff970000 0x0 0x8000>;
1936                 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
1937                 clocks = <&cru PCLK_EDP>, <&cru PCLK_EDP_CTRL>;
1938                 clock-names = "dp", "pclk";
1939                 power-domains = <&power RK3399_PD_EDP>;
1940                 resets = <&cru SRST_P_EDP_CTRL>;
1941                 reset-names = "dp";
1942                 rockchip,grf = <&grf>;
1943                 status = "disabled";
1944                 pinctrl-names = "default";
1945                 pinctrl-0 = <&edp_hpd>;
1946
1947                 ports {
1948                         #address-cells = <1>;
1949                         #size-cells = <0>;
1950
1951                         edp_in: port@0 {
1952                                 reg = <0>;
1953                                 #address-cells = <1>;
1954                                 #size-cells = <0>;
1955
1956                                 edp_in_vopb: endpoint@0 {
1957                                         reg = <0>;
1958                                         remote-endpoint = <&vopb_out_edp>;
1959                                 };
1960
1961                                 edp_in_vopl: endpoint@1 {
1962                                         reg = <1>;
1963                                         remote-endpoint = <&vopl_out_edp>;
1964                                 };
1965                         };
1966                 };
1967         };
1968
1969         display_subsystem: display-subsystem {
1970                 compatible = "rockchip,display-subsystem";
1971                 ports = <&vopl_out>, <&vopb_out>;
1972                 status = "disabled";
1973         };
1974
1975         pinctrl: pinctrl {
1976                 compatible = "rockchip,rk3399-pinctrl";
1977                 rockchip,grf = <&grf>;
1978                 rockchip,pmu = <&pmugrf>;
1979                 #address-cells = <0x2>;
1980                 #size-cells = <0x2>;
1981                 ranges;
1982
1983                 gpio0: gpio0@ff720000 {
1984                         compatible = "rockchip,gpio-bank";
1985                         reg = <0x0 0xff720000 0x0 0x100>;
1986                         clocks = <&pmucru PCLK_GPIO0_PMU>;
1987                         interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
1988
1989                         gpio-controller;
1990                         #gpio-cells = <0x2>;
1991
1992                         interrupt-controller;
1993                         #interrupt-cells = <0x2>;
1994                 };
1995
1996                 gpio1: gpio1@ff730000 {
1997                         compatible = "rockchip,gpio-bank";
1998                         reg = <0x0 0xff730000 0x0 0x100>;
1999                         clocks = <&pmucru PCLK_GPIO1_PMU>;
2000                         interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
2001
2002                         gpio-controller;
2003                         #gpio-cells = <0x2>;
2004
2005                         interrupt-controller;
2006                         #interrupt-cells = <0x2>;
2007                 };
2008
2009                 gpio2: gpio2@ff780000 {
2010                         compatible = "rockchip,gpio-bank";
2011                         reg = <0x0 0xff780000 0x0 0x100>;
2012                         clocks = <&cru PCLK_GPIO2>;
2013                         interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
2014
2015                         gpio-controller;
2016                         #gpio-cells = <0x2>;
2017
2018                         interrupt-controller;
2019                         #interrupt-cells = <0x2>;
2020                 };
2021
2022                 gpio3: gpio3@ff788000 {
2023                         compatible = "rockchip,gpio-bank";
2024                         reg = <0x0 0xff788000 0x0 0x100>;
2025                         clocks = <&cru PCLK_GPIO3>;
2026                         interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
2027
2028                         gpio-controller;
2029                         #gpio-cells = <0x2>;
2030
2031                         interrupt-controller;
2032                         #interrupt-cells = <0x2>;
2033                 };
2034
2035                 gpio4: gpio4@ff790000 {
2036                         compatible = "rockchip,gpio-bank";
2037                         reg = <0x0 0xff790000 0x0 0x100>;
2038                         clocks = <&cru PCLK_GPIO4>;
2039                         interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
2040
2041                         gpio-controller;
2042                         #gpio-cells = <0x2>;
2043
2044                         interrupt-controller;
2045                         #interrupt-cells = <0x2>;
2046                 };
2047
2048                 pcfg_pull_up: pcfg-pull-up {
2049                         bias-pull-up;
2050                 };
2051
2052                 pcfg_pull_down: pcfg-pull-down {
2053                         bias-pull-down;
2054                 };
2055
2056                 pcfg_pull_none: pcfg-pull-none {
2057                         bias-disable;
2058                 };
2059
2060                 pcfg_pull_up_20ma: pcfg-pull-up-20ma {
2061                         bias-pull-up;
2062                         drive-strength = <20>;
2063                 };
2064
2065                 pcfg_pull_none_20ma: pcfg-pull-none-20ma {
2066                         bias-disable;
2067                         drive-strength = <20>;
2068                 };
2069
2070                 pcfg_pull_none_18ma: pcfg-pull-none-18ma {
2071                         bias-disable;
2072                         drive-strength = <18>;
2073                 };
2074
2075                 pcfg_pull_none_12ma: pcfg-pull-none-12ma {
2076                         bias-disable;
2077                         drive-strength = <12>;
2078                 };
2079
2080                 pcfg_pull_up_8ma: pcfg-pull-up-8ma {
2081                         bias-pull-up;
2082                         drive-strength = <8>;
2083                 };
2084
2085                 pcfg_pull_down_4ma: pcfg-pull-down-4ma {
2086                         bias-pull-down;
2087                         drive-strength = <4>;
2088                 };
2089
2090                 pcfg_pull_up_2ma: pcfg-pull-up-2ma {
2091                         bias-pull-up;
2092                         drive-strength = <2>;
2093                 };
2094
2095                 pcfg_pull_down_12ma: pcfg-pull-down-12ma {
2096                         bias-pull-down;
2097                         drive-strength = <12>;
2098                 };
2099
2100                 pcfg_pull_none_13ma: pcfg-pull-none-13ma {
2101                         bias-disable;
2102                         drive-strength = <13>;
2103                 };
2104
2105                 pcfg_output_high: pcfg-output-high {
2106                         output-high;
2107                 };
2108
2109                 pcfg_output_low: pcfg-output-low {
2110                         output-low;
2111                 };
2112
2113                 pcfg_input: pcfg-input {
2114                         input-enable;
2115                 };
2116
2117                 emmc {
2118                         emmc_pwr: emmc-pwr {
2119                                 rockchip,pins =
2120                                         <0 5 RK_FUNC_1 &pcfg_pull_up>;
2121                         };
2122                 };
2123
2124                 gmac {
2125                         rgmii_pins: rgmii-pins {
2126                                 rockchip,pins =
2127                                         /* mac_txclk */
2128                                         <3 17 RK_FUNC_1 &pcfg_pull_none_13ma>,
2129                                         /* mac_rxclk */
2130                                         <3 14 RK_FUNC_1 &pcfg_pull_none>,
2131                                         /* mac_mdio */
2132                                         <3 13 RK_FUNC_1 &pcfg_pull_none>,
2133                                         /* mac_txen */
2134                                         <3 12 RK_FUNC_1 &pcfg_pull_none_13ma>,
2135                                         /* mac_clk */
2136                                         <3 11 RK_FUNC_1 &pcfg_pull_none>,
2137                                         /* mac_rxdv */
2138                                         <3 9 RK_FUNC_1 &pcfg_pull_none>,
2139                                         /* mac_mdc */
2140                                         <3 8 RK_FUNC_1 &pcfg_pull_none>,
2141                                         /* mac_rxd1 */
2142                                         <3 7 RK_FUNC_1 &pcfg_pull_none>,
2143                                         /* mac_rxd0 */
2144                                         <3 6 RK_FUNC_1 &pcfg_pull_none>,
2145                                         /* mac_txd1 */
2146                                         <3 5 RK_FUNC_1 &pcfg_pull_none_13ma>,
2147                                         /* mac_txd0 */
2148                                         <3 4 RK_FUNC_1 &pcfg_pull_none_13ma>,
2149                                         /* mac_rxd3 */
2150                                         <3 3 RK_FUNC_1 &pcfg_pull_none>,
2151                                         /* mac_rxd2 */
2152                                         <3 2 RK_FUNC_1 &pcfg_pull_none>,
2153                                         /* mac_txd3 */
2154                                         <3 1 RK_FUNC_1 &pcfg_pull_none_13ma>,
2155                                         /* mac_txd2 */
2156                                         <3 0 RK_FUNC_1 &pcfg_pull_none_13ma>;
2157                         };
2158
2159                         rmii_pins: rmii-pins {
2160                                 rockchip,pins =
2161                                         /* mac_mdio */
2162                                         <3 13 RK_FUNC_1 &pcfg_pull_none>,
2163                                         /* mac_txen */
2164                                         <3 12 RK_FUNC_1 &pcfg_pull_none_13ma>,
2165                                         /* mac_clk */
2166                                         <3 11 RK_FUNC_1 &pcfg_pull_none>,
2167                                         /* mac_rxer */
2168                                         <3 10 RK_FUNC_1 &pcfg_pull_none>,
2169                                         /* mac_rxdv */
2170                                         <3 9 RK_FUNC_1 &pcfg_pull_none>,
2171                                         /* mac_mdc */
2172                                         <3 8 RK_FUNC_1 &pcfg_pull_none>,
2173                                         /* mac_rxd1 */
2174                                         <3 7 RK_FUNC_1 &pcfg_pull_none>,
2175                                         /* mac_rxd0 */
2176                                         <3 6 RK_FUNC_1 &pcfg_pull_none>,
2177                                         /* mac_txd1 */
2178                                         <3 5 RK_FUNC_1 &pcfg_pull_none_13ma>,
2179                                         /* mac_txd0 */
2180                                         <3 4 RK_FUNC_1 &pcfg_pull_none_13ma>;
2181                         };
2182                 };
2183
2184                 i2c0 {
2185                         i2c0_xfer: i2c0-xfer {
2186                                 rockchip,pins =
2187                                         <1 15 RK_FUNC_2 &pcfg_pull_none>,
2188                                         <1 16 RK_FUNC_2 &pcfg_pull_none>;
2189                         };
2190                 };
2191
2192                 i2c1 {
2193                         i2c1_xfer: i2c1-xfer {
2194                                 rockchip,pins =
2195                                         <4 2 RK_FUNC_1 &pcfg_pull_none>,
2196                                         <4 1 RK_FUNC_1 &pcfg_pull_none>;
2197                         };
2198                 };
2199
2200                 i2c2 {
2201                         i2c2_xfer: i2c2-xfer {
2202                                 rockchip,pins =
2203                                         <2 1 RK_FUNC_2 &pcfg_pull_none_12ma>,
2204                                         <2 0 RK_FUNC_2 &pcfg_pull_none_12ma>;
2205                         };
2206                 };
2207
2208                 i2c3 {
2209                         i2c3_xfer: i2c3-xfer {
2210                                 rockchip,pins =
2211                                         <4 17 RK_FUNC_1 &pcfg_pull_none>,
2212                                         <4 16 RK_FUNC_1 &pcfg_pull_none>;
2213                         };
2214
2215                         i2c3_gpio: i2c3_gpio {
2216                                 rockchip,pins =
2217                                         <4 17 RK_FUNC_GPIO &pcfg_pull_none>,
2218                                         <4 16 RK_FUNC_GPIO &pcfg_pull_none>;
2219                         };
2220
2221                 };
2222
2223                 i2c4 {
2224                         i2c4_xfer: i2c4-xfer {
2225                                 rockchip,pins =
2226                                         <1 12 RK_FUNC_1 &pcfg_pull_none>,
2227                                         <1 11 RK_FUNC_1 &pcfg_pull_none>;
2228                         };
2229                 };
2230
2231                 i2c5 {
2232                         i2c5_xfer: i2c5-xfer {
2233                                 rockchip,pins =
2234                                         <3 11 RK_FUNC_2 &pcfg_pull_none>,
2235                                         <3 10 RK_FUNC_2 &pcfg_pull_none>;
2236                         };
2237                 };
2238
2239                 i2c6 {
2240                         i2c6_xfer: i2c6-xfer {
2241                                 rockchip,pins =
2242                                         <2 10 RK_FUNC_2 &pcfg_pull_none>,
2243                                         <2 9 RK_FUNC_2 &pcfg_pull_none>;
2244                         };
2245                 };
2246
2247                 i2c7 {
2248                         i2c7_xfer: i2c7-xfer {
2249                                 rockchip,pins =
2250                                         <2 8 RK_FUNC_2 &pcfg_pull_none>,
2251                                         <2 7 RK_FUNC_2 &pcfg_pull_none>;
2252                         };
2253                 };
2254
2255                 i2c8 {
2256                         i2c8_xfer: i2c8-xfer {
2257                                 rockchip,pins =
2258                                         <1 21 RK_FUNC_1 &pcfg_pull_none>,
2259                                         <1 20 RK_FUNC_1 &pcfg_pull_none>;
2260                         };
2261                 };
2262
2263                 i2s0 {
2264                         i2s0_8ch_bus: i2s0-8ch-bus {
2265                                 rockchip,pins =
2266                                         <3 24 RK_FUNC_1 &pcfg_pull_none>,
2267                                         <3 25 RK_FUNC_1 &pcfg_pull_none>,
2268                                         <3 26 RK_FUNC_1 &pcfg_pull_none>,
2269                                         <3 27 RK_FUNC_1 &pcfg_pull_none>,
2270                                         <3 28 RK_FUNC_1 &pcfg_pull_none>,
2271                                         <3 29 RK_FUNC_1 &pcfg_pull_none>,
2272                                         <3 30 RK_FUNC_1 &pcfg_pull_none>,
2273                                         <3 31 RK_FUNC_1 &pcfg_pull_none>,
2274                                         <4 0 RK_FUNC_1 &pcfg_pull_none>;
2275                         };
2276                 };
2277
2278                 i2s1 {
2279                         i2s1_2ch_bus: i2s1-2ch-bus {
2280                                 rockchip,pins =
2281                                         <4 3 RK_FUNC_1 &pcfg_pull_none>,
2282                                         <4 4 RK_FUNC_1 &pcfg_pull_none>,
2283                                         <4 5 RK_FUNC_1 &pcfg_pull_none>,
2284                                         <4 6 RK_FUNC_1 &pcfg_pull_none>,
2285                                         <4 7 RK_FUNC_1 &pcfg_pull_none>;
2286                         };
2287                 };
2288
2289                 sdio0 {
2290                         sdio0_bus1: sdio0-bus1 {
2291                                 rockchip,pins =
2292                                         <2 20 RK_FUNC_1 &pcfg_pull_up>;
2293                         };
2294
2295                         sdio0_bus4: sdio0-bus4 {
2296                                 rockchip,pins =
2297                                         <2 20 RK_FUNC_1 &pcfg_pull_up>,
2298                                         <2 21 RK_FUNC_1 &pcfg_pull_up>,
2299                                         <2 22 RK_FUNC_1 &pcfg_pull_up>,
2300                                         <2 23 RK_FUNC_1 &pcfg_pull_up>;
2301                         };
2302
2303                         sdio0_cmd: sdio0-cmd {
2304                                 rockchip,pins =
2305                                         <2 24 RK_FUNC_1 &pcfg_pull_up>;
2306                         };
2307
2308                         sdio0_clk: sdio0-clk {
2309                                 rockchip,pins =
2310                                         <2 25 RK_FUNC_1 &pcfg_pull_none>;
2311                         };
2312
2313                         sdio0_cd: sdio0-cd {
2314                                 rockchip,pins =
2315                                         <2 26 RK_FUNC_1 &pcfg_pull_up>;
2316                         };
2317
2318                         sdio0_pwr: sdio0-pwr {
2319                                 rockchip,pins =
2320                                         <2 27 RK_FUNC_1 &pcfg_pull_up>;
2321                         };
2322
2323                         sdio0_bkpwr: sdio0-bkpwr {
2324                                 rockchip,pins =
2325                                         <2 28 RK_FUNC_1 &pcfg_pull_up>;
2326                         };
2327
2328                         sdio0_wp: sdio0-wp {
2329                                 rockchip,pins =
2330                                         <0 3 RK_FUNC_1 &pcfg_pull_up>;
2331                         };
2332
2333                         sdio0_int: sdio0-int {
2334                                 rockchip,pins =
2335                                         <0 4 RK_FUNC_1 &pcfg_pull_up>;
2336                         };
2337                 };
2338
2339                 sdmmc {
2340                         sdmmc_bus1: sdmmc-bus1 {
2341                                 rockchip,pins =
2342                                         <4 8 RK_FUNC_1 &pcfg_pull_up>;
2343                         };
2344
2345                         sdmmc_bus4: sdmmc-bus4 {
2346                                 rockchip,pins =
2347                                         <4 8 RK_FUNC_1 &pcfg_pull_up>,
2348                                         <4 9 RK_FUNC_1 &pcfg_pull_up>,
2349                                         <4 10 RK_FUNC_1 &pcfg_pull_up>,
2350                                         <4 11 RK_FUNC_1 &pcfg_pull_up>;
2351                         };
2352
2353                         sdmmc_clk: sdmmc-clk {
2354                                 rockchip,pins =
2355                                         <4 12 RK_FUNC_1 &pcfg_pull_none>;
2356                         };
2357
2358                         sdmmc_cmd: sdmmc-cmd {
2359                                 rockchip,pins =
2360                                         <4 13 RK_FUNC_1 &pcfg_pull_up>;
2361                         };
2362
2363                         sdmmc_cd: sdmcc-cd {
2364                                 rockchip,pins =
2365                                         <0 7 RK_FUNC_1 &pcfg_pull_up>;
2366                         };
2367
2368                         sdmmc_wp: sdmmc-wp {
2369                                 rockchip,pins =
2370                                         <0 8 RK_FUNC_1 &pcfg_pull_up>;
2371                         };
2372                 };
2373
2374                 spdif {
2375                         spdif_bus: spdif-bus {
2376                                 rockchip,pins =
2377                                         <4 21 RK_FUNC_1 &pcfg_pull_none>;
2378                         };
2379
2380                         spdif_bus_1: spdif-bus-1 {
2381                                 rockchip,pins =
2382                                         <3 16 RK_FUNC_3 &pcfg_pull_none>;
2383                         };
2384                 };
2385
2386                 spi0 {
2387                         spi0_clk: spi0-clk {
2388                                 rockchip,pins =
2389                                         <3 6 RK_FUNC_2 &pcfg_pull_up>;
2390                         };
2391                         spi0_cs0: spi0-cs0 {
2392                                 rockchip,pins =
2393                                         <3 7 RK_FUNC_2 &pcfg_pull_up>;
2394                         };
2395                         spi0_cs1: spi0-cs1 {
2396                                 rockchip,pins =
2397                                         <3 8 RK_FUNC_2 &pcfg_pull_up>;
2398                         };
2399                         spi0_tx: spi0-tx {
2400                                 rockchip,pins =
2401                                         <3 5 RK_FUNC_2 &pcfg_pull_up>;
2402                         };
2403                         spi0_rx: spi0-rx {
2404                                 rockchip,pins =
2405                                         <3 4 RK_FUNC_2 &pcfg_pull_up>;
2406                         };
2407                 };
2408
2409                 spi1 {
2410                         spi1_clk: spi1-clk {
2411                                 rockchip,pins =
2412                                         <1 9 RK_FUNC_2 &pcfg_pull_up>;
2413                         };
2414                         spi1_cs0: spi1-cs0 {
2415                                 rockchip,pins =
2416                                         <1 10 RK_FUNC_2 &pcfg_pull_up>;
2417                         };
2418                         spi1_rx: spi1-rx {
2419                                 rockchip,pins =
2420                                         <1 7 RK_FUNC_2 &pcfg_pull_up>;
2421                         };
2422                         spi1_tx: spi1-tx {
2423                                 rockchip,pins =
2424                                         <1 8 RK_FUNC_2 &pcfg_pull_up>;
2425                         };
2426                 };
2427
2428                 spi2 {
2429                         spi2_clk: spi2-clk {
2430                                 rockchip,pins =
2431                                         <2 11 RK_FUNC_1 &pcfg_pull_up>;
2432                         };
2433                         spi2_cs0: spi2-cs0 {
2434                                 rockchip,pins =
2435                                         <2 12 RK_FUNC_1 &pcfg_pull_up>;
2436                         };
2437                         spi2_rx: spi2-rx {
2438                                 rockchip,pins =
2439                                         <2 9 RK_FUNC_1 &pcfg_pull_up>;
2440                         };
2441                         spi2_tx: spi2-tx {
2442                                 rockchip,pins =
2443                                         <2 10 RK_FUNC_1 &pcfg_pull_up>;
2444                         };
2445                 };
2446
2447                 spi3 {
2448                         spi3_clk: spi3-clk {
2449                                 rockchip,pins =
2450                                         <1 17 RK_FUNC_1 &pcfg_pull_up>;
2451                         };
2452                         spi3_cs0: spi3-cs0 {
2453                                 rockchip,pins =
2454                                         <1 18 RK_FUNC_1 &pcfg_pull_up>;
2455                         };
2456                         spi3_rx: spi3-rx {
2457                                 rockchip,pins =
2458                                         <1 15 RK_FUNC_1 &pcfg_pull_up>;
2459                         };
2460                         spi3_tx: spi3-tx {
2461                                 rockchip,pins =
2462                                         <1 16 RK_FUNC_1 &pcfg_pull_up>;
2463                         };
2464                 };
2465
2466                 spi4 {
2467                         spi4_clk: spi4-clk {
2468                                 rockchip,pins =
2469                                         <3 2 RK_FUNC_2 &pcfg_pull_up>;
2470                         };
2471                         spi4_cs0: spi4-cs0 {
2472                                 rockchip,pins =
2473                                         <3 3 RK_FUNC_2 &pcfg_pull_up>;
2474                         };
2475                         spi4_rx: spi4-rx {
2476                                 rockchip,pins =
2477                                         <3 0 RK_FUNC_2 &pcfg_pull_up>;
2478                         };
2479                         spi4_tx: spi4-tx {
2480                                 rockchip,pins =
2481                                         <3 1 RK_FUNC_2 &pcfg_pull_up>;
2482                         };
2483                 };
2484
2485                 spi5 {
2486                         spi5_clk: spi5-clk {
2487                                 rockchip,pins =
2488                                         <2 22 RK_FUNC_2 &pcfg_pull_up>;
2489                         };
2490                         spi5_cs0: spi5-cs0 {
2491                                 rockchip,pins =
2492                                         <2 23 RK_FUNC_2 &pcfg_pull_up>;
2493                         };
2494                         spi5_rx: spi5-rx {
2495                                 rockchip,pins =
2496                                         <2 20 RK_FUNC_2 &pcfg_pull_up>;
2497                         };
2498                         spi5_tx: spi5-tx {
2499                                 rockchip,pins =
2500                                         <2 21 RK_FUNC_2 &pcfg_pull_up>;
2501                         };
2502                 };
2503
2504                 tsadc {
2505                         otp_gpio: otp-gpio {
2506                                 rockchip,pins = <1 6 RK_FUNC_GPIO &pcfg_pull_none>;
2507                         };
2508
2509                         otp_out: otp-out {
2510                                 rockchip,pins = <1 6 RK_FUNC_1 &pcfg_pull_none>;
2511                         };
2512                 };
2513
2514                 uart0 {
2515                         uart0_xfer: uart0-xfer {
2516                                 rockchip,pins =
2517                                         <2 16 RK_FUNC_1 &pcfg_pull_up>,
2518                                         <2 17 RK_FUNC_1 &pcfg_pull_none>;
2519                         };
2520
2521                         uart0_cts: uart0-cts {
2522                                 rockchip,pins =
2523                                         <2 18 RK_FUNC_1 &pcfg_pull_none>;
2524                         };
2525
2526                         uart0_rts: uart0-rts {
2527                                 rockchip,pins =
2528                                         <2 19 RK_FUNC_1 &pcfg_pull_none>;
2529                         };
2530                 };
2531
2532                 uart1 {
2533                         uart1_xfer: uart1-xfer {
2534                                 rockchip,pins =
2535                                         <3 12 RK_FUNC_2 &pcfg_pull_up>,
2536                                         <3 13 RK_FUNC_2 &pcfg_pull_none>;
2537                         };
2538                 };
2539
2540                 uart2a {
2541                         uart2a_xfer: uart2a-xfer {
2542                                 rockchip,pins =
2543                                         <4 8 RK_FUNC_2 &pcfg_pull_up>,
2544                                         <4 9 RK_FUNC_2 &pcfg_pull_none>;
2545                         };
2546                 };
2547
2548                 uart2b {
2549                         uart2b_xfer: uart2b-xfer {
2550                                 rockchip,pins =
2551                                         <4 16 RK_FUNC_2 &pcfg_pull_up>,
2552                                         <4 17 RK_FUNC_2 &pcfg_pull_none>;
2553                         };
2554                 };
2555
2556                 uart2c {
2557                         uart2c_xfer: uart2c-xfer {
2558                                 rockchip,pins =
2559                                         <4 19 RK_FUNC_1 &pcfg_pull_up>,
2560                                         <4 20 RK_FUNC_1 &pcfg_pull_none>;
2561                         };
2562                 };
2563
2564                 uart3 {
2565                         uart3_xfer: uart3-xfer {
2566                                 rockchip,pins =
2567                                         <3 14 RK_FUNC_2 &pcfg_pull_up>,
2568                                         <3 15 RK_FUNC_2 &pcfg_pull_none>;
2569                         };
2570
2571                         uart3_cts: uart3-cts {
2572                                 rockchip,pins =
2573                                         <3 18 RK_FUNC_2 &pcfg_pull_none>;
2574                         };
2575
2576                         uart3_rts: uart3-rts {
2577                                 rockchip,pins =
2578                                         <3 19 RK_FUNC_2 &pcfg_pull_none>;
2579                         };
2580                 };
2581
2582                 uart4 {
2583                         uart4_xfer: uart4-xfer {
2584                                 rockchip,pins =
2585                                         <1 7 RK_FUNC_1 &pcfg_pull_up>,
2586                                         <1 8 RK_FUNC_1 &pcfg_pull_none>;
2587                         };
2588                 };
2589
2590                 uarthdcp {
2591                         uarthdcp_xfer: uarthdcp-xfer {
2592                                 rockchip,pins =
2593                                         <4 21 RK_FUNC_2 &pcfg_pull_up>,
2594                                         <4 22 RK_FUNC_2 &pcfg_pull_none>;
2595                         };
2596                 };
2597
2598                 pwm0 {
2599                         pwm0_pin: pwm0-pin {
2600                                 rockchip,pins =
2601                                         <4 18 RK_FUNC_1 &pcfg_pull_none>;
2602                         };
2603
2604                         vop0_pwm_pin: vop0-pwm-pin {
2605                                 rockchip,pins =
2606                                         <4 18 RK_FUNC_2 &pcfg_pull_none>;
2607                         };
2608                 };
2609
2610                 pwm1 {
2611                         pwm1_pin: pwm1-pin {
2612                                 rockchip,pins =
2613                                         <4 22 RK_FUNC_1 &pcfg_pull_none>;
2614                         };
2615
2616                         vop1_pwm_pin: vop1-pwm-pin {
2617                                 rockchip,pins =
2618                                         <4 18 RK_FUNC_3 &pcfg_pull_none>;
2619                         };
2620                 };
2621
2622                 pwm2 {
2623                         pwm2_pin: pwm2-pin {
2624                                 rockchip,pins =
2625                                         <1 19 RK_FUNC_1 &pcfg_pull_none>;
2626                         };
2627                 };
2628
2629                 pwm3a {
2630                         pwm3a_pin: pwm3a-pin {
2631                                 rockchip,pins =
2632                                         <0 6 RK_FUNC_1 &pcfg_pull_none>;
2633                         };
2634                 };
2635
2636                 pwm3b {
2637                         pwm3b_pin: pwm3b-pin {
2638                                 rockchip,pins =
2639                                         <1 14 RK_FUNC_1 &pcfg_pull_none>;
2640                         };
2641                 };
2642
2643                 edp {
2644                         edp_hpd: edp-hpd {
2645                                 rockchip,pins =
2646                                         <4 23 RK_FUNC_2 &pcfg_pull_none>;
2647                         };
2648                 };
2649
2650                 hdmi {
2651                         hdmi_i2c_xfer: hdmi-i2c-xfer {
2652                                 rockchip,pins =
2653                                         <4 17 RK_FUNC_3 &pcfg_pull_none>,
2654                                         <4 16 RK_FUNC_3 &pcfg_pull_none>;
2655                         };
2656
2657                         hdmi_cec: hdmi-cec {
2658                                 rockchip,pins =
2659                                         <4 23 RK_FUNC_1 &pcfg_pull_none>;
2660                         };
2661                 };
2662
2663                 pcie {
2664                         pcie_clkreqn: pci-clkreqn {
2665                                 rockchip,pins =
2666                                         <2 26 RK_FUNC_2 &pcfg_pull_none>;
2667                         };
2668
2669                         pcie_clkreqnb: pci-clkreqnb {
2670                                 rockchip,pins =
2671                                         <4 24 RK_FUNC_1 &pcfg_pull_none>;
2672                         };
2673
2674                         pcie_clkreqn_cpm: pci-clkreqn-cpm {
2675                                 /*
2676                                  * Since our pcie doesn't support
2677                                  * ClockPM(CPM), we want to hack this as
2678                                  * gpio, so the EP could be able to
2679                                  * de-assert it along and make ClockPM(CPM)
2680                                  * work.
2681                                  */
2682                                 rockchip,pins =
2683                                         <2 26 RK_FUNC_GPIO &pcfg_pull_none>;
2684                         };
2685
2686                         pcie_clkreqnb_cpm: pci-clkreqnb-cpm {
2687                                 rockchip,pins =
2688                                         <4 24 RK_FUNC_GPIO &pcfg_pull_none>;
2689                         };
2690                 };
2691         };
2692
2693         rockchip_suspend: rockchip-suspend {
2694                 compatible = "rockchip,pm-rk3399";
2695                 status = "disabled";
2696                 rockchip,sleep-debug-en = <0>;
2697                 rockchip,virtual-poweroff = <0>;
2698                 rockchip,sleep-mode-config = <
2699                         (0
2700                         | RKPM_SLP_ARMPD
2701                         | RKPM_SLP_PERILPPD
2702                         | RKPM_SLP_DDR_RET
2703                         | RKPM_SLP_PLLPD
2704                         | RKPM_SLP_OSC_DIS
2705                         | RKPM_SLP_CENTER_PD
2706                         | RKPM_SLP_AP_PWROFF
2707                         )
2708                 >;
2709                 rockchip,wakeup-config = <
2710                         (0
2711                         | RKPM_GPIO_WKUP_EN
2712                         )
2713                 >;
2714         };
2715 };