forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-22 9ca5fbcb63a8dcaee0527f96afb91dc4b4bd8fa9
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 = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
21
- pinctrl-names = "default";
22
- pinctrl-0 = <&hp_det>;
23
- };
2418
2519 vcc2v5_sys: vcc2v5-ddr {
2620 compatible = "regulator-fixed";
....@@ -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,151 @@
9286 enable-active-high;
9387 regulator-always-on;
9488 regulator-boot-on;
89
+ };
90
+#endif
91
+
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
+ usb_ogt {
145
+ gpio_num = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //OTG_EN_OC_GPIO0_C2
146
+ gpio_function = <0>;
147
+ };
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
+
155
+ #if 0
156
+ do1 {
157
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
158
+ gpio_function = <0>;
159
+ };
160
+
161
+ do2 {
162
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
163
+ gpio_function = <0>;
164
+ };
165
+
166
+ do3 {
167
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
168
+ gpio_function = <0>;
169
+ };
170
+
171
+ do4 {
172
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
173
+ gpio_function = <0>;
174
+ };
175
+
176
+ do5 {
177
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
178
+ gpio_function = <0>;
179
+ };
180
+
181
+ do6 {
182
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
183
+ gpio_function = <0>;
184
+ };
185
+
186
+ do7 {
187
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
188
+ gpio_function = <0>;
189
+ };
190
+
191
+ di1 {
192
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
193
+ gpio_function = <1>;
194
+ };
195
+ #endif
196
+ };
95197
96
- };
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>;
97209
98
- nk_io_init {
99
- 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
105
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
106
- 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>;
108
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
109
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
110
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
111
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
112
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
113
- 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>;
129
- };
130
-
131
-
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
+ };
132234 };
133235
134236 &combphy0_us {
....@@ -144,11 +246,11 @@
144246 };
145247
146248 &csi2_dphy_hw {
147
- status = "okay";
249
+ status = "disabled";
148250 };
149251
150252 &csi2_dphy0 {
151
- status = "okay";
253
+ status = "disabled";
152254
153255 ports {
154256 #address-cells = <1>;
....@@ -192,7 +294,7 @@
192294 * when dsi0 is enabled
193295 */
194296 &dsi0 {
195
- status = "okay";
297
+ status = "disabled";
196298 };
197299
198300 &dsi0_in_vp0 {
....@@ -200,7 +302,7 @@
200302 };
201303
202304 &dsi0_in_vp1 {
203
- status = "okay";
305
+ status = "disabled";
204306 };
205307
206308 &dsi0_panel {
....@@ -228,7 +330,30 @@
228330 };
229331
230332 &edp {
231
- 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 {
232357 status = "okay";
233358 };
234359
....@@ -237,18 +362,18 @@
237362 };
238363
239364 &edp_in_vp0 {
240
- status = "okay";
365
+ status = "disabled";
241366 };
242367
243368 &edp_in_vp1 {
244
- status = "disabled";
369
+ status = "okay";
245370 };
246371
247372 &gmac0 {
248373 phy-mode = "rgmii";
249374 clock_in_out = "output";
250375
251
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
376
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
252377 snps,reset-active-low;
253378 /* Reset time is 20ms, 100ms for rtl8211f */
254379 snps,reset-delays-us = <0 20000 100000>;
....@@ -268,7 +393,9 @@
268393 rx_delay = <0x2f>;
269394
270395 phy-handle = <&rgmii_phy0>;
271
- status = "disabled";
396
+
397
+ status = "okay";
398
+
272399 };
273400
274401 &gmac1 {
....@@ -302,9 +429,7 @@
302429 * power-supply should switche to vcc3v3_lcd1_n
303430 * when mipi panel is connected to dsi1.
304431 */
305
-&gt1x {
306
- power-supply = <&vcc3v3_lcd0_n>;
307
-};
432
+
308433
309434 &i2c3 {
310435 status = "okay";
....@@ -320,13 +445,10 @@
320445 compatible = "nk_mcu";
321446 reg = <0x15>;
322447 };
323
-
324
-
325
-
326448 };
327449
328450 &i2c4 {
329
- status = "okay";
451
+ status = "disabled";
330452 gc8034: gc8034@37 {
331453 compatible = "galaxycore,gc8034";
332454 status = "okay";
....@@ -372,7 +494,7 @@
372494 };
373495 };
374496 ov5695: ov5695@36 {
375
- status = "okay";
497
+ status = "disabled";
376498 compatible = "ovti,ov5695";
377499 reg = <0x36>;
378500 clocks = <&cru CLK_CIF_OUT>;
....@@ -421,20 +543,27 @@
421543 status = "okay";
422544 };
423545
546
+&pcie2x1 {
547
+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
548
+ vpcie3v3-supply = <&vcc3v3_pcie>;
549
+ status = "okay";
550
+};
551
+
424552 &pcie3x2 {
425
- 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>;
426561 vpcie3v3-supply = <&vcc3v3_pcie>;
427562 status = "okay";
428563 };
429564
430565 &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
- };
566
+
438567 headphone {
439568 hp_det: hp-det {
440569 rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
....@@ -446,36 +575,48 @@
446575 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
447576 };
448577 };
449
-
450
- wireless-bluetooth {
451
- uart8_gpios: uart8-gpios {
452
- rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
578
+
579
+ nk_io_init{
580
+ nk_io_gpio: nk-io-gpio{
581
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
582
+ <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
583
+ <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
584
+ <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
585
+ <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
586
+ <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
587
+ <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
588
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
589
+ <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
590
+ <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
591
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
592
+ <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
593
+ <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
594
+ <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
595
+ <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
596
+ <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
597
+ <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
598
+ <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
599
+ <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
600
+ <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
601
+ <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
453602 };
454603 };
604
+};
455605
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>;
466
- };
606
+&rk809_sound {
607
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
467608 };
468609
469610 &rkisp {
470
- status = "okay";
611
+ status = "disabled";
471612 };
472613
473614 &rkisp_mmu {
474
- status = "okay";
615
+ status = "disabled";
475616 };
476617
477618 &rkisp_vir0 {
478
- status = "okay";
619
+ status = "disabled";
479620
480621 port {
481622 #address-cells = <1>;
....@@ -489,13 +630,15 @@
489630 };
490631
491632 &route_dsi0 {
492
- status = "okay";
633
+ status = "disabled";
493634 connect = <&vp1_out_dsi0>;
494635 };
495636
637
+
638
+
496639 &route_edp {
497
- status = "okay";
498
- connect = <&vp0_out_edp>;
640
+ status = "disabled";
641
+ connect = <&vp1_out_edp>;
499642 };
500643
501644 &sata2 {
....@@ -531,12 +674,12 @@
531674 };
532675
533676 &vcc3v3_lcd0_n {
534
- gpio = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
677
+ gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
535678 enable-active-high;
536679 };
537680
538681 &vcc3v3_lcd1_n {
539
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
682
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
540683 enable-active-high;
541684 };
542685
....@@ -548,15 +691,40 @@
548691
549692 &wireless_bluetooth {
550693 compatible = "bluetooth-platdata";
551
- clocks = <&rk809 1>;
552
- clock-names = "ext_clock";
553
- //wifi-bt-power-toggle;
554
- uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
555
- pinctrl-names = "default", "rts_gpio";
556
- pinctrl-0 = <&uart8m0_rtsn>;
557
- pinctrl-1 = <&uart8_gpios>;
558
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
559
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
560
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
694
+ status = "disabled";
695
+};
696
+
697
+&uart0 {
561698 status = "okay";
562699 };
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
+};