Commit | Line | Data |
---|---|---|
4ee99ceb | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
955bebde HS |
2 | /* |
3 | * Copyright (c) 2017 PINE64 | |
955bebde HS |
4 | */ |
5 | ||
6 | /dts-v1/; | |
7 | #include "rk3328.dtsi" | |
8 | ||
9 | / { | |
10 | model = "Pine64 Rock64"; | |
11 | compatible = "pine64,rock64", "rockchip,rk3328"; | |
12 | ||
28869aa5 HS |
13 | aliases { |
14 | mmc0 = &sdmmc; | |
15 | mmc1 = &emmc; | |
16 | }; | |
17 | ||
955bebde HS |
18 | chosen { |
19 | stdout-path = "serial2:1500000n8"; | |
20 | }; | |
21 | ||
22 | gmac_clkin: external-gmac-clock { | |
23 | compatible = "fixed-clock"; | |
24 | clock-frequency = <125000000>; | |
25 | clock-output-names = "gmac_clkin"; | |
26 | #clock-cells = <0>; | |
27 | }; | |
28 | ||
29 | vcc_sd: sdmmc-regulator { | |
30 | compatible = "regulator-fixed"; | |
31 | gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; | |
32 | pinctrl-names = "default"; | |
2bc65fef | 33 | pinctrl-0 = <&sdmmc0m1_pin>; |
955bebde HS |
34 | regulator-name = "vcc_sd"; |
35 | regulator-min-microvolt = <3300000>; | |
36 | regulator-max-microvolt = <3300000>; | |
37 | vin-supply = <&vcc_io>; | |
38 | }; | |
39 | ||
03633c4e LB |
40 | /* Common enable line for all of the rails mentioned in the labels */ |
41 | vcc_host_5v: vcc_host1_5v: vcc_otg_5v: vcc-host-5v-regulator { | |
955bebde | 42 | compatible = "regulator-fixed"; |
9301d28d | 43 | gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; |
955bebde | 44 | pinctrl-names = "default"; |
9301d28d | 45 | pinctrl-0 = <&usb20_host_drv>; |
955bebde HS |
46 | regulator-name = "vcc_host_5v"; |
47 | regulator-always-on; | |
26e2d7b0 | 48 | regulator-boot-on; |
955bebde HS |
49 | vin-supply = <&vcc_sys>; |
50 | }; | |
51 | ||
955bebde HS |
52 | vcc_sys: vcc-sys { |
53 | compatible = "regulator-fixed"; | |
54 | regulator-name = "vcc_sys"; | |
55 | regulator-always-on; | |
56 | regulator-boot-on; | |
57 | regulator-min-microvolt = <5000000>; | |
58 | regulator-max-microvolt = <5000000>; | |
59 | }; | |
e007e4e0 | 60 | |
e31882e0 JK |
61 | ir-receiver { |
62 | compatible = "gpio-ir-receiver"; | |
63 | gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; | |
64 | pinctrl-0 = <&ir_int>; | |
65 | pinctrl-names = "default"; | |
66 | }; | |
67 | ||
092430ea JK |
68 | leds { |
69 | compatible = "gpio-leds"; | |
70 | ||
e916d85b | 71 | power_led: led-0 { |
092430ea JK |
72 | gpios = <&rk805 1 GPIO_ACTIVE_LOW>; |
73 | linux,default-trigger = "mmc0"; | |
74 | }; | |
75 | ||
e916d85b | 76 | standby_led: led-1 { |
092430ea JK |
77 | gpios = <&rk805 0 GPIO_ACTIVE_LOW>; |
78 | linux,default-trigger = "heartbeat"; | |
79 | }; | |
80 | }; | |
81 | ||
25572fb5 KS |
82 | spdif_sound: spdif-sound { |
83 | compatible = "simple-audio-card"; | |
84 | simple-audio-card,name = "SPDIF"; | |
85 | ||
86 | simple-audio-card,cpu { | |
87 | sound-dai = <&spdif>; | |
88 | }; | |
89 | ||
90 | simple-audio-card,codec { | |
91 | sound-dai = <&spdif_dit>; | |
92 | }; | |
e007e4e0 KS |
93 | }; |
94 | ||
25572fb5 | 95 | spdif_dit: spdif-dit { |
e007e4e0 KS |
96 | compatible = "linux,spdif-dit"; |
97 | #sound-dai-cells = <0>; | |
e007e4e0 | 98 | }; |
955bebde HS |
99 | }; |
100 | ||
25572fb5 KS |
101 | &analog_sound { |
102 | status = "okay"; | |
103 | }; | |
104 | ||
87bf7c7f | 105 | &codec { |
612b25d2 | 106 | mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; |
87bf7c7f | 107 | status = "okay"; |
87bf7c7f KS |
108 | }; |
109 | ||
955bebde HS |
110 | &cpu0 { |
111 | cpu-supply = <&vdd_arm>; | |
112 | }; | |
113 | ||
114 | &cpu1 { | |
115 | cpu-supply = <&vdd_arm>; | |
116 | }; | |
117 | ||
118 | &cpu2 { | |
119 | cpu-supply = <&vdd_arm>; | |
120 | }; | |
121 | ||
122 | &cpu3 { | |
123 | cpu-supply = <&vdd_arm>; | |
124 | }; | |
125 | ||
126 | &emmc { | |
127 | bus-width = <8>; | |
128 | cap-mmc-highspeed; | |
cff6d1d6 | 129 | mmc-hs200-1_8v; |
955bebde HS |
130 | non-removable; |
131 | pinctrl-names = "default"; | |
132 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; | |
133 | vmmc-supply = <&vcc_io>; | |
134 | vqmmc-supply = <&vcc18_emmc>; | |
135 | status = "okay"; | |
136 | }; | |
137 | ||
138 | &gmac2io { | |
139 | assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; | |
140 | assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; | |
141 | clock_in_out = "input"; | |
142 | phy-supply = <&vcc_io>; | |
143 | phy-mode = "rgmii"; | |
144 | pinctrl-names = "default"; | |
145 | pinctrl-0 = <&rgmiim1_pins>; | |
73e42e18 | 146 | snps,force_thresh_dma_mode; |
955bebde HS |
147 | snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; |
148 | snps,reset-active-low; | |
149 | snps,reset-delays-us = <0 10000 50000>; | |
73e42e18 KT |
150 | tx_delay = <0x24>; |
151 | rx_delay = <0x18>; | |
955bebde HS |
152 | status = "okay"; |
153 | }; | |
154 | ||
e78d53c7 HS |
155 | &hdmi { |
156 | status = "okay"; | |
157 | }; | |
158 | ||
25572fb5 KS |
159 | &hdmi_sound { |
160 | status = "okay"; | |
161 | }; | |
162 | ||
e78d53c7 HS |
163 | &hdmiphy { |
164 | status = "okay"; | |
165 | }; | |
166 | ||
955bebde HS |
167 | &i2c1 { |
168 | status = "okay"; | |
169 | ||
83b99412 | 170 | rk805: pmic@18 { |
955bebde HS |
171 | compatible = "rockchip,rk805"; |
172 | reg = <0x18>; | |
173 | interrupt-parent = <&gpio2>; | |
174 | interrupts = <6 IRQ_TYPE_LEVEL_LOW>; | |
175 | #clock-cells = <1>; | |
176 | clock-output-names = "xin32k", "rk805-clkout2"; | |
092430ea JK |
177 | gpio-controller; |
178 | #gpio-cells = <2>; | |
955bebde HS |
179 | pinctrl-names = "default"; |
180 | pinctrl-0 = <&pmic_int_l>; | |
181 | rockchip,system-power-controller; | |
182 | wakeup-source; | |
183 | ||
184 | vcc1-supply = <&vcc_sys>; | |
185 | vcc2-supply = <&vcc_sys>; | |
186 | vcc3-supply = <&vcc_sys>; | |
187 | vcc4-supply = <&vcc_sys>; | |
188 | vcc5-supply = <&vcc_io>; | |
189 | vcc6-supply = <&vcc_sys>; | |
190 | ||
191 | regulators { | |
192 | vdd_logic: DCDC_REG1 { | |
193 | regulator-name = "vdd_logic"; | |
194 | regulator-min-microvolt = <712500>; | |
195 | regulator-max-microvolt = <1450000>; | |
196 | regulator-ramp-delay = <12500>; | |
197 | regulator-always-on; | |
198 | regulator-boot-on; | |
199 | regulator-state-mem { | |
200 | regulator-on-in-suspend; | |
201 | regulator-suspend-microvolt = <1000000>; | |
202 | }; | |
203 | }; | |
204 | ||
205 | vdd_arm: DCDC_REG2 { | |
206 | regulator-name = "vdd_arm"; | |
207 | regulator-min-microvolt = <712500>; | |
208 | regulator-max-microvolt = <1450000>; | |
209 | regulator-ramp-delay = <12500>; | |
210 | regulator-always-on; | |
211 | regulator-boot-on; | |
212 | regulator-state-mem { | |
213 | regulator-on-in-suspend; | |
214 | regulator-suspend-microvolt = <950000>; | |
215 | }; | |
216 | }; | |
217 | ||
218 | vcc_ddr: DCDC_REG3 { | |
219 | regulator-name = "vcc_ddr"; | |
220 | regulator-always-on; | |
221 | regulator-boot-on; | |
222 | regulator-state-mem { | |
223 | regulator-on-in-suspend; | |
224 | }; | |
225 | }; | |
226 | ||
227 | vcc_io: DCDC_REG4 { | |
228 | regulator-name = "vcc_io"; | |
229 | regulator-min-microvolt = <3300000>; | |
230 | regulator-max-microvolt = <3300000>; | |
231 | regulator-always-on; | |
232 | regulator-boot-on; | |
233 | regulator-state-mem { | |
234 | regulator-on-in-suspend; | |
235 | regulator-suspend-microvolt = <3300000>; | |
236 | }; | |
237 | }; | |
238 | ||
239 | vcc_18: LDO_REG1 { | |
ad3c8cc3 | 240 | regulator-name = "vcc_18"; |
955bebde HS |
241 | regulator-min-microvolt = <1800000>; |
242 | regulator-max-microvolt = <1800000>; | |
243 | regulator-always-on; | |
244 | regulator-boot-on; | |
245 | regulator-state-mem { | |
246 | regulator-on-in-suspend; | |
247 | regulator-suspend-microvolt = <1800000>; | |
248 | }; | |
249 | }; | |
250 | ||
251 | vcc18_emmc: LDO_REG2 { | |
ad3c8cc3 | 252 | regulator-name = "vcc18_emmc"; |
955bebde HS |
253 | regulator-min-microvolt = <1800000>; |
254 | regulator-max-microvolt = <1800000>; | |
255 | regulator-always-on; | |
256 | regulator-boot-on; | |
257 | regulator-state-mem { | |
258 | regulator-on-in-suspend; | |
259 | regulator-suspend-microvolt = <1800000>; | |
260 | }; | |
261 | }; | |
262 | ||
263 | vdd_10: LDO_REG3 { | |
264 | regulator-name = "vdd_10"; | |
265 | regulator-min-microvolt = <1000000>; | |
266 | regulator-max-microvolt = <1000000>; | |
267 | regulator-always-on; | |
268 | regulator-boot-on; | |
269 | regulator-state-mem { | |
270 | regulator-on-in-suspend; | |
271 | regulator-suspend-microvolt = <1000000>; | |
272 | }; | |
273 | }; | |
274 | }; | |
275 | }; | |
276 | }; | |
277 | ||
25572fb5 | 278 | &i2s0 { |
87bf7c7f | 279 | status = "okay"; |
25572fb5 | 280 | }; |
87bf7c7f | 281 | |
25572fb5 KS |
282 | &i2s1 { |
283 | status = "okay"; | |
87bf7c7f KS |
284 | }; |
285 | ||
955bebde HS |
286 | &io_domains { |
287 | status = "okay"; | |
288 | ||
289 | vccio1-supply = <&vcc_io>; | |
290 | vccio2-supply = <&vcc18_emmc>; | |
291 | vccio3-supply = <&vcc_io>; | |
292 | vccio4-supply = <&vcc_18>; | |
293 | vccio5-supply = <&vcc_io>; | |
294 | vccio6-supply = <&vcc_io>; | |
295 | pmuio-supply = <&vcc_io>; | |
296 | }; | |
297 | ||
298 | &pinctrl { | |
e31882e0 JK |
299 | ir { |
300 | ir_int: ir-int { | |
301 | rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; | |
302 | }; | |
303 | }; | |
304 | ||
955bebde HS |
305 | pmic { |
306 | pmic_int_l: pmic-int-l { | |
307 | rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; | |
308 | }; | |
309 | }; | |
310 | ||
311 | usb2 { | |
312 | usb20_host_drv: usb20-host-drv { | |
ef05bcb6 | 313 | rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; |
955bebde HS |
314 | }; |
315 | }; | |
955bebde HS |
316 | }; |
317 | ||
318 | &sdmmc { | |
319 | bus-width = <4>; | |
320 | cap-mmc-highspeed; | |
321 | cap-sd-highspeed; | |
322 | disable-wp; | |
323 | max-frequency = <150000000>; | |
324 | pinctrl-names = "default"; | |
325 | pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; | |
326 | vmmc-supply = <&vcc_sd>; | |
327 | status = "okay"; | |
328 | }; | |
329 | ||
e007e4e0 KS |
330 | &spdif { |
331 | pinctrl-0 = <&spdifm0_tx>; | |
332 | status = "okay"; | |
e007e4e0 KS |
333 | }; |
334 | ||
cd7ab133 CYT |
335 | &spi0 { |
336 | status = "okay"; | |
337 | ||
b1443184 | 338 | flash@0 { |
cd7ab133 CYT |
339 | compatible = "jedec,spi-nor"; |
340 | reg = <0>; | |
341 | ||
342 | /* maximum speed for Rockchip SPI */ | |
343 | spi-max-frequency = <50000000>; | |
344 | }; | |
345 | }; | |
346 | ||
955bebde HS |
347 | &tsadc { |
348 | rockchip,hw-tshut-mode = <0>; | |
349 | rockchip,hw-tshut-polarity = <0>; | |
350 | status = "okay"; | |
351 | }; | |
352 | ||
353 | &uart2 { | |
354 | status = "okay"; | |
355 | }; | |
356 | ||
357 | &u2phy { | |
358 | status = "okay"; | |
359 | ||
360 | u2phy_host: host-port { | |
361 | status = "okay"; | |
362 | }; | |
363 | ||
364 | u2phy_otg: otg-port { | |
365 | status = "okay"; | |
366 | }; | |
367 | }; | |
368 | ||
369 | &usb20_otg { | |
370 | dr_mode = "host"; | |
371 | status = "okay"; | |
372 | }; | |
373 | ||
bbac8bd6 CN |
374 | &usbdrd3 { |
375 | dr_mode = "host"; | |
376 | status = "okay"; | |
377 | }; | |
378 | ||
955bebde HS |
379 | &usb_host0_ehci { |
380 | status = "okay"; | |
381 | }; | |
382 | ||
383 | &usb_host0_ohci { | |
384 | status = "okay"; | |
385 | }; | |
e78d53c7 HS |
386 | |
387 | &vop { | |
388 | status = "okay"; | |
389 | }; | |
390 | ||
391 | &vop_mmu { | |
392 | status = "okay"; | |
393 | }; |