forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-22 9ca5fbcb63a8dcaee0527f96afb91dc4b4bd8fa9
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -16,14 +16,6 @@
1616 model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
1717 compatible = "rockchip,rk3568-evb1-ddr4-v10", "rockchip,rk3568";
1818
19
- rk_headset: rk-headset {
20
- compatible = "rockchip_headset";
21
- headset_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
22
- spk_ctl_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;//AMP_SD_GPIO4_C2_3V3
23
- pinctrl-names = "default";
24
- pinctrl-0 = <&hp_det>;
25
- };
26
-
2719 vcc2v5_sys: vcc2v5-ddr {
2820 compatible = "regulator-fixed";
2921 regulator-name = "vcc2v5-sys";
....@@ -34,6 +26,15 @@
3426 vin-supply = <&vcc3v3_sys>;
3527 };
3628
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
+ };
3738
3839 pcie30_avdd0v9: pcie30-avdd0v9 {
3940 compatible = "regulator-fixed";
....@@ -60,9 +61,7 @@
6061 regulator-name = "vcc3v3_pcie";
6162 regulator-min-microvolt = <3300000>;
6263 regulator-max-microvolt = <3300000>;
63
- regulator-always-on;
6464 enable-active-high;
65
- regulator-boot-on;
6665 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
6766 startup-delay-us = <5000>;
6867 vin-supply = <&dc_12v>;
....@@ -87,12 +86,16 @@
8786 enable-active-high;
8887 regulator-always-on;
8988 regulator-boot-on;
90
- };
89
+ };
9190 #endif
91
+
9292 ndj_io_init {
9393 compatible = "nk_io_control";
9494 pinctrl-names = "default";
9595 pinctrl-0 = <&nk_io_gpio>;
96
+
97
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
98
+
9699 vcc_5v {
97100 gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
98101 gpio_function = <0>;
....@@ -138,52 +141,75 @@
138141 gpio_function = <0>;
139142 };
140143
141
- wifi_power_en {
142
- gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
144
+ usb_ogt {
145
+ gpio_num = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //OTG_EN_OC_GPIO0_C2
143146 gpio_function = <0>;
144147 };
145
- };
146
-#if 0
147
- nk_io_init {
148
- compatible = "nk_io_control";
149
-// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
150
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
151
- hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
152
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
153
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
154
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
155
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
156
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
157
- wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
158
- hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
159
-// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
160
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
161
-// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
162
- pinctrl-names = "default";
163
- pinctrl-0 = <&nk_io_gpio>;
164
- };
165
-#endif
166
- panel: panel {
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
+ };
197
+
198
+ panel: panel {
167199 compatible = "simple-panel";
168200 backlight = <&backlight>;
169201 power-supply = <&vcc3v3_lcd0_n>;
170
- enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
171
- reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
172
- edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
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
173204 edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
174205 bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
175206 bpc = <8>;
176207 prepare-delay-ms = <200>;
177208 enable-delay-ms = <20>;
178
- lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
179
- lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
180
- lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
181
- lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
182
- nodka-lvds = <15>;
183209
184210 display-timings {
185
- native-mode = <&timing0>;
186
- timing0: timing0 {
211
+ native-mode = <&timing>;
212
+ timing: timing {
187213 clock-frequency = <72500000>;
188214 hactive = <1280>;
189215 vactive = <800>;
....@@ -200,8 +226,8 @@
200226 };
201227 };
202228 ports {
203
- panel_in: endpoint {
204
- remote-endpoint = <&edp_out>;
229
+ panel_in_lvds: endpoint {
230
+ remote-endpoint = <&lvds_out>;
205231 };
206232 };
207233 };
....@@ -267,10 +293,6 @@
267293 * video_phy0 needs to be enabled
268294 * when dsi0 is enabled
269295 */
270
-&video_phy0 {
271
- status = "disabled";
272
-};
273
-
274296 &dsi0 {
275297 status = "disabled";
276298 };
....@@ -291,10 +313,6 @@
291313 * video_phy1 needs to be enabled
292314 * when dsi1 is enabled
293315 */
294
-
295
-&video_phy1 {
296
- status = "okay";
297
-};
298316 &dsi1 {
299317 status = "disabled";
300318 };
....@@ -304,108 +322,58 @@
304322 };
305323
306324 &dsi1_in_vp1 {
307
- status = "okay";
325
+ status = "disabled";
308326 };
309327
310328 &dsi1_panel {
311
- power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
312
- vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
313
- reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
314
- vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
315
- pinctrl-names = "default";
316
- pinctrl-0 = <&lcd1_rst_gpio>;
329
+ power-supply = <&vcc3v3_lcd1_n>;
317330 };
318
-
319
-&route_dsi1 {
320
- status = "disabled";
321
- connect = <&vp1_out_dsi1>;
322
-};
323
-
324
-
325
-/*
326
-* edp_start
327
-*/
328331
329332 &edp {
333
+ //hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
330334 force-hpd;
335
+ status = "disabled";
336
+};
337
+
338
+&lvds {
331339 status = "okay";
332340 ports {
333341 port@1 {
334342 reg = <1>;
335
- edp_out: endpoint {
336
- remote-endpoint = <&panel_in>;
343
+ lvds_out: endpoint {
344
+ remote-endpoint = <&panel_in_lvds>;
337345 };
338346 };
339
- };
347
+
348
+ };
349
+};
350
+
351
+&route_lvds{
352
+ status = "okay";
353
+ connect = <&vp2_out_lvds>;
354
+};
355
+
356
+&lvds_in_vp2 {
357
+ status = "okay";
340358 };
341359
342360 &edp_phy {
343
- status = "okay";
344
-
361
+ status = "okay";
345362 };
346363
347364 &edp_in_vp0 {
348
- status = "disabled";
349
-};
350
-
351
-&edp_in_vp1 {
352
- status = "okay";
353
-
354
-};
355
-
356
-&route_edp {
357
- status = "okay";
358
- connect = <&vp1_out_edp>;
359
-};
360
-
361
-&route_edp {
362
- status = "okay";
363
-};
364
-/*
365
-* edp_end
366
-*/
367
-
368
-/*
369
-* Hdmi_start
370
-*/
371
-
372
-&hdmi {
373
- status = "okay";
374
- rockchip,phy-table =
375
- <92812500 0x8009 0x0000 0x0270>,
376
- <165000000 0x800b 0x0000 0x026d>,
377
- <185625000 0x800b 0x0000 0x01ed>,
378
- <297000000 0x800b 0x0000 0x01ad>,
379
- <594000000 0x8029 0x0000 0x0088>,
380
- <000000000 0x0000 0x0000 0x0000>;
381
-};
382
-
383
-&route_hdmi {
384
- status = "okay";
385
- connect = <&vp0_out_hdmi>;
386
-};
387
-
388
-&hdmi_in_vp0 {
389
- status = "okay";
390
-};
391
-
392
-&hdmi_in_vp1 {
393365 status = "disabled";
394366 };
395367
396
-&hdmi_sound {
368
+&edp_in_vp1 {
397369 status = "okay";
398370 };
399
-
400
-/*
401
- * Hdmi_END
402
-*/
403371
404372 &gmac0 {
405373 phy-mode = "rgmii";
406374 clock_in_out = "output";
407375
408
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
376
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
409377 snps,reset-active-low;
410378 /* Reset time is 20ms, 100ms for rtl8211f */
411379 snps,reset-delays-us = <0 20000 100000>;
....@@ -425,7 +393,9 @@
425393 rx_delay = <0x2f>;
426394
427395 phy-handle = <&rgmii_phy0>;
428
- status = "disabled";
396
+
397
+ status = "okay";
398
+
429399 };
430400
431401 &gmac1 {
....@@ -459,9 +429,7 @@
459429 * power-supply should switche to vcc3v3_lcd1_n
460430 * when mipi panel is connected to dsi1.
461431 */
462
-&gt1x {
463
- power-supply = <&vcc3v3_lcd0_n>;
464
-};
432
+
465433
466434 &i2c3 {
467435 status = "okay";
....@@ -480,7 +448,7 @@
480448 };
481449
482450 &i2c4 {
483
- status = "okay";
451
+ status = "disabled";
484452 gc8034: gc8034@37 {
485453 compatible = "galaxycore,gc8034";
486454 status = "okay";
....@@ -526,7 +494,7 @@
526494 };
527495 };
528496 ov5695: ov5695@36 {
529
- status = "okay";
497
+ status = "disabled";
530498 compatible = "ovti,ov5695";
531499 reg = <0x36>;
532500 clocks = <&cru CLK_CIF_OUT>;
....@@ -549,19 +517,6 @@
549517 };
550518 };
551519
552
-&i2c5 {
553
- status = "okay";
554
-
555
- hym8563: hym8563@51 {
556
- compatible = "haoyu,hym8563";
557
- reg = <0x51>;
558
- #clock-cells = <0>;
559
- clock-frequency = <32768>;
560
- clock-output-names = "xin32k";
561
- /* rtc_int is not connected */
562
- };
563
-};
564
-
565520 &mdio0 {
566521 rgmii_phy0: phy@0 {
567522 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -576,7 +531,13 @@
576531 };
577532 };
578533
534
+&video_phy0 {
535
+ status = "okay";
536
+};
579537
538
+&video_phy1 {
539
+ status = "disabled";
540
+};
580541
581542 &pcie30phy {
582543 status = "okay";
....@@ -588,39 +549,33 @@
588549 status = "okay";
589550 };
590551
552
+&pcie3x2 {
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>;
561
+ vpcie3v3-supply = <&vcc3v3_pcie>;
562
+ status = "okay";
563
+};
564
+
591565 &pinctrl {
592
-// cam {
593
-// camera_pwr: camera-pwr {
594
-// rockchip,pins =
595
-// /* camera power en */
596
-// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
597
-// };
598
-// };
566
+
599567 headphone {
600568 hp_det: hp-det {
601
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
602
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
569
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
603570 };
604571 };
605572
606573 wireless-wlan {
607574 wifi_host_wake_irq: wifi-host-wake-irq {
608
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
609
- };
610
- };
611
-
612
- wireless-bluetooth {
613
- uart1_gpios: uart1-gpios {
614
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
575
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
615576 };
616577 };
617578
618
- lcd1 {
619
- lcd1_rst_gpio: lcd1-rst-gpio {
620
- rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
621
- };
622
- };
623
-
624579 nk_io_init{
625580 nk_io_gpio: nk-io-gpio{
626581 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -630,7 +585,7 @@
630585 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
631586 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
632587 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
633
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
588
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
634589 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
635590 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
636591 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -646,6 +601,10 @@
646601 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
647602 };
648603 };
604
+};
605
+
606
+&rk809_sound {
607
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
649608 };
650609
651610 &rkisp {
....@@ -670,32 +629,36 @@
670629 };
671630 };
672631
632
+&route_dsi0 {
633
+ status = "disabled";
634
+ connect = <&vp1_out_dsi0>;
635
+};
673636
674637
675638
639
+&route_edp {
640
+ status = "disabled";
641
+ connect = <&vp1_out_edp>;
642
+};
676643
677644 &sata2 {
678645 status = "okay";
679646 };
680647
681648 &sdmmc2 {
682
- status = "disabled";
683
-};
684
-
685
-&sdmmc1 {
686
- max-frequency = <150000000>;
687
- supports-sdio;
688
- bus-width = <4>;
689
- disable-wp;
690
- cap-sd-highspeed;
691
- cap-sdio-irq;
692
- keep-power-in-suspend;
693
- mmc-pwrseq = <&sdio_pwrseq>;
694
- non-removable;
695
- pinctrl-names = "default";
696
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
697
- sd-uhs-sdr104;
698
- status = "okay";
649
+ max-frequency = <150000000>;
650
+ supports-sdio;
651
+ bus-width = <4>;
652
+ disable-wp;
653
+ cap-sd-highspeed;
654
+ cap-sdio-irq;
655
+ keep-power-in-suspend;
656
+ mmc-pwrseq = <&sdio_pwrseq>;
657
+ non-removable;
658
+ pinctrl-names = "default";
659
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
660
+ sd-uhs-sdr104;
661
+ status = "okay";
699662 };
700663
701664 &spdif_8ch {
....@@ -728,17 +691,7 @@
728691
729692 &wireless_bluetooth {
730693 compatible = "bluetooth-platdata";
731
- clocks = <&rk809 1>;
732
- clock-names = "ext_clock";
733
- //wifi-bt-power-toggle;
734
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
735
- pinctrl-names = "default", "rts_gpio";
736
- pinctrl-0 = <&uart1m0_rtsn>;
737
- pinctrl-1 = <&uart1_gpios>;
738
- BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
739
- BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
740
- BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
741
- status = "okay";
694
+ status = "disabled";
742695 };
743696
744697 &uart0 {
....@@ -748,7 +701,7 @@
748701 &uart1 {
749702 pinctrl-names = "default";
750703 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
751
- status = "okay";
704
+ status = "disabled";
752705 };
753706
754707 &uart3 {
....@@ -774,4 +727,4 @@
774727 &uart9 {
775728 status = "okay";
776729 pinctrl-0 = <&uart9m1_xfer>;
777
-};
730
+};