forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-22 9ca5fbcb63a8dcaee0527f96afb91dc4b4bd8fa9
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,8 +86,9 @@
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";
....@@ -141,11 +141,18 @@
141141 gpio_function = <0>;
142142 };
143143
144
- wifi_power_en {
145
- gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
144
+ usb_ogt {
145
+ gpio_num = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //OTG_EN_OC_GPIO0_C2
146146 gpio_function = <0>;
147147 };
148148
149
+ m2_wifi_pwr {
150
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;//WIFI_PWREN_GPIO3_C6_1V8
151
+ gpio_function = <0>;
152
+ };
153
+
154
+
155
+ #if 0
149156 do1 {
150157 gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
151158 gpio_function = <0>;
....@@ -185,48 +192,24 @@
185192 gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
186193 gpio_function = <1>;
187194 };
188
- };
189
-#if 0
190
- nk_io_init {
191
- compatible = "nk_io_control";
192
-// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
193
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
194
- hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
195
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
196
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
197
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
198
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
199
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
200
- wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
201
- hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
202
-// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
203
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
204
-// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
205
- pinctrl-names = "default";
206
- pinctrl-0 = <&nk_io_gpio>;
207
- };
208
-#endif
209
- panel: panel {
195
+ #endif
196
+ };
197
+
198
+ panel: panel {
210199 compatible = "simple-panel";
211200 backlight = <&backlight>;
212201 power-supply = <&vcc3v3_lcd0_n>;
213
- enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
214
- reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
215
- edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
202
+ enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
203
+ edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_PWBLK_H_GPIO0_B7
216204 edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
217205 bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
218206 bpc = <8>;
219207 prepare-delay-ms = <200>;
220208 enable-delay-ms = <20>;
221
- lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
222
- lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
223
- lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
224
- lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
225
- nodka-lvds = <15>;
226209
227210 display-timings {
228
- native-mode = <&timing0>;
229
- timing0: timing0 {
211
+ native-mode = <&timing>;
212
+ timing: timing {
230213 clock-frequency = <72500000>;
231214 hactive = <1280>;
232215 vactive = <800>;
....@@ -243,8 +226,8 @@
243226 };
244227 };
245228 ports {
246
- panel_in: endpoint {
247
- remote-endpoint = <&edp_out>;
229
+ panel_in_lvds: endpoint {
230
+ remote-endpoint = <&lvds_out>;
248231 };
249232 };
250233 };
....@@ -310,10 +293,6 @@
310293 * video_phy0 needs to be enabled
311294 * when dsi0 is enabled
312295 */
313
-&video_phy0 {
314
- status = "disabled";
315
-};
316
-
317296 &dsi0 {
318297 status = "disabled";
319298 };
....@@ -334,10 +313,6 @@
334313 * video_phy1 needs to be enabled
335314 * when dsi1 is enabled
336315 */
337
-
338
-&video_phy1 {
339
- status = "okay";
340
-};
341316 &dsi1 {
342317 status = "disabled";
343318 };
....@@ -347,108 +322,58 @@
347322 };
348323
349324 &dsi1_in_vp1 {
350
- status = "okay";
325
+ status = "disabled";
351326 };
352327
353328 &dsi1_panel {
354
- power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
355
- vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
356
- reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
357
- vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
358
- pinctrl-names = "default";
359
- pinctrl-0 = <&lcd1_rst_gpio>;
329
+ power-supply = <&vcc3v3_lcd1_n>;
360330 };
361
-
362
-&route_dsi1 {
363
- status = "disabled";
364
- connect = <&vp1_out_dsi1>;
365
-};
366
-
367
-
368
-/*
369
-* edp_start
370
-*/
371331
372332 &edp {
333
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
373334 force-hpd;
335
+ status = "disabled";
336
+};
337
+
338
+&lvds {
374339 status = "okay";
375340 ports {
376341 port@1 {
377342 reg = <1>;
378
- edp_out: endpoint {
379
- remote-endpoint = <&panel_in>;
343
+ lvds_out: endpoint {
344
+ remote-endpoint = <&panel_in_lvds>;
380345 };
381346 };
382
- };
347
+
348
+ };
349
+};
350
+
351
+&route_lvds{
352
+ status = "okay";
353
+ connect = <&vp2_out_lvds>;
354
+};
355
+
356
+&lvds_in_vp2 {
357
+ status = "okay";
383358 };
384359
385360 &edp_phy {
386
- status = "okay";
387
-
361
+ status = "okay";
388362 };
389363
390364 &edp_in_vp0 {
391
- status = "disabled";
392
-};
393
-
394
-&edp_in_vp1 {
395
- status = "okay";
396
-
397
-};
398
-
399
-&route_edp {
400
- status = "okay";
401
- connect = <&vp1_out_edp>;
402
-};
403
-
404
-&route_edp {
405
- status = "okay";
406
-};
407
-/*
408
-* edp_end
409
-*/
410
-
411
-/*
412
-* Hdmi_start
413
-*/
414
-
415
-&hdmi {
416
- status = "okay";
417
- rockchip,phy-table =
418
- <92812500 0x8009 0x0000 0x0270>,
419
- <165000000 0x800b 0x0000 0x026d>,
420
- <185625000 0x800b 0x0000 0x01ed>,
421
- <297000000 0x800b 0x0000 0x01ad>,
422
- <594000000 0x8029 0x0000 0x0088>,
423
- <000000000 0x0000 0x0000 0x0000>;
424
-};
425
-
426
-&route_hdmi {
427
- status = "okay";
428
- connect = <&vp0_out_hdmi>;
429
-};
430
-
431
-&hdmi_in_vp0 {
432
- status = "okay";
433
-};
434
-
435
-&hdmi_in_vp1 {
436365 status = "disabled";
437366 };
438367
439
-&hdmi_sound {
368
+&edp_in_vp1 {
440369 status = "okay";
441370 };
442
-
443
-/*
444
- * Hdmi_END
445
-*/
446371
447372 &gmac0 {
448373 phy-mode = "rgmii";
449374 clock_in_out = "output";
450375
451
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
376
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
452377 snps,reset-active-low;
453378 /* Reset time is 20ms, 100ms for rtl8211f */
454379 snps,reset-delays-us = <0 20000 100000>;
....@@ -468,7 +393,9 @@
468393 rx_delay = <0x2f>;
469394
470395 phy-handle = <&rgmii_phy0>;
471
- status = "disabled";
396
+
397
+ status = "okay";
398
+
472399 };
473400
474401 &gmac1 {
....@@ -502,9 +429,7 @@
502429 * power-supply should switche to vcc3v3_lcd1_n
503430 * when mipi panel is connected to dsi1.
504431 */
505
-&gt1x {
506
- power-supply = <&vcc3v3_lcd0_n>;
507
-};
432
+
508433
509434 &i2c3 {
510435 status = "okay";
....@@ -523,7 +448,7 @@
523448 };
524449
525450 &i2c4 {
526
- status = "okay";
451
+ status = "disabled";
527452 gc8034: gc8034@37 {
528453 compatible = "galaxycore,gc8034";
529454 status = "okay";
....@@ -569,7 +494,7 @@
569494 };
570495 };
571496 ov5695: ov5695@36 {
572
- status = "okay";
497
+ status = "disabled";
573498 compatible = "ovti,ov5695";
574499 reg = <0x36>;
575500 clocks = <&cru CLK_CIF_OUT>;
....@@ -592,19 +517,6 @@
592517 };
593518 };
594519
595
-&i2c5 {
596
- status = "okay";
597
-
598
- hym8563: hym8563@51 {
599
- compatible = "haoyu,hym8563";
600
- reg = <0x51>;
601
- #clock-cells = <0>;
602
- clock-frequency = <32768>;
603
- clock-output-names = "xin32k";
604
- /* rtc_int is not connected */
605
- };
606
-};
607
-
608520 &mdio0 {
609521 rgmii_phy0: phy@0 {
610522 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -619,7 +531,13 @@
619531 };
620532 };
621533
534
+&video_phy0 {
535
+ status = "okay";
536
+};
622537
538
+&video_phy1 {
539
+ status = "disabled";
540
+};
623541
624542 &pcie30phy {
625543 status = "okay";
....@@ -631,39 +549,33 @@
631549 status = "okay";
632550 };
633551
552
+&pcie3x2 {
553
+ reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
554
+ vpcie3v3-supply = <&vcc3v3_pcie>;
555
+ status = "disabled";
556
+};
557
+
558
+&pcie3x1 {
559
+ rockchip,bifurcation;
560
+ reset-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
561
+ vpcie3v3-supply = <&vcc3v3_pcie>;
562
+ status = "okay";
563
+};
564
+
634565 &pinctrl {
635
-// cam {
636
-// camera_pwr: camera-pwr {
637
-// rockchip,pins =
638
-// /* camera power en */
639
-// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
640
-// };
641
-// };
566
+
642567 headphone {
643568 hp_det: hp-det {
644
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
645
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
569
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
646570 };
647571 };
648572
649573 wireless-wlan {
650574 wifi_host_wake_irq: wifi-host-wake-irq {
651
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
652
- };
653
- };
654
-
655
- wireless-bluetooth {
656
- uart1_gpios: uart1-gpios {
657
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
575
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
658576 };
659577 };
660578
661
- lcd1 {
662
- lcd1_rst_gpio: lcd1-rst-gpio {
663
- rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
664
- };
665
- };
666
-
667579 nk_io_init{
668580 nk_io_gpio: nk-io-gpio{
669581 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -691,6 +603,10 @@
691603 };
692604 };
693605
606
+&rk809_sound {
607
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
608
+};
609
+
694610 &rkisp {
695611 status = "disabled";
696612 };
....@@ -713,32 +629,36 @@
713629 };
714630 };
715631
632
+&route_dsi0 {
633
+ status = "disabled";
634
+ connect = <&vp1_out_dsi0>;
635
+};
716636
717637
718638
639
+&route_edp {
640
+ status = "disabled";
641
+ connect = <&vp1_out_edp>;
642
+};
719643
720644 &sata2 {
721645 status = "okay";
722646 };
723647
724648 &sdmmc2 {
725
- status = "disabled";
726
-};
727
-
728
-&sdmmc1 {
729
- max-frequency = <150000000>;
730
- supports-sdio;
731
- bus-width = <4>;
732
- disable-wp;
733
- cap-sd-highspeed;
734
- cap-sdio-irq;
735
- keep-power-in-suspend;
736
- mmc-pwrseq = <&sdio_pwrseq>;
737
- non-removable;
738
- pinctrl-names = "default";
739
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
740
- sd-uhs-sdr104;
741
- status = "okay";
649
+ max-frequency = <150000000>;
650
+ supports-sdio;
651
+ bus-width = <4>;
652
+ disable-wp;
653
+ cap-sd-highspeed;
654
+ cap-sdio-irq;
655
+ keep-power-in-suspend;
656
+ mmc-pwrseq = <&sdio_pwrseq>;
657
+ non-removable;
658
+ pinctrl-names = "default";
659
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
660
+ sd-uhs-sdr104;
661
+ status = "okay";
742662 };
743663
744664 &spdif_8ch {
....@@ -771,17 +691,7 @@
771691
772692 &wireless_bluetooth {
773693 compatible = "bluetooth-platdata";
774
- clocks = <&rk809 1>;
775
- clock-names = "ext_clock";
776
- //wifi-bt-power-toggle;
777
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
778
- pinctrl-names = "default", "rts_gpio";
779
- pinctrl-0 = <&uart1m0_rtsn>;
780
- pinctrl-1 = <&uart1_gpios>;
781
- BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
782
- BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
783
- BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
784
- status = "okay";
694
+ status = "disabled";
785695 };
786696
787697 &uart0 {
....@@ -791,7 +701,7 @@
791701 &uart1 {
792702 pinctrl-names = "default";
793703 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
794
- status = "okay";
704
+ status = "disabled";
795705 };
796706
797707 &uart3 {
....@@ -817,4 +727,4 @@
817727 &uart9 {
818728 status = "okay";
819729 pinctrl-0 = <&uart9m1_xfer>;
820
-};
730
+};