Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3568-photonicat.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/pinctrl/rockchip.h>
7 #include <dt-bindings/soc/rockchip,vop2.h>
8 #include "rk3568.dtsi"
9
10 / {
11 model = "Ariaboard Photonicat";
12 compatible = "ariaboard,photonicat", "rockchip,rk3568";
13
14 aliases {
15 ethernet0 = &gmac0;
16 ethernet1 = &gmac1;
17 mmc0 = &sdhci;
18 mmc1 = &sdmmc0;
19 mmc2 = &sdmmc1;
20 };
21
22 battery: battery {
23 compatible = "simple-battery";
24 device-chemistry = "lithium-ion";
25 charge-full-design-microamp-hours = <6800000>;
26 energy-full-design-microwatt-hours = <25000000>;
27 voltage-max-design-microvolt = <4200000>;
28 voltage-min-design-microvolt = <3400000>;
29
30 ocv-capacity-celsius = <25>;
31 ocv-capacity-table-0 = <4100000 100>, <4040000 90>,
32 <3980000 80>, <3920000 70>,
33 <3870000 60>, <3820000 50>,
34 <3790000 40>, <3770000 30>,
35 <3740000 20>, <3680000 10>,
36 <3450000 0>;
37 };
38
39 chosen: chosen {
40 stdout-path = "serial2:1500000n8";
41 };
42
43 hdmi_con: hdmi-con {
44 compatible = "hdmi-connector";
45 type = "a";
46
47 port {
48 hdmi_con_in: endpoint {
49 remote-endpoint = <&hdmi_out_con>;
50 };
51 };
52 };
53
54 vcc_1v8: regulator-vcc-1v8 {
55 compatible = "regulator-fixed";
56 regulator-name = "vcc_1v8";
57 regulator-always-on;
58 regulator-boot-on;
59 regulator-min-microvolt = <1800000>;
60 regulator-max-microvolt = <1800000>;
61 vin-supply = <&vcc3v3_sys>;
62 };
63
64 vcc_3v3: regulator-vcc-3v3 {
65 compatible = "regulator-fixed";
66 regulator-name = "vcc_3v3";
67 regulator-always-on;
68 regulator-boot-on;
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
71 vin-supply = <&vcc3v3_sys>;
72 };
73
74 /* actually fed by vcc_syson, dependent
75 * on pi6c clock generator
76 */
77 vcc3v3_pcie: regulator-vcc3v3-pcie {
78 compatible = "regulator-fixed";
79 regulator-name = "vcc3v3_pcie";
80 regulator-always-on;
81 regulator-boot-on;
82 regulator-min-microvolt = <3300000>;
83 regulator-max-microvolt = <3300000>;
84 vin-supply = <&vcc3v3_pi6c>;
85 };
86
87 /* pi6c pcie clock generator */
88 vcc3v3_pi6c: regulator-vcc3v3-pi6c {
89 compatible = "regulator-fixed";
90 enable-active-high;
91 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
92 pinctrl-names = "default";
93 pinctrl-0 = <&pcie_pwren_h>;
94 regulator-name = "vcc3v3_pi6c";
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 vin-supply = <&vcc_syson>;
98 };
99
100 vcc3v3_sd: regulator-vcc3v3-sd {
101 compatible = "regulator-fixed";
102 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
103 pinctrl-names = "default";
104 pinctrl-0 = <&sdmmc0_pwren>;
105 regulator-boot-on;
106 regulator-name = "vcc3v3_sd";
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109 vin-supply = <&vcc_3v3>;
110 };
111
112 vcc3v3_sys: regulator-vcc3v3-sys {
113 compatible = "regulator-fixed";
114 regulator-name = "vcc3v3_sys";
115 regulator-always-on;
116 regulator-boot-on;
117 regulator-min-microvolt = <3300000>;
118 regulator-max-microvolt = <3300000>;
119 vin-supply = <&vcc_syson>;
120 };
121
122 vcc3v4_rf: regulator-vcc3v4-rf {
123 compatible = "regulator-fixed";
124 enable-active-high;
125 gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&rf_pwr_en>;
128 regulator-name = "vcc3v4_rf";
129 regulator-min-microvolt = <3400000>;
130 regulator-max-microvolt = <3400000>;
131 vin-supply = <&vccin_5v>;
132 };
133
134 vcc5v0_usb30_otg0: regulator-vcc5v0-usb30-otg0 {
135 compatible = "regulator-fixed";
136 enable-active-high;
137 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
138 pinctrl-names = "default";
139 pinctrl-0 = <&usb_host_pwren_h>;
140 regulator-name = "vcc5v0_usb30_otg0";
141 regulator-min-microvolt = <5000000>;
142 regulator-max-microvolt = <5000000>;
143 vin-supply = <&vccin_5v>;
144 };
145
146 vccin_5v: regulator-vccin-5v {
147 compatible = "regulator-fixed";
148 regulator-name = "vccin_5v";
149 regulator-always-on;
150 regulator-boot-on;
151 regulator-min-microvolt = <5000000>;
152 regulator-max-microvolt = <5000000>;
153 };
154
155 vcc_sysin: regulator-vcc-sysin {
156 compatible = "regulator-fixed";
157 regulator-name = "vcc_sysin";
158 regulator-always-on;
159 regulator-boot-on;
160 regulator-min-microvolt = <5000000>;
161 regulator-max-microvolt = <5000000>;
162 vin-supply = <&vccin_5v>;
163 };
164
165 vcc_syson: regulator-vcc-syson {
166 compatible = "regulator-fixed";
167 regulator-name = "vcc_syson";
168 regulator-always-on;
169 regulator-boot-on;
170 regulator-min-microvolt = <5000000>;
171 regulator-max-microvolt = <5000000>;
172 vin-supply = <&vcc_sysin>;
173 };
174
175 vcca_1v8: regulator-vcca-1v8 {
176 compatible = "regulator-fixed";
177 regulator-name = "vcca_1v8";
178 regulator-always-on;
179 regulator-boot-on;
180 regulator-min-microvolt = <1800000>;
181 regulator-max-microvolt = <1800000>;
182 vin-supply = <&vcc3v3_sys>;
183 };
184
185 vdda_0v9: regulator-vdda-0v9 {
186 compatible = "regulator-fixed";
187 regulator-name = "vdda_0v9";
188 regulator-always-on;
189 regulator-boot-on;
190 regulator-min-microvolt = <900000>;
191 regulator-max-microvolt = <900000>;
192 vin-supply = <&vcc3v3_sys>;
193 };
194
195 vdd_gpu: regulator-vdd-gpu {
196 compatible = "pwm-regulator";
197 pwms = <&pwm2 0 5000 1>;
198 pwm-supply = <&vcc_syson>;
199 regulator-name = "vdd_gpu";
200 regulator-min-microvolt = <800000>;
201 regulator-max-microvolt = <1350000>;
202 regulator-ramp-delay = <6001>;
203 regulator-settling-time-up-us = <250>;
204 };
205
206 vdd_logic: regulator-vdd-logic {
207 compatible = "pwm-regulator";
208 pwms = <&pwm1 0 5000 1>;
209 pwm-supply = <&vcc_syson>;
210 regulator-name = "vdd_logic";
211 regulator-min-microvolt = <500000>;
212 regulator-max-microvolt = <1350000>;
213 regulator-ramp-delay = <6001>;
214 regulator-settling-time-up-us = <250>;
215 };
216
217 rfkill-modem {
218 compatible = "rfkill-gpio";
219 label = "M.2 USB Modem";
220 radio-type = "wwan";
221 shutdown-gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
222 };
223
224 wifi_pwrseq: wifi-pwrseq {
225 compatible = "mmc-pwrseq-simple";
226 clocks = <&pmucru CLK_RTC_32K>;
227 clock-names = "ext_clock";
228 pinctrl-names = "default";
229 pinctrl-0 = <&wifi_reg_on_h &clk32k_out1>;
230 post-power-on-delay-ms = <200>;
231 reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
232 };
233 };
234
235 &combphy0 {
236 status = "okay";
237 };
238
239 &combphy1 {
240 status = "okay";
241 };
242
243 &combphy2 {
244 status = "okay";
245 };
246
247 &cpu0 {
248 cpu-supply = <&vdd_cpu>;
249 };
250
251 &cpu1 {
252 cpu-supply = <&vdd_cpu>;
253 };
254
255 &cpu2 {
256 cpu-supply = <&vdd_cpu>;
257 };
258
259 &cpu3 {
260 cpu-supply = <&vdd_cpu>;
261 };
262
263 /* Motorcomm YT8521SC LAN port (require SGMII) */
264 &gmac0 {
265 status = "disabled";
266 };
267
268 /* Motorcomm YT8521SC WAN port */
269 &gmac1 {
270 assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
271 assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
272 assigned-clock-rates = <0>, <125000000>;
273 clock_in_out = "output";
274 phy-handle = <&rgmii_phy>;
275 phy-mode = "rgmii-id";
276 phy-supply = <&vcc_3v3>;
277 pinctrl-names = "default";
278 pinctrl-0 = <&gmac1m1_miim
279 &gmac1m1_tx_bus2
280 &gmac1m1_rx_bus2
281 &gmac1m1_rgmii_clk
282 &gmac1m1_rgmii_bus>;
283 status = "okay";
284 };
285
286 &gpu {
287 mali-supply = <&vdd_gpu>;
288 status = "okay";
289 };
290
291 &hdmi {
292 avdd-0v9-supply = <&vdda_0v9>;
293 avdd-1v8-supply = <&vcca_1v8>;
294 status = "okay";
295 };
296
297 &hdmi_in {
298 hdmi_in_vp0: endpoint {
299 remote-endpoint = <&vp0_out_hdmi>;
300 };
301 };
302
303 &hdmi_out {
304 hdmi_out_con: endpoint {
305 remote-endpoint = <&hdmi_con_in>;
306 };
307 };
308
309 &hdmi_sound {
310 status = "okay";
311 };
312
313 &i2c0 {
314 status = "okay";
315
316 vdd_cpu: regulator@1c {
317 compatible = "tcs,tcs4525";
318 reg = <0x1c>;
319 fcs,suspend-voltage-selector = <1>;
320 regulator-name = "vdd_cpu";
321 regulator-always-on;
322 regulator-boot-on;
323 regulator-min-microvolt = <800000>;
324 regulator-max-microvolt = <1150000>;
325 regulator-ramp-delay = <2300>;
326 vin-supply = <&vcc_syson>;
327
328 regulator-state-mem {
329 regulator-off-in-suspend;
330 };
331 };
332 };
333
334 &i2c2 {
335 pinctrl-names = "default";
336 pinctrl-0 = <&i2c2m1_xfer>;
337 status = "okay";
338 };
339
340 &i2s0_8ch {
341 status = "okay";
342 };
343
344 &mdio1 {
345 rgmii_phy: ethernet-phy@3 {
346 compatible = "ethernet-phy-ieee802.3-c22";
347 reg = <0x3>;
348 reset-assert-us = <20000>;
349 reset-deassert-us = <100000>;
350 reset-gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_LOW>;
351 rx-internal-delay-ps = <1500>;
352 tx-internal-delay-ps = <1500>;
353 };
354 };
355
356 &pcie30phy {
357 status = "okay";
358 };
359
360 /* M.2 E-Key for PCIe WLAN */
361 &pcie3x2 {
362 max-link-speed = <1>;
363 num-lanes = <1>;
364 pinctrl-names = "default";
365 pinctrl-0 = <&pcie30x1m0_pins>;
366 reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
367 vpcie3v3-supply = <&vcc3v3_pcie>;
368 status = "okay";
369 };
370
371 &pinctrl {
372 bt {
373 bt_reg_on_h: bt-reg-on-h {
374 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
375 };
376 };
377
378 pcie {
379 pcie_pwren_h: pcie-pwren-h {
380 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
381 };
382 };
383
384 sdmmc0 {
385 sdmmc0_pwren: sdmmc0-pwren {
386 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
387 };
388 };
389
390 usb {
391 rf_pwr_en: rf-pwr-en {
392 rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
393 };
394
395 usb_host_pwren_h: usb-host-pwren-h {
396 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
397 };
398 };
399
400 wifi {
401 wifi_reg_on_h: wifi-reg-on-h {
402 rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
403 };
404 };
405 };
406
407 &pmu_io_domains {
408 pmuio1-supply = <&vcc_3v3>;
409 pmuio2-supply = <&vcc_3v3>;
410 vccio1-supply = <&vcc_3v3>;
411 vccio2-supply = <&vcc_1v8>;
412 vccio3-supply = <&vcc_3v3>;
413 vccio4-supply = <&vcc_1v8>;
414 vccio5-supply = <&vcc_3v3>;
415 vccio6-supply = <&vcc_3v3>;
416 vccio7-supply = <&vcc_3v3>;
417 status = "okay";
418 };
419
420 &pwm1 {
421 status = "okay";
422 };
423
424 &pwm2 {
425 status = "okay";
426 };
427
428 &saradc {
429 vref-supply = <&vcca_1v8>;
430 status = "okay";
431 };
432
433 /* eMMC */
434 &sdhci {
435 bus-width = <8>;
436 max-frequency = <200000000>;
437 mmc-hs200-1_8v;
438 non-removable;
439 pinctrl-names = "default";
440 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
441 vmmc-supply = <&vcc_3v3>;
442 vqmmc-supply = <&vcc_1v8>;
443 status = "okay";
444 };
445
446 /* Micro SD card slot */
447 &sdmmc0 {
448 bus-width = <4>;
449 cap-sd-highspeed;
450 cd-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
451 disable-wp;
452 no-1-8-v;
453 pinctrl-names = "default";
454 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>;
455 vmmc-supply = <&vcc3v3_sd>;
456 vqmmc-supply = <&vcc_3v3>;
457 status = "okay";
458 };
459
460 /* Qualcomm Atheros QCA9377 WiFi */
461 &sdmmc1 {
462 bus-width = <4>;
463 cap-sd-highspeed;
464 cap-sdio-irq;
465 keep-power-in-suspend;
466 mmc-pwrseq = <&wifi_pwrseq>;
467 non-removable;
468 pinctrl-names = "default";
469 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
470 sd-uhs-sdr104;
471 vmmc-supply = <&vcc3v3_sys>;
472 vqmmc-supply = <&vcc_1v8>;
473 #address-cells = <1>;
474 #size-cells = <0>;
475 status = "okay";
476
477 wifi: wifi@1 {
478 reg = <1>;
479 interrupt-parent = <&gpio2>;
480 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_HIGH>;
481 interrupt-names = "host-wake";
482 };
483 };
484
485 &tsadc {
486 rockchip,hw-tshut-mode = <1>;
487 rockchip,hw-tshut-polarity = <0>;
488 status = "okay";
489 };
490
491 /* Qualcomm Atheros QCA9377 Bluetooth */
492 &uart1 {
493 dma-names = "tx", "rx";
494 pinctrl-names = "default";
495 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
496 uart-has-rtscts;
497 status = "okay";
498
499 bluetooth {
500 compatible = "qcom,qca9377-bt";
501 clocks = <&pmucru CLK_RTC_32K>;
502 enable-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
503 pinctrl-names = "default";
504 pinctrl-0 = <&bt_reg_on_h>;
505 vddio-supply = <&vcc_1v8>;
506 };
507 };
508
509 /* Debug UART */
510 &uart2 {
511 status = "okay";
512 };
513
514 &uart3 {
515 dma-names = "tx", "rx";
516 status = "okay";
517 };
518
519 /* Onboard power management MCU */
520 &uart4 {
521 dma-names = "tx", "rx";
522 status = "okay";
523 };
524
525 /* M.2 E-Key for USB Bluetooth */
526 &usb_host0_ehci {
527 status = "okay";
528 };
529
530 &usb_host0_ohci {
531 status = "okay";
532 };
533
534 /* USB Type-A Port */
535 &usb_host0_xhci {
536 dr_mode = "host";
537 status = "okay";
538 };
539
540 /* M.2 B-Key for USB Modem WWAN */
541 &usb_host1_xhci {
542 status = "okay";
543 };
544
545 &usb2phy0 {
546 status = "okay";
547 };
548
549 &usb2phy0_host {
550 phy-supply = <&vcc3v4_rf>;
551 status = "okay";
552 };
553
554 &usb2phy0_otg {
555 phy-supply = <&vcc5v0_usb30_otg0>;
556 status = "okay";
557 };
558
559 &usb2phy1 {
560 status = "okay";
561 };
562
563 &usb2phy1_otg {
564 phy-supply = <&vcc5v0_usb30_otg0>;
565 status = "okay";
566 };
567
568 &vop {
569 assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
570 assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
571 status = "okay";
572 };
573
574 &vop_mmu {
575 status = "okay";
576 };
577
578 &vp0 {
579 vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
580 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
581 remote-endpoint = <&hdmi_in_vp0>;
582 };
583 };
584
585 &xin32k {
586 pinctrl-names = "default";
587 pinctrl-0 = <&clk32k_out1>;
588 };