blob: 229fe9da9c2ddc1e31ac662a6996424efe78d64e [file] [log] [blame]
Matwey V. Kornilov94b26612019-06-09 00:27:16 +03001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 PINE64
4 */
5
6/dts-v1/;
7#include "rk3328.dtsi"
8
9/ {
10 model = "Pine64 Rock64";
11 compatible = "pine64,rock64", "rockchip,rk3328";
12
Peter Robinson7715db32021-07-22 16:20:43 +010013 aliases {
Jonas Karlmanb74552c2024-02-17 00:22:37 +000014 ethernet0 = &gmac2io;
Peter Robinson7715db32021-07-22 16:20:43 +010015 mmc0 = &sdmmc;
16 mmc1 = &emmc;
17 };
18
Matwey V. Kornilov94b26612019-06-09 00:27:16 +030019 chosen {
20 stdout-path = "serial2:1500000n8";
21 };
22
23 gmac_clkin: external-gmac-clock {
24 compatible = "fixed-clock";
25 clock-frequency = <125000000>;
26 clock-output-names = "gmac_clkin";
27 #clock-cells = <0>;
28 };
29
30 vcc_sd: sdmmc-regulator {
31 compatible = "regulator-fixed";
32 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
33 pinctrl-names = "default";
Peter Robinson7715db32021-07-22 16:20:43 +010034 pinctrl-0 = <&sdmmc0m1_pin>;
Matwey V. Kornilov94b26612019-06-09 00:27:16 +030035 regulator-name = "vcc_sd";
36 regulator-min-microvolt = <3300000>;
37 regulator-max-microvolt = <3300000>;
38 vin-supply = <&vcc_io>;
39 };
40
Matwey V. Kornilov8573e3a2023-10-10 21:27:38 +030041 /* Common enable line for all of the rails mentioned in the labels */
42 vcc_host_5v: vcc_host1_5v: vcc_otg_5v: vcc-host-5v-regulator {
Matwey V. Kornilov94b26612019-06-09 00:27:16 +030043 compatible = "regulator-fixed";
Kever Yanga3843e52019-08-15 11:13:28 +080044 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
Matwey V. Kornilov94b26612019-06-09 00:27:16 +030045 pinctrl-names = "default";
46 pinctrl-0 = <&usb20_host_drv>;
Kever Yanga3843e52019-08-15 11:13:28 +080047 regulator-name = "vcc_host_5v";
Matwey V. Kornilov94b26612019-06-09 00:27:16 +030048 regulator-always-on;
49 regulator-boot-on;
50 vin-supply = <&vcc_sys>;
51 };
52
53 vcc_sys: vcc-sys {
54 compatible = "regulator-fixed";
55 regulator-name = "vcc_sys";
56 regulator-always-on;
57 regulator-boot-on;
58 regulator-min-microvolt = <5000000>;
59 regulator-max-microvolt = <5000000>;
60 };
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080061
62 ir-receiver {
63 compatible = "gpio-ir-receiver";
64 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
65 pinctrl-0 = <&ir_int>;
66 pinctrl-names = "default";
67 };
68
69 leds {
70 compatible = "gpio-leds";
71
Peter Robinson7715db32021-07-22 16:20:43 +010072 power_led: led-0 {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080073 gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "mmc0";
75 };
76
Peter Robinson7715db32021-07-22 16:20:43 +010077 standby_led: led-1 {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080078 gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "heartbeat";
80 };
81 };
82
Peter Robinson7715db32021-07-22 16:20:43 +010083 spdif_sound: spdif-sound {
84 compatible = "simple-audio-card";
85 simple-audio-card,name = "SPDIF";
86
87 simple-audio-card,cpu {
88 sound-dai = <&spdif>;
89 };
90
91 simple-audio-card,codec {
92 sound-dai = <&spdif_dit>;
93 };
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080094 };
95
Peter Robinson7715db32021-07-22 16:20:43 +010096 spdif_dit: spdif-dit {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080097 compatible = "linux,spdif-dit";
98 #sound-dai-cells = <0>;
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +080099 };
100};
101
Peter Robinson7715db32021-07-22 16:20:43 +0100102&analog_sound {
103 status = "okay";
104};
105
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800106&codec {
107 mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
108 status = "okay";
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300109};
110
111&cpu0 {
112 cpu-supply = <&vdd_arm>;
113};
114
115&cpu1 {
116 cpu-supply = <&vdd_arm>;
117};
118
119&cpu2 {
120 cpu-supply = <&vdd_arm>;
121};
122
123&cpu3 {
124 cpu-supply = <&vdd_arm>;
125};
126
127&emmc {
128 bus-width = <8>;
129 cap-mmc-highspeed;
130 mmc-hs200-1_8v;
131 non-removable;
132 pinctrl-names = "default";
133 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
134 vmmc-supply = <&vcc_io>;
135 vqmmc-supply = <&vcc18_emmc>;
136 status = "okay";
137};
138
139&gmac2io {
140 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
141 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
142 clock_in_out = "input";
143 phy-supply = <&vcc_io>;
144 phy-mode = "rgmii";
145 pinctrl-names = "default";
146 pinctrl-0 = <&rgmiim1_pins>;
147 snps,force_thresh_dma_mode;
148 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
149 snps,reset-active-low;
150 snps,reset-delays-us = <0 10000 50000>;
151 tx_delay = <0x24>;
152 rx_delay = <0x18>;
153 status = "okay";
154};
155
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800156&hdmi {
157 status = "okay";
158};
159
Peter Robinson7715db32021-07-22 16:20:43 +0100160&hdmi_sound {
161 status = "okay";
162};
163
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800164&hdmiphy {
165 status = "okay";
166};
167
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300168&i2c1 {
169 status = "okay";
170
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800171 rk805: pmic@18 {
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300172 compatible = "rockchip,rk805";
173 reg = <0x18>;
174 interrupt-parent = <&gpio2>;
175 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
176 #clock-cells = <1>;
177 clock-output-names = "xin32k", "rk805-clkout2";
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800178 gpio-controller;
179 #gpio-cells = <2>;
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300180 pinctrl-names = "default";
181 pinctrl-0 = <&pmic_int_l>;
182 rockchip,system-power-controller;
183 wakeup-source;
184
185 vcc1-supply = <&vcc_sys>;
186 vcc2-supply = <&vcc_sys>;
187 vcc3-supply = <&vcc_sys>;
188 vcc4-supply = <&vcc_sys>;
189 vcc5-supply = <&vcc_io>;
190 vcc6-supply = <&vcc_sys>;
191
192 regulators {
193 vdd_logic: DCDC_REG1 {
194 regulator-name = "vdd_logic";
195 regulator-min-microvolt = <712500>;
196 regulator-max-microvolt = <1450000>;
197 regulator-ramp-delay = <12500>;
198 regulator-always-on;
199 regulator-boot-on;
200 regulator-state-mem {
201 regulator-on-in-suspend;
202 regulator-suspend-microvolt = <1000000>;
203 };
204 };
205
206 vdd_arm: DCDC_REG2 {
207 regulator-name = "vdd_arm";
208 regulator-min-microvolt = <712500>;
209 regulator-max-microvolt = <1450000>;
210 regulator-ramp-delay = <12500>;
211 regulator-always-on;
212 regulator-boot-on;
213 regulator-state-mem {
214 regulator-on-in-suspend;
215 regulator-suspend-microvolt = <950000>;
216 };
217 };
218
219 vcc_ddr: DCDC_REG3 {
220 regulator-name = "vcc_ddr";
221 regulator-always-on;
222 regulator-boot-on;
223 regulator-state-mem {
224 regulator-on-in-suspend;
225 };
226 };
227
228 vcc_io: DCDC_REG4 {
229 regulator-name = "vcc_io";
230 regulator-min-microvolt = <3300000>;
231 regulator-max-microvolt = <3300000>;
232 regulator-always-on;
233 regulator-boot-on;
234 regulator-state-mem {
235 regulator-on-in-suspend;
236 regulator-suspend-microvolt = <3300000>;
237 };
238 };
239
240 vcc_18: LDO_REG1 {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800241 regulator-name = "vcc_18";
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300242 regulator-min-microvolt = <1800000>;
243 regulator-max-microvolt = <1800000>;
244 regulator-always-on;
245 regulator-boot-on;
246 regulator-state-mem {
247 regulator-on-in-suspend;
248 regulator-suspend-microvolt = <1800000>;
249 };
250 };
251
252 vcc18_emmc: LDO_REG2 {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800253 regulator-name = "vcc18_emmc";
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300254 regulator-min-microvolt = <1800000>;
255 regulator-max-microvolt = <1800000>;
256 regulator-always-on;
257 regulator-boot-on;
258 regulator-state-mem {
259 regulator-on-in-suspend;
260 regulator-suspend-microvolt = <1800000>;
261 };
262 };
263
264 vdd_10: LDO_REG3 {
265 regulator-name = "vdd_10";
266 regulator-min-microvolt = <1000000>;
267 regulator-max-microvolt = <1000000>;
268 regulator-always-on;
269 regulator-boot-on;
270 regulator-state-mem {
271 regulator-on-in-suspend;
272 regulator-suspend-microvolt = <1000000>;
273 };
274 };
275 };
276 };
277};
278
Peter Robinson7715db32021-07-22 16:20:43 +0100279&i2s0 {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800280 status = "okay";
Peter Robinson7715db32021-07-22 16:20:43 +0100281};
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800282
Peter Robinson7715db32021-07-22 16:20:43 +0100283&i2s1 {
284 status = "okay";
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800285};
286
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300287&io_domains {
288 status = "okay";
289
290 vccio1-supply = <&vcc_io>;
291 vccio2-supply = <&vcc18_emmc>;
292 vccio3-supply = <&vcc_io>;
293 vccio4-supply = <&vcc_18>;
294 vccio5-supply = <&vcc_io>;
295 vccio6-supply = <&vcc_io>;
296 pmuio-supply = <&vcc_io>;
297};
298
299&pinctrl {
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800300 ir {
301 ir_int: ir-int {
302 rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
303 };
304 };
305
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300306 pmic {
307 pmic_int_l: pmic-int-l {
308 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
309 };
310 };
311
312 usb2 {
313 usb20_host_drv: usb20-host-drv {
314 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
315 };
316 };
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300317};
318
319&sdmmc {
320 bus-width = <4>;
321 cap-mmc-highspeed;
322 cap-sd-highspeed;
323 disable-wp;
324 max-frequency = <150000000>;
325 pinctrl-names = "default";
326 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
327 vmmc-supply = <&vcc_sd>;
328 status = "okay";
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800329};
330
331&spdif {
332 pinctrl-0 = <&spdifm0_tx>;
333 status = "okay";
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300334};
335
336&spi0 {
337 status = "okay";
338
Peter Robinsonc90ca2b2023-06-14 13:43:14 +0100339 flash@0 {
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300340 compatible = "jedec,spi-nor";
341 reg = <0>;
342
343 /* maximum speed for Rockchip SPI */
344 spi-max-frequency = <50000000>;
345 };
346};
347
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800348&tsadc {
349 rockchip,hw-tshut-mode = <0>;
350 rockchip,hw-tshut-polarity = <0>;
351 status = "okay";
352};
353
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300354&uart2 {
355 status = "okay";
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800356};
357
358&u2phy {
359 status = "okay";
360
361 u2phy_host: host-port {
362 status = "okay";
363 };
364
365 u2phy_otg: otg-port {
366 status = "okay";
367 };
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300368};
369
370&usb20_otg {
371 dr_mode = "host";
372 status = "okay";
373};
374
Peter Robinson7715db32021-07-22 16:20:43 +0100375&usbdrd3 {
376 dr_mode = "host";
377 status = "okay";
378};
379
Matwey V. Kornilov94b26612019-06-09 00:27:16 +0300380&usb_host0_ehci {
381 status = "okay";
382};
383
384&usb_host0_ohci {
385 status = "okay";
386};
Chen-Yu Tsaib67079b2020-04-27 14:52:52 +0800387
388&vop {
389 status = "okay";
390};
391
392&vop_mmu {
393 status = "okay";
394};