OSDN Git Service

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