blob: 72a503e50de7a4fc704306ea5e6c21c451127230 [file] [log] [blame]
Jagan Teki9e7b9d42020-06-18 21:42:19 +05301// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 * Copyright (c) 2019 Vamrs Limited
5 * Copyright (c) 2019 Amarula Solutions(India)
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/pinctrl/rockchip.h>
Jagan Teki9e7b9d42020-06-18 21:42:19 +053010
11/ {
12 compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288";
13
Jagan Teki9e7b9d42020-06-18 21:42:19 +053014 vccio_flash: vccio-flash-regulator {
15 compatible = "regulator-fixed";
16 regulator-name = "vccio_flash";
17 regulator-min-microvolt = <1800000>;
18 regulator-max-microvolt = <1800000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053019 vin-supply = <&vcc_io>;
20 };
Jagan Teki9e7b9d42020-06-18 21:42:19 +053021};
22
23&emmc {
24 bus-width = <8>;
25 cap-mmc-highspeed;
26 disable-wp;
27 non-removable;
28 pinctrl-names = "default";
29 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
Jagan Teki27107792020-07-21 20:54:35 +053030 vmmc-supply = <&vcc_io>;
31 vqmmc-supply = <&vccio_flash>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053032 status = "okay";
33};
34
35&gmac {
36 assigned-clocks = <&cru SCLK_MAC>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053037 phy-supply = <&vcc_io>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053038 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053039};
40
41&i2c0 {
42 clock-frequency = <400000>;
43 status = "okay";
44
45 rk808: pmic@1b {
46 compatible = "rockchip,rk808";
47 reg = <0x1b>;
48 interrupt-parent = <&gpio0>;
49 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
50 pinctrl-names = "default";
51 pinctrl-0 = <&pmic_int &global_pwroff>;
52 rockchip,system-power-controller;
53 wakeup-source;
54 #clock-cells = <1>;
55 clock-output-names = "rk808-clkout1", "rk808-clkout2";
56
Jagan Teki27107792020-07-21 20:54:35 +053057 vcc1-supply = <&vcc5v0_sys>;
58 vcc2-supply = <&vcc5v0_sys>;
59 vcc3-supply = <&vcc5v0_sys>;
60 vcc4-supply = <&vcc5v0_sys>;
61 vcc6-supply = <&vcc5v0_sys>;
62 vcc7-supply = <&vcc5v0_sys>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053063 vcc8-supply = <&vcc_io>;
64 vcc9-supply = <&vcc_io>;
Jagan Teki27107792020-07-21 20:54:35 +053065 vcc10-supply = <&vcc5v0_sys>;
66 vcc11-supply = <&vcc5v0_sys>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053067 vcc12-supply = <&vcc_io>;
68 vddio-supply = <&vcc_io>;
69
70 regulators {
71 vdd_cpu: DCDC_REG1 {
Jagan Teki27107792020-07-21 20:54:35 +053072 regulator-name = "vdd_arm";
Jagan Teki9e7b9d42020-06-18 21:42:19 +053073 regulator-always-on;
74 regulator-boot-on;
75 regulator-min-microvolt = <750000>;
76 regulator-max-microvolt = <1400000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053077 regulator-state-mem {
78 regulator-off-in-suspend;
79 };
80 };
81
82 vdd_gpu: DCDC_REG2 {
Jagan Teki27107792020-07-21 20:54:35 +053083 regulator-name = "vdd_gpu";
Jagan Teki9e7b9d42020-06-18 21:42:19 +053084 regulator-always-on;
85 regulator-boot-on;
86 regulator-min-microvolt = <850000>;
87 regulator-max-microvolt = <1250000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053088 regulator-ramp-delay = <6000>;
89 regulator-state-mem {
90 regulator-off-in-suspend;
91 };
92 };
93
94 vcc_ddr: DCDC_REG3 {
Jagan Teki27107792020-07-21 20:54:35 +053095 regulator-name = "vcc_ddr";
Jagan Teki9e7b9d42020-06-18 21:42:19 +053096 regulator-always-on;
97 regulator-boot-on;
Jagan Teki9e7b9d42020-06-18 21:42:19 +053098 regulator-state-mem {
99 regulator-on-in-suspend;
100 };
101 };
102
103 vcc_io: DCDC_REG4 {
Jagan Teki27107792020-07-21 20:54:35 +0530104 regulator-name = "vcc_io";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530105 regulator-always-on;
106 regulator-boot-on;
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530109 regulator-state-mem {
110 regulator-on-in-suspend;
111 regulator-suspend-microvolt = <3300000>;
112 };
113 };
114
115 vcc_tp: LDO_REG1 {
Jagan Teki27107792020-07-21 20:54:35 +0530116 regulator-name = "vcc_tp";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530117 regulator-always-on;
118 regulator-boot-on;
119 regulator-min-microvolt = <3300000>;
120 regulator-max-microvolt = <3300000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530121 regulator-state-mem {
122 regulator-off-in-suspend;
123 };
124 };
125
126 vcca_codec: LDO_REG2 {
Jagan Teki27107792020-07-21 20:54:35 +0530127 regulator-name = "vcca_codec";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530128 regulator-always-on;
129 regulator-boot-on;
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530132 regulator-state-mem {
133 regulator-on-in-suspend;
134 regulator-suspend-microvolt = <3300000>;
135 };
136 };
137
138 vdd_10: LDO_REG3 {
Jagan Teki27107792020-07-21 20:54:35 +0530139 regulator-name = "vdd_10";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530140 regulator-always-on;
141 regulator-boot-on;
142 regulator-min-microvolt = <1000000>;
143 regulator-max-microvolt = <1000000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530144 regulator-state-mem {
145 regulator-on-in-suspend;
146 regulator-suspend-microvolt = <1000000>;
147 };
148 };
149
150 vcc_wl: LDO_REG4 {
Jagan Teki27107792020-07-21 20:54:35 +0530151 regulator-name = "vcc_wl";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530152 regulator-always-on;
153 regulator-boot-on;
154 regulator-min-microvolt = <1800000>;
155 regulator-max-microvolt = <1800000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530156 regulator-state-mem {
157 regulator-on-in-suspend;
158 };
159 };
160
161 vccio_sd: LDO_REG5 {
Jagan Teki27107792020-07-21 20:54:35 +0530162 regulator-name = "vccio_sd";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530163 regulator-always-on;
164 regulator-boot-on;
165 regulator-min-microvolt = <1800000>;
166 regulator-max-microvolt = <3300000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530167 regulator-state-mem {
168 regulator-on-in-suspend;
169 regulator-suspend-microvolt = <3300000>;
170 };
171 };
172
173 vdd10_lcd: LDO_REG6 {
Jagan Teki27107792020-07-21 20:54:35 +0530174 regulator-name = "vdd10_lcd";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530175 regulator-always-on;
176 regulator-boot-on;
177 regulator-min-microvolt = <1000000>;
178 regulator-max-microvolt = <1000000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530179 regulator-state-mem {
180 regulator-off-in-suspend;
181 };
182 };
183
184 vcc_18: LDO_REG7 {
Jagan Teki27107792020-07-21 20:54:35 +0530185 regulator-name = "vcc_18";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530186 regulator-always-on;
187 regulator-boot-on;
188 regulator-min-microvolt = <1800000>;
189 regulator-max-microvolt = <1800000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530190 regulator-state-mem {
191 regulator-on-in-suspend;
192 regulator-suspend-microvolt = <1800000>;
193 };
194 };
195
196 vcc18_lcd: LDO_REG8 {
Jagan Teki27107792020-07-21 20:54:35 +0530197 regulator-name = "vcc18_lcd";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530198 regulator-always-on;
199 regulator-boot-on;
200 regulator-min-microvolt = <1800000>;
201 regulator-max-microvolt = <1800000>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530202 regulator-state-mem {
203 regulator-off-in-suspend;
204 };
205 };
206
207 vcc_sd: SWITCH_REG1 {
Jagan Teki27107792020-07-21 20:54:35 +0530208 regulator-name = "vcc_sd";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530209 regulator-always-on;
210 regulator-boot-on;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530211 regulator-state-mem {
212 regulator-off-in-suspend;
213 };
214 };
215
216 vcc_lcd: SWITCH_REG2 {
Jagan Teki27107792020-07-21 20:54:35 +0530217 regulator-name = "vcc_lcd";
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530218 regulator-always-on;
219 regulator-boot-on;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530220 regulator-state-mem {
221 regulator-off-in-suspend;
222 };
223 };
224 };
225 };
226};
227
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530228&pinctrl {
229 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
230 drive-strength = <8>;
231 };
232
233 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
234 bias-pull-up;
235 drive-strength = <8>;
236 };
237
238 pmic {
239 pmic_int: pmic-int {
240 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
241 };
242 };
243
244 sdmmc {
245 sdmmc_bus4: sdmmc-bus4 {
246 rockchip,pins =
247 <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
248 <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
249 <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
250 <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
251 };
252
253 sdmmc_clk: sdmmc-clk {
Jagan Teki27107792020-07-21 20:54:35 +0530254 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530255 };
256
257 sdmmc_cmd: sdmmc-cmd {
Jagan Teki27107792020-07-21 20:54:35 +0530258 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530259 };
260 };
Jagan Teki87027292020-07-21 20:54:38 +0530261
262 vbus_host {
263 usb1_en_oc: usb1-en-oc {
264 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
265 };
266 };
267
268 vbus_typec {
269 usb0_en_oc: usb0-en-oc {
270 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
271 };
272 };
273};
274
275&usbphy {
276 status = "okay";
277};
278
279&usb_host0_ehci {
280 status = "okay";
281};
282
283&usb_host0_ohci {
284 status = "okay";
285};
286
287&usb_host1 {
288 status = "okay";
289};
290
291&usb_otg {
292 status = "okay";
293};
294
295&vbus_host {
296 enable-active-high;
297 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
298};
299
300&vbus_typec {
301 enable-active-high;
302 gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
Jagan Teki9e7b9d42020-06-18 21:42:19 +0530303};