xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3528-rock-2.dtsi (revision 1537cf73828a2db2a67622ccfff77383c7db6f07)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pwm/pwm.h>
8#include "rk3528.dtsi"
9
10/ {
11	aliases {
12		i2c1 = &i2c1;
13		mmc0 = &sdhci;
14		mmc1 = &sdmmc;
15		serial0 = &uart0;
16	};
17
18	chosen {
19		stdout-path = "serial0:1500000n8";
20	};
21
22	adc-keys {
23		compatible = "adc-keys";
24		io-channels = <&saradc 0>;
25		io-channel-names = "buttons";
26		keyup-threshold-microvolt = <1800000>;
27		poll-interval = <100>;
28
29		button-maskrom {
30			label = "MASKROM";
31			linux,code = <KEY_SETUP>;
32			press-threshold-microvolt = <0>;
33		};
34	};
35
36	leds: leds {
37		compatible = "gpio-leds";
38		pinctrl-names = "default";
39		pinctrl-0 = <&state_led_b>;
40
41		led-0 {
42			color = <LED_COLOR_ID_BLUE>;
43			default-state = "on";
44			function = LED_FUNCTION_HEARTBEAT;
45			gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
46			linux,default-trigger = "heartbeat";
47		};
48	};
49
50	vdd_0v9: regulator-0v9-vdd {
51		compatible = "regulator-fixed";
52		regulator-name = "vdd_0v9";
53		regulator-always-on;
54		regulator-boot-on;
55		regulator-min-microvolt = <900000>;
56		regulator-max-microvolt = <900000>;
57		vin-supply = <&vcc5v0_sys>;
58	};
59
60	vcc_ddr: regulator-1v1-vcc-ddr {
61		compatible = "regulator-fixed";
62		regulator-name = "vcc_ddr";
63		regulator-always-on;
64		regulator-boot-on;
65		regulator-min-microvolt = <1100000>;
66		regulator-max-microvolt = <1100000>;
67		vin-supply = <&vcc5v0_sys>;
68	};
69
70	vcc_1v8: regulator-1v8-vcc {
71		compatible = "regulator-fixed";
72		regulator-name = "vcc_1v8";
73		regulator-always-on;
74		regulator-boot-on;
75		regulator-min-microvolt = <1800000>;
76		regulator-max-microvolt = <1800000>;
77		vin-supply = <&vcc_3v3>;
78	};
79
80	vcc_3v3: regulator-3v3-vcc {
81		compatible = "regulator-fixed";
82		regulator-name = "vcc_3v3";
83		regulator-always-on;
84		regulator-boot-on;
85		regulator-min-microvolt = <3300000>;
86		regulator-max-microvolt = <3300000>;
87		vin-supply = <&vcc5v0_sys>;
88	};
89
90	vcc_wifi: regulator-3v3-vcc-wifi {
91		compatible = "regulator-fixed";
92		enable-active-high;
93		gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
94		pinctrl-names = "default";
95		pinctrl-0 = <&usb_wifi_pwr>;
96		regulator-name = "vcc_wifi";
97		regulator-min-microvolt = <3300000>;
98		regulator-max-microvolt = <3300000>;
99		vin-supply = <&vcc_3v3>;
100	};
101
102	vcc5v0_sys: regulator-5v0-vcc-sys {
103		compatible = "regulator-fixed";
104		regulator-name = "vcc5v0_sys";
105		regulator-always-on;
106		regulator-boot-on;
107		regulator-min-microvolt = <5000000>;
108		regulator-max-microvolt = <5000000>;
109	};
110
111	vcc5v0_usb20: regulator-5v0-vcc-usb20 {
112		compatible = "regulator-fixed";
113		enable-active-high;
114		gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
115		pinctrl-names = "default";
116		pinctrl-0 = <&usb_host_en>;
117		regulator-name = "vcc5v0_usb20";
118		regulator-min-microvolt = <5000000>;
119		regulator-max-microvolt = <5000000>;
120		vin-supply = <&vcc5v0_sys>;
121	};
122
123	vccio_sd: regulator-vccio-sd {
124		compatible = "regulator-gpio";
125		gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
126		pinctrl-names = "default";
127		pinctrl-0 = <&sdmmc_vol_ctrl_h>;
128		regulator-name = "vccio_sd";
129		regulator-min-microvolt = <1800000>;
130		regulator-max-microvolt = <3300000>;
131		states = <1800000 0x0>, <3300000 0x1>;
132		vin-supply = <&vcc5v0_sys>;
133	};
134
135	vdd_arm: regulator-vdd-arm {
136		compatible = "pwm-regulator";
137		pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
138		pwm-supply = <&vcc5v0_sys>;
139		regulator-name = "vdd_arm";
140		regulator-always-on;
141		regulator-boot-on;
142		regulator-min-microvolt = <746000>;
143		regulator-max-microvolt = <1201000>;
144		regulator-settling-time-up-us = <250>;
145	};
146
147	vdd_logic: regulator-vdd-logic {
148		compatible = "pwm-regulator";
149		pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
150		pwm-supply = <&vcc5v0_sys>;
151		regulator-name = "vdd_logic";
152		regulator-always-on;
153		regulator-boot-on;
154		regulator-min-microvolt = <705000>;
155		regulator-max-microvolt = <1006000>;
156		regulator-settling-time-up-us = <250>;
157	};
158
159	rfkill {
160		compatible = "rfkill-gpio";
161		label = "rfkill-wlan";
162		pinctrl-names = "default";
163		pinctrl-0 = <&wifi_reg_on_h>;
164		radio-type = "wlan";
165		shutdown-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
166	};
167};
168
169&cpu0 {
170	cpu-supply = <&vdd_arm>;
171};
172
173&cpu1 {
174	cpu-supply = <&vdd_arm>;
175};
176
177&cpu2 {
178	cpu-supply = <&vdd_arm>;
179};
180
181&cpu3 {
182	cpu-supply = <&vdd_arm>;
183};
184
185&gpu {
186	mali-supply = <&vdd_logic>;
187	status = "okay";
188};
189
190&i2c1 {
191	pinctrl-names = "default";
192	pinctrl-0 = <&i2c1m0_xfer>;
193	status = "okay";
194
195	eeprom@50 {
196		compatible = "belling,bl24c16a", "atmel,24c16";
197		reg = <0x50>;
198		pagesize = <16>;
199		read-only;
200		vcc-supply = <&vcc_3v3>;
201	};
202};
203
204&pinctrl {
205	bluetooth {
206		bt_wake_host_h: bt-wake-host-h {
207			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
208		};
209
210		host_wake_bt_h: host-wake-bt-h {
211			rockchip,pins = <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
212		};
213	};
214
215	leds {
216		state_led_b: state-led-b {
217			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
218		};
219	};
220
221	sdmmc {
222		sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
223			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
224		};
225	};
226
227	usb {
228		usb_host_en: usb-host-en {
229			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
230		};
231	};
232
233	wifi {
234		usb_wifi_pwr: usb-wifi-pwr {
235			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
236		};
237
238		wifi_reg_on_h: wifi-reg-on-h {
239			rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
240		};
241
242		wifi_wake_host_h: wifi-wake-host-h {
243			rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
244		};
245	};
246};
247
248&pwm1 {
249	pinctrl-names = "default";
250	pinctrl-0 = <&pwm1m0_pins>;
251	status = "okay";
252};
253
254&pwm2 {
255	pinctrl-names = "default";
256	pinctrl-0 = <&pwm2m0_pins>;
257	status = "okay";
258};
259
260&saradc {
261	vref-supply = <&vcc_1v8>;
262	status = "okay";
263};
264
265&sdhci {
266	bus-width = <8>;
267	cap-mmc-highspeed;
268	mmc-hs200-1_8v;
269	no-sd;
270	no-sdio;
271	non-removable;
272	vmmc-supply = <&vcc_3v3>;
273	vqmmc-supply = <&vcc_1v8>;
274	status = "okay";
275};
276
277&sdmmc {
278	bus-width = <4>;
279	cap-mmc-highspeed;
280	cap-sd-highspeed;
281	disable-wp;
282	max-frequency = <100000000>;
283	sd-uhs-sdr104;
284	vmmc-supply = <&vcc_3v3>;
285	vqmmc-supply = <&vccio_sd>;
286	status = "okay";
287};
288
289&uart0 {
290	pinctrl-names = "default";
291	pinctrl-0 = <&uart0m0_xfer>;
292	status = "okay";
293};
294