forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-07 5e8555e3ea324daaf0e38422bcba48c4df33a0d9
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -16,14 +16,6 @@
1616 model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
1717 compatible = "rockchip,rk3568-evb1-ddr4-v10", "rockchip,rk3568";
1818
19
- rk_headset: rk-headset {
20
- compatible = "rockchip_headset";
21
- headset_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
22
- spk_ctl_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;//AMP_SD_GPIO4_C2_3V3
23
- pinctrl-names = "default";
24
- pinctrl-0 = <&hp_det>;
25
- };
26
-
2719 vcc2v5_sys: vcc2v5-ddr {
2820 compatible = "regulator-fixed";
2921 regulator-name = "vcc2v5-sys";
....@@ -34,6 +26,15 @@
3426 vin-supply = <&vcc3v3_sys>;
3527 };
3628
29
+ vcc3v3_vga: vcc3v3-vga {
30
+ compatible = "regulator-fixed";
31
+ regulator-name = "vcc3v3_vga";
32
+ regulator-always-on;
33
+ regulator-boot-on;
34
+ gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
35
+ enable-active-high;
36
+ vin-supply = <&vcc3v3_sys>;
37
+ };
3738
3839 pcie30_avdd0v9: pcie30-avdd0v9 {
3940 compatible = "regulator-fixed";
....@@ -60,9 +61,7 @@
6061 regulator-name = "vcc3v3_pcie";
6162 regulator-min-microvolt = <3300000>;
6263 regulator-max-microvolt = <3300000>;
63
- regulator-always-on;
6464 enable-active-high;
65
- regulator-boot-on;
6665 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
6766 startup-delay-us = <5000>;
6867 vin-supply = <&dc_12v>;
....@@ -87,12 +86,16 @@
8786 enable-active-high;
8887 regulator-always-on;
8988 regulator-boot-on;
90
- };
89
+ };
9190 #endif
91
+
9292 ndj_io_init {
9393 compatible = "nk_io_control";
9494 pinctrl-names = "default";
9595 pinctrl-0 = <&nk_io_gpio>;
96
+
97
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
98
+
9699 vcc_5v {
97100 gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
98101 gpio_function = <0>;
....@@ -142,28 +145,50 @@
142145 gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
143146 gpio_function = <0>;
144147 };
145
- };
146
-#if 0
147
- nk_io_init {
148
- compatible = "nk_io_control";
149
-// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
150
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
151
- hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
152
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
153
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
154
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
155
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
156
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
157
- wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
158
- hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
159
-// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
160
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
161
-// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
162
- pinctrl-names = "default";
163
- pinctrl-0 = <&nk_io_gpio>;
164
- };
165
-#endif
166
- panel: panel {
148
+ #if 0
149
+ do1 {
150
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
151
+ gpio_function = <0>;
152
+ };
153
+
154
+ do2 {
155
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
156
+ gpio_function = <0>;
157
+ };
158
+
159
+ do3 {
160
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
161
+ gpio_function = <0>;
162
+ };
163
+
164
+ do4 {
165
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
166
+ gpio_function = <0>;
167
+ };
168
+
169
+ do5 {
170
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
171
+ gpio_function = <0>;
172
+ };
173
+
174
+ do6 {
175
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
176
+ gpio_function = <0>;
177
+ };
178
+
179
+ do7 {
180
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
181
+ gpio_function = <0>;
182
+ };
183
+
184
+ di1 {
185
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
186
+ gpio_function = <1>;
187
+ };
188
+ #endif
189
+ };
190
+
191
+ panel: panel {
167192 compatible = "simple-panel";
168193 backlight = <&backlight>;
169194 power-supply = <&vcc3v3_lcd0_n>;
....@@ -267,10 +292,6 @@
267292 * video_phy0 needs to be enabled
268293 * when dsi0 is enabled
269294 */
270
-&video_phy0 {
271
- status = "disabled";
272
-};
273
-
274295 &dsi0 {
275296 status = "disabled";
276297 };
....@@ -291,10 +312,6 @@
291312 * video_phy1 needs to be enabled
292313 * when dsi1 is enabled
293314 */
294
-
295
-&video_phy1 {
296
- status = "okay";
297
-};
298315 &dsi1 {
299316 status = "disabled";
300317 };
....@@ -304,29 +321,15 @@
304321 };
305322
306323 &dsi1_in_vp1 {
307
- status = "okay";
324
+ status = "disabled";
308325 };
309326
310327 &dsi1_panel {
311
- power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
312
- vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
313
- reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
314
- vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
315
- pinctrl-names = "default";
316
- pinctrl-0 = <&lcd1_rst_gpio>;
328
+ power-supply = <&vcc3v3_lcd1_n>;
317329 };
318
-
319
-&route_dsi1 {
320
- status = "disabled";
321
- connect = <&vp1_out_dsi1>;
322
-};
323
-
324
-
325
-/*
326
-* edp_start
327
-*/
328330
329331 &edp {
332
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
330333 force-hpd;
331334 status = "okay";
332335 ports {
....@@ -336,70 +339,21 @@
336339 remote-endpoint = <&panel_in>;
337340 };
338341 };
339
- };
342
+
343
+ };
340344 };
341345
342346 &edp_phy {
343
- status = "okay";
344
-
347
+ status = "okay";
345348 };
346349
347350 &edp_in_vp0 {
348
- status = "disabled";
349
-};
350
-
351
-&edp_in_vp1 {
352
- status = "okay";
353
-
354
-};
355
-
356
-&route_edp {
357
- status = "okay";
358
- connect = <&vp1_out_edp>;
359
-};
360
-
361
-&route_edp {
362
- status = "okay";
363
-};
364
-/*
365
-* edp_end
366
-*/
367
-
368
-/*
369
-* Hdmi_start
370
-*/
371
-
372
-&hdmi {
373
- status = "okay";
374
- rockchip,phy-table =
375
- <92812500 0x8009 0x0000 0x0270>,
376
- <165000000 0x800b 0x0000 0x026d>,
377
- <185625000 0x800b 0x0000 0x01ed>,
378
- <297000000 0x800b 0x0000 0x01ad>,
379
- <594000000 0x8029 0x0000 0x0088>,
380
- <000000000 0x0000 0x0000 0x0000>;
381
-};
382
-
383
-&route_hdmi {
384
- status = "okay";
385
- connect = <&vp0_out_hdmi>;
386
-};
387
-
388
-&hdmi_in_vp0 {
389
- status = "okay";
390
-};
391
-
392
-&hdmi_in_vp1 {
393351 status = "disabled";
394352 };
395353
396
-&hdmi_sound {
354
+&edp_in_vp1 {
397355 status = "okay";
398356 };
399
-
400
-/*
401
- * Hdmi_END
402
-*/
403357
404358 &gmac0 {
405359 phy-mode = "rgmii";
....@@ -459,9 +413,7 @@
459413 * power-supply should switche to vcc3v3_lcd1_n
460414 * when mipi panel is connected to dsi1.
461415 */
462
-&gt1x {
463
- power-supply = <&vcc3v3_lcd0_n>;
464
-};
416
+
465417
466418 &i2c3 {
467419 status = "okay";
....@@ -480,7 +432,7 @@
480432 };
481433
482434 &i2c4 {
483
- status = "okay";
435
+ status = "disabled";
484436 gc8034: gc8034@37 {
485437 compatible = "galaxycore,gc8034";
486438 status = "okay";
....@@ -526,7 +478,7 @@
526478 };
527479 };
528480 ov5695: ov5695@36 {
529
- status = "okay";
481
+ status = "disabled";
530482 compatible = "ovti,ov5695";
531483 reg = <0x36>;
532484 clocks = <&cru CLK_CIF_OUT>;
....@@ -549,19 +501,6 @@
549501 };
550502 };
551503
552
-&i2c5 {
553
- status = "okay";
554
-
555
- hym8563: hym8563@51 {
556
- compatible = "haoyu,hym8563";
557
- reg = <0x51>;
558
- #clock-cells = <0>;
559
- clock-frequency = <32768>;
560
- clock-output-names = "xin32k";
561
- /* rtc_int is not connected */
562
- };
563
-};
564
-
565504 &mdio0 {
566505 rgmii_phy0: phy@0 {
567506 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -576,51 +515,44 @@
576515 };
577516 };
578517
518
+&video_phy0 {
519
+ status = "disabled";
520
+};
579521
522
+&video_phy1 {
523
+ status = "disabled";
524
+};
580525
581526 &pcie30phy {
582527 status = "okay";
583528 };
584529
585
-&pcie2x1 {
586
- reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
530
+&pcie3x2 {
531
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
587532 vpcie3v3-supply = <&vcc3v3_pcie>;
588533 status = "okay";
589534 };
590535
591536 &pinctrl {
592
-// cam {
593
-// camera_pwr: camera-pwr {
594
-// rockchip,pins =
595
-// /* camera power en */
596
-// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
597
-// };
598
-// };
537
+
599538 headphone {
600539 hp_det: hp-det {
601
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
602
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
540
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
603541 };
604542 };
605543
606544 wireless-wlan {
607545 wifi_host_wake_irq: wifi-host-wake-irq {
608
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
546
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
609547 };
610548 };
611549
612550 wireless-bluetooth {
613
- uart1_gpios: uart1-gpios {
614
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
551
+ uart8_gpios: uart8-gpios {
552
+ rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
615553 };
616554 };
617555
618
- lcd1 {
619
- lcd1_rst_gpio: lcd1-rst-gpio {
620
- rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
621
- };
622
- };
623
-
624556 nk_io_init{
625557 nk_io_gpio: nk-io-gpio{
626558 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -630,7 +562,7 @@
630562 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
631563 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
632564 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
633
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
565
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
634566 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
635567 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
636568 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -646,6 +578,10 @@
646578 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
647579 };
648580 };
581
+};
582
+
583
+&rk809_sound {
584
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
649585 };
650586
651587 &rkisp {
....@@ -670,32 +606,36 @@
670606 };
671607 };
672608
609
+&route_dsi0 {
610
+ status = "disabled";
611
+ connect = <&vp1_out_dsi0>;
612
+};
673613
674614
675615
616
+&route_edp {
617
+ status = "okay";
618
+ connect = <&vp1_out_edp>;
619
+};
676620
677621 &sata2 {
678622 status = "okay";
679623 };
680624
681625 &sdmmc2 {
682
- status = "disabled";
683
-};
684
-
685
-&sdmmc1 {
686
- max-frequency = <150000000>;
687
- supports-sdio;
688
- bus-width = <4>;
689
- disable-wp;
690
- cap-sd-highspeed;
691
- cap-sdio-irq;
692
- keep-power-in-suspend;
693
- mmc-pwrseq = <&sdio_pwrseq>;
694
- non-removable;
695
- pinctrl-names = "default";
696
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
697
- sd-uhs-sdr104;
698
- status = "okay";
626
+ max-frequency = <150000000>;
627
+ supports-sdio;
628
+ bus-width = <4>;
629
+ disable-wp;
630
+ cap-sd-highspeed;
631
+ cap-sdio-irq;
632
+ keep-power-in-suspend;
633
+ mmc-pwrseq = <&sdio_pwrseq>;
634
+ non-removable;
635
+ pinctrl-names = "default";
636
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
637
+ sd-uhs-sdr104;
638
+ status = "okay";
699639 };
700640
701641 &spdif_8ch {
....@@ -723,7 +663,7 @@
723663 &wireless_wlan {
724664 pinctrl-names = "default";
725665 pinctrl-0 = <&wifi_host_wake_irq>;
726
- WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
666
+ WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
727667 };
728668
729669 &wireless_bluetooth {
....@@ -731,13 +671,13 @@
731671 clocks = <&rk809 1>;
732672 clock-names = "ext_clock";
733673 //wifi-bt-power-toggle;
734
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
674
+ uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
735675 pinctrl-names = "default", "rts_gpio";
736
- pinctrl-0 = <&uart1m0_rtsn>;
737
- pinctrl-1 = <&uart1_gpios>;
738
- BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
739
- BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
740
- BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
676
+ pinctrl-0 = <&uart8m0_rtsn>;
677
+ pinctrl-1 = <&uart8_gpios>;
678
+ BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
679
+ BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
680
+ BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
741681 status = "okay";
742682 };
743683
....@@ -774,4 +714,4 @@
774714 &uart9 {
775715 status = "okay";
776716 pinctrl-0 = <&uart9m1_xfer>;
777
-};
717
+};