forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 69d6da3c1c63675524a25e7dc92a4f43c4164cef
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,50 @@
185186 gpio_function = <1>;
186187 };
187188 #endif
188
-};
189
+ };
190
+
191
+ panel: panel {
192
+ compatible = "simple-panel";
193
+ backlight = <&backlight>;
194
+ power-supply = <&vcc3v3_lcd0_n>;
195
+ enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
196
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
197
+ edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
198
+ edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
199
+ bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
200
+ bpc = <8>;
201
+ prepare-delay-ms = <200>;
202
+ enable-delay-ms = <20>;
203
+ lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
204
+ lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
205
+ lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
206
+ lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
207
+ nodka-lvds = <15>;
208
+
209
+ display-timings {
210
+ native-mode = <&timing0>;
211
+ timing0: timing0 {
212
+ clock-frequency = <72500000>;
213
+ hactive = <1280>;
214
+ vactive = <800>;
215
+ hfront-porch = <70>;
216
+ hsync-len = <2>;
217
+ hback-porch = <88>;
218
+ vfront-porch = <7>;
219
+ vsync-len = <4>;
220
+ vback-porch = <17>;
221
+ hsync-active = <21>;
222
+ vsync-active = <0>;
223
+ de-active = <0>;
224
+ pixelclk-active = <0>;
225
+ };
226
+ };
227
+ ports {
228
+ panel_in: endpoint {
229
+ remote-endpoint = <&edp_out>;
230
+ };
231
+ };
232
+ };
189233 };
190234
191235 &combphy0_us {
....@@ -285,8 +329,18 @@
285329 };
286330
287331 &edp {
288
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
289
- status = "okay";
332
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
333
+ force-hpd;
334
+ status = "okay";
335
+ ports {
336
+ port@1 {
337
+ reg = <1>;
338
+ edp_out: endpoint {
339
+ remote-endpoint = <&panel_in>;
340
+ };
341
+ };
342
+
343
+ };
290344 };
291345
292346 &edp_phy {
....@@ -294,11 +348,11 @@
294348 };
295349
296350 &edp_in_vp0 {
297
- status = "okay";
351
+ status = "disabled";
298352 };
299353
300354 &edp_in_vp1 {
301
- status = "disabled";
355
+ status = "okay";
302356 };
303357
304358 &gmac0 {
....@@ -359,8 +413,22 @@
359413 * power-supply should switche to vcc3v3_lcd1_n
360414 * when mipi panel is connected to dsi1.
361415 */
362
-&gt1x {
363
- power-supply = <&vcc3v3_lcd0_n>;
416
+
417
+
418
+&i2c3 {
419
+ status = "okay";
420
+ //mac eeprom
421
+ eeprom@51 {
422
+ //compatible = "atmel,24c02";
423
+ compatible = "atmel,24c256";
424
+ reg = <0x51>;
425
+ };
426
+
427
+ //nk-mcu
428
+ nkmcu@15 {
429
+ compatible = "nk_mcu";
430
+ reg = <0x15>;
431
+ };
364432 };
365433
366434 &i2c4 {
....@@ -456,6 +524,12 @@
456524 };
457525
458526 &pcie30phy {
527
+ status = "disabled";
528
+};
529
+
530
+&pcie2x1 {
531
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
532
+ vpcie3v3-supply = <&vcc3v3_pcie>;
459533 status = "okay";
460534 };
461535
....@@ -466,13 +540,7 @@
466540 };
467541
468542 &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
- };
543
+
476544 headphone {
477545 hp_det: hp-det {
478546 rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
....@@ -486,8 +554,8 @@
486554 };
487555
488556 wireless-bluetooth {
489
- uart8_gpios: uart8-gpios {
490
- rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
557
+ uart1_gpios: uart1-gpios {
558
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
491559 };
492560 };
493561
....@@ -531,7 +599,7 @@
531599 };
532600
533601 &rkisp_vir0 {
534
- status = "okay";
602
+ status = "disabled";
535603
536604 port {
537605 #address-cells = <1>;
....@@ -549,9 +617,11 @@
549617 connect = <&vp1_out_dsi0>;
550618 };
551619
620
+
621
+
552622 &route_edp {
553623 status = "okay";
554
- connect = <&vp0_out_edp>;
624
+ connect = <&vp1_out_edp>;
555625 };
556626
557627 &sata2 {
....@@ -581,25 +651,25 @@
581651 };
582652
583653 &uart8 {
584
- status = "okay";
654
+ status = "disabled";
585655 pinctrl-names = "default";
586656 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
587657 };
588658
589659 &vcc3v3_lcd0_n {
590
- gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
660
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
591661 enable-active-high;
592662 };
593663
594664 &vcc3v3_lcd1_n {
595
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
665
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
596666 enable-active-high;
597667 };
598668
599669 &wireless_wlan {
600670 pinctrl-names = "default";
601671 pinctrl-0 = <&wifi_host_wake_irq>;
602
- WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
672
+ WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
603673 };
604674
605675 &wireless_bluetooth {
....@@ -607,12 +677,47 @@
607677 clocks = <&rk809 1>;
608678 clock-names = "ext_clock";
609679 //wifi-bt-power-toggle;
610
- uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
680
+ uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
611681 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>;
682
+ pinctrl-0 = <&uart1m0_rtsn>;
683
+ pinctrl-1 = <&uart1_gpios>;
684
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
685
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
686
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
617687 status = "okay";
618688 };
689
+
690
+&uart0 {
691
+ status = "okay";
692
+};
693
+
694
+&uart1 {
695
+ pinctrl-names = "default";
696
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
697
+ status = "okay";
698
+};
699
+
700
+&uart3 {
701
+ status = "okay";
702
+ pinctrl-0 = <&uart3m1_xfer>;
703
+};
704
+
705
+&uart4 {
706
+ status = "okay";
707
+ pinctrl-0 = <&uart4m1_xfer>;
708
+};
709
+
710
+&uart5 {
711
+ status = "okay";
712
+ pinctrl-0 = <&uart5m1_xfer>;
713
+};
714
+
715
+&uart7 {
716
+ status = "okay";
717
+ pinctrl-0 = <&uart7m1_xfer>;
718
+};
719
+
720
+&uart9 {
721
+ status = "okay";
722
+ pinctrl-0 = <&uart9m1_xfer>;
723
+};