Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / rockchip / rk3328-roc-cc.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
4  */
5
6 /dts-v1/;
7 #include "rk3328.dtsi"
8
9 / {
10         model = "Firefly roc-rk3328-cc";
11         compatible = "firefly,roc-rk3328-cc", "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         dc_12v: dc-12v {
25                 compatible = "regulator-fixed";
26                 regulator-name = "dc_12v";
27                 regulator-always-on;
28                 regulator-boot-on;
29                 regulator-min-microvolt = <12000000>;
30                 regulator-max-microvolt = <12000000>;
31         };
32
33         vcc_sd: sdmmc-regulator {
34                 compatible = "regulator-fixed";
35                 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
36                 pinctrl-names = "default";
37                 pinctrl-0 = <&sdmmc0m1_gpio>;
38                 regulator-name = "vcc_sd";
39                 regulator-min-microvolt = <3300000>;
40                 regulator-max-microvolt = <3300000>;
41                 vin-supply = <&vcc_io>;
42         };
43
44         vcc_sdio: sdmmcio-regulator {
45                 compatible = "regulator-gpio";
46                 gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
47                 states = <1800000 0x1
48                           3300000 0x0>;
49                 regulator-name = "vcc_sdio";
50                 regulator-type = "voltage";
51                 regulator-min-microvolt = <1800000>;
52                 regulator-max-microvolt = <3300000>;
53                 regulator-always-on;
54                 vin-supply = <&vcc_sys>;
55         };
56
57         vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
58                 compatible = "regulator-fixed";
59                 enable-active-high;
60                 gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
61                 pinctrl-names = "default";
62                 pinctrl-0 = <&usb20_host_drv>;
63                 regulator-name = "vcc_host1_5v";
64                 regulator-always-on;
65                 vin-supply = <&vcc_sys>;
66         };
67
68         vcc_sys: vcc-sys {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vcc_sys";
71                 regulator-always-on;
72                 regulator-boot-on;
73                 regulator-min-microvolt = <5000000>;
74                 regulator-max-microvolt = <5000000>;
75                 vin-supply = <&dc_12v>;
76         };
77
78         vcc_phy: vcc-phy-regulator {
79                 compatible = "regulator-fixed";
80                 regulator-name = "vcc_phy";
81                 regulator-always-on;
82                 regulator-boot-on;
83         };
84
85         leds {
86                 compatible = "gpio-leds";
87
88                 power {
89                         label = "firefly:blue:power";
90                         linux,default-trigger = "heartbeat";
91                         gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
92                         default-state = "on";
93                         mode = <0x23>;
94                 };
95
96                 user {
97                         label = "firefly:yellow:user";
98                         linux,default-trigger = "mmc1";
99                         gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
100                         default-state = "off";
101                         mode = <0x05>;
102                 };
103         };
104 };
105
106 &cpu0 {
107         cpu-supply = <&vdd_arm>;
108 };
109
110 &cpu1 {
111         cpu-supply = <&vdd_arm>;
112 };
113
114 &cpu2 {
115         cpu-supply = <&vdd_arm>;
116 };
117
118 &cpu3 {
119         cpu-supply = <&vdd_arm>;
120 };
121
122 &emmc {
123         bus-width = <8>;
124         cap-mmc-highspeed;
125         max-frequency = <150000000>;
126         mmc-ddr-1_8v;
127         mmc-hs200-1_8v;
128         non-removable;
129         pinctrl-names = "default";
130         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
131         vmmc-supply = <&vcc_io>;
132         vqmmc-supply = <&vcc18_emmc>;
133         status = "okay";
134 };
135
136 &gmac2io {
137         assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
138         assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
139         clock_in_out = "input";
140         phy-supply = <&vcc_phy>;
141         phy-mode = "rgmii";
142         pinctrl-names = "default";
143         pinctrl-0 = <&rgmiim1_pins>;
144         snps,force_thresh_dma_mode;
145         snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
146         snps,reset-active-low;
147         snps,reset-delays-us = <0 10000 50000>;
148         tx_delay = <0x24>;
149         rx_delay = <0x18>;
150         status = "okay";
151 };
152
153 &hdmi {
154         status = "okay";
155 };
156
157 &hdmiphy {
158         status = "okay";
159 };
160
161 &i2c1 {
162         status = "okay";
163
164         rk805: pmic@18 {
165                 compatible = "rockchip,rk805";
166                 reg = <0x18>;
167                 interrupt-parent = <&gpio1>;
168                 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
169                 #clock-cells = <1>;
170                 clock-output-names = "xin32k", "rk805-clkout2";
171                 gpio-controller;
172                 #gpio-cells = <2>;
173                 pinctrl-names = "default";
174                 pinctrl-0 = <&pmic_int_l>;
175                 rockchip,system-power-controller;
176                 wakeup-source;
177
178                 vcc1-supply = <&vcc_sys>;
179                 vcc2-supply = <&vcc_sys>;
180                 vcc3-supply = <&vcc_sys>;
181                 vcc4-supply = <&vcc_sys>;
182                 vcc5-supply = <&vcc_io>;
183                 vcc6-supply = <&vcc_io>;
184
185                 regulators {
186                         vdd_logic: DCDC_REG1 {
187                                 regulator-name = "vdd_logic";
188                                 regulator-min-microvolt = <712500>;
189                                 regulator-max-microvolt = <1450000>;
190                                 regulator-always-on;
191                                 regulator-boot-on;
192                                 regulator-state-mem {
193                                         regulator-on-in-suspend;
194                                         regulator-suspend-microvolt = <1000000>;
195                                 };
196                         };
197
198                         vdd_arm: DCDC_REG2 {
199                                 regulator-name = "vdd_arm";
200                                 regulator-min-microvolt = <712500>;
201                                 regulator-max-microvolt = <1450000>;
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-state-mem {
205                                         regulator-on-in-suspend;
206                                         regulator-suspend-microvolt = <950000>;
207                                 };
208                         };
209
210                         vcc_ddr: DCDC_REG3 {
211                                 regulator-name = "vcc_ddr";
212                                 regulator-always-on;
213                                 regulator-boot-on;
214                                 regulator-state-mem {
215                                         regulator-on-in-suspend;
216                                 };
217                         };
218
219                         vcc_io: DCDC_REG4 {
220                                 regulator-name = "vcc_io";
221                                 regulator-min-microvolt = <3300000>;
222                                 regulator-max-microvolt = <3300000>;
223                                 regulator-always-on;
224                                 regulator-boot-on;
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                         regulator-suspend-microvolt = <3300000>;
228                                 };
229                         };
230
231                         vcc_18: LDO_REG1 {
232                                 regulator-name = "vcc_18";
233                                 regulator-min-microvolt = <1800000>;
234                                 regulator-max-microvolt = <1800000>;
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <1800000>;
240                                 };
241                         };
242
243                         vcc18_emmc: LDO_REG2 {
244                                 regulator-name = "vcc18_emmc";
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                         vdd_10: LDO_REG3 {
256                                 regulator-name = "vdd_10";
257                                 regulator-min-microvolt = <1000000>;
258                                 regulator-max-microvolt = <1000000>;
259                                 regulator-always-on;
260                                 regulator-boot-on;
261                                 regulator-state-mem {
262                                         regulator-on-in-suspend;
263                                         regulator-suspend-microvolt = <1000000>;
264                                 };
265                         };
266                 };
267         };
268 };
269
270 &io_domains {
271         status = "okay";
272
273         vccio1-supply = <&vcc_io>;
274         vccio2-supply = <&vcc18_emmc>;
275         vccio3-supply = <&vcc_sdio>;
276         vccio4-supply = <&vcc_18>;
277         vccio5-supply = <&vcc_io>;
278         vccio6-supply = <&vcc_io>;
279         pmuio-supply = <&vcc_io>;
280 };
281
282 &pinctrl {
283         pmic {
284                 pmic_int_l: pmic-int-l {
285                         rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
286                 };
287         };
288
289         usb2 {
290                 usb20_host_drv: usb20-host-drv {
291                         rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
292                 };
293         };
294 };
295
296 &sdmmc {
297         bus-width = <4>;
298         cap-mmc-highspeed;
299         cap-sd-highspeed;
300         disable-wp;
301         max-frequency = <150000000>;
302         pinctrl-names = "default";
303         pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
304         sd-uhs-sdr12;
305         sd-uhs-sdr25;
306         sd-uhs-sdr50;
307         sd-uhs-sdr104;
308         vmmc-supply = <&vcc_sd>;
309         vqmmc-supply = <&vcc_sdio>;
310         status = "okay";
311 };
312
313 &tsadc {
314         status = "okay";
315 };
316
317 &u2phy {
318         status = "okay";
319 };
320
321 &u2phy_host {
322         status = "okay";
323 };
324
325 &u2phy_otg {
326         status = "okay";
327 };
328
329 &uart2 {
330         status = "okay";
331 };
332
333 &usb20_otg {
334         status = "okay";
335 };
336
337 &usb_host0_ehci {
338         status = "okay";
339 };
340
341 &usb_host0_ohci {
342         status = "okay";
343 };
344
345 &vop {
346         status = "okay";
347 };
348
349 &vop_mmu {
350         status = "okay";
351 };