Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3528-nanopi-zero2.dts

raw
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 model = "FriendlyElec NanoPi Zero2";
12 compatible = "friendlyarm,nanopi-zero2", "rockchip,rk3528";
13
14 aliases {
15 ethernet0 = &gmac1;
16 i2c1 = &i2c1;
17 mmc0 = &sdhci;
18 mmc1 = &sdmmc;
19 serial0 = &uart0;
20 };
21
22 chosen {
23 stdout-path = "serial0:1500000n8";
24 };
25
26 adc-keys-0 {
27 compatible = "adc-keys";
28 io-channels = <&saradc 0>;
29 io-channel-names = "buttons";
30 keyup-threshold-microvolt = <1800000>;
31 poll-interval = <100>;
32
33 button-maskrom {
34 label = "MASK";
35 linux,code = <KEY_SETUP>;
36 press-threshold-microvolt = <0>;
37 };
38 };
39
40 adc-keys-1 {
41 compatible = "adc-keys";
42 io-channels = <&saradc 1>;
43 io-channel-names = "buttons";
44 keyup-threshold-microvolt = <1800000>;
45 poll-interval = <100>;
46
47 button-recovery {
48 label = "RECOVERY";
49 linux,code = <KEY_VENDOR>;
50 press-threshold-microvolt = <0>;
51 };
52 };
53
54 leds {
55 compatible = "gpio-leds";
56 pinctrl-names = "default";
57 pinctrl-0 = <&led1>, <&led_sys>;
58
59 led-0 {
60 color = <LED_COLOR_ID_RED>;
61 default-state = "on";
62 function = LED_FUNCTION_HEARTBEAT;
63 gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
64 linux,default-trigger = "heartbeat";
65 };
66
67 led-1 {
68 color = <LED_COLOR_ID_GREEN>;
69 default-state = "on";
70 function = LED_FUNCTION_STATUS;
71 gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
72 linux,default-trigger = "default-on";
73 };
74 };
75
76 vcc0v6_ddr: regulator-0v6-vcc-ddr {
77 compatible = "regulator-fixed";
78 regulator-name = "vcc0v6_ddr";
79 regulator-always-on;
80 regulator-boot-on;
81 regulator-min-microvolt = <600000>;
82 regulator-max-microvolt = <600000>;
83 vin-supply = <&vcc5v0_sys>;
84 };
85
86 vdd_0v9: regulator-0v9-vdd {
87 compatible = "regulator-fixed";
88 regulator-name = "vdd_0v9";
89 regulator-always-on;
90 regulator-boot-on;
91 regulator-min-microvolt = <900000>;
92 regulator-max-microvolt = <900000>;
93 vin-supply = <&vcc5v0_sys>;
94 };
95
96 vcc_ddr: regulator-1v1-vcc-ddr {
97 compatible = "regulator-fixed";
98 regulator-name = "vcc_ddr";
99 regulator-always-on;
100 regulator-boot-on;
101 regulator-min-microvolt = <1100000>;
102 regulator-max-microvolt = <1100000>;
103 vin-supply = <&vcc5v0_sys>;
104 };
105
106 vcc_1v8: regulator-1v8-vcc {
107 compatible = "regulator-fixed";
108 regulator-name = "vcc_1v8";
109 regulator-always-on;
110 regulator-boot-on;
111 regulator-min-microvolt = <1800000>;
112 regulator-max-microvolt = <1800000>;
113 vin-supply = <&vcc_3v3>;
114 };
115
116 vcc_3v3: regulator-3v3-vcc {
117 compatible = "regulator-fixed";
118 regulator-name = "vcc_3v3";
119 regulator-always-on;
120 regulator-boot-on;
121 regulator-min-microvolt = <3300000>;
122 regulator-max-microvolt = <3300000>;
123 vin-supply = <&vcc5v0_sys>;
124 };
125
126 vcc3v3_sd: regulator-3v3-vcc-sd {
127 compatible = "regulator-fixed";
128 gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>;
129 pinctrl-names = "default";
130 pinctrl-0 = <&sdmmc_pwren_l>;
131 regulator-name = "vcc3v3_sd";
132 regulator-min-microvolt = <3300000>;
133 regulator-max-microvolt = <3300000>;
134 vin-supply = <&vcc_3v3>;
135 };
136
137 vcc5v0_sys: regulator-5v0-vcc-sys {
138 compatible = "regulator-fixed";
139 regulator-name = "vcc5v0_sys";
140 regulator-always-on;
141 regulator-boot-on;
142 regulator-min-microvolt = <5000000>;
143 regulator-max-microvolt = <5000000>;
144 };
145
146 usb2_host_5v: regulator-5v0-usb2-host {
147 compatible = "regulator-fixed";
148 enable-active-high;
149 gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&usb20_host1_pwren>;
152 regulator-name = "usb2_host_5v";
153 regulator-min-microvolt = <5000000>;
154 regulator-max-microvolt = <5000000>;
155 vin-supply = <&vcc5v0_sys>;
156 };
157
158 vccio_sd: regulator-vccio-sd {
159 compatible = "regulator-gpio";
160 gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&sdmmc_vol_ctrl_h>;
163 regulator-name = "vccio_sd";
164 regulator-min-microvolt = <1800000>;
165 regulator-max-microvolt = <3300000>;
166 states = <1800000 0x0>, <3300000 0x1>;
167 vin-supply = <&vcc5v0_sys>;
168 };
169
170 vdd_arm: regulator-vdd-arm {
171 compatible = "pwm-regulator";
172 pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
173 pwm-supply = <&vcc5v0_sys>;
174 regulator-name = "vdd_arm";
175 regulator-always-on;
176 regulator-boot-on;
177 regulator-min-microvolt = <746000>;
178 regulator-max-microvolt = <1201000>;
179 regulator-settling-time-up-us = <250>;
180 };
181
182 vdd_logic: regulator-vdd-logic {
183 compatible = "pwm-regulator";
184 pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
185 pwm-supply = <&vcc5v0_sys>;
186 regulator-name = "vdd_logic";
187 regulator-always-on;
188 regulator-boot-on;
189 regulator-min-microvolt = <705000>;
190 regulator-max-microvolt = <1006000>;
191 regulator-settling-time-up-us = <250>;
192 };
193 };
194
195 &cpu0 {
196 cpu-supply = <&vdd_arm>;
197 };
198
199 &cpu1 {
200 cpu-supply = <&vdd_arm>;
201 };
202
203 &cpu2 {
204 cpu-supply = <&vdd_arm>;
205 };
206
207 &cpu3 {
208 cpu-supply = <&vdd_arm>;
209 };
210
211 &gmac1 {
212 clock_in_out = "output";
213 phy-handle = <&rgmii_phy>;
214 phy-mode = "rgmii-id";
215 phy-supply = <&vcc_3v3>;
216 pinctrl-names = "default";
217 pinctrl-0 = <&rgmii_miim>, <&rgmii_tx_bus2>, <&rgmii_rx_bus2>,
218 <&rgmii_rgmii_clk>, <&rgmii_rgmii_bus>;
219 status = "okay";
220 };
221
222 &gpu {
223 mali-supply = <&vdd_logic>;
224 status = "okay";
225 };
226
227 &i2c1 {
228 pinctrl-names = "default";
229 pinctrl-0 = <&i2c1m0_xfer>;
230 status = "okay";
231
232 hym8563: rtc@51 {
233 compatible = "haoyu,hym8563";
234 reg = <0x51>;
235 #clock-cells = <0>;
236 interrupt-parent = <&gpio4>;
237 interrupts = <RK_PC1 IRQ_TYPE_LEVEL_LOW>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&rtc_int_l>;
240 wakeup-source;
241 };
242 };
243
244 &mdio1 {
245 rgmii_phy: ethernet-phy@1 {
246 compatible = "ethernet-phy-ieee802.3-c22";
247 reg = <0x1>;
248 pinctrl-names = "default";
249 pinctrl-0 = <&gmac1_rstn_l>;
250 reset-assert-us = <20000>;
251 reset-deassert-us = <100000>;
252 reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
253 };
254 };
255
256 &pinctrl {
257 ethernet {
258 gmac1_rstn_l: gmac1-rstn-l {
259 rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
260 };
261 };
262
263 leds {
264 led1: led1 {
265 rockchip,pins = <4 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
266 };
267
268 led_sys: led-sys {
269 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
270 };
271 };
272
273 rtc {
274 rtc_int_l: rtc-int-l {
275 rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
276 };
277 };
278
279 sdmmc {
280 sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
281 rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
282 };
283
284 sdmmc_pwren_l: sdmmc-pwren-l {
285 rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
286 };
287 };
288
289 usb {
290 usb20_host1_pwren: usb20-host1-pwren {
291 rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
292 };
293 };
294 };
295
296 &pwm1 {
297 pinctrl-names = "default";
298 pinctrl-0 = <&pwm1m0_pins>;
299 status = "okay";
300 };
301
302 &pwm2 {
303 pinctrl-names = "default";
304 pinctrl-0 = <&pwm2m0_pins>;
305 status = "okay";
306 };
307
308 &saradc {
309 vref-supply = <&vcc_1v8>;
310 status = "okay";
311 };
312
313 &sdhci {
314 bus-width = <8>;
315 cap-mmc-highspeed;
316 mmc-hs200-1_8v;
317 no-sd;
318 no-sdio;
319 non-removable;
320 vmmc-supply = <&vcc_3v3>;
321 vqmmc-supply = <&vcc_1v8>;
322 status = "okay";
323 };
324
325 &sdmmc {
326 bus-width = <4>;
327 cap-mmc-highspeed;
328 cap-sd-highspeed;
329 disable-wp;
330 sd-uhs-sdr104;
331 vmmc-supply = <&vcc3v3_sd>;
332 vqmmc-supply = <&vccio_sd>;
333 status = "okay";
334 };
335
336 &uart0 {
337 pinctrl-names = "default";
338 pinctrl-0 = <&uart0m0_xfer>;
339 status = "okay";
340 };