xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3288-vmarc-som.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*4882a593Smuzhiyun/*
3*4882a593Smuzhiyun * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4*4882a593Smuzhiyun * Copyright (c) 2019 Vamrs Limited
5*4882a593Smuzhiyun * Copyright (c) 2019 Amarula Solutions(India)
6*4882a593Smuzhiyun */
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun#include <dt-bindings/gpio/gpio.h>
9*4882a593Smuzhiyun#include <dt-bindings/pinctrl/rockchip.h>
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun/ {
12*4882a593Smuzhiyun	compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288";
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun	vccio_flash: vccio-flash-regulator {
15*4882a593Smuzhiyun		compatible = "regulator-fixed";
16*4882a593Smuzhiyun		regulator-name = "vccio_flash";
17*4882a593Smuzhiyun		regulator-min-microvolt = <1800000>;
18*4882a593Smuzhiyun		regulator-max-microvolt = <1800000>;
19*4882a593Smuzhiyun		vin-supply = <&vcc_io>;
20*4882a593Smuzhiyun	};
21*4882a593Smuzhiyun};
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun&emmc {
24*4882a593Smuzhiyun	bus-width = <8>;
25*4882a593Smuzhiyun	cap-mmc-highspeed;
26*4882a593Smuzhiyun	disable-wp;
27*4882a593Smuzhiyun	non-removable;
28*4882a593Smuzhiyun	pinctrl-names = "default";
29*4882a593Smuzhiyun	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
30*4882a593Smuzhiyun	vmmc-supply = <&vcc_io>;
31*4882a593Smuzhiyun	vqmmc-supply = <&vccio_flash>;
32*4882a593Smuzhiyun	status = "okay";
33*4882a593Smuzhiyun};
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun&gmac {
36*4882a593Smuzhiyun	assigned-clocks = <&cru SCLK_MAC>;
37*4882a593Smuzhiyun	phy-supply = <&vcc_io>;
38*4882a593Smuzhiyun	snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
39*4882a593Smuzhiyun};
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun&hdmi {
42*4882a593Smuzhiyun	ddc-i2c-bus = <&i2c5>;
43*4882a593Smuzhiyun	pinctrl-names = "default";
44*4882a593Smuzhiyun	pinctrl-0 = <&hdmi_cec_c0>;
45*4882a593Smuzhiyun};
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun&i2c0 {
48*4882a593Smuzhiyun	clock-frequency = <400000>;
49*4882a593Smuzhiyun	status = "okay";
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun	rk808: pmic@1b {
52*4882a593Smuzhiyun		compatible = "rockchip,rk808";
53*4882a593Smuzhiyun		reg = <0x1b>;
54*4882a593Smuzhiyun		interrupt-parent = <&gpio0>;
55*4882a593Smuzhiyun		interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
56*4882a593Smuzhiyun		pinctrl-names = "default";
57*4882a593Smuzhiyun		pinctrl-0 = <&pmic_int &global_pwroff>;
58*4882a593Smuzhiyun		rockchip,system-power-controller;
59*4882a593Smuzhiyun		wakeup-source;
60*4882a593Smuzhiyun		#clock-cells = <1>;
61*4882a593Smuzhiyun		clock-output-names = "rk808-clkout1", "rk808-clkout2";
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun		vcc1-supply = <&vcc5v0_sys>;
64*4882a593Smuzhiyun		vcc2-supply = <&vcc5v0_sys>;
65*4882a593Smuzhiyun		vcc3-supply = <&vcc5v0_sys>;
66*4882a593Smuzhiyun		vcc4-supply = <&vcc5v0_sys>;
67*4882a593Smuzhiyun		vcc6-supply = <&vcc5v0_sys>;
68*4882a593Smuzhiyun		vcc7-supply = <&vcc5v0_sys>;
69*4882a593Smuzhiyun		vcc8-supply = <&vcc_io>;
70*4882a593Smuzhiyun		vcc9-supply = <&vcc_io>;
71*4882a593Smuzhiyun		vcc10-supply = <&vcc5v0_sys>;
72*4882a593Smuzhiyun		vcc11-supply = <&vcc5v0_sys>;
73*4882a593Smuzhiyun		vcc12-supply = <&vcc_io>;
74*4882a593Smuzhiyun		vddio-supply = <&vcc_io>;
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun		regulators {
77*4882a593Smuzhiyun			vdd_cpu: DCDC_REG1 {
78*4882a593Smuzhiyun				regulator-name = "vdd_arm";
79*4882a593Smuzhiyun				regulator-always-on;
80*4882a593Smuzhiyun				regulator-boot-on;
81*4882a593Smuzhiyun				regulator-min-microvolt = <750000>;
82*4882a593Smuzhiyun				regulator-max-microvolt = <1400000>;
83*4882a593Smuzhiyun				regulator-state-mem {
84*4882a593Smuzhiyun					regulator-off-in-suspend;
85*4882a593Smuzhiyun				};
86*4882a593Smuzhiyun			};
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun			vdd_gpu: DCDC_REG2 {
89*4882a593Smuzhiyun				regulator-name = "vdd_gpu";
90*4882a593Smuzhiyun				regulator-always-on;
91*4882a593Smuzhiyun				regulator-boot-on;
92*4882a593Smuzhiyun				regulator-min-microvolt = <850000>;
93*4882a593Smuzhiyun				regulator-max-microvolt = <1250000>;
94*4882a593Smuzhiyun				regulator-ramp-delay = <6000>;
95*4882a593Smuzhiyun				regulator-state-mem {
96*4882a593Smuzhiyun					regulator-off-in-suspend;
97*4882a593Smuzhiyun				};
98*4882a593Smuzhiyun			};
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun			vcc_ddr: DCDC_REG3 {
101*4882a593Smuzhiyun				regulator-name = "vcc_ddr";
102*4882a593Smuzhiyun				regulator-always-on;
103*4882a593Smuzhiyun				regulator-boot-on;
104*4882a593Smuzhiyun				regulator-state-mem {
105*4882a593Smuzhiyun					regulator-on-in-suspend;
106*4882a593Smuzhiyun				};
107*4882a593Smuzhiyun			};
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun			vcc_io: DCDC_REG4 {
110*4882a593Smuzhiyun				regulator-name = "vcc_io";
111*4882a593Smuzhiyun				regulator-always-on;
112*4882a593Smuzhiyun				regulator-boot-on;
113*4882a593Smuzhiyun				regulator-min-microvolt = <3300000>;
114*4882a593Smuzhiyun				regulator-max-microvolt = <3300000>;
115*4882a593Smuzhiyun				regulator-state-mem {
116*4882a593Smuzhiyun					regulator-on-in-suspend;
117*4882a593Smuzhiyun					regulator-suspend-microvolt = <3300000>;
118*4882a593Smuzhiyun				};
119*4882a593Smuzhiyun			};
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun			vcc_tp: LDO_REG1 {
122*4882a593Smuzhiyun				regulator-name = "vcc_tp";
123*4882a593Smuzhiyun				regulator-always-on;
124*4882a593Smuzhiyun				regulator-boot-on;
125*4882a593Smuzhiyun				regulator-min-microvolt = <3300000>;
126*4882a593Smuzhiyun				regulator-max-microvolt = <3300000>;
127*4882a593Smuzhiyun				regulator-state-mem {
128*4882a593Smuzhiyun					regulator-off-in-suspend;
129*4882a593Smuzhiyun				};
130*4882a593Smuzhiyun			};
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun			vcca_codec: LDO_REG2 {
133*4882a593Smuzhiyun				regulator-name = "vcca_codec";
134*4882a593Smuzhiyun				regulator-always-on;
135*4882a593Smuzhiyun				regulator-boot-on;
136*4882a593Smuzhiyun				regulator-min-microvolt = <3300000>;
137*4882a593Smuzhiyun				regulator-max-microvolt = <3300000>;
138*4882a593Smuzhiyun				regulator-state-mem {
139*4882a593Smuzhiyun					regulator-on-in-suspend;
140*4882a593Smuzhiyun					regulator-suspend-microvolt = <3300000>;
141*4882a593Smuzhiyun				};
142*4882a593Smuzhiyun			};
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun			vdd_10: LDO_REG3 {
145*4882a593Smuzhiyun				regulator-name = "vdd_10";
146*4882a593Smuzhiyun				regulator-always-on;
147*4882a593Smuzhiyun				regulator-boot-on;
148*4882a593Smuzhiyun				regulator-min-microvolt = <1000000>;
149*4882a593Smuzhiyun				regulator-max-microvolt = <1000000>;
150*4882a593Smuzhiyun				regulator-state-mem {
151*4882a593Smuzhiyun					regulator-on-in-suspend;
152*4882a593Smuzhiyun					regulator-suspend-microvolt = <1000000>;
153*4882a593Smuzhiyun				};
154*4882a593Smuzhiyun			};
155*4882a593Smuzhiyun
156*4882a593Smuzhiyun			vcc_wl: LDO_REG4 {
157*4882a593Smuzhiyun				regulator-name = "vcc_wl";
158*4882a593Smuzhiyun				regulator-always-on;
159*4882a593Smuzhiyun				regulator-boot-on;
160*4882a593Smuzhiyun				regulator-min-microvolt = <1800000>;
161*4882a593Smuzhiyun				regulator-max-microvolt = <1800000>;
162*4882a593Smuzhiyun				regulator-state-mem {
163*4882a593Smuzhiyun					regulator-on-in-suspend;
164*4882a593Smuzhiyun				};
165*4882a593Smuzhiyun			};
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun			vccio_sd: LDO_REG5 {
168*4882a593Smuzhiyun				regulator-name = "vccio_sd";
169*4882a593Smuzhiyun				regulator-always-on;
170*4882a593Smuzhiyun				regulator-boot-on;
171*4882a593Smuzhiyun				regulator-min-microvolt = <1800000>;
172*4882a593Smuzhiyun				regulator-max-microvolt = <3300000>;
173*4882a593Smuzhiyun				regulator-state-mem {
174*4882a593Smuzhiyun					regulator-on-in-suspend;
175*4882a593Smuzhiyun					regulator-suspend-microvolt = <3300000>;
176*4882a593Smuzhiyun				};
177*4882a593Smuzhiyun			};
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun			vdd10_lcd: LDO_REG6 {
180*4882a593Smuzhiyun				regulator-name = "vdd10_lcd";
181*4882a593Smuzhiyun				regulator-always-on;
182*4882a593Smuzhiyun				regulator-boot-on;
183*4882a593Smuzhiyun				regulator-min-microvolt = <1000000>;
184*4882a593Smuzhiyun				regulator-max-microvolt = <1000000>;
185*4882a593Smuzhiyun				regulator-state-mem {
186*4882a593Smuzhiyun					regulator-off-in-suspend;
187*4882a593Smuzhiyun				};
188*4882a593Smuzhiyun			};
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun			vcc_18: LDO_REG7 {
191*4882a593Smuzhiyun				regulator-name = "vcc_18";
192*4882a593Smuzhiyun				regulator-always-on;
193*4882a593Smuzhiyun				regulator-boot-on;
194*4882a593Smuzhiyun				regulator-min-microvolt = <1800000>;
195*4882a593Smuzhiyun				regulator-max-microvolt = <1800000>;
196*4882a593Smuzhiyun				regulator-state-mem {
197*4882a593Smuzhiyun					regulator-on-in-suspend;
198*4882a593Smuzhiyun					regulator-suspend-microvolt = <1800000>;
199*4882a593Smuzhiyun				};
200*4882a593Smuzhiyun			};
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun			vcc18_lcd: LDO_REG8 {
203*4882a593Smuzhiyun				regulator-name = "vcc18_lcd";
204*4882a593Smuzhiyun				regulator-always-on;
205*4882a593Smuzhiyun				regulator-boot-on;
206*4882a593Smuzhiyun				regulator-min-microvolt = <1800000>;
207*4882a593Smuzhiyun				regulator-max-microvolt = <1800000>;
208*4882a593Smuzhiyun				regulator-state-mem {
209*4882a593Smuzhiyun					regulator-off-in-suspend;
210*4882a593Smuzhiyun				};
211*4882a593Smuzhiyun			};
212*4882a593Smuzhiyun
213*4882a593Smuzhiyun			vcc_sd: SWITCH_REG1 {
214*4882a593Smuzhiyun				regulator-name = "vcc_sd";
215*4882a593Smuzhiyun				regulator-always-on;
216*4882a593Smuzhiyun				regulator-boot-on;
217*4882a593Smuzhiyun				regulator-state-mem {
218*4882a593Smuzhiyun					regulator-off-in-suspend;
219*4882a593Smuzhiyun				};
220*4882a593Smuzhiyun			};
221*4882a593Smuzhiyun
222*4882a593Smuzhiyun			vcc_lcd: SWITCH_REG2 {
223*4882a593Smuzhiyun				regulator-name = "vcc_lcd";
224*4882a593Smuzhiyun				regulator-always-on;
225*4882a593Smuzhiyun				regulator-boot-on;
226*4882a593Smuzhiyun				regulator-state-mem {
227*4882a593Smuzhiyun					regulator-off-in-suspend;
228*4882a593Smuzhiyun				};
229*4882a593Smuzhiyun			};
230*4882a593Smuzhiyun		};
231*4882a593Smuzhiyun	};
232*4882a593Smuzhiyun};
233*4882a593Smuzhiyun
234*4882a593Smuzhiyun&i2c5 {
235*4882a593Smuzhiyun	status = "okay";
236*4882a593Smuzhiyun};
237*4882a593Smuzhiyun
238*4882a593Smuzhiyun&io_domains {
239*4882a593Smuzhiyun	bb-supply = <&vcc_io>;
240*4882a593Smuzhiyun	flash0-supply = <&vccio_flash>;
241*4882a593Smuzhiyun	gpio1830-supply = <&vcc_18>;
242*4882a593Smuzhiyun	gpio30-supply = <&vcc_io>;
243*4882a593Smuzhiyun	sdcard-supply = <&vccio_sd>;
244*4882a593Smuzhiyun	status = "okay";
245*4882a593Smuzhiyun};
246*4882a593Smuzhiyun
247*4882a593Smuzhiyun&pinctrl {
248*4882a593Smuzhiyun	pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
249*4882a593Smuzhiyun		drive-strength = <8>;
250*4882a593Smuzhiyun	};
251*4882a593Smuzhiyun
252*4882a593Smuzhiyun	pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
253*4882a593Smuzhiyun		bias-pull-up;
254*4882a593Smuzhiyun		drive-strength = <8>;
255*4882a593Smuzhiyun	};
256*4882a593Smuzhiyun
257*4882a593Smuzhiyun	pmic {
258*4882a593Smuzhiyun		pmic_int: pmic-int {
259*4882a593Smuzhiyun			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
260*4882a593Smuzhiyun		};
261*4882a593Smuzhiyun	};
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun	sdmmc {
264*4882a593Smuzhiyun		sdmmc_bus4: sdmmc-bus4 {
265*4882a593Smuzhiyun			rockchip,pins =
266*4882a593Smuzhiyun				<6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
267*4882a593Smuzhiyun				<6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
268*4882a593Smuzhiyun				<6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
269*4882a593Smuzhiyun				<6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
270*4882a593Smuzhiyun		};
271*4882a593Smuzhiyun
272*4882a593Smuzhiyun		sdmmc_clk: sdmmc-clk {
273*4882a593Smuzhiyun			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
274*4882a593Smuzhiyun		};
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun		sdmmc_cmd: sdmmc-cmd {
277*4882a593Smuzhiyun			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
278*4882a593Smuzhiyun		};
279*4882a593Smuzhiyun	};
280*4882a593Smuzhiyun
281*4882a593Smuzhiyun	vbus_host {
282*4882a593Smuzhiyun		usb1_en_oc: usb1-en-oc {
283*4882a593Smuzhiyun			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
284*4882a593Smuzhiyun		};
285*4882a593Smuzhiyun	};
286*4882a593Smuzhiyun
287*4882a593Smuzhiyun	vbus_typec {
288*4882a593Smuzhiyun		usb0_en_oc: usb0-en-oc {
289*4882a593Smuzhiyun			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
290*4882a593Smuzhiyun		};
291*4882a593Smuzhiyun	};
292*4882a593Smuzhiyun};
293*4882a593Smuzhiyun
294*4882a593Smuzhiyun&usbphy {
295*4882a593Smuzhiyun	status = "okay";
296*4882a593Smuzhiyun};
297*4882a593Smuzhiyun
298*4882a593Smuzhiyun&usb_host0_ehci {
299*4882a593Smuzhiyun	status = "okay";
300*4882a593Smuzhiyun};
301*4882a593Smuzhiyun
302*4882a593Smuzhiyun&usb_host0_ohci {
303*4882a593Smuzhiyun	status = "okay";
304*4882a593Smuzhiyun};
305*4882a593Smuzhiyun
306*4882a593Smuzhiyun&usb_host1 {
307*4882a593Smuzhiyun	status = "okay";
308*4882a593Smuzhiyun};
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun&usb_otg {
311*4882a593Smuzhiyun	status = "okay";
312*4882a593Smuzhiyun};
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun&vbus_host {
315*4882a593Smuzhiyun	enable-active-high;
316*4882a593Smuzhiyun	gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
317*4882a593Smuzhiyun};
318*4882a593Smuzhiyun
319*4882a593Smuzhiyun&vbus_typec {
320*4882a593Smuzhiyun	enable-active-high;
321*4882a593Smuzhiyun	gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
322*4882a593Smuzhiyun};
323