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