blob: 7bcc53fccede6ee517e62bb6efe7f3dd18a8fe51 [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
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";
37 enable-active-high;
38 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
39 pinctrl-names = "default";
40 pinctrl-0 = <&usb30_host_drv>;
41 regulator-name = "vcc_host_5v";
42 regulator-always-on;
43 regulator-boot-on;
44 vin-supply = <&vcc_sys>;
45 };
46
47 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
48 compatible = "regulator-fixed";
49 enable-active-high;
50 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&usb20_host_drv>;
53 regulator-name = "vcc_host1_5v";
54 regulator-always-on;
55 regulator-boot-on;
56 vin-supply = <&vcc_sys>;
57 };
58
59 vcc_sys: vcc-sys {
60 compatible = "regulator-fixed";
61 regulator-name = "vcc_sys";
62 regulator-always-on;
63 regulator-boot-on;
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5000000>;
66 };
67};
68
69&cpu0 {
70 cpu-supply = <&vdd_arm>;
71};
72
73&cpu1 {
74 cpu-supply = <&vdd_arm>;
75};
76
77&cpu2 {
78 cpu-supply = <&vdd_arm>;
79};
80
81&cpu3 {
82 cpu-supply = <&vdd_arm>;
83};
84
85&emmc {
86 bus-width = <8>;
87 cap-mmc-highspeed;
88 mmc-hs200-1_8v;
89 non-removable;
90 pinctrl-names = "default";
91 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
92 vmmc-supply = <&vcc_io>;
93 vqmmc-supply = <&vcc18_emmc>;
94 status = "okay";
95};
96
97&gmac2io {
98 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
99 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
100 clock_in_out = "input";
101 phy-supply = <&vcc_io>;
102 phy-mode = "rgmii";
103 pinctrl-names = "default";
104 pinctrl-0 = <&rgmiim1_pins>;
105 snps,force_thresh_dma_mode;
106 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
107 snps,reset-active-low;
108 snps,reset-delays-us = <0 10000 50000>;
109 tx_delay = <0x24>;
110 rx_delay = <0x18>;
111 status = "okay";
112};
113
114&i2c1 {
115 status = "okay";
116
117 rk805: rk805@18 {
118 compatible = "rockchip,rk805";
119 reg = <0x18>;
120 interrupt-parent = <&gpio2>;
121 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
122 #clock-cells = <1>;
123 clock-output-names = "xin32k", "rk805-clkout2";
124 pinctrl-names = "default";
125 pinctrl-0 = <&pmic_int_l>;
126 rockchip,system-power-controller;
127 wakeup-source;
128
129 vcc1-supply = <&vcc_sys>;
130 vcc2-supply = <&vcc_sys>;
131 vcc3-supply = <&vcc_sys>;
132 vcc4-supply = <&vcc_sys>;
133 vcc5-supply = <&vcc_io>;
134 vcc6-supply = <&vcc_sys>;
135
136 regulators {
137 vdd_logic: DCDC_REG1 {
138 regulator-name = "vdd_logic";
139 regulator-min-microvolt = <712500>;
140 regulator-max-microvolt = <1450000>;
141 regulator-ramp-delay = <12500>;
142 regulator-always-on;
143 regulator-boot-on;
144 regulator-state-mem {
145 regulator-on-in-suspend;
146 regulator-suspend-microvolt = <1000000>;
147 };
148 };
149
150 vdd_arm: DCDC_REG2 {
151 regulator-name = "vdd_arm";
152 regulator-min-microvolt = <712500>;
153 regulator-max-microvolt = <1450000>;
154 regulator-ramp-delay = <12500>;
155 regulator-always-on;
156 regulator-boot-on;
157 regulator-state-mem {
158 regulator-on-in-suspend;
159 regulator-suspend-microvolt = <950000>;
160 };
161 };
162
163 vcc_ddr: DCDC_REG3 {
164 regulator-name = "vcc_ddr";
165 regulator-always-on;
166 regulator-boot-on;
167 regulator-state-mem {
168 regulator-on-in-suspend;
169 };
170 };
171
172 vcc_io: DCDC_REG4 {
173 regulator-name = "vcc_io";
174 regulator-min-microvolt = <3300000>;
175 regulator-max-microvolt = <3300000>;
176 regulator-always-on;
177 regulator-boot-on;
178 regulator-state-mem {
179 regulator-on-in-suspend;
180 regulator-suspend-microvolt = <3300000>;
181 };
182 };
183
184 vcc_18: LDO_REG1 {
185 regulator-name = "vdd_18";
186 regulator-min-microvolt = <1800000>;
187 regulator-max-microvolt = <1800000>;
188 regulator-always-on;
189 regulator-boot-on;
190 regulator-state-mem {
191 regulator-on-in-suspend;
192 regulator-suspend-microvolt = <1800000>;
193 };
194 };
195
196 vcc18_emmc: LDO_REG2 {
197 regulator-name = "vcc_18emmc";
198 regulator-min-microvolt = <1800000>;
199 regulator-max-microvolt = <1800000>;
200 regulator-always-on;
201 regulator-boot-on;
202 regulator-state-mem {
203 regulator-on-in-suspend;
204 regulator-suspend-microvolt = <1800000>;
205 };
206 };
207
208 vdd_10: LDO_REG3 {
209 regulator-name = "vdd_10";
210 regulator-min-microvolt = <1000000>;
211 regulator-max-microvolt = <1000000>;
212 regulator-always-on;
213 regulator-boot-on;
214 regulator-state-mem {
215 regulator-on-in-suspend;
216 regulator-suspend-microvolt = <1000000>;
217 };
218 };
219 };
220 };
221};
222
223&io_domains {
224 status = "okay";
225
226 vccio1-supply = <&vcc_io>;
227 vccio2-supply = <&vcc18_emmc>;
228 vccio3-supply = <&vcc_io>;
229 vccio4-supply = <&vcc_18>;
230 vccio5-supply = <&vcc_io>;
231 vccio6-supply = <&vcc_io>;
232 pmuio-supply = <&vcc_io>;
233};
234
235&pinctrl {
236 pmic {
237 pmic_int_l: pmic-int-l {
238 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
239 };
240 };
241
242 usb2 {
243 usb20_host_drv: usb20-host-drv {
244 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
245 };
246 };
247
248 usb3 {
249 usb30_host_drv: usb30-host-drv {
250 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
251 };
252 };
253};
254
255&sdmmc {
256 bus-width = <4>;
257 cap-mmc-highspeed;
258 cap-sd-highspeed;
259 disable-wp;
260 max-frequency = <150000000>;
261 pinctrl-names = "default";
262 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
263 vmmc-supply = <&vcc_sd>;
264 status = "okay";
265};
266
267&spi0 {
268 status = "okay";
269
270 spiflash@0 {
271 compatible = "jedec,spi-nor";
272 reg = <0>;
273
274 /* maximum speed for Rockchip SPI */
275 spi-max-frequency = <50000000>;
276 };
277};
278
279&uart2 {
280 status = "okay";
281};
282
283&usb20_otg {
284 dr_mode = "host";
285 status = "okay";
286};
287
288&usb_host0_ehci {
289 status = "okay";
290};
291
292&usb_host0_ohci {
293 status = "okay";
294};