forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-03-07 b7c0d7ef5080a876d1e2a044d0a51dcb0e0bcf1e
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -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
....@@ -17,7 +18,7 @@
1718
1819 rk_headset: rk-headset {
1920 compatible = "rockchip_headset";
20
- headset_gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
21
+ headset_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
2122 pinctrl-names = "default";
2223 pinctrl-0 = <&hp_det>;
2324 };
....@@ -32,15 +33,6 @@
3233 vin-supply = <&vcc3v3_sys>;
3334 };
3435
35
- vcc3v3_vga: vcc3v3-vga {
36
- compatible = "regulator-fixed";
37
- regulator-name = "vcc3v3_vga";
38
- regulator-always-on;
39
- regulator-boot-on;
40
- gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
41
- enable-active-high;
42
- vin-supply = <&vcc3v3_sys>;
43
- };
4436
4537 pcie30_avdd0v9: pcie30-avdd0v9 {
4638 compatible = "regulator-fixed";
....@@ -67,7 +59,9 @@
6759 regulator-name = "vcc3v3_pcie";
6860 regulator-min-microvolt = <3300000>;
6961 regulator-max-microvolt = <3300000>;
62
+ regulator-always-on;
7063 enable-active-high;
64
+ regulator-boot-on;
7165 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
7266 startup-delay-us = <5000>;
7367 vin-supply = <&dc_12v>;
....@@ -82,7 +76,7 @@
8276 regulator-max-microvolt = <3300000>;
8377 vin-supply = <&vcc5v0_sys>;
8478 };
85
-
79
+#if 0
8680 vcc_camera: vcc-camera-regulator {
8781 compatible = "regulator-fixed";
8882 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
....@@ -92,43 +86,70 @@
9286 enable-active-high;
9387 regulator-always-on;
9488 regulator-boot-on;
95
-
9689 };
90
+#endif
9791
9892 nk_io_init {
9993 compatible = "nk_io_control";
100
- hub_host2_5v_gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; //USB_HOST_PWREN_H_GPIO0_A6
101
- usb_en_oc_gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; //USB_EN_OC_GPIO0_A5
102
- lcd_bk_en_gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
103
- lcd_pwblk_gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
104
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
94
+ vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
10595 hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
10696 hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
107
-// hub_host3_5V_rest_gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
10897 vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
10998 vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
11099 en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
111100 reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
112101 air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
113102 wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
114
-
115
- edp_enable_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
116
- edp_gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>; //7511_GPIO0-GPIO3_D2
117
- edp_gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>; //7511_GPIO1-GPIO3_D3
118
- edp_gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>; //7511_GPIO2-GPIO3_D4
119
- edp_gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>; //7511_GPIO3-GPIO3_D5
120
- edp_reset = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
121
-// tp_reset = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
122
-// vddio_mipi = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
123
-
124
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
125
-
126
- // pinctrl-names = "default";
127
-// pinctrl-0 = <&nk_io_gpio>;
128
- nodka_lvds = <9>;
103
+ hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
104
+ spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
105
+ wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
106
+// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
107
+ pinctrl-names = "default";
108
+ pinctrl-0 = <&nk_io_gpio>;
129109 };
110
+
111
+ panel: panel {
112
+ compatible = "simple-panel";
113
+ backlight = <&backlight>;
114
+ power-supply = <&vcc3v3_lcd0_n>;
115
+ enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
116
+ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
117
+ edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
118
+ edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
119
+ bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
120
+ bpc = <8>;
121
+ prepare-delay-ms = <200>;
122
+ enable-delay-ms = <20>;
123
+ lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
124
+ lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
125
+ lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
126
+ lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
127
+ nodka-lvds = <9>;
130128
131
-
129
+ display-timings {
130
+ native-mode = <&timing0>;
131
+ timing0: timing0 {
132
+ clock-frequency = <142300000>;
133
+ hactive = <1920>;
134
+ vactive = <1080>;
135
+ hfront-porch = <48>;
136
+ hsync-len = <32>;
137
+ hback-porch = <100>;
138
+ vfront-porch = <7>;
139
+ vsync-len = <20>;
140
+ vback-porch = <23>;
141
+ hsync-active = <0>;
142
+ vsync-active = <0>;
143
+ de-active = <0>;
144
+ pixelclk-active = <0>;
145
+ };
146
+ };
147
+ ports {
148
+ panel_in: endpoint {
149
+ remote-endpoint = <&edp_out>;
150
+ };
151
+ };
152
+ };
132153 };
133154
134155 &combphy0_us {
....@@ -144,11 +165,11 @@
144165 };
145166
146167 &csi2_dphy_hw {
147
- status = "okay";
168
+ status = "disabled";
148169 };
149170
150171 &csi2_dphy0 {
151
- status = "okay";
172
+ status = "disabled";
152173
153174 ports {
154175 #address-cells = <1>;
....@@ -191,8 +212,12 @@
191212 * video_phy0 needs to be enabled
192213 * when dsi0 is enabled
193214 */
215
+&video_phy0 {
216
+ status = "disabled";
217
+};
218
+
194219 &dsi0 {
195
- status = "okay";
220
+ status = "disabled";
196221 };
197222
198223 &dsi0_in_vp0 {
....@@ -200,7 +225,7 @@
200225 };
201226
202227 &dsi0_in_vp1 {
203
- status = "okay";
228
+ status = "disabled";
204229 };
205230
206231 &dsi0_panel {
....@@ -211,6 +236,10 @@
211236 * video_phy1 needs to be enabled
212237 * when dsi1 is enabled
213238 */
239
+
240
+&video_phy1 {
241
+ status = "disabled";
242
+};
214243 &dsi1 {
215244 status = "disabled";
216245 };
....@@ -227,22 +256,82 @@
227256 power-supply = <&vcc3v3_lcd1_n>;
228257 };
229258
259
+/*
260
+* edp_start
261
+*/
262
+
230263 &edp {
231
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
232
- status = "okay";
264
+ force-hpd;
265
+ status = "okay";
266
+ ports {
267
+ port@1 {
268
+ reg = <1>;
269
+ edp_out: endpoint {
270
+ remote-endpoint = <&panel_in>;
271
+ };
272
+ };
273
+ };
233274 };
234275
235276 &edp_phy {
236
- status = "okay";
277
+ status = "okay";
237278 };
238279
239280 &edp_in_vp0 {
240
- status = "okay";
281
+ status = "disabled";
241282 };
242283
243284 &edp_in_vp1 {
285
+ status = "okay";
286
+};
287
+
288
+&route_edp {
289
+ status = "okay";
290
+ connect = <&vp1_out_edp>;
291
+};
292
+
293
+&route_edp {
294
+ status = "okay";
295
+};
296
+/*
297
+* edp_end
298
+*/
299
+
300
+/*
301
+* Hdmi_start
302
+*/
303
+
304
+&hdmi {
305
+ status = "okay";
306
+ rockchip,phy-table =
307
+ <92812500 0x8009 0x0000 0x0270>,
308
+ <165000000 0x800b 0x0000 0x026d>,
309
+ <185625000 0x800b 0x0000 0x01ed>,
310
+ <297000000 0x800b 0x0000 0x01ad>,
311
+ <594000000 0x8029 0x0000 0x0088>,
312
+ <000000000 0x0000 0x0000 0x0000>;
313
+};
314
+
315
+&route_hdmi {
316
+ status = "okay";
317
+ connect = <&vp0_out_hdmi>;
318
+};
319
+
320
+&hdmi_in_vp0 {
321
+ status = "okay";
322
+};
323
+
324
+&hdmi_in_vp1 {
244325 status = "disabled";
245326 };
327
+
328
+&hdmi_sound {
329
+ status = "okay";
330
+};
331
+
332
+/*
333
+ * Hdmi_END
334
+*/
246335
247336 &gmac0 {
248337 phy-mode = "rgmii";
....@@ -320,9 +409,6 @@
320409 compatible = "nk_mcu";
321410 reg = <0x15>;
322411 };
323
-
324
-
325
-
326412 };
327413
328414 &i2c4 {
....@@ -395,6 +481,19 @@
395481 };
396482 };
397483
484
+&i2c5 {
485
+ status = "okay";
486
+
487
+ hym8563: hym8563@51 {
488
+ compatible = "haoyu,hym8563";
489
+ reg = <0x51>;
490
+ #clock-cells = <0>;
491
+ clock-frequency = <32768>;
492
+ clock-output-names = "xin32k";
493
+ /* rtc_int is not connected */
494
+ };
495
+};
496
+
398497 &mdio0 {
399498 rgmii_phy0: phy@0 {
400499 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -409,73 +508,77 @@
409508 };
410509 };
411510
412
-&video_phy0 {
413
- status = "okay";
414
-};
415511
416
-&video_phy1 {
417
- status = "disabled";
418
-};
419512
420513 &pcie30phy {
421514 status = "okay";
422515 };
423516
424
-&pcie3x2 {
425
- reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
517
+&pcie2x1 {
518
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
426519 vpcie3v3-supply = <&vcc3v3_pcie>;
427520 status = "okay";
428521 };
429522
430523 &pinctrl {
431
- cam {
432
- camera_pwr: camera-pwr {
433
- rockchip,pins =
434
- /* camera power en */
435
- <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
436
- };
437
- };
524
+// cam {
525
+// camera_pwr: camera-pwr {
526
+// rockchip,pins =
527
+// /* camera power en */
528
+// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
529
+// };
530
+// };
438531 headphone {
439532 hp_det: hp-det {
440
- rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
533
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
441534 };
442535 };
443536
444537 wireless-wlan {
445538 wifi_host_wake_irq: wifi-host-wake-irq {
446
- rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
539
+ rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
447540 };
448541 };
449542
450543 wireless-bluetooth {
451
- uart8_gpios: uart8-gpios {
452
- rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
544
+ uart1_gpios: uart1-gpios {
545
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
453546 };
454547 };
455
-
456
- nk_io_gpio: nk_io_gpio_col{
457
- rockchip,pins =
458
- <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
459
- <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
460
- <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
461
- <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
462
- <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>,
463
- <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
464
- <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
465
- <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
548
+ nk_io_init{
549
+ nk_io_gpio: nk-io-gpio{
550
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
551
+ <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
552
+ <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
553
+ <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
554
+ <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
555
+ <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
556
+ <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
557
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
558
+ <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
559
+ <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
560
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
561
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
562
+ <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
563
+ <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
564
+ <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
565
+ <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
566
+ <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
567
+ <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
568
+ };
466569 };
467570 };
468571
469572 &rkisp {
470
- status = "okay";
573
+ status = "disabled";
471574 };
472575
473576 &rkisp_mmu {
474
- status = "okay";
577
+ status = "disabled";
475578 };
476579
477580 &rkisp_vir0 {
478
- status = "okay";
581
+ status = "disabled";
479582
480583 port {
481584 #address-cells = <1>;
....@@ -489,33 +592,34 @@
489592 };
490593
491594 &route_dsi0 {
492
- status = "okay";
595
+ status = "disabled";
493596 connect = <&vp1_out_dsi0>;
494597 };
495598
496
-&route_edp {
497
- status = "okay";
498
- connect = <&vp0_out_edp>;
499
-};
599
+
500600
501601 &sata2 {
502602 status = "okay";
503603 };
504604
505605 &sdmmc2 {
506
- max-frequency = <150000000>;
507
- supports-sdio;
508
- bus-width = <4>;
509
- disable-wp;
510
- cap-sd-highspeed;
511
- cap-sdio-irq;
512
- keep-power-in-suspend;
513
- mmc-pwrseq = <&sdio_pwrseq>;
514
- non-removable;
515
- pinctrl-names = "default";
516
- pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
517
- sd-uhs-sdr104;
518
- status = "okay";
606
+ status = "disabled";
607
+};
608
+
609
+&sdmmc1 {
610
+ max-frequency = <150000000>;
611
+ supports-sdio;
612
+ bus-width = <4>;
613
+ disable-wp;
614
+ cap-sd-highspeed;
615
+ cap-sdio-irq;
616
+ keep-power-in-suspend;
617
+ mmc-pwrseq = <&sdio_pwrseq>;
618
+ non-removable;
619
+ pinctrl-names = "default";
620
+ pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
621
+ sd-uhs-sdr104;
622
+ status = "okay";
519623 };
520624
521625 &spdif_8ch {
....@@ -531,7 +635,7 @@
531635 };
532636
533637 &vcc3v3_lcd0_n {
534
- gpio = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
638
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
535639 enable-active-high;
536640 };
537641
....@@ -551,12 +655,42 @@
551655 clocks = <&rk809 1>;
552656 clock-names = "ext_clock";
553657 //wifi-bt-power-toggle;
554
- uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
658
+ uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
659
+ BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
555660 pinctrl-names = "default", "rts_gpio";
556
- pinctrl-0 = <&uart8m0_rtsn>;
557
- pinctrl-1 = <&uart8_gpios>;
661
+ pinctrl-0 = <&uart1m0_rtsn>;
662
+ pinctrl-1 = <&uart1_gpios>;
558663 BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
559664 BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
560665 BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
666
+ status = "disabled";
667
+};
668
+
669
+&uart0 {
561670 status = "okay";
562671 };
672
+
673
+&uart3 {
674
+ status = "okay";
675
+ pinctrl-0 = <&uart3m1_xfer>;
676
+};
677
+
678
+&uart4 {
679
+ status = "okay";
680
+ pinctrl-0 = <&uart4m1_xfer>;
681
+};
682
+
683
+&uart5 {
684
+ status = "okay";
685
+ pinctrl-0 = <&uart5m1_xfer>;
686
+};
687
+
688
+&uart7 {
689
+ status = "okay";
690
+ pinctrl-0 = <&uart7m1_xfer>;
691
+};
692
+
693
+&uart9 {
694
+ status = "okay";
695
+ pinctrl-0 = <&uart9m1_xfer>;
696
+};