forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -16,6 +16,14 @@
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
+
1927 vcc2v5_sys: vcc2v5-ddr {
2028 compatible = "regulator-fixed";
2129 regulator-name = "vcc2v5-sys";
....@@ -61,7 +69,9 @@
6169 regulator-name = "vcc3v3_pcie";
6270 regulator-min-microvolt = <3300000>;
6371 regulator-max-microvolt = <3300000>;
72
+ regulator-always-on;
6473 enable-active-high;
74
+ regulator-boot-on;
6575 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
6676 startup-delay-us = <5000>;
6777 vin-supply = <&dc_12v>;
....@@ -86,9 +96,8 @@
8696 enable-active-high;
8797 regulator-always-on;
8898 regulator-boot-on;
89
- };
99
+ };
90100 #endif
91
-
92101 ndj_io_init {
93102 compatible = "nk_io_control";
94103 pinctrl-names = "default";
....@@ -141,12 +150,10 @@
141150 gpio_function = <0>;
142151 };
143152
144
- usb_ogt {
145
- gpio_num = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //OTG_EN_OC_GPIO0_C2
153
+ wifi_power_en {
154
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
146155 gpio_function = <0>;
147156 };
148
-
149
-
150157 #if 0
151158 do1 {
152159 gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
....@@ -188,23 +195,48 @@
188195 gpio_function = <1>;
189196 };
190197 #endif
191
- };
192
-
193
- panel: panel {
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 {
194220 compatible = "simple-panel";
195221 backlight = <&backlight>;
196222 power-supply = <&vcc3v3_lcd0_n>;
197
- enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
198
- edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_PWBLK_H_GPIO0_B7
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
199226 edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
200227 bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
201228 bpc = <8>;
202229 prepare-delay-ms = <200>;
203230 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>;
204236
205237 display-timings {
206
- native-mode = <&timing>;
207
- timing: timing {
238
+ native-mode = <&timing0>;
239
+ timing0: timing0 {
208240 clock-frequency = <72500000>;
209241 hactive = <1280>;
210242 vactive = <800>;
....@@ -221,8 +253,8 @@
221253 };
222254 };
223255 ports {
224
- panel_in_lvds: endpoint {
225
- remote-endpoint = <&lvds_out>;
256
+ panel_in: endpoint {
257
+ remote-endpoint = <&edp_out>;
226258 };
227259 };
228260 };
....@@ -288,6 +320,10 @@
288320 * video_phy0 needs to be enabled
289321 * when dsi0 is enabled
290322 */
323
+&video_phy0 {
324
+ status = "disabled";
325
+};
326
+
291327 &dsi0 {
292328 status = "disabled";
293329 };
....@@ -308,6 +344,10 @@
308344 * video_phy1 needs to be enabled
309345 * when dsi1 is enabled
310346 */
347
+
348
+&video_phy1 {
349
+ status = "okay";
350
+};
311351 &dsi1 {
312352 status = "disabled";
313353 };
....@@ -317,39 +357,40 @@
317357 };
318358
319359 &dsi1_in_vp1 {
320
- status = "disabled";
360
+ status = "okay";
321361 };
322362
323363 &dsi1_panel {
324
- 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>;
325370 };
371
+
372
+&route_dsi1 {
373
+ status = "disabled";
374
+ connect = <&vp1_out_dsi1>;
375
+};
376
+
377
+
378
+/*
379
+* edp_start
380
+*/
326381
327382 &edp {
328
- //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
329383 force-hpd;
330
- status = "disabled";
331
-};
332
-
333
-&lvds {
334384 status = "okay";
335385 ports {
336386 port@1 {
337387 reg = <1>;
338
- lvds_out: endpoint {
339
- remote-endpoint = <&panel_in_lvds>;
388
+ edp_out: endpoint {
389
+ remote-endpoint = <&panel_in>;
340390 };
341391 };
342392
343393 };
344
-};
345
-
346
-&route_lvds{
347
- status = "okay";
348
- connect = <&vp2_out_lvds>;
349
-};
350
-
351
-&lvds_in_vp2 {
352
- status = "okay";
353394 };
354395
355396 &edp_phy {
....@@ -357,12 +398,61 @@
357398 };
358399
359400 &edp_in_vp0 {
360
- status = "disabled";
401
+ status = "disabled";
361402 };
362403
363404 &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 {
364415 status = "okay";
365416 };
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 {
446
+ status = "disabled";
447
+};
448
+
449
+&hdmi_sound {
450
+ status = "okay";
451
+};
452
+
453
+/*
454
+ * Hdmi_END
455
+*/
366456
367457 &gmac0 {
368458 phy-mode = "rgmii";
....@@ -388,7 +478,9 @@
388478 rx_delay = <0x2f>;
389479
390480 phy-handle = <&rgmii_phy0>;
481
+
391482 status = "disabled";
483
+
392484 };
393485
394486 &gmac1 {
....@@ -453,7 +545,6 @@
453545 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
454546 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
455547 rockchip,grf = <&grf>;
456
- power-domains = <&power RK3568_PD_VI>;
457548 rockchip,camera-module-index = <0>;
458549 rockchip,camera-module-facing = "back";
459550 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -510,6 +601,19 @@
510601 };
511602 };
512603
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
+
513617 &mdio0 {
514618 rgmii_phy0: phy@0 {
515619 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -524,16 +628,10 @@
524628 };
525629 };
526630
527
-&video_phy0 {
528
- status = "okay";
529
-};
530631
531
-&video_phy1 {
532
- status = "disabled";
533
-};
534632
535633 &pcie30phy {
536
- status = "disabled";
634
+ status = "okay";
537635 };
538636
539637 &pcie2x1 {
....@@ -542,26 +640,39 @@
542640 status = "okay";
543641 };
544642
545
-&pcie3x2 {
546
- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
547
- vpcie3v3-supply = <&vcc3v3_pcie>;
548
- status = "okay";
549
-};
550
-
551643 &pinctrl {
552
-
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
+// };
553651 headphone {
554652 hp_det: hp-det {
555
- 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>;
556655 };
557656 };
558657
559658 wireless-wlan {
560659 wifi_host_wake_irq: wifi-host-wake-irq {
561
- rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
660
+ rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
661
+ };
662
+ };
663
+
664
+ wireless-bluetooth {
665
+ uart1_gpios: uart1-gpios {
666
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
562667 };
563668 };
564669
670
+ lcd1 {
671
+ lcd1_rst_gpio: lcd1-rst-gpio {
672
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
673
+ };
674
+ };
675
+
565676 nk_io_init{
566677 nk_io_gpio: nk-io-gpio{
567678 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -571,7 +682,7 @@
571682 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
572683 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
573684 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
574
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
685
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
575686 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
576687 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
577688 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -587,10 +698,6 @@
587698 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
588699 };
589700 };
590
-};
591
-
592
-&rk809_sound {
593
- hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
594701 };
595702
596703 &rkisp {
....@@ -615,36 +722,30 @@
615722 };
616723 };
617724
618
-&route_dsi0 {
619
- status = "disabled";
620
- connect = <&vp1_out_dsi0>;
621
-};
622725
623
-
624
-
625
-&route_edp {
626
- status = "disabled";
627
- connect = <&vp1_out_edp>;
628
-};
629726
630727 &sata2 {
631728 status = "okay";
632729 };
633730
634731 &sdmmc2 {
635
- max-frequency = <150000000>;
636
- supports-sdio;
637
- bus-width = <4>;
638
- disable-wp;
639
- cap-sd-highspeed;
640
- cap-sdio-irq;
641
- keep-power-in-suspend;
642
- mmc-pwrseq = <&sdio_pwrseq>;
643
- non-removable;
644
- pinctrl-names = "default";
645
- pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
646
- sd-uhs-sdr104;
647
- 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";
648749 };
649750
650751 &spdif_8ch {
....@@ -677,7 +778,17 @@
677778
678779 &wireless_bluetooth {
679780 compatible = "bluetooth-platdata";
680
- status = "disabled";
781
+ clocks = <&rk809 1>;
782
+ clock-names = "ext_clock";
783
+ //wifi-bt-power-toggle;
784
+ uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
785
+ pinctrl-names = "default", "rts_gpio";
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>;
791
+ status = "okay";
681792 };
682793
683794 &uart0 {
....@@ -687,7 +798,7 @@
687798 &uart1 {
688799 pinctrl-names = "default";
689800 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
690
- status = "disabled";
801
+ status = "okay";
691802 };
692803
693804 &uart3 {
....@@ -713,4 +824,4 @@
713824 &uart9 {
714825 status = "okay";
715826 pinctrl-0 = <&uart9m1_xfer>;
716
-};
827
+};