forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 0d8657dd3056063fb115946b10157477b5c70451
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -8,19 +8,13 @@
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
1415 / {
1516 model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
1617 compatible = "rockchip,rk3568-evb1-ddr4-v10", "rockchip,rk3568";
17
-
18
- rk_headset: rk-headset {
19
- compatible = "rockchip_headset";
20
- headset_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
21
- pinctrl-names = "default";
22
- pinctrl-0 = <&hp_det>;
23
- };
2418
2519 vcc2v5_sys: vcc2v5-ddr {
2620 compatible = "regulator-fixed";
....@@ -32,6 +26,15 @@
3226 vin-supply = <&vcc3v3_sys>;
3327 };
3428
29
+ vcc3v3_vga: vcc3v3-vga {
30
+ compatible = "regulator-fixed";
31
+ regulator-name = "vcc3v3_vga";
32
+ regulator-always-on;
33
+ regulator-boot-on;
34
+ gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
35
+ enable-active-high;
36
+ vin-supply = <&vcc3v3_sys>;
37
+ };
3538
3639 pcie30_avdd0v9: pcie30-avdd0v9 {
3740 compatible = "regulator-fixed";
....@@ -83,42 +86,144 @@
8386 enable-active-high;
8487 regulator-always-on;
8588 regulator-boot-on;
86
- };
89
+ };
8790 #endif
8891
89
- nk_io_init {
90
- compatible = "nk_io_control";
91
-// usb_en_oc_gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; //USB_EN_OC_GPIO0_A5
92
- lcd_bk_en_gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
93
- lcd_pwblk_gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
94
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
95
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
96
- hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
97
-// hub_host3_5V_rest_gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
98
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
99
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
100
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
101
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
102
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
103
- wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
104
- hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
105
- spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
106
-
107
- edp_enable_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
108
- edp_gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
109
- edp_gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
110
- edp_gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
111
- edp_gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
112
- edp_reset = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
113
-// tp_reset = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
114
-// vddio_mipi = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
115
-
116
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
92
+ ndj_io_init {
93
+ compatible = "nk_io_control";
94
+ pinctrl-names = "default";
95
+ pinctrl-0 = <&nk_io_gpio>;
96
+
97
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
98
+
99
+ vcc_5v {
100
+ gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
101
+ gpio_function = <0>;
102
+ };
103
+
104
+ vcc_12v {
105
+ gpio_num = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
106
+ gpio_function = <0>;
107
+ };
108
+
109
+ hub_host2_rst {
110
+ gpio_num = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
111
+ gpio_function = <3>;
112
+ };
113
+
114
+ hub_host3 {
115
+ gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
116
+ gpio_function = <0>;
117
+ };
118
+
119
+ wake_4g {
120
+ gpio_num = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //4G_WAKEUP_GPIO01_B1_3V3
121
+ gpio_function = <0>;
122
+ };
123
+
124
+ air_mode_4g {
125
+ gpio_num = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; //4G_AIR_MODE_GPIO01_B0_3V3
126
+ gpio_function = <0>;
127
+ };
128
+
129
+ reset_4g {
130
+ gpio_num = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //4G_RST_GPIO01_B2_3V3
131
+ gpio_function = <3>;
132
+ };
133
+
134
+ en_4g {
135
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
136
+ gpio_function = <0>;
137
+ };
138
+
139
+ hp_en {
140
+ gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
141
+ gpio_function = <0>;
142
+ };
143
+
144
+ wifi_power_en {
145
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
146
+ gpio_function = <0>;
147
+ };
148
+ #if 0
149
+ do1 {
150
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
151
+ gpio_function = <0>;
152
+ };
153
+
154
+ do2 {
155
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
156
+ gpio_function = <0>;
157
+ };
158
+
159
+ do3 {
160
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
161
+ gpio_function = <0>;
162
+ };
163
+
164
+ do4 {
165
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
166
+ gpio_function = <0>;
167
+ };
168
+
169
+ do5 {
170
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
171
+ gpio_function = <0>;
172
+ };
173
+
174
+ do6 {
175
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
176
+ gpio_function = <0>;
177
+ };
178
+
179
+ do7 {
180
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
181
+ gpio_function = <0>;
182
+ };
183
+
184
+ di1 {
185
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
186
+ gpio_function = <1>;
187
+ };
188
+ #endif
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>;
117202
118
- pinctrl-names = "default";
119
- pinctrl-0 = <&nk_io_gpio>;
120
- nodka_lvds = <9>;
121
- };
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
+ };
122227 };
123228
124229 &combphy0_us {
....@@ -134,11 +239,11 @@
134239 };
135240
136241 &csi2_dphy_hw {
137
- status = "okay";
242
+ status = "disabled";
138243 };
139244
140245 &csi2_dphy0 {
141
- status = "okay";
246
+ status = "disabled";
142247
143248 ports {
144249 #address-cells = <1>;
....@@ -182,7 +287,7 @@
182287 * when dsi0 is enabled
183288 */
184289 &dsi0 {
185
- status = "okay";
290
+ status = "disabled";
186291 };
187292
188293 &dsi0_in_vp0 {
....@@ -190,7 +295,7 @@
190295 };
191296
192297 &dsi0_in_vp1 {
193
- status = "okay";
298
+ status = "disabled";
194299 };
195300
196301 &dsi0_panel {
....@@ -218,7 +323,30 @@
218323 };
219324
220325 &edp {
221
- 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 {
222350 status = "okay";
223351 };
224352
....@@ -227,18 +355,18 @@
227355 };
228356
229357 &edp_in_vp0 {
230
- status = "okay";
358
+ status = "disabled";
231359 };
232360
233361 &edp_in_vp1 {
234
- status = "disabled";
362
+ status = "okay";
235363 };
236364
237365 &gmac0 {
238366 phy-mode = "rgmii";
239367 clock_in_out = "output";
240368
241
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
369
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
242370 snps,reset-active-low;
243371 /* Reset time is 20ms, 100ms for rtl8211f */
244372 snps,reset-delays-us = <0 20000 100000>;
....@@ -258,7 +386,7 @@
258386 rx_delay = <0x2f>;
259387
260388 phy-handle = <&rgmii_phy0>;
261
- status = "disabled";
389
+ status = "okay";
262390 };
263391
264392 &gmac1 {
....@@ -292,9 +420,7 @@
292420 * power-supply should switche to vcc3v3_lcd1_n
293421 * when mipi panel is connected to dsi1.
294422 */
295
-&gt1x {
296
- power-supply = <&vcc3v3_lcd0_n>;
297
-};
423
+
298424
299425 &i2c3 {
300426 status = "okay";
....@@ -313,7 +439,7 @@
313439 };
314440
315441 &i2c4 {
316
- status = "okay";
442
+ status = "disabled";
317443 gc8034: gc8034@37 {
318444 compatible = "galaxycore,gc8034";
319445 status = "okay";
....@@ -359,7 +485,7 @@
359485 };
360486 };
361487 ov5695: ov5695@36 {
362
- status = "okay";
488
+ status = "disabled";
363489 compatible = "ovti,ov5695";
364490 reg = <0x36>;
365491 clocks = <&cru CLK_CIF_OUT>;
....@@ -379,19 +505,6 @@
379505 data-lanes = <1 2>;
380506 };
381507 };
382
- };
383
-};
384
-
385
-&i2c5 {
386
- status = "okay";
387
-
388
- hym8563: hym8563@51 {
389
- compatible = "haoyu,hym8563";
390
- reg = <0x51>;
391
- #clock-cells = <0>;
392
- clock-frequency = <32768>;
393
- clock-output-names = "xin32k";
394
- /* rtc_int is not connected */
395508 };
396509 };
397510
....@@ -418,6 +531,12 @@
418531 };
419532
420533 &pcie30phy {
534
+ status = "disabled";
535
+};
536
+
537
+&pcie2x1 {
538
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
539
+ vpcie3v3-supply = <&vcc3v3_pcie>;
421540 status = "okay";
422541 };
423542
....@@ -428,30 +547,19 @@
428547 };
429548
430549 &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
-// };
550
+
438551 headphone {
439552 hp_det: hp-det {
440
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
553
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
441554 };
442555 };
443556
444557 wireless-wlan {
445558 wifi_host_wake_irq: wifi-host-wake-irq {
446
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
559
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
447560 };
448561 };
449
-
450
- wireless-bluetooth {
451
- uart1_gpios: uart1-gpios {
452
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
453
- };
454
- };
562
+
455563 nk_io_init{
456564 nk_io_gpio: nk-io-gpio{
457565 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -461,31 +569,38 @@
461569 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
462570 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
463571 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
464
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
572
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
465573 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
466574 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
467575 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
468
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
469576 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
470577 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
471578 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
472579 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
473580 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
581
+ <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
582
+ <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
583
+ <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
584
+ <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
474585 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
475586 };
476587 };
477588 };
478589
590
+&rk809_sound {
591
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
592
+};
593
+
479594 &rkisp {
480
- status = "okay";
595
+ status = "disabled";
481596 };
482597
483598 &rkisp_mmu {
484
- status = "okay";
599
+ status = "disabled";
485600 };
486601
487602 &rkisp_vir0 {
488
- status = "okay";
603
+ status = "disabled";
489604
490605 port {
491606 #address-cells = <1>;
....@@ -499,13 +614,15 @@
499614 };
500615
501616 &route_dsi0 {
502
- status = "okay";
617
+ status = "disabled";
503618 connect = <&vp1_out_dsi0>;
504619 };
505620
621
+
622
+
506623 &route_edp {
507
- status = "okay";
508
- connect = <&vp0_out_edp>;
624
+ status = "disabled";
625
+ connect = <&vp1_out_edp>;
509626 };
510627
511628 &sata2 {
....@@ -513,23 +630,19 @@
513630 };
514631
515632 &sdmmc2 {
516
- status = "disabled";
517
-};
518
-
519
-&sdmmc1 {
520
- max-frequency = <150000000>;
521
- supports-sdio;
522
- bus-width = <4>;
523
- disable-wp;
524
- cap-sd-highspeed;
525
- cap-sdio-irq;
526
- keep-power-in-suspend;
527
- mmc-pwrseq = <&sdio_pwrseq>;
528
- non-removable;
529
- pinctrl-names = "default";
530
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
531
- sd-uhs-sdr104;
532
- status = "okay";
633
+ max-frequency = <150000000>;
634
+ supports-sdio;
635
+ bus-width = <4>;
636
+ disable-wp;
637
+ cap-sd-highspeed;
638
+ cap-sdio-irq;
639
+ keep-power-in-suspend;
640
+ mmc-pwrseq = <&sdio_pwrseq>;
641
+ non-removable;
642
+ pinctrl-names = "default";
643
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
644
+ sd-uhs-sdr104;
645
+ status = "okay";
533646 };
534647
535648 &spdif_8ch {
....@@ -545,12 +658,12 @@
545658 };
546659
547660 &vcc3v3_lcd0_n {
548
- gpio = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
661
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
549662 enable-active-high;
550663 };
551664
552665 &vcc3v3_lcd1_n {
553
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
666
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
554667 enable-active-high;
555668 };
556669
....@@ -562,22 +675,17 @@
562675
563676 &wireless_bluetooth {
564677 compatible = "bluetooth-platdata";
565
- clocks = <&rk809 1>;
566
- clock-names = "ext_clock";
567
- //wifi-bt-power-toggle;
568
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
569
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
570
- pinctrl-names = "default", "rts_gpio";
571
- pinctrl-0 = <&uart1m0_rtsn>;
572
- pinctrl-1 = <&uart1_gpios>;
573
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
574
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
575
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
576678 status = "disabled";
577679 };
578680
579681 &uart0 {
580682 status = "okay";
683
+};
684
+
685
+&uart1 {
686
+ pinctrl-names = "default";
687
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
688
+ status = "disabled";
581689 };
582690
583691 &uart3 {
....@@ -603,4 +711,4 @@
603711 &uart9 {
604712 status = "okay";
605713 pinctrl-0 = <&uart9m1_xfer>;
606
-};
714
+};