blob: 3253c6403413423fa2f71473d5e3811566dc7190 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Kever Yange43e7392017-11-28 16:04:15 +08002/*
3 * (C) Copyright 2017 Rockchip Electronics Co., Ltd
Kever Yange43e7392017-11-28 16:04:15 +08004 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include <dt-bindings/clock/rk3128-cru.h>
Kever Yange43e7392017-11-28 16:04:15 +080011
12/ {
13 compatible = "rockchip,rk3128";
14 rockchip,sram = <&sram>;
15 interrupt-parent = <&gic>;
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 gpio0 = &gpio0;
21 gpio1 = &gpio1;
22 gpio2 = &gpio2;
23 gpio3 = &gpio3;
24 i2c0 = &i2c0;
25 i2c1 = &i2c1;
26 i2c2 = &i2c2;
27 i2c3 = &i2c3;
28 spi0 = &spi0;
29 serial0 = &uart0;
30 serial1 = &uart1;
31 serial2 = &uart2;
32 mmc0 = &emmc;
33 mmc1 = &sdmmc;
34 };
35
Kever Yange43e7392017-11-28 16:04:15 +080036 arm-pmu {
37 compatible = "arm,cortex-a7-pmu";
38 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
39 <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
40 <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
41 <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
42 };
43
44 cpus {
45 #address-cells = <1>;
46 #size-cells = <0>;
47 enable-method = "rockchip,rk3128-smp";
48
Johan Jonker1f288232022-09-09 22:19:24 +020049 cpu0: cpu@0 {
Kever Yange43e7392017-11-28 16:04:15 +080050 device_type = "cpu";
51 compatible = "arm,cortex-a7";
Johan Jonker1f288232022-09-09 22:19:24 +020052 reg = <0x0>;
Kever Yange43e7392017-11-28 16:04:15 +080053 operating-points = <
54 /* KHz uV */
55 816000 1000000
56 >;
57 #cooling-cells = <2>; /* min followed by max */
58 clock-latency = <40000>;
59 clocks = <&cru ARMCLK>;
60 };
61
Johan Jonker1f288232022-09-09 22:19:24 +020062 cpu1: cpu@1 {
Kever Yange43e7392017-11-28 16:04:15 +080063 device_type = "cpu";
64 compatible = "arm,cortex-a7";
Johan Jonker1f288232022-09-09 22:19:24 +020065 reg = <0x1>;
Kever Yange43e7392017-11-28 16:04:15 +080066 };
67
Johan Jonker1f288232022-09-09 22:19:24 +020068 cpu2: cpu@2 {
Kever Yange43e7392017-11-28 16:04:15 +080069 device_type = "cpu";
70 compatible = "arm,cortex-a7";
Johan Jonker1f288232022-09-09 22:19:24 +020071 reg = <0x2>;
Kever Yange43e7392017-11-28 16:04:15 +080072 };
73
Johan Jonker1f288232022-09-09 22:19:24 +020074 cpu3: cpu@3 {
Kever Yange43e7392017-11-28 16:04:15 +080075 device_type = "cpu";
76 compatible = "arm,cortex-a7";
Johan Jonker1f288232022-09-09 22:19:24 +020077 reg = <0x3>;
Kever Yange43e7392017-11-28 16:04:15 +080078 };
79 };
80
81 cpu_axi_bus: cpu_axi_bus {
82 compatible = "rockchip,cpu_axi_bus";
83 #address-cells = <1>;
84 #size-cells = <1>;
85 ranges;
86
87 qos {
88 #address-cells = <1>;
89 #size-cells = <1>;
90 ranges;
91
92 crypto {
93 reg = <0x10128080 0x20>;
94 };
95
96 core {
97 reg = <0x1012a000 0x20>;
98 };
99
100 peri {
101 reg = <0x1012c000 0x20>;
102 };
103
104 gpu {
105 reg = <0x1012d000 0x20>;
106 };
107
108 vpu {
109 reg = <0x1012e000 0x20>;
110 };
111
112 rga {
113 reg = <0x1012f000 0x20>;
114 };
115 ebc {
116 reg = <0x1012f080 0x20>;
117 };
118
119 iep {
120 reg = <0x1012f100 0x20>;
121 };
122
123 lcdc {
124 reg = <0x1012f180 0x20>;
125 rockchip,priority = <3 3>;
126 };
127
128 vip {
129 reg = <0x1012f200 0x20>;
130 rockchip,priority = <3 3>;
131 };
132 };
133
134 msch {
135 #address-cells = <1>;
136 #size-cells = <1>;
137 ranges;
138
139 msch@10128000 {
140 reg = <0x10128000 0x20>;
141 rockchip,read-latency = <0x3f>;
142 };
143 };
144 };
145
146 psci {
147 compatible = "arm,psci";
148 method = "smc";
149 cpu_suspend = <0x84000001>;
150 cpu_off = <0x84000002>;
151 cpu_on = <0x84000003>;
152 migrate = <0x84000005>;
153 };
154
155 amba {
156 compatible = "arm,amba-bus";
157 #address-cells = <1>;
158 #size-cells = <1>;
159 interrupt-parent = <&gic>;
160 ranges;
161
Johan Jonker1f288232022-09-09 22:19:24 +0200162 pdma: dma-controller@20078000 {
Kever Yange43e7392017-11-28 16:04:15 +0800163 compatible = "arm,pl330", "arm,primecell";
164 reg = <0x20078000 0x4000>;
165 arm,pl330-broken-no-flushp;//2
166 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
167 <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
168 #dma-cells = <1>;
Johan Jonker9d3bfc32022-09-09 22:18:45 +0200169 clocks = <&cru ACLK_DMAC>;
Kever Yange43e7392017-11-28 16:04:15 +0800170 clock-names = "apb_pclk";
171 };
172 };
173
174 xin24m: xin24m {
175 compatible = "fixed-clock";
176 clock-frequency = <24000000>;
177 clock-output-names = "xin24m";
178 #clock-cells = <0>;
179 };
180
181 xin12m: xin12m {
182 compatible = "fixed-clock";
Kever Yange43e7392017-11-28 16:04:15 +0800183 clock-frequency = <12000000>;
184 clock-output-names = "xin12m";
185 #clock-cells = <0>;
186 };
187
188 timer {
189 compatible = "arm,armv7-timer";
190 arm,cpu-registers-not-fw-configured;
191 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
192 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
193 clock-frequency = <24000000>;
194 };
195
196 timer@20044000 {
197 compatible = "arm,armv7-timer";
198 reg = <0x20044000 0xb8>;
199 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
200 rockchip,broadcast = <1>;
201 };
202
Johan Jonker1f288232022-09-09 22:19:24 +0200203 watchdog: watchdog@2004c000 {
Johan Jonker7698dc42022-09-09 22:20:07 +0200204 compatible = "rockchip,rk3128-wdt", "snps,dw-wdt";
Kever Yange43e7392017-11-28 16:04:15 +0800205 reg = <0x2004c000 0x100>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200206 clocks = <&cru PCLK_WDT>;
Kever Yange43e7392017-11-28 16:04:15 +0800207 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
208 rockchip,irq = <1>;
209 rockchip,timeout = <60>;
210 rockchip,atboot = <1>;
211 rockchip,debug = <0>;
212 };
213
214 reset: reset@20000110 {
215 compatible = "rockchip,reset";
216 reg = <0x20000110 0x24>;
217 #reset-cells = <1>;
218 };
219
Johan Jonker1f288232022-09-09 22:19:24 +0200220 nandc: nand-controller@10500000 {
Johan Jonker7698dc42022-09-09 22:20:07 +0200221 compatible = "rockchip,rk3128-nfc", "rockchip,rk2928-nfc";
Kever Yange43e7392017-11-28 16:04:15 +0800222 reg = <0x10500000 0x4000>;
223 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
224 pinctrl-names = "default";
225 pinctrl-0 = <&nandc_ale &nandc_cle &nandc_wrn &nandc_rdn &nandc_rdy &nandc_cs0 &nandc_data>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200226 clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>;
227 clock-names = "ahb", "nfc";
Kever Yange43e7392017-11-28 16:04:15 +0800228 };
229
Kever Yange43e7392017-11-28 16:04:15 +0800230 cru: clock-controller@20000000 {
Kever Yange43e7392017-11-28 16:04:15 +0800231 compatible = "rockchip,rk3128-cru";
232 reg = <0x20000000 0x1000>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200233 clocks = <&xin24m>;
234 clock-names = "xin24m";
Kever Yange43e7392017-11-28 16:04:15 +0800235 rockchip,grf = <&grf>;
236 #clock-cells = <1>;
237 #reset-cells = <1>;
238 assigned-clocks = <&cru PLL_GPLL>;
239 assigned-clock-rates = <594000000>;
240 };
241
Johan Jonker1f288232022-09-09 22:19:24 +0200242 uart0: serial@20060000 {
Kever Yange43e7392017-11-28 16:04:15 +0800243 compatible = "rockchip,rk3128-uart", "snps,dw-apb-uart";
244 reg = <0x20060000 0x100>;
245 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
246 reg-shift = <2>;
247 reg-io-width = <4>;
248 clock-frequency = <24000000>;
249 clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
250 clock-names = "baudclk", "apb_pclk";
251 pinctrl-names = "default";
252 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
253 dmas = <&pdma 2>, <&pdma 3>;
254 #dma-cells = <2>;
255 };
256
Johan Jonker1f288232022-09-09 22:19:24 +0200257 uart1: serial@20064000 {
Kever Yange43e7392017-11-28 16:04:15 +0800258 compatible = "rockchip,rk3128-uart", "snps,dw-apb-uart";
259 reg = <0x20064000 0x100>;
260 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
261 reg-shift = <2>;
262 reg-io-width = <4>;
263 clock-frequency = <24000000>;
264 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
265 clock-names = "baudclk", "apb_pclk";
266 pinctrl-names = "default";
267 pinctrl-0 = <&uart1_xfer>;
268 dmas = <&pdma 4>, <&pdma 5>;
269 #dma-cells = <2>;
270 };
271
Johan Jonker1f288232022-09-09 22:19:24 +0200272 uart2: serial@20068000 {
Kever Yange43e7392017-11-28 16:04:15 +0800273 compatible = "rockchip,rk3128-uart", "snps,dw-apb-uart";
274 reg = <0x20068000 0x100>;
275 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
276 reg-shift = <2>;
277 reg-io-width = <4>;
278 clock-frequency = <24000000>;
279 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
280 clock-names = "baudclk", "apb_pclk";
281 pinctrl-names = "default";
282 pinctrl-0 = <&uart2_xfer>;
283 dmas = <&pdma 6>, <&pdma 7>;
284 #dma-cells = <2>;
285 };
286
287 saradc: saradc@2006c000 {
288 compatible = "rockchip,saradc";
289 reg = <0x2006c000 0x100>;
290 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
291 #io-channel-cells = <1>;
292 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
293 clock-names = "saradc", "apb_pclk";
294 resets = <&cru SRST_SARADC>;
295 reset-names = "saradc-apb";
296 status = "disabled";
297 };
298
Johan Jonker1f288232022-09-09 22:19:24 +0200299 pwm0: pwm@20050000 {
Kever Yange43e7392017-11-28 16:04:15 +0800300 compatible = "rockchip,rk3128-pwm", "rockchip,rk3288-pwm";
301 reg = <0x20050000 0x10>;
Kever Yang32e49002018-01-16 16:08:18 +0800302 #pwm-cells = <3>;
Kever Yange43e7392017-11-28 16:04:15 +0800303 pinctrl-names = "default";
304 pinctrl-0 = <&pwm0_pin>;
305 clocks = <&cru PCLK_PWM>;
Kever Yange43e7392017-11-28 16:04:15 +0800306 };
307
Johan Jonker1f288232022-09-09 22:19:24 +0200308 pwm1: pwm@20050010 {
Kever Yange43e7392017-11-28 16:04:15 +0800309 compatible = "rockchip,rk3128-pwm", "rockchip,rk3288-pwm";
310 reg = <0x20050010 0x10>;
Kever Yang32e49002018-01-16 16:08:18 +0800311 #pwm-cells = <3>;
Kever Yange43e7392017-11-28 16:04:15 +0800312 pinctrl-names = "default";
313 pinctrl-0 = <&pwm1_pin>;
314 clocks = <&cru PCLK_PWM>;
Kever Yange43e7392017-11-28 16:04:15 +0800315 };
316
Johan Jonker1f288232022-09-09 22:19:24 +0200317 pwm2: pwm@20050020 {
Kever Yange43e7392017-11-28 16:04:15 +0800318 compatible = "rockchip,rk3128-pwm", "rockchip,rk3288-pwm";
319 reg = <0x20050020 0x10>;
Kever Yang32e49002018-01-16 16:08:18 +0800320 #pwm-cells = <3>;
Kever Yange43e7392017-11-28 16:04:15 +0800321 pinctrl-names = "default";
322 pinctrl-0 = <&pwm2_pin>;
323 clocks = <&cru PCLK_PWM>;
Kever Yange43e7392017-11-28 16:04:15 +0800324 };
325
Johan Jonker1f288232022-09-09 22:19:24 +0200326 pwm3: pwm@20050030 {
Kever Yange43e7392017-11-28 16:04:15 +0800327 compatible = "rockchip,rk3128-pwm", "rockchip,rk3288-pwm";
328 reg = <0x20050030 0x10>;
Kever Yang32e49002018-01-16 16:08:18 +0800329 #pwm-cells = <3>;
Kever Yange43e7392017-11-28 16:04:15 +0800330 pinctrl-names = "default";
331 pinctrl-0 = <&pwm3_pin>;
332 clocks = <&cru PCLK_PWM>;
Kever Yange43e7392017-11-28 16:04:15 +0800333 };
334
335 sram: sram@10080400 {
336 compatible = "rockchip,rk3128-smp-sram", "mmio-sram";
337 reg = <0x10080400 0x1C00>;
338 map-exec;
339 map-cacheable;
340 };
341
342 pmu: syscon@100a0000 {
343 compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd";
344 reg = <0x100a0000 0x1000>;
345 #address-cells = <1>;
346 #size-cells = <1>;
347 };
348
349 gic: interrupt-controller@10139000 {
350 compatible = "arm,gic-400";
351 interrupt-controller;
352 #interrupt-cells = <3>;
353 #address-cells = <0>;
354 reg = <0x10139000 0x1000>,
355 <0x1013a000 0x1000>,
356 <0x1013c000 0x2000>,
357 <0x1013e000 0x2000>;
358 interrupts = <GIC_PPI 9 0xf04>;
359 };
360
Johan Jonker7698dc42022-09-09 22:20:07 +0200361 u2phy: usb2phy {
Kever Yange43e7392017-11-28 16:04:15 +0800362 compatible = "rockchip,rk3128-usb2phy";
363 reg = <0x017c 0x0c>;
364 rockchip,grf = <&grf>;
365 clocks = <&cru SCLK_OTGPHY0>;
366 clock-names = "phyclk";
367 #clock-cells = <0>;
368 clock-output-names = "usb480m_phy";
Kever Yange43e7392017-11-28 16:04:15 +0800369 status = "disabled";
370
371 u2phy_otg: otg-port {
372 #phy-cells = <0>;
373 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
374 <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
375 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
376 interrupt-names = "otg-bvalid", "otg-id",
377 "linestate";
378 status = "disabled";
379 };
380
381 u2phy_host: host-port {
382 #phy-cells = <0>;
383 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
384 interrupt-names = "linestate";
385 status = "disabled";
386 };
387 };
388
389 usb_otg: usb@10180000 {
Johan Jonker7698dc42022-09-09 22:20:07 +0200390 compatible = "rockchip,rk3128-usb", "rockchip,rk3066-usb", "snps,dwc2";
Kever Yange43e7392017-11-28 16:04:15 +0800391 reg = <0x10180000 0x40000>;
392 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200393 clocks = <&cru HCLK_OTG>;
394 clock-names = "otg";
Kever Yange43e7392017-11-28 16:04:15 +0800395 dr_mode = "otg";
Johan Jonker7698dc42022-09-09 22:20:07 +0200396 phys = <&u2phy_otg>;
397 phy-names = "usb2-phy";
Kever Yange43e7392017-11-28 16:04:15 +0800398 status = "disabled";
399 };
400
401 usb_host_ehci: usb@101c0000 {
402 compatible = "generic-ehci";
403 reg = <0x101c0000 0x20000>;
404 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200405 phys = <&u2phy_host>;
Kever Yange43e7392017-11-28 16:04:15 +0800406 phy-names = "usb";
407 status = "disabled";
408 };
409
410 usb_host_ohci: usb@101e0000 {
411 compatible = "generic-ohci";
412 reg = <0x101e0000 0x20000>;
413 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200414 phys = <&u2phy_host>;
Kever Yange43e7392017-11-28 16:04:15 +0800415 phy-names = "usb";
416 status = "disabled";
417 };
418
Johan Jonker1f288232022-09-09 22:19:24 +0200419 sdmmc: mmc@10214000 {
Johan Jonker7698dc42022-09-09 22:20:07 +0200420 compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc";
Kever Yange43e7392017-11-28 16:04:15 +0800421 reg = <0x10214000 0x4000>;
422 max-frequency = <150000000>;
423 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
424 clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
425 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200426 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
Kever Yange43e7392017-11-28 16:04:15 +0800427 fifo-depth = <0x100>;
428 pinctrl-names = "default";
429 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
430 bus-width = <4>;
431 status = "disabled";
432 };
433
Johan Jonker1f288232022-09-09 22:19:24 +0200434 emmc: mmc@1021c000 {
Kever Yange43e7392017-11-28 16:04:15 +0800435 compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc";
436 reg = <0x1021c000 0x4000>;
437 max-frequency = <150000000>;
438 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
439 clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
440 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
Johan Jonker7698dc42022-09-09 22:20:07 +0200441 clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
Kever Yange43e7392017-11-28 16:04:15 +0800442 bus-width = <8>;
443 default-sample-phase = <158>;
444 num-slots = <1>;
445 fifo-depth = <0x100>;
446 pinctrl-names = "default";
447 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
448 resets = <&cru SRST_EMMC>;
449 reset-names = "reset";
450 status = "disabled";
451 };
452
Johan Jonker1f288232022-09-09 22:19:24 +0200453 i2c0: i2c@20072000 {
Kever Yange43e7392017-11-28 16:04:15 +0800454 compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c";
455 reg = <20072000 0x1000>;
456 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
457 #address-cells = <1>;
458 #size-cells = <0>;
459 clock-names = "i2c";
460 clocks = <&cru PCLK_I2C0>;
461 pinctrl-names = "default";
462 pinctrl-0 = <&i2c0_xfer>;
463 };
464
Johan Jonker1f288232022-09-09 22:19:24 +0200465 i2c1: i2c@20056000 {
Kever Yange43e7392017-11-28 16:04:15 +0800466 compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c";
467 reg = <0x20056000 0x1000>;
468 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
469 #address-cells = <1>;
470 #size-cells = <0>;
471 clock-names = "i2c";
472 clocks = <&cru PCLK_I2C1>;
473 pinctrl-names = "default";
474 pinctrl-0 = <&i2c1_xfer>;
475 };
476
Johan Jonker1f288232022-09-09 22:19:24 +0200477 i2c2: i2c@2005a000 {
Kever Yange43e7392017-11-28 16:04:15 +0800478 compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c";
479 reg = <0x2005a000 0x1000>;
480 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
481 #address-cells = <1>;
482 #size-cells = <0>;
483 clock-names = "i2c";
484 clocks = <&cru PCLK_I2C2>;
485 pinctrl-names = "default";
486 pinctrl-0 = <&i2c2_xfer>;
487 };
488
Johan Jonker1f288232022-09-09 22:19:24 +0200489 i2c3: i2c@2005e000 {
Kever Yange43e7392017-11-28 16:04:15 +0800490 compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c";
491 reg = <0x2005e000 0x1000>;
492 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
493 #address-cells = <1>;
494 #size-cells = <0>;
495 clock-names = "i2c";
496 clocks = <&cru PCLK_I2C3>;
497 pinctrl-names = "default";
498 pinctrl-0 = <&i2c3_xfer>;
499 };
500
501 spi0: spi@20074000 {
Johan Jonker7698dc42022-09-09 22:20:07 +0200502 compatible = "rockchip,rk3128-spi", "rockchip,rk3066-spi";
Kever Yange43e7392017-11-28 16:04:15 +0800503 reg = <0x20074000 0x1000>;
504 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
505 #address-cells = <1>;
506 #size-cells = <0>;
507 pinctrl-names = "default";
508 pinctrl-0 = <&spi0_txd_mux0 &spi0_rxd_mux0 &spi0_clk_mux0 &spi0_cs0_mux0 &spi0_cs1_mux0>;
509 rockchip,spi-src-clk = <0>;
510 num-cs = <2>;
Johan Jonker9d3bfc32022-09-09 22:18:45 +0200511 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
512 clock-names = "spiclk", "apb_pclk";
Kever Yange43e7392017-11-28 16:04:15 +0800513 dmas = <&pdma 8>, <&pdma 9>;
514 #dma-cells = <2>;
515 dma-names = "tx", "rx";
516 };
517
518 grf: syscon@20008000 {
Kever Yange43e7392017-11-28 16:04:15 +0800519 compatible = "rockchip,rk3128-grf", "syscon";
520 reg = <0x20008000 0x1000>;
521 };
522
523 pinctrl: pinctrl@20008000 {
524 compatible = "rockchip,rk3128-pinctrl";
525 reg = <0x20008000 0xA8>,
526 <0x200080A8 0x4C>,
527 <0x20008118 0x20>,
528 <0x20008100 0x04>;
529 reg-names = "base", "mux", "pull", "drv";
530 rockchip,grf = <&grf>;
531 #address-cells = <1>;
532 #size-cells = <1>;
533 ranges;
534
Johan Jonker1f288232022-09-09 22:19:24 +0200535 gpio0: gpio@2007c000 {
Kever Yange43e7392017-11-28 16:04:15 +0800536 compatible = "rockchip,gpio-bank";
537 reg = <0x2007c000 0x100>;
538 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
539 clocks = <&cru PCLK_GPIO0>;
540 gpio-controller;
541 #gpio-cells = <2>;
542 interrupt-controller;
543 #interrupt-cells = <2>;
544 };
545
Johan Jonker1f288232022-09-09 22:19:24 +0200546 gpio1: gpio@20080000 {
Kever Yange43e7392017-11-28 16:04:15 +0800547 compatible = "rockchip,gpio-bank";
548 reg = <0x20080000 0x100>;
549 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
550 clocks = <&cru PCLK_GPIO1>;
551 gpio-controller;
552 #gpio-cells = <2>;
553 interrupt-controller;
554 #interrupt-cells = <2>;
555 };
556
Johan Jonker1f288232022-09-09 22:19:24 +0200557 gpio2: gpio@20084000 {
Kever Yange43e7392017-11-28 16:04:15 +0800558 compatible = "rockchip,gpio-bank";
559 reg = <0x20084000 0x100>;
560 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
561 clocks = <&cru PCLK_GPIO2>;
562 gpio-controller;
563 #gpio-cells = <2>;
564 interrupt-controller;
565 #interrupt-cells = <2>;
566 };
567
Johan Jonker1f288232022-09-09 22:19:24 +0200568 gpio3: gpio@20088000 {
Kever Yange43e7392017-11-28 16:04:15 +0800569 compatible = "rockchip,gpio-bank";
570 reg = <0x20088000 0x100>;
571 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
572 clocks = <&cru PCLK_GPIO3>;
573 gpio-controller;
574 #gpio-cells = <2>;
575 interrupt-controller;
576 #interrupt-cells = <2>;
577 };
578
579 pcfg_pull_up: pcfg-pull-up {
580 bias-pull-up;
581 };
582
583 pcfg_pull_down: pcfg-pull-down {
584 bias-pull-down;
585 };
586
587 pcfg_pull_none: pcfg-pull-none {
588 bias-disable;
589 };
590
591 emmc {
592 /*
593 * We run eMMC at max speed; bump up drive strength.
594 * We also have external pulls, so disable the internal ones.
595 */
596
597 emmc_clk: emmc-clk {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200598 rockchip,pins = <2 RK_PA7 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800599 };
600
601 emmc_cmd: emmc-cmd {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200602 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800603 };
604
605 emmc_pwren: emmc-pwren {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200606 rockchip,pins = <2 RK_PA5 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800607 };
608
609 emmc_bus8: emmc-bus8 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200610 rockchip,pins = <1 RK_PD0 2 &pcfg_pull_none>,
611 <1 RK_PD1 2 &pcfg_pull_none>,
612 <1 RK_PD2 2 &pcfg_pull_none>,
613 <1 RK_PD3 2 &pcfg_pull_none>,
614 <1 RK_PD4 2 &pcfg_pull_none>,
615 <1 RK_PD5 2 &pcfg_pull_none>,
616 <1 RK_PD6 2 &pcfg_pull_none>,
617 <1 RK_PD7 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800618 };
619 };
620
621 nandc{
622 nandc_ale:nandc-ale {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200623 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800624 };
625
626 nandc_cle:nandc-cle {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200627 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800628 };
629
630 nandc_wrn:nandc-wrn {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200631 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800632 };
633
634 nandc_rdn:nandc-rdn {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200635 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800636 };
637
638 nandc_rdy:nandc-rdy {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200639 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800640 };
641
642 nandc_cs0:nandc-cs0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200643 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800644 };
645
646 nandc_data: nandc-data {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200647 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800648 };
649 };
650
651 uart0 {
652 uart0_xfer: uart0-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200653 rockchip,pins = <0 RK_PC0 1 &pcfg_pull_none>,
654 <0 RK_PC1 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800655 };
656
657 uart0_cts: uart0-cts {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200658 rockchip,pins = <0 RK_PC2 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800659 };
660
661 uart0_rts: uart0-rts {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200662 rockchip,pins = <0 RK_PC3 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800663 };
664 };
665
666 uart1 {
667 uart1_xfer: uart1-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200668 rockchip,pins = <2 RK_PC6 1 &pcfg_pull_none>,
669 <2 RK_PC7 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800670 };
671 };
672
673 uart2 {
674 uart2_xfer: uart2-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200675 rockchip,pins = <1 RK_PC2 2 &pcfg_pull_none>,
676 <1 RK_PC3 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800677 };
678 };
679
680 sdmmc {
681 sdmmc_clk: sdmmc-clk {
682 rockchip,pins = <1 RK_PC0 1 &pcfg_pull_none>;
683 };
684
685 sdmmc_cmd: sdmmc-cmd {
686 rockchip,pins = <1 RK_PC1 1 &pcfg_pull_up>;
687 };
688
689 sdmmc_wp: sdmmc-wp {
690 rockchip,pins = <1 RK_PA7 1 &pcfg_pull_up>;
691 };
692
693 sdmmc_pwren: sdmmc-pwren {
694 rockchip,pins = <1 RK_PB6 1 &pcfg_pull_up>;
695 };
696
697 sdmmc_bus4: sdmmc-bus4 {
698 rockchip,pins = <1 RK_PC2 1 &pcfg_pull_up>,
699 <1 RK_PC3 1 &pcfg_pull_up>,
700 <1 RK_PC4 1 &pcfg_pull_up>,
701 <1 RK_PC5 1 &pcfg_pull_up>;
702 };
703 };
704
705 pwm0 {
706 pwm0_pin: pwm0-pin {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200707 rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800708 };
709 };
710
711 pwm1 {
712 pwm1_pin: pwm1-pin {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200713 rockchip,pins = <0 RK_PA1 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800714 };
715 };
716
717 pwm2 {
718 pwm2_pin: pwm2-pin {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200719 rockchip,pins = <0 RK_PA1 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800720 };
721 };
722
723 pwm3 {
724 pwm3_pin: pwm3-pin {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200725 rockchip,pins = <0 RK_PD3 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800726 };
727 };
728
729 i2c0 {
730 i2c0_xfer: i2c0-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200731 rockchip,pins = <0 RK_PA0 1 &pcfg_pull_none>,
732 <0 RK_PA1 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800733 };
734 };
735
736 i2c1 {
737 i2c1_xfer: i2c1-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200738 rockchip,pins = <0 RK_PA2 1 &pcfg_pull_none>,
739 <0 RK_PA3 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800740 };
741 };
742
743 i2c2 {
744 i2c2_xfer: i2c2-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200745 rockchip,pins = <2 RK_PC4 3 &pcfg_pull_none>,
746 <2 RK_PC5 3 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800747 };
748 };
749
750 i2c3 {
751 i2c3_xfer: i2c3-xfer {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200752 rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>,
753 <0 RK_PA7 1 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800754 };
755 };
756
757 spi0 {
758 spi0_txd_mux0:spi0-txd-mux0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200759 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800760 };
761
762 spi0_rxd_mux0:spi0-rxd-mux0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200763 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800764 };
765
766 spi0_clk_mux0:spi0-clk-mux0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200767 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800768 };
769
770 spi0_cs0_mux0:spi0-cs0-mux0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200771 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800772 };
773
774 spi0_cs1_mux0:spi0-cs1-mux0 {
Johan Jonkerb89d6a02022-09-09 22:18:55 +0200775 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none>;
Kever Yange43e7392017-11-28 16:04:15 +0800776 };
777 };
778
779 };
780};