hc
2023-11-06 1622ff3442ff6aecc1f538cda437379d1f6a4a93
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 {
....@@ -466,13 +534,7 @@
466534 };
467535
468536 &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
- };
537
+
476538 headphone {
477539 hp_det: hp-det {
478540 rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
....@@ -531,7 +593,7 @@
531593 };
532594
533595 &rkisp_vir0 {
534
- status = "okay";
596
+ status = "disabled";
535597
536598 port {
537599 #address-cells = <1>;
....@@ -549,9 +611,11 @@
549611 connect = <&vp1_out_dsi0>;
550612 };
551613
614
+
615
+
552616 &route_edp {
553617 status = "okay";
554
- connect = <&vp0_out_edp>;
618
+ connect = <&vp1_out_edp>;
555619 };
556620
557621 &sata2 {
....@@ -581,18 +645,18 @@
581645 };
582646
583647 &uart8 {
584
- status = "okay";
648
+ status = "disabled";
585649 pinctrl-names = "default";
586650 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
587651 };
588652
589653 &vcc3v3_lcd0_n {
590
- gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
654
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
591655 enable-active-high;
592656 };
593657
594658 &vcc3v3_lcd1_n {
595
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
659
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
596660 enable-active-high;
597661 };
598662
....@@ -616,3 +680,38 @@
616680 BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
617681 status = "okay";
618682 };
683
+
684
+&uart0 {
685
+ status = "okay";
686
+};
687
+
688
+&uart1 {
689
+ pinctrl-names = "default";
690
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
691
+ status = "okay";
692
+};
693
+
694
+&uart3 {
695
+ status = "okay";
696
+ pinctrl-0 = <&uart3m1_xfer>;
697
+};
698
+
699
+&uart4 {
700
+ status = "okay";
701
+ pinctrl-0 = <&uart4m1_xfer>;
702
+};
703
+
704
+&uart5 {
705
+ status = "okay";
706
+ pinctrl-0 = <&uart5m1_xfer>;
707
+};
708
+
709
+&uart7 {
710
+ status = "okay";
711
+ pinctrl-0 = <&uart7m1_xfer>;
712
+};
713
+
714
+&uart9 {
715
+ status = "okay";
716
+ pinctrl-0 = <&uart9m1_xfer>;
717
+};