forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
old mode 100644new mode 100755
....@@ -8,12 +8,21 @@
88
99 #include <dt-bindings/gpio/gpio.h>
1010 #include <dt-bindings/pinctrl/rockchip.h>
11
+#include <dt-bindings/display/media-bus-format.h>
1112 #include "rk3568.dtsi"
1213 #include "rk3568-evb.dtsi"
1314
1415 / {
1516 model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
1617 compatible = "rockchip,rk3568-evb1-ddr4-v10", "rockchip,rk3568";
18
+
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
+ };
1726
1827 vcc2v5_sys: vcc2v5-ddr {
1928 compatible = "regulator-fixed";
....@@ -60,7 +69,9 @@
6069 regulator-name = "vcc3v3_pcie";
6170 regulator-min-microvolt = <3300000>;
6271 regulator-max-microvolt = <3300000>;
72
+ regulator-always-on;
6373 enable-active-high;
74
+ regulator-boot-on;
6475 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
6576 startup-delay-us = <5000>;
6677 vin-supply = <&dc_12v>;
....@@ -85,9 +96,8 @@
8596 enable-active-high;
8697 regulator-always-on;
8798 regulator-boot-on;
88
- };
99
+ };
89100 #endif
90
-
91101 ndj_io_init {
92102 compatible = "nk_io_control";
93103 pinctrl-names = "default";
....@@ -185,7 +195,69 @@
185195 gpio_function = <1>;
186196 };
187197 #endif
188
-};
198
+ };
199
+#if 0
200
+ nk_io_init {
201
+ compatible = "nk_io_control";
202
+// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
203
+ hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
204
+ hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
205
+ vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
206
+ vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
207
+ en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
208
+ reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
209
+ air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
210
+ wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
211
+ hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
212
+// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
213
+ wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
214
+// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
215
+ pinctrl-names = "default";
216
+ pinctrl-0 = <&nk_io_gpio>;
217
+ };
218
+#endif
219
+ panel: panel {
220
+ compatible = "simple-panel";
221
+ backlight = <&backlight>;
222
+ power-supply = <&vcc3v3_lcd0_n>;
223
+ enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
224
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
225
+ edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
226
+ edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
227
+ bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
228
+ bpc = <8>;
229
+ prepare-delay-ms = <200>;
230
+ enable-delay-ms = <20>;
231
+ lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
232
+ lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
233
+ lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
234
+ lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
235
+ nodka-lvds = <15>;
236
+
237
+ display-timings {
238
+ native-mode = <&timing0>;
239
+ timing0: timing0 {
240
+ clock-frequency = <72500000>;
241
+ hactive = <1280>;
242
+ vactive = <800>;
243
+ hfront-porch = <70>;
244
+ hsync-len = <2>;
245
+ hback-porch = <88>;
246
+ vfront-porch = <7>;
247
+ vsync-len = <4>;
248
+ vback-porch = <17>;
249
+ hsync-active = <21>;
250
+ vsync-active = <0>;
251
+ de-active = <0>;
252
+ pixelclk-active = <0>;
253
+ };
254
+ };
255
+ ports {
256
+ panel_in: endpoint {
257
+ remote-endpoint = <&edp_out>;
258
+ };
259
+ };
260
+ };
189261 };
190262
191263 &combphy0_us {
....@@ -248,6 +320,10 @@
248320 * video_phy0 needs to be enabled
249321 * when dsi0 is enabled
250322 */
323
+&video_phy0 {
324
+ status = "disabled";
325
+};
326
+
251327 &dsi0 {
252328 status = "disabled";
253329 };
....@@ -268,6 +344,10 @@
268344 * video_phy1 needs to be enabled
269345 * when dsi1 is enabled
270346 */
347
+
348
+&video_phy1 {
349
+ status = "okay";
350
+};
271351 &dsi1 {
272352 status = "disabled";
273353 };
....@@ -277,16 +357,40 @@
277357 };
278358
279359 &dsi1_in_vp1 {
280
- status = "disabled";
360
+ status = "okay";
281361 };
282362
283363 &dsi1_panel {
284
- power-supply = <&vcc3v3_lcd1_n>;
364
+ power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
365
+ vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
366
+ reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
367
+ vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
368
+ pinctrl-names = "default";
369
+ pinctrl-0 = <&lcd1_rst_gpio>;
285370 };
286371
372
+&route_dsi1 {
373
+ status = "disabled";
374
+ connect = <&vp1_out_dsi1>;
375
+};
376
+
377
+
378
+/*
379
+* edp_start
380
+*/
381
+
287382 &edp {
288
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
289
- status = "okay";
383
+ force-hpd;
384
+ status = "okay";
385
+ ports {
386
+ port@1 {
387
+ reg = <1>;
388
+ edp_out: endpoint {
389
+ remote-endpoint = <&panel_in>;
390
+ };
391
+ };
392
+
393
+ };
290394 };
291395
292396 &edp_phy {
....@@ -294,18 +398,67 @@
294398 };
295399
296400 &edp_in_vp0 {
297
- status = "okay";
401
+ status = "disabled";
298402 };
299403
300404 &edp_in_vp1 {
405
+ status = "okay";
406
+
407
+};
408
+
409
+&route_edp {
410
+ status = "okay";
411
+ connect = <&vp1_out_edp>;
412
+};
413
+
414
+&route_edp {
415
+ status = "okay";
416
+};
417
+/*
418
+* edp_end
419
+*/
420
+
421
+/*
422
+* Hdmi_start
423
+*/
424
+
425
+&hdmi {
426
+ status = "okay";
427
+ rockchip,phy-table =
428
+ <92812500 0x8009 0x0000 0x0270>,
429
+ <165000000 0x800b 0x0000 0x026d>,
430
+ <185625000 0x800b 0x0000 0x01ed>,
431
+ <297000000 0x800b 0x0000 0x01ad>,
432
+ <594000000 0x8029 0x0000 0x0088>,
433
+ <000000000 0x0000 0x0000 0x0000>;
434
+};
435
+
436
+&route_hdmi {
437
+ status = "okay";
438
+ connect = <&vp0_out_hdmi>;
439
+};
440
+
441
+&hdmi_in_vp0 {
442
+ status = "okay";
443
+};
444
+
445
+&hdmi_in_vp1 {
301446 status = "disabled";
302447 };
448
+
449
+&hdmi_sound {
450
+ status = "okay";
451
+};
452
+
453
+/*
454
+ * Hdmi_END
455
+*/
303456
304457 &gmac0 {
305458 phy-mode = "rgmii";
306459 clock_in_out = "output";
307460
308
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
461
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
309462 snps,reset-active-low;
310463 /* Reset time is 20ms, 100ms for rtl8211f */
311464 snps,reset-delays-us = <0 20000 100000>;
....@@ -325,7 +478,9 @@
325478 rx_delay = <0x2f>;
326479
327480 phy-handle = <&rgmii_phy0>;
481
+
328482 status = "disabled";
483
+
329484 };
330485
331486 &gmac1 {
....@@ -359,8 +514,22 @@
359514 * power-supply should switche to vcc3v3_lcd1_n
360515 * when mipi panel is connected to dsi1.
361516 */
362
-&gt1x {
363
- power-supply = <&vcc3v3_lcd0_n>;
517
+
518
+
519
+&i2c3 {
520
+ status = "okay";
521
+ //mac eeprom
522
+ eeprom@51 {
523
+ //compatible = "atmel,24c02";
524
+ compatible = "atmel,24c256";
525
+ reg = <0x51>;
526
+ };
527
+
528
+ //nk-mcu
529
+ nkmcu@15 {
530
+ compatible = "nk_mcu";
531
+ reg = <0x15>;
532
+ };
364533 };
365534
366535 &i2c4 {
....@@ -376,7 +545,6 @@
376545 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
377546 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
378547 rockchip,grf = <&grf>;
379
- power-domains = <&power RK3568_PD_VI>;
380548 rockchip,camera-module-index = <0>;
381549 rockchip,camera-module-facing = "back";
382550 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -433,6 +601,19 @@
433601 };
434602 };
435603
604
+&i2c5 {
605
+ status = "okay";
606
+
607
+ hym8563: hym8563@51 {
608
+ compatible = "haoyu,hym8563";
609
+ reg = <0x51>;
610
+ #clock-cells = <0>;
611
+ clock-frequency = <32768>;
612
+ clock-output-names = "xin32k";
613
+ /* rtc_int is not connected */
614
+ };
615
+};
616
+
436617 &mdio0 {
437618 rgmii_phy0: phy@0 {
438619 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -447,50 +628,51 @@
447628 };
448629 };
449630
450
-&video_phy0 {
451
- status = "disabled";
452
-};
453631
454
-&video_phy1 {
455
- status = "disabled";
456
-};
457632
458633 &pcie30phy {
459634 status = "okay";
460635 };
461636
462
-&pcie3x2 {
463
- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
637
+&pcie2x1 {
638
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
464639 vpcie3v3-supply = <&vcc3v3_pcie>;
465640 status = "okay";
466641 };
467642
468643 &pinctrl {
469
- cam {
470
- camera_pwr: camera-pwr {
471
- rockchip,pins =
472
- /* camera power en */
473
- <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
474
- };
475
- };
644
+// cam {
645
+// camera_pwr: camera-pwr {
646
+// rockchip,pins =
647
+// /* camera power en */
648
+// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
649
+// };
650
+// };
476651 headphone {
477652 hp_det: hp-det {
478
- rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
653
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
654
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
479655 };
480656 };
481657
482658 wireless-wlan {
483659 wifi_host_wake_irq: wifi-host-wake-irq {
484
- rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
660
+ rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
485661 };
486662 };
487663
488664 wireless-bluetooth {
489
- uart8_gpios: uart8-gpios {
490
- rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
665
+ uart1_gpios: uart1-gpios {
666
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
491667 };
492668 };
493669
670
+ lcd1 {
671
+ lcd1_rst_gpio: lcd1-rst-gpio {
672
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
673
+ };
674
+ };
675
+
494676 nk_io_init{
495677 nk_io_gpio: nk-io-gpio{
496678 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -500,7 +682,7 @@
500682 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
501683 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
502684 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
503
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
685
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
504686 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
505687 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
506688 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -518,10 +700,6 @@
518700 };
519701 };
520702
521
-&rk809_sound {
522
- hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
523
-};
524
-
525703 &rkisp {
526704 status = "disabled";
527705 };
....@@ -531,7 +709,7 @@
531709 };
532710
533711 &rkisp_vir0 {
534
- status = "okay";
712
+ status = "disabled";
535713
536714 port {
537715 #address-cells = <1>;
....@@ -544,34 +722,30 @@
544722 };
545723 };
546724
547
-&route_dsi0 {
548
- status = "disabled";
549
- connect = <&vp1_out_dsi0>;
550
-};
551725
552
-&route_edp {
553
- status = "okay";
554
- connect = <&vp0_out_edp>;
555
-};
556726
557727 &sata2 {
558728 status = "okay";
559729 };
560730
561731 &sdmmc2 {
562
- max-frequency = <150000000>;
563
- supports-sdio;
564
- bus-width = <4>;
565
- disable-wp;
566
- cap-sd-highspeed;
567
- cap-sdio-irq;
568
- keep-power-in-suspend;
569
- mmc-pwrseq = <&sdio_pwrseq>;
570
- non-removable;
571
- pinctrl-names = "default";
572
- pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
573
- sd-uhs-sdr104;
574
- status = "okay";
732
+ status = "disabled";
733
+};
734
+
735
+&sdmmc1 {
736
+ max-frequency = <150000000>;
737
+ supports-sdio;
738
+ bus-width = <4>;
739
+ disable-wp;
740
+ cap-sd-highspeed;
741
+ cap-sdio-irq;
742
+ keep-power-in-suspend;
743
+ mmc-pwrseq = <&sdio_pwrseq>;
744
+ non-removable;
745
+ pinctrl-names = "default";
746
+ pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
747
+ sd-uhs-sdr104;
748
+ status = "okay";
575749 };
576750
577751 &spdif_8ch {
....@@ -581,25 +755,25 @@
581755 };
582756
583757 &uart8 {
584
- status = "okay";
758
+ status = "disabled";
585759 pinctrl-names = "default";
586760 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
587761 };
588762
589763 &vcc3v3_lcd0_n {
590
- gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
764
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
591765 enable-active-high;
592766 };
593767
594768 &vcc3v3_lcd1_n {
595
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
769
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
596770 enable-active-high;
597771 };
598772
599773 &wireless_wlan {
600774 pinctrl-names = "default";
601775 pinctrl-0 = <&wifi_host_wake_irq>;
602
- WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
776
+ WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
603777 };
604778
605779 &wireless_bluetooth {
....@@ -607,12 +781,47 @@
607781 clocks = <&rk809 1>;
608782 clock-names = "ext_clock";
609783 //wifi-bt-power-toggle;
610
- uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
784
+ uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
611785 pinctrl-names = "default", "rts_gpio";
612
- pinctrl-0 = <&uart8m0_rtsn>;
613
- pinctrl-1 = <&uart8_gpios>;
614
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
615
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
616
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
786
+ pinctrl-0 = <&uart1m0_rtsn>;
787
+ pinctrl-1 = <&uart1_gpios>;
788
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
789
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
790
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
617791 status = "okay";
618792 };
793
+
794
+&uart0 {
795
+ status = "okay";
796
+};
797
+
798
+&uart1 {
799
+ pinctrl-names = "default";
800
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
801
+ status = "okay";
802
+};
803
+
804
+&uart3 {
805
+ status = "okay";
806
+ pinctrl-0 = <&uart3m1_xfer>;
807
+};
808
+
809
+&uart4 {
810
+ status = "okay";
811
+ pinctrl-0 = <&uart4m1_xfer>;
812
+};
813
+
814
+&uart5 {
815
+ status = "okay";
816
+ pinctrl-0 = <&uart5m1_xfer>;
817
+};
818
+
819
+&uart7 {
820
+ status = "okay";
821
+ pinctrl-0 = <&uart7m1_xfer>;
822
+};
823
+
824
+&uart9 {
825
+ status = "okay";
826
+ pinctrl-0 = <&uart9m1_xfer>;
827
+};