Merge existing fixes from regulator/for-5.14
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / rockchip / rk3328-evb.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
4  */
5
6 /dts-v1/;
7 #include "rk3328.dtsi"
8
9 / {
10         model = "Rockchip RK3328 EVB";
11         compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
12
13         aliases {
14                 mmc0 = &sdmmc;
15                 mmc1 = &sdio;
16                 mmc2 = &emmc;
17         };
18
19         chosen {
20                 stdout-path = "serial2:1500000n8";
21         };
22
23         dc_12v: dc-12v {
24                 compatible = "regulator-fixed";
25                 regulator-name = "dc_12v";
26                 regulator-always-on;
27                 regulator-boot-on;
28                 regulator-min-microvolt = <12000000>;
29                 regulator-max-microvolt = <12000000>;
30         };
31
32         sdio_pwrseq: sdio-pwrseq {
33                 compatible = "mmc-pwrseq-simple";
34                 pinctrl-names = "default";
35                 pinctrl-0 = <&wifi_enable_h>;
36
37                 /*
38                  * On the module itself this is one of these (depending
39                  * on the actual card populated):
40                  * - SDIO_RESET_L_WL_REG_ON
41                  * - PDN (power down when low)
42                  */
43                 reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
44         };
45
46         vcc_sd: sdmmc-regulator {
47                 compatible = "regulator-fixed";
48                 gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
49                 pinctrl-names = "default";
50                 pinctrl-0 = <&sdmmc0m1_pin>;
51                 regulator-name = "vcc_sd";
52                 regulator-min-microvolt = <3300000>;
53                 regulator-max-microvolt = <3300000>;
54                 vin-supply = <&vcc_io>;
55         };
56
57         vcc_sys: vcc-sys {
58                 compatible = "regulator-fixed";
59                 regulator-name = "vcc_sys";
60                 regulator-always-on;
61                 regulator-boot-on;
62                 regulator-min-microvolt = <5000000>;
63                 regulator-max-microvolt = <5000000>;
64                 vin-supply = <&dc_12v>;
65         };
66
67         vcc_phy: vcc-phy-regulator {
68                 compatible = "regulator-fixed";
69                 regulator-name = "vcc_phy";
70                 regulator-always-on;
71                 regulator-boot-on;
72         };
73 };
74
75 &cpu0 {
76         cpu-supply = <&vdd_arm>;
77 };
78
79 &cpu1 {
80         cpu-supply = <&vdd_arm>;
81 };
82
83 &cpu2 {
84         cpu-supply = <&vdd_arm>;
85 };
86
87 &cpu3 {
88         cpu-supply = <&vdd_arm>;
89 };
90
91 &emmc {
92         bus-width = <8>;
93         cap-mmc-highspeed;
94         non-removable;
95         pinctrl-names = "default";
96         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
97         status = "okay";
98 };
99
100 &gmac2phy {
101         phy-supply = <&vcc_phy>;
102         clock_in_out = "output";
103         assigned-clock-rate = <50000000>;
104         assigned-clocks = <&cru SCLK_MAC2PHY>;
105         assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
106         status = "okay";
107 };
108
109 &i2c1 {
110         status = "okay";
111
112         rk805: pmic@18 {
113                 compatible = "rockchip,rk805";
114                 reg = <0x18>;
115                 interrupt-parent = <&gpio2>;
116                 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
117                 #clock-cells = <1>;
118                 clock-output-names = "xin32k", "rk805-clkout2";
119                 gpio-controller;
120                 #gpio-cells = <2>;
121                 pinctrl-names = "default";
122                 pinctrl-0 = <&pmic_int_l>;
123                 rockchip,system-power-controller;
124                 wakeup-source;
125
126                 vcc1-supply = <&vcc_sys>;
127                 vcc2-supply = <&vcc_sys>;
128                 vcc3-supply = <&vcc_sys>;
129                 vcc4-supply = <&vcc_sys>;
130                 vcc5-supply = <&vcc_io>;
131                 vcc6-supply = <&vcc_io>;
132
133                 regulators {
134                         vdd_logic: DCDC_REG1 {
135                                 regulator-name = "vdd_logic";
136                                 regulator-min-microvolt = <712500>;
137                                 regulator-max-microvolt = <1450000>;
138                                 regulator-always-on;
139                                 regulator-boot-on;
140                                 regulator-state-mem {
141                                         regulator-on-in-suspend;
142                                         regulator-suspend-microvolt = <1000000>;
143                                 };
144                         };
145
146                         vdd_arm: DCDC_REG2 {
147                                 regulator-name = "vdd_arm";
148                                 regulator-min-microvolt = <712500>;
149                                 regulator-max-microvolt = <1450000>;
150                                 regulator-always-on;
151                                 regulator-boot-on;
152                                 regulator-state-mem {
153                                         regulator-on-in-suspend;
154                                         regulator-suspend-microvolt = <950000>;
155                                 };
156                         };
157
158                         vcc_ddr: DCDC_REG3 {
159                                 regulator-name = "vcc_ddr";
160                                 regulator-always-on;
161                                 regulator-boot-on;
162                                 regulator-state-mem {
163                                         regulator-on-in-suspend;
164                                 };
165                         };
166
167                         vcc_io: DCDC_REG4 {
168                                 regulator-name = "vcc_io";
169                                 regulator-min-microvolt = <3300000>;
170                                 regulator-max-microvolt = <3300000>;
171                                 regulator-always-on;
172                                 regulator-boot-on;
173                                 regulator-state-mem {
174                                         regulator-on-in-suspend;
175                                         regulator-suspend-microvolt = <3300000>;
176                                 };
177                         };
178
179                         vcc_18: LDO_REG1 {
180                                 regulator-name = "vcc_18";
181                                 regulator-min-microvolt = <1800000>;
182                                 regulator-max-microvolt = <1800000>;
183                                 regulator-always-on;
184                                 regulator-boot-on;
185                                 regulator-state-mem {
186                                         regulator-on-in-suspend;
187                                         regulator-suspend-microvolt = <1800000>;
188                                 };
189                         };
190
191                         vcc18_emmc: LDO_REG2 {
192                                 regulator-name = "vcc18_emmc";
193                                 regulator-min-microvolt = <1800000>;
194                                 regulator-max-microvolt = <1800000>;
195                                 regulator-always-on;
196                                 regulator-boot-on;
197                                 regulator-state-mem {
198                                         regulator-on-in-suspend;
199                                         regulator-suspend-microvolt = <1800000>;
200                                 };
201                         };
202
203                         vdd_10: LDO_REG3 {
204                                 regulator-name = "vdd_10";
205                                 regulator-min-microvolt = <1000000>;
206                                 regulator-max-microvolt = <1000000>;
207                                 regulator-always-on;
208                                 regulator-boot-on;
209                                 regulator-state-mem {
210                                         regulator-on-in-suspend;
211                                         regulator-suspend-microvolt = <1000000>;
212                                 };
213                         };
214                 };
215         };
216 };
217
218 &pinctrl {
219         pmic {
220                 pmic_int_l: pmic-int-l {
221                         rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
222                 };
223         };
224
225         sdio-pwrseq {
226                 wifi_enable_h: wifi-enable-h {
227                 rockchip,pins =
228                         <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
229                 };
230         };
231 };
232
233 &sdio {
234         bus-width = <4>;
235         cap-sd-highspeed;
236         cap-sdio-irq;
237         keep-power-in-suspend;
238         max-frequency = <150000000>;
239         mmc-pwrseq = <&sdio_pwrseq>;
240         non-removable;
241         pinctrl-names = "default";
242         pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
243         status = "okay";
244 };
245
246 &sdmmc {
247         bus-width = <4>;
248         cap-mmc-highspeed;
249         cap-sd-highspeed;
250         disable-wp;
251         max-frequency = <150000000>;
252         pinctrl-names = "default";
253         pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
254         vmmc-supply = <&vcc_sd>;
255         status = "okay";
256 };
257
258 &tsadc {
259         status = "okay";
260 };
261
262 &uart2 {
263         status = "okay";
264 };
265
266 &u2phy {
267         status = "okay";
268 };
269
270 &u2phy_host {
271         status = "okay";
272 };
273
274 &u2phy_otg {
275         status = "okay";
276 };
277
278 &usb20_otg {
279         status = "okay";
280 };
281
282 &usb_host0_ehci {
283         status = "okay";
284 };
285
286 &usb_host0_ohci {
287         status = "okay";
288 };