hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
old mode 100755new mode 100644
....@@ -8,21 +8,12 @@
88
99 #include <dt-bindings/gpio/gpio.h>
1010 #include <dt-bindings/pinctrl/rockchip.h>
11
-#include <dt-bindings/display/media-bus-format.h>
1211 #include "rk3568.dtsi"
1312 #include "rk3568-evb.dtsi"
1413
1514 / {
1615 model = "Rockchip RK3568 EVB1 DDR4 V10 Board";
1716 compatible = "rockchip,rk3568-evb1-ddr4-v10", "rockchip,rk3568";
18
-
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
- };
2617
2718 vcc2v5_sys: vcc2v5-ddr {
2819 compatible = "regulator-fixed";
....@@ -34,6 +25,15 @@
3425 vin-supply = <&vcc3v3_sys>;
3526 };
3627
28
+ vcc3v3_vga: vcc3v3-vga {
29
+ compatible = "regulator-fixed";
30
+ regulator-name = "vcc3v3_vga";
31
+ regulator-always-on;
32
+ regulator-boot-on;
33
+ gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
34
+ enable-active-high;
35
+ vin-supply = <&vcc3v3_sys>;
36
+ };
3737
3838 pcie30_avdd0v9: pcie30-avdd0v9 {
3939 compatible = "regulator-fixed";
....@@ -60,9 +60,7 @@
6060 regulator-name = "vcc3v3_pcie";
6161 regulator-min-microvolt = <3300000>;
6262 regulator-max-microvolt = <3300000>;
63
- regulator-always-on;
6463 enable-active-high;
65
- regulator-boot-on;
6664 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
6765 startup-delay-us = <5000>;
6866 vin-supply = <&dc_12v>;
....@@ -87,12 +85,16 @@
8785 enable-active-high;
8886 regulator-always-on;
8987 regulator-boot-on;
90
- };
88
+ };
9189 #endif
90
+
9291 ndj_io_init {
9392 compatible = "nk_io_control";
9493 pinctrl-names = "default";
9594 pinctrl-0 = <&nk_io_gpio>;
95
+
96
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
97
+
9698 vcc_5v {
9799 gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
98100 gpio_function = <0>;
....@@ -142,69 +144,48 @@
142144 gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
143145 gpio_function = <0>;
144146 };
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 {
167
- compatible = "simple-panel";
168
- backlight = <&backlight>;
169
- 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
173
- edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
174
- bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
175
- bpc = <8>;
176
- prepare-delay-ms = <200>;
177
- 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>;
183
-
184
- display-timings {
185
- native-mode = <&timing0>;
186
- timing0: timing0 {
187
- clock-frequency = <72500000>;
188
- hactive = <1280>;
189
- vactive = <800>;
190
- hfront-porch = <70>;
191
- hsync-len = <2>;
192
- hback-porch = <88>;
193
- vfront-porch = <7>;
194
- vsync-len = <4>;
195
- vback-porch = <17>;
196
- hsync-active = <21>;
197
- vsync-active = <0>;
198
- de-active = <0>;
199
- pixelclk-active = <0>;
200
- };
201
- };
202
- ports {
203
- panel_in: endpoint {
204
- remote-endpoint = <&edp_out>;
205
- };
206
- };
207
- };
147
+ #if 0
148
+ do1 {
149
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
150
+ gpio_function = <0>;
151
+ };
152
+
153
+ do2 {
154
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
155
+ gpio_function = <0>;
156
+ };
157
+
158
+ do3 {
159
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
160
+ gpio_function = <0>;
161
+ };
162
+
163
+ do4 {
164
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
165
+ gpio_function = <0>;
166
+ };
167
+
168
+ do5 {
169
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
170
+ gpio_function = <0>;
171
+ };
172
+
173
+ do6 {
174
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
175
+ gpio_function = <0>;
176
+ };
177
+
178
+ do7 {
179
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
180
+ gpio_function = <0>;
181
+ };
182
+
183
+ di1 {
184
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
185
+ gpio_function = <1>;
186
+ };
187
+ #endif
188
+};
208189 };
209190
210191 &combphy0_us {
....@@ -267,10 +248,6 @@
267248 * video_phy0 needs to be enabled
268249 * when dsi0 is enabled
269250 */
270
-&video_phy0 {
271
- status = "disabled";
272
-};
273
-
274251 &dsi0 {
275252 status = "disabled";
276253 };
....@@ -291,10 +268,6 @@
291268 * video_phy1 needs to be enabled
292269 * when dsi1 is enabled
293270 */
294
-
295
-&video_phy1 {
296
- status = "okay";
297
-};
298271 &dsi1 {
299272 status = "disabled";
300273 };
....@@ -304,102 +277,29 @@
304277 };
305278
306279 &dsi1_in_vp1 {
307
- status = "okay";
280
+ status = "disabled";
308281 };
309282
310283 &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>;
284
+ power-supply = <&vcc3v3_lcd1_n>;
317285 };
318
-
319
-&route_dsi1 {
320
- status = "disabled";
321
- connect = <&vp1_out_dsi1>;
322
-};
323
-
324
-
325
-/*
326
-* edp_start
327
-*/
328286
329287 &edp {
330
- force-hpd;
331
- status = "okay";
332
- ports {
333
- port@1 {
334
- reg = <1>;
335
- edp_out: endpoint {
336
- remote-endpoint = <&panel_in>;
337
- };
338
- };
339
- };
288
+ hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
289
+ status = "okay";
340290 };
341291
342292 &edp_phy {
343
- status = "okay";
344
-
293
+ status = "okay";
345294 };
346295
347296 &edp_in_vp0 {
348
- status = "disabled";
297
+ status = "okay";
349298 };
350299
351300 &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 {
393301 status = "disabled";
394302 };
395
-
396
-&hdmi_sound {
397
- status = "okay";
398
-};
399
-
400
-/*
401
- * Hdmi_END
402
-*/
403303
404304 &gmac0 {
405305 phy-mode = "rgmii";
....@@ -463,24 +363,8 @@
463363 power-supply = <&vcc3v3_lcd0_n>;
464364 };
465365
466
-&i2c3 {
467
- status = "okay";
468
- //mac eeprom
469
- eeprom@51 {
470
- //compatible = "atmel,24c02";
471
- compatible = "atmel,24c256";
472
- reg = <0x51>;
473
- };
474
-
475
- //nk-mcu
476
- nkmcu@15 {
477
- compatible = "nk_mcu";
478
- reg = <0x15>;
479
- };
480
-};
481
-
482366 &i2c4 {
483
- status = "okay";
367
+ status = "disabled";
484368 gc8034: gc8034@37 {
485369 compatible = "galaxycore,gc8034";
486370 status = "okay";
....@@ -526,7 +410,7 @@
526410 };
527411 };
528412 ov5695: ov5695@36 {
529
- status = "okay";
413
+ status = "disabled";
530414 compatible = "ovti,ov5695";
531415 reg = <0x36>;
532416 clocks = <&cru CLK_CIF_OUT>;
....@@ -549,19 +433,6 @@
549433 };
550434 };
551435
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
-
565436 &mdio0 {
566437 rgmii_phy0: phy@0 {
567438 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -576,51 +447,50 @@
576447 };
577448 };
578449
450
+&video_phy0 {
451
+ status = "disabled";
452
+};
579453
454
+&video_phy1 {
455
+ status = "disabled";
456
+};
580457
581458 &pcie30phy {
582459 status = "okay";
583460 };
584461
585
-&pcie2x1 {
586
- reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
462
+&pcie3x2 {
463
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
587464 vpcie3v3-supply = <&vcc3v3_pcie>;
588465 status = "okay";
589466 };
590467
591468 &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
-// };
469
+ cam {
470
+ camera_pwr: camera-pwr {
471
+ rockchip,pins =
472
+ /* camera power en */
473
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
474
+ };
475
+ };
599476 headphone {
600477 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>;
478
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
603479 };
604480 };
605481
606482 wireless-wlan {
607483 wifi_host_wake_irq: wifi-host-wake-irq {
608
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
484
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
609485 };
610486 };
611487
612488 wireless-bluetooth {
613
- uart1_gpios: uart1-gpios {
614
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
489
+ uart8_gpios: uart8-gpios {
490
+ rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
615491 };
616492 };
617493
618
- lcd1 {
619
- lcd1_rst_gpio: lcd1-rst-gpio {
620
- rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
621
- };
622
- };
623
-
624494 nk_io_init{
625495 nk_io_gpio: nk-io-gpio{
626496 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -630,7 +500,7 @@
630500 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
631501 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
632502 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
633
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
503
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
634504 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
635505 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
636506 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -648,6 +518,10 @@
648518 };
649519 };
650520
521
+&rk809_sound {
522
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
523
+};
524
+
651525 &rkisp {
652526 status = "disabled";
653527 };
....@@ -657,7 +531,7 @@
657531 };
658532
659533 &rkisp_vir0 {
660
- status = "disabled";
534
+ status = "okay";
661535
662536 port {
663537 #address-cells = <1>;
....@@ -670,32 +544,34 @@
670544 };
671545 };
672546
547
+&route_dsi0 {
548
+ status = "disabled";
549
+ connect = <&vp1_out_dsi0>;
550
+};
673551
674
-
675
-
552
+&route_edp {
553
+ status = "okay";
554
+ connect = <&vp0_out_edp>;
555
+};
676556
677557 &sata2 {
678558 status = "okay";
679559 };
680560
681561 &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";
562
+ max-frequency = <150000000>;
563
+ supports-sdio;
564
+ bus-width = <4>;
565
+ disable-wp;
566
+ cap-sd-highspeed;
567
+ cap-sdio-irq;
568
+ keep-power-in-suspend;
569
+ mmc-pwrseq = <&sdio_pwrseq>;
570
+ non-removable;
571
+ pinctrl-names = "default";
572
+ pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
573
+ sd-uhs-sdr104;
574
+ status = "okay";
699575 };
700576
701577 &spdif_8ch {
....@@ -705,25 +581,25 @@
705581 };
706582
707583 &uart8 {
708
- status = "disabled";
584
+ status = "okay";
709585 pinctrl-names = "default";
710586 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
711587 };
712588
713589 &vcc3v3_lcd0_n {
714
- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
590
+ gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
715591 enable-active-high;
716592 };
717593
718594 &vcc3v3_lcd1_n {
719
- gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
595
+ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
720596 enable-active-high;
721597 };
722598
723599 &wireless_wlan {
724600 pinctrl-names = "default";
725601 pinctrl-0 = <&wifi_host_wake_irq>;
726
- WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
602
+ WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
727603 };
728604
729605 &wireless_bluetooth {
....@@ -731,47 +607,12 @@
731607 clocks = <&rk809 1>;
732608 clock-names = "ext_clock";
733609 //wifi-bt-power-toggle;
734
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
610
+ uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
735611 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>;
612
+ pinctrl-0 = <&uart8m0_rtsn>;
613
+ pinctrl-1 = <&uart8_gpios>;
614
+ BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
615
+ BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
616
+ BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
741617 status = "okay";
742
-};
743
-
744
-&uart0 {
745
- status = "okay";
746
-};
747
-
748
-&uart1 {
749
- pinctrl-names = "default";
750
- pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
751
- status = "okay";
752
-};
753
-
754
-&uart3 {
755
- status = "okay";
756
- pinctrl-0 = <&uart3m1_xfer>;
757
-};
758
-
759
-&uart4 {
760
- status = "okay";
761
- pinctrl-0 = <&uart4m1_xfer>;
762
-};
763
-
764
-&uart5 {
765
- status = "okay";
766
- pinctrl-0 = <&uart5m1_xfer>;
767
-};
768
-
769
-&uart7 {
770
- status = "okay";
771
- pinctrl-0 = <&uart7m1_xfer>;
772
-};
773
-
774
-&uart9 {
775
- status = "okay";
776
- pinctrl-0 = <&uart9m1_xfer>;
777618 };