forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 69d6da3c1c63675524a25e7dc92a4f43c4164cef
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,150 @@
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_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>;
117208
118
- pinctrl-names = "default";
119
- pinctrl-0 = <&nk_io_gpio>;
120
- nodka_lvds = <9>;
121
- };
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
+ };
122233 };
123234
124235 &combphy0_us {
....@@ -134,11 +245,11 @@
134245 };
135246
136247 &csi2_dphy_hw {
137
- status = "okay";
248
+ status = "disabled";
138249 };
139250
140251 &csi2_dphy0 {
141
- status = "okay";
252
+ status = "disabled";
142253
143254 ports {
144255 #address-cells = <1>;
....@@ -182,7 +293,7 @@
182293 * when dsi0 is enabled
183294 */
184295 &dsi0 {
185
- status = "okay";
296
+ status = "disabled";
186297 };
187298
188299 &dsi0_in_vp0 {
....@@ -190,7 +301,7 @@
190301 };
191302
192303 &dsi0_in_vp1 {
193
- status = "okay";
304
+ status = "disabled";
194305 };
195306
196307 &dsi0_panel {
....@@ -218,8 +329,18 @@
218329 };
219330
220331 &edp {
221
- hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
222
- 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
+ };
223344 };
224345
225346 &edp_phy {
....@@ -227,11 +348,11 @@
227348 };
228349
229350 &edp_in_vp0 {
230
- status = "okay";
351
+ status = "disabled";
231352 };
232353
233354 &edp_in_vp1 {
234
- status = "disabled";
355
+ status = "okay";
235356 };
236357
237358 &gmac0 {
....@@ -292,9 +413,7 @@
292413 * power-supply should switche to vcc3v3_lcd1_n
293414 * when mipi panel is connected to dsi1.
294415 */
295
-&gt1x {
296
- power-supply = <&vcc3v3_lcd0_n>;
297
-};
416
+
298417
299418 &i2c3 {
300419 status = "okay";
....@@ -310,13 +429,10 @@
310429 compatible = "nk_mcu";
311430 reg = <0x15>;
312431 };
313
-
314
-
315
-
316432 };
317433
318434 &i2c4 {
319
- status = "okay";
435
+ status = "disabled";
320436 gc8034: gc8034@37 {
321437 compatible = "galaxycore,gc8034";
322438 status = "okay";
....@@ -362,7 +478,7 @@
362478 };
363479 };
364480 ov5695: ov5695@36 {
365
- status = "okay";
481
+ status = "disabled";
366482 compatible = "ovti,ov5695";
367483 reg = <0x36>;
368484 clocks = <&cru CLK_CIF_OUT>;
....@@ -400,7 +516,7 @@
400516 };
401517
402518 &video_phy0 {
403
- status = "okay";
519
+ status = "disabled";
404520 };
405521
406522 &video_phy1 {
....@@ -408,6 +524,12 @@
408524 };
409525
410526 &pcie30phy {
527
+ status = "disabled";
528
+};
529
+
530
+&pcie2x1 {
531
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
532
+ vpcie3v3-supply = <&vcc3v3_pcie>;
411533 status = "okay";
412534 };
413535
....@@ -418,22 +540,16 @@
418540 };
419541
420542 &pinctrl {
421
-// cam {
422
-// camera_pwr: camera-pwr {
423
-// rockchip,pins =
424
-// /* camera power en */
425
-// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
426
-// };
427
-// };
543
+
428544 headphone {
429545 hp_det: hp-det {
430
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
546
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
431547 };
432548 };
433549
434550 wireless-wlan {
435551 wifi_host_wake_irq: wifi-host-wake-irq {
436
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
552
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
437553 };
438554 };
439555
....@@ -442,6 +558,7 @@
442558 rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
443559 };
444560 };
561
+
445562 nk_io_init{
446563 nk_io_gpio: nk-io-gpio{
447564 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -451,31 +568,38 @@
451568 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
452569 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
453570 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
454
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
571
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
455572 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
456573 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
457574 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
458
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
459575 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
460576 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
461577 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
462578 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
463579 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
580
+ <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
581
+ <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
582
+ <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
583
+ <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
464584 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
465585 };
466586 };
467587 };
468588
589
+&rk809_sound {
590
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
591
+};
592
+
469593 &rkisp {
470
- status = "okay";
594
+ status = "disabled";
471595 };
472596
473597 &rkisp_mmu {
474
- status = "okay";
598
+ status = "disabled";
475599 };
476600
477601 &rkisp_vir0 {
478
- status = "okay";
602
+ status = "disabled";
479603
480604 port {
481605 #address-cells = <1>;
....@@ -489,13 +613,15 @@
489613 };
490614
491615 &route_dsi0 {
492
- status = "okay";
616
+ status = "disabled";
493617 connect = <&vp1_out_dsi0>;
494618 };
495619
620
+
621
+
496622 &route_edp {
497623 status = "okay";
498
- connect = <&vp0_out_edp>;
624
+ connect = <&vp1_out_edp>;
499625 };
500626
501627 &sata2 {
....@@ -503,23 +629,19 @@
503629 };
504630
505631 &sdmmc2 {
506
- status = "disabled";
507
-};
508
-
509
-&sdmmc1 {
510
- max-frequency = <150000000>;
511
- supports-sdio;
512
- bus-width = <4>;
513
- disable-wp;
514
- cap-sd-highspeed;
515
- cap-sdio-irq;
516
- keep-power-in-suspend;
517
- mmc-pwrseq = <&sdio_pwrseq>;
518
- non-removable;
519
- pinctrl-names = "default";
520
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
521
- sd-uhs-sdr104;
522
- status = "okay";
632
+ max-frequency = <150000000>;
633
+ supports-sdio;
634
+ bus-width = <4>;
635
+ disable-wp;
636
+ cap-sd-highspeed;
637
+ cap-sdio-irq;
638
+ keep-power-in-suspend;
639
+ mmc-pwrseq = <&sdio_pwrseq>;
640
+ non-removable;
641
+ pinctrl-names = "default";
642
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
643
+ sd-uhs-sdr104;
644
+ status = "okay";
523645 };
524646
525647 &spdif_8ch {
....@@ -535,12 +657,12 @@
535657 };
536658
537659 &vcc3v3_lcd0_n {
538
- gpio = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
660
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
539661 enable-active-high;
540662 };
541663
542664 &vcc3v3_lcd1_n {
543
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
665
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
544666 enable-active-high;
545667 };
546668
....@@ -556,18 +678,23 @@
556678 clock-names = "ext_clock";
557679 //wifi-bt-power-toggle;
558680 uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
559
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
560681 pinctrl-names = "default", "rts_gpio";
561682 pinctrl-0 = <&uart1m0_rtsn>;
562683 pinctrl-1 = <&uart1_gpios>;
563
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
564
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
565
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
566
- status = "disabled";
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>;
687
+ status = "okay";
567688 };
568689
569690 &uart0 {
570691 status = "okay";
692
+};
693
+
694
+&uart1 {
695
+ pinctrl-names = "default";
696
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
697
+ status = "okay";
571698 };
572699
573700 &uart3 {
....@@ -593,4 +720,4 @@
593720 &uart9 {
594721 status = "okay";
595722 pinctrl-0 = <&uart9m1_xfer>;
596
-};
723
+};