forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-22 9ca5fbcb63a8dcaee0527f96afb91dc4b4bd8fa9
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
....@@ -140,10 +141,17 @@
140141 gpio_function = <0>;
141142 };
142143
143
- wifi_power_en {
144
- 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
145146 gpio_function = <0>;
146147 };
148
+
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
+
147155 #if 0
148156 do1 {
149157 gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
....@@ -185,7 +193,44 @@
185193 gpio_function = <1>;
186194 };
187195 #endif
188
-};
196
+ };
197
+
198
+ panel: panel {
199
+ compatible = "simple-panel";
200
+ backlight = <&backlight>;
201
+ power-supply = <&vcc3v3_lcd0_n>;
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
204
+ edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
205
+ bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
206
+ bpc = <8>;
207
+ prepare-delay-ms = <200>;
208
+ enable-delay-ms = <20>;
209
+
210
+ display-timings {
211
+ native-mode = <&timing>;
212
+ timing: timing {
213
+ clock-frequency = <72500000>;
214
+ hactive = <1280>;
215
+ vactive = <800>;
216
+ hfront-porch = <70>;
217
+ hsync-len = <2>;
218
+ hback-porch = <88>;
219
+ vfront-porch = <7>;
220
+ vsync-len = <4>;
221
+ vback-porch = <17>;
222
+ hsync-active = <21>;
223
+ vsync-active = <0>;
224
+ de-active = <0>;
225
+ pixelclk-active = <0>;
226
+ };
227
+ };
228
+ ports {
229
+ panel_in_lvds: endpoint {
230
+ remote-endpoint = <&lvds_out>;
231
+ };
232
+ };
233
+ };
189234 };
190235
191236 &combphy0_us {
....@@ -285,7 +330,30 @@
285330 };
286331
287332 &edp {
288
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
333
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
334
+ force-hpd;
335
+ status = "disabled";
336
+};
337
+
338
+&lvds {
339
+ status = "okay";
340
+ ports {
341
+ port@1 {
342
+ reg = <1>;
343
+ lvds_out: endpoint {
344
+ remote-endpoint = <&panel_in_lvds>;
345
+ };
346
+ };
347
+
348
+ };
349
+};
350
+
351
+&route_lvds{
352
+ status = "okay";
353
+ connect = <&vp2_out_lvds>;
354
+};
355
+
356
+&lvds_in_vp2 {
289357 status = "okay";
290358 };
291359
....@@ -294,18 +362,18 @@
294362 };
295363
296364 &edp_in_vp0 {
297
- status = "okay";
365
+ status = "disabled";
298366 };
299367
300368 &edp_in_vp1 {
301
- status = "disabled";
369
+ status = "okay";
302370 };
303371
304372 &gmac0 {
305373 phy-mode = "rgmii";
306374 clock_in_out = "output";
307375
308
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
376
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
309377 snps,reset-active-low;
310378 /* Reset time is 20ms, 100ms for rtl8211f */
311379 snps,reset-delays-us = <0 20000 100000>;
....@@ -325,7 +393,9 @@
325393 rx_delay = <0x2f>;
326394
327395 phy-handle = <&rgmii_phy0>;
328
- status = "disabled";
396
+
397
+ status = "okay";
398
+
329399 };
330400
331401 &gmac1 {
....@@ -359,8 +429,22 @@
359429 * power-supply should switche to vcc3v3_lcd1_n
360430 * when mipi panel is connected to dsi1.
361431 */
362
-&gt1x {
363
- power-supply = <&vcc3v3_lcd0_n>;
432
+
433
+
434
+&i2c3 {
435
+ status = "okay";
436
+ //mac eeprom
437
+ eeprom@51 {
438
+ //compatible = "atmel,24c02";
439
+ compatible = "atmel,24c256";
440
+ reg = <0x51>;
441
+ };
442
+
443
+ //nk-mcu
444
+ nkmcu@15 {
445
+ compatible = "nk_mcu";
446
+ reg = <0x15>;
447
+ };
364448 };
365449
366450 &i2c4 {
....@@ -448,7 +532,7 @@
448532 };
449533
450534 &video_phy0 {
451
- status = "disabled";
535
+ status = "okay";
452536 };
453537
454538 &video_phy1 {
....@@ -459,20 +543,27 @@
459543 status = "okay";
460544 };
461545
546
+&pcie2x1 {
547
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
548
+ vpcie3v3-supply = <&vcc3v3_pcie>;
549
+ status = "okay";
550
+};
551
+
462552 &pcie3x2 {
463
- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
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>;
464561 vpcie3v3-supply = <&vcc3v3_pcie>;
465562 status = "okay";
466563 };
467564
468565 &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
- };
566
+
476567 headphone {
477568 hp_det: hp-det {
478569 rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
....@@ -482,12 +573,6 @@
482573 wireless-wlan {
483574 wifi_host_wake_irq: wifi-host-wake-irq {
484575 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>;
491576 };
492577 };
493578
....@@ -531,7 +616,7 @@
531616 };
532617
533618 &rkisp_vir0 {
534
- status = "okay";
619
+ status = "disabled";
535620
536621 port {
537622 #address-cells = <1>;
....@@ -549,9 +634,11 @@
549634 connect = <&vp1_out_dsi0>;
550635 };
551636
637
+
638
+
552639 &route_edp {
553
- status = "okay";
554
- connect = <&vp0_out_edp>;
640
+ status = "disabled";
641
+ connect = <&vp1_out_edp>;
555642 };
556643
557644 &sata2 {
....@@ -581,38 +668,63 @@
581668 };
582669
583670 &uart8 {
584
- status = "okay";
671
+ status = "disabled";
585672 pinctrl-names = "default";
586673 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
587674 };
588675
589676 &vcc3v3_lcd0_n {
590
- gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
677
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
591678 enable-active-high;
592679 };
593680
594681 &vcc3v3_lcd1_n {
595
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
682
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
596683 enable-active-high;
597684 };
598685
599686 &wireless_wlan {
600687 pinctrl-names = "default";
601688 pinctrl-0 = <&wifi_host_wake_irq>;
602
- WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
689
+ WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
603690 };
604691
605692 &wireless_bluetooth {
606693 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>;
694
+ status = "disabled";
695
+};
696
+
697
+&uart0 {
617698 status = "okay";
618699 };
700
+
701
+&uart1 {
702
+ pinctrl-names = "default";
703
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
704
+ status = "disabled";
705
+};
706
+
707
+&uart3 {
708
+ status = "okay";
709
+ pinctrl-0 = <&uart3m1_xfer>;
710
+};
711
+
712
+&uart4 {
713
+ status = "okay";
714
+ pinctrl-0 = <&uart4m1_xfer>;
715
+};
716
+
717
+&uart5 {
718
+ status = "okay";
719
+ pinctrl-0 = <&uart5m1_xfer>;
720
+};
721
+
722
+&uart7 {
723
+ status = "okay";
724
+ pinctrl-0 = <&uart7m1_xfer>;
725
+};
726
+
727
+&uart9 {
728
+ status = "okay";
729
+ pinctrl-0 = <&uart9m1_xfer>;
730
+};