blob: 0a27fa5271f57684a930d4a0cd9ded6dd74d1eb2 [file] [log] [blame]
Matwey V. Kornilov348a0b72019-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 Robinson27e1b5e2021-07-22 16:20:43 +010013 aliases {
14 mmc0 = &sdmmc;
15 mmc1 = &emmc;
16 };
17
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +030018 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";
Peter Robinson27e1b5e2021-07-22 16:20:43 +010033 pinctrl-0 = <&sdmmc0m1_pin>;
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +030034 regulator-name = "vcc_sd";
35 regulator-min-microvolt = <3300000>;
36 regulator-max-microvolt = <3300000>;
37 vin-supply = <&vcc_io>;
38 };
39
Matwey V. Kornilovad84cc82023-10-10 21:27:38 +030040 /* 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 {
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +030042 compatible = "regulator-fixed";
Kever Yang08bbe442019-08-15 11:13:28 +080043 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +030044 pinctrl-names = "default";
45 pinctrl-0 = <&usb20_host_drv>;
Kever Yang08bbe442019-08-15 11:13:28 +080046 regulator-name = "vcc_host_5v";
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +030047 regulator-always-on;
48 regulator-boot-on;
49 vin-supply = <&vcc_sys>;
50 };
51
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 };
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080060
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
68 leds {
69 compatible = "gpio-leds";
70
Peter Robinson27e1b5e2021-07-22 16:20:43 +010071 power_led: led-0 {
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080072 gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
73 linux,default-trigger = "mmc0";
74 };
75
Peter Robinson27e1b5e2021-07-22 16:20:43 +010076 standby_led: led-1 {
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080077 gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
78 linux,default-trigger = "heartbeat";
79 };
80 };
81
Peter Robinson27e1b5e2021-07-22 16:20:43 +010082 spdif_sound: spdif-sound {
83 compatible = "simple-audio-card";
84 simple-audio-card,name = "SPDIF";
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080085
Peter Robinson27e1b5e2021-07-22 16:20:43 +010086 simple-audio-card,cpu {
87 sound-dai = <&spdif>;
88 };
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080089
Peter Robinson27e1b5e2021-07-22 16:20:43 +010090 simple-audio-card,codec {
91 sound-dai = <&spdif_dit>;
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +080092 };
93 };
Peter Robinson27e1b5e2021-07-22 16:20:43 +010094
95 spdif_dit: spdif-dit {
96 compatible = "linux,spdif-dit";
97 #sound-dai-cells = <0>;
98 };
99};
100
101&analog_sound {
102 status = "okay";
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800103};
104
105&codec {
106 mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
107 status = "okay";
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300108};
109
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;
129 mmc-hs200-1_8v;
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>;
146 snps,force_thresh_dma_mode;
147 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
148 snps,reset-active-low;
149 snps,reset-delays-us = <0 10000 50000>;
150 tx_delay = <0x24>;
151 rx_delay = <0x18>;
152 status = "okay";
153};
154
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800155&hdmi {
156 status = "okay";
157};
158
Peter Robinson27e1b5e2021-07-22 16:20:43 +0100159&hdmi_sound {
160 status = "okay";
161};
162
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800163&hdmiphy {
164 status = "okay";
165};
166
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300167&i2c1 {
168 status = "okay";
169
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800170 rk805: pmic@18 {
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300171 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";
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800177 gpio-controller;
178 #gpio-cells = <2>;
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300179 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 {
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800240 regulator-name = "vcc_18";
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300241 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 {
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800252 regulator-name = "vcc18_emmc";
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300253 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
Peter Robinson27e1b5e2021-07-22 16:20:43 +0100278&i2s0 {
279 status = "okay";
280};
281
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800282&i2s1 {
283 status = "okay";
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800284};
285
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300286&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 {
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800299 ir {
300 ir_int: ir-int {
301 rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
302 };
303 };
304
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300305 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 {
313 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
314 };
315 };
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300316};
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
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800330&spdif {
331 pinctrl-0 = <&spdifm0_tx>;
332 status = "okay";
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800333};
334
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300335&spi0 {
336 status = "okay";
337
Peter Robinson10e38322023-06-14 13:43:14 +0100338 flash@0 {
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300339 compatible = "jedec,spi-nor";
340 reg = <0>;
341
342 /* maximum speed for Rockchip SPI */
343 spi-max-frequency = <50000000>;
344 };
345};
346
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800347&tsadc {
348 rockchip,hw-tshut-mode = <0>;
349 rockchip,hw-tshut-polarity = <0>;
350 status = "okay";
351};
352
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300353&uart2 {
354 status = "okay";
355};
356
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800357&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
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300369&usb20_otg {
370 dr_mode = "host";
371 status = "okay";
372};
373
Peter Robinson27e1b5e2021-07-22 16:20:43 +0100374&usbdrd3 {
375 dr_mode = "host";
376 status = "okay";
377};
378
Matwey V. Kornilov348a0b72019-06-09 00:27:16 +0300379&usb_host0_ehci {
380 status = "okay";
381};
382
383&usb_host0_ohci {
384 status = "okay";
385};
Chen-Yu Tsai50cbff72020-04-27 14:52:52 +0800386
387&vop {
388 status = "okay";
389};
390
391&vop_mmu {
392 status = "okay";
393};