forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 0d8657dd3056063fb115946b10157477b5c70451
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
old mode 100644new mode 100755
....@@ -8,6 +8,7 @@
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
....@@ -185,7 +186,44 @@
185186 gpio_function = <1>;
186187 };
187188 #endif
188
-};
189
+ };
190
+
191
+ panel: panel {
192
+ compatible = "simple-panel";
193
+ backlight = <&backlight>;
194
+ power-supply = <&vcc3v3_lcd1_n>;
195
+ enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
196
+ edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_PWBLK_H_GPIO0_B7
197
+ edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
198
+ bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
199
+ bpc = <8>;
200
+ prepare-delay-ms = <200>;
201
+ enable-delay-ms = <20>;
202
+
203
+ display-timings {
204
+ native-mode = <&timing>;
205
+ timing: timing {
206
+ clock-frequency = <72500000>;
207
+ hactive = <1280>;
208
+ vactive = <800>;
209
+ hfront-porch = <70>;
210
+ hsync-len = <2>;
211
+ hback-porch = <88>;
212
+ vfront-porch = <7>;
213
+ vsync-len = <4>;
214
+ vback-porch = <17>;
215
+ hsync-active = <21>;
216
+ vsync-active = <0>;
217
+ de-active = <0>;
218
+ pixelclk-active = <0>;
219
+ };
220
+ };
221
+ ports {
222
+ panel_in_lvds: endpoint {
223
+ remote-endpoint = <&lvds_out>;
224
+ };
225
+ };
226
+ };
189227 };
190228
191229 &combphy0_us {
....@@ -285,7 +323,30 @@
285323 };
286324
287325 &edp {
288
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
326
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
327
+ force-hpd;
328
+ status = "disabled";
329
+};
330
+
331
+&lvds {
332
+ status = "okay";
333
+ ports {
334
+ port@1 {
335
+ reg = <1>;
336
+ lvds_out: endpoint {
337
+ remote-endpoint = <&panel_in_lvds>;
338
+ };
339
+ };
340
+
341
+ };
342
+};
343
+
344
+&route_lvds{
345
+ status = "okay";
346
+ connect = <&vp2_out_lvds>;
347
+};
348
+
349
+&lvds_in_vp2 {
289350 status = "okay";
290351 };
291352
....@@ -294,18 +355,18 @@
294355 };
295356
296357 &edp_in_vp0 {
297
- status = "okay";
358
+ status = "disabled";
298359 };
299360
300361 &edp_in_vp1 {
301
- status = "disabled";
362
+ status = "okay";
302363 };
303364
304365 &gmac0 {
305366 phy-mode = "rgmii";
306367 clock_in_out = "output";
307368
308
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
369
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
309370 snps,reset-active-low;
310371 /* Reset time is 20ms, 100ms for rtl8211f */
311372 snps,reset-delays-us = <0 20000 100000>;
....@@ -325,7 +386,7 @@
325386 rx_delay = <0x2f>;
326387
327388 phy-handle = <&rgmii_phy0>;
328
- status = "disabled";
389
+ status = "okay";
329390 };
330391
331392 &gmac1 {
....@@ -359,8 +420,22 @@
359420 * power-supply should switche to vcc3v3_lcd1_n
360421 * when mipi panel is connected to dsi1.
361422 */
362
-&gt1x {
363
- power-supply = <&vcc3v3_lcd0_n>;
423
+
424
+
425
+&i2c3 {
426
+ status = "okay";
427
+ //mac eeprom
428
+ eeprom@51 {
429
+ //compatible = "atmel,24c02";
430
+ compatible = "atmel,24c256";
431
+ reg = <0x51>;
432
+ };
433
+
434
+ //nk-mcu
435
+ nkmcu@15 {
436
+ compatible = "nk_mcu";
437
+ reg = <0x15>;
438
+ };
364439 };
365440
366441 &i2c4 {
....@@ -448,7 +523,7 @@
448523 };
449524
450525 &video_phy0 {
451
- status = "disabled";
526
+ status = "okay";
452527 };
453528
454529 &video_phy1 {
....@@ -456,6 +531,12 @@
456531 };
457532
458533 &pcie30phy {
534
+ status = "disabled";
535
+};
536
+
537
+&pcie2x1 {
538
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
539
+ vpcie3v3-supply = <&vcc3v3_pcie>;
459540 status = "okay";
460541 };
461542
....@@ -466,13 +547,7 @@
466547 };
467548
468549 &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
- };
550
+
476551 headphone {
477552 hp_det: hp-det {
478553 rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
....@@ -482,12 +557,6 @@
482557 wireless-wlan {
483558 wifi_host_wake_irq: wifi-host-wake-irq {
484559 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
485
- };
486
- };
487
-
488
- wireless-bluetooth {
489
- uart8_gpios: uart8-gpios {
490
- rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
491560 };
492561 };
493562
....@@ -531,7 +600,7 @@
531600 };
532601
533602 &rkisp_vir0 {
534
- status = "okay";
603
+ status = "disabled";
535604
536605 port {
537606 #address-cells = <1>;
....@@ -549,9 +618,11 @@
549618 connect = <&vp1_out_dsi0>;
550619 };
551620
621
+
622
+
552623 &route_edp {
553
- status = "okay";
554
- connect = <&vp0_out_edp>;
624
+ status = "disabled";
625
+ connect = <&vp1_out_edp>;
555626 };
556627
557628 &sata2 {
....@@ -581,38 +652,63 @@
581652 };
582653
583654 &uart8 {
584
- status = "okay";
655
+ status = "disabled";
585656 pinctrl-names = "default";
586657 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
587658 };
588659
589660 &vcc3v3_lcd0_n {
590
- gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
661
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
591662 enable-active-high;
592663 };
593664
594665 &vcc3v3_lcd1_n {
595
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
666
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
596667 enable-active-high;
597668 };
598669
599670 &wireless_wlan {
600671 pinctrl-names = "default";
601672 pinctrl-0 = <&wifi_host_wake_irq>;
602
- WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
673
+ WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
603674 };
604675
605676 &wireless_bluetooth {
606677 compatible = "bluetooth-platdata";
607
- clocks = <&rk809 1>;
608
- clock-names = "ext_clock";
609
- //wifi-bt-power-toggle;
610
- uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
611
- 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>;
678
+ status = "disabled";
679
+};
680
+
681
+&uart0 {
617682 status = "okay";
618683 };
684
+
685
+&uart1 {
686
+ pinctrl-names = "default";
687
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
688
+ status = "disabled";
689
+};
690
+
691
+&uart3 {
692
+ status = "okay";
693
+ pinctrl-0 = <&uart3m1_xfer>;
694
+};
695
+
696
+&uart4 {
697
+ status = "okay";
698
+ pinctrl-0 = <&uart4m1_xfer>;
699
+};
700
+
701
+&uart5 {
702
+ status = "okay";
703
+ pinctrl-0 = <&uart5m1_xfer>;
704
+};
705
+
706
+&uart7 {
707
+ status = "okay";
708
+ pinctrl-0 = <&uart7m1_xfer>;
709
+};
710
+
711
+&uart9 {
712
+ status = "okay";
713
+ pinctrl-0 = <&uart9m1_xfer>;
714
+};