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,8 +85,9 @@
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";
....@@ -145,69 +144,48 @@
145144 gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
146145 gpio_function = <0>;
147146 };
148
- };
149
-#if 0
150
- nk_io_init {
151
- compatible = "nk_io_control";
152
-// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
153
- hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
154
- hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
155
- vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
156
- vcc_12v_io = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
157
- en_4g_gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
158
- reset_4g_gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //4G_RST_GPIO01_B2_3V3
159
- air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
160
- wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
161
- hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
162
-// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
163
- wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
164
-// pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
165
- pinctrl-names = "default";
166
- pinctrl-0 = <&nk_io_gpio>;
167
- };
168
-#endif
169
- panel: panel {
170
- compatible = "simple-panel";
171
- backlight = <&backlight>;
172
- power-supply = <&vcc3v3_lcd0_n>;
173
- enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
174
- reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
175
- edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
176
- edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
177
- bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
178
- bpc = <8>;
179
- prepare-delay-ms = <200>;
180
- enable-delay-ms = <20>;
181
- lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2
182
- lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
183
- lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
184
- lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
185
- nodka-lvds = <15>;
186
-
187
- display-timings {
188
- native-mode = <&timing0>;
189
- timing0: timing0 {
190
- clock-frequency = <72500000>;
191
- hactive = <1280>;
192
- vactive = <800>;
193
- hfront-porch = <70>;
194
- hsync-len = <2>;
195
- hback-porch = <88>;
196
- vfront-porch = <7>;
197
- vsync-len = <4>;
198
- vback-porch = <17>;
199
- hsync-active = <21>;
200
- vsync-active = <0>;
201
- de-active = <0>;
202
- pixelclk-active = <0>;
203
- };
204
- };
205
- ports {
206
- panel_in: endpoint {
207
- remote-endpoint = <&edp_out>;
208
- };
209
- };
210
- };
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
+};
211189 };
212190
213191 &combphy0_us {
....@@ -270,10 +248,6 @@
270248 * video_phy0 needs to be enabled
271249 * when dsi0 is enabled
272250 */
273
-&video_phy0 {
274
- status = "disabled";
275
-};
276
-
277251 &dsi0 {
278252 status = "disabled";
279253 };
....@@ -294,10 +268,6 @@
294268 * video_phy1 needs to be enabled
295269 * when dsi1 is enabled
296270 */
297
-
298
-&video_phy1 {
299
- status = "okay";
300
-};
301271 &dsi1 {
302272 status = "disabled";
303273 };
....@@ -307,102 +277,29 @@
307277 };
308278
309279 &dsi1_in_vp1 {
310
- status = "okay";
280
+ status = "disabled";
311281 };
312282
313283 &dsi1_panel {
314
- power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
315
- vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
316
- reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
317
- vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
318
- pinctrl-names = "default";
319
- pinctrl-0 = <&lcd1_rst_gpio>;
284
+ power-supply = <&vcc3v3_lcd1_n>;
320285 };
321
-
322
-&route_dsi1 {
323
- status = "disabled";
324
- connect = <&vp1_out_dsi1>;
325
-};
326
-
327
-
328
-/*
329
-* edp_start
330
-*/
331286
332287 &edp {
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
- };
288
+ hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
289
+ status = "okay";
343290 };
344291
345292 &edp_phy {
346
- status = "okay";
347
-
293
+ status = "okay";
348294 };
349295
350296 &edp_in_vp0 {
351
- status = "disabled";
297
+ status = "okay";
352298 };
353299
354300 &edp_in_vp1 {
355
- status = "okay";
356
-
357
-};
358
-
359
-&route_edp {
360
- status = "okay";
361
- connect = <&vp1_out_edp>;
362
-};
363
-
364
-&route_edp {
365
- status = "okay";
366
-};
367
-/*
368
-* edp_end
369
-*/
370
-
371
-/*
372
-* Hdmi_start
373
-*/
374
-
375
-&hdmi {
376
- status = "okay";
377
- rockchip,phy-table =
378
- <92812500 0x8009 0x0000 0x0270>,
379
- <165000000 0x800b 0x0000 0x026d>,
380
- <185625000 0x800b 0x0000 0x01ed>,
381
- <297000000 0x800b 0x0000 0x01ad>,
382
- <594000000 0x8029 0x0000 0x0088>,
383
- <000000000 0x0000 0x0000 0x0000>;
384
-};
385
-
386
-&route_hdmi {
387
- status = "okay";
388
- connect = <&vp0_out_hdmi>;
389
-};
390
-
391
-&hdmi_in_vp0 {
392
- status = "okay";
393
-};
394
-
395
-&hdmi_in_vp1 {
396301 status = "disabled";
397302 };
398
-
399
-&hdmi_sound {
400
- status = "okay";
401
-};
402
-
403
-/*
404
- * Hdmi_END
405
-*/
406303
407304 &gmac0 {
408305 phy-mode = "rgmii";
....@@ -466,24 +363,8 @@
466363 power-supply = <&vcc3v3_lcd0_n>;
467364 };
468365
469
-&i2c3 {
470
- status = "okay";
471
- //mac eeprom
472
- eeprom@51 {
473
- //compatible = "atmel,24c02";
474
- compatible = "atmel,24c256";
475
- reg = <0x51>;
476
- };
477
-
478
- //nk-mcu
479
- nkmcu@15 {
480
- compatible = "nk_mcu";
481
- reg = <0x15>;
482
- };
483
-};
484
-
485366 &i2c4 {
486
- status = "okay";
367
+ status = "disabled";
487368 gc8034: gc8034@37 {
488369 compatible = "galaxycore,gc8034";
489370 status = "okay";
....@@ -529,7 +410,7 @@
529410 };
530411 };
531412 ov5695: ov5695@36 {
532
- status = "okay";
413
+ status = "disabled";
533414 compatible = "ovti,ov5695";
534415 reg = <0x36>;
535416 clocks = <&cru CLK_CIF_OUT>;
....@@ -552,19 +433,6 @@
552433 };
553434 };
554435
555
-&i2c5 {
556
- status = "okay";
557
-
558
- hym8563: hym8563@51 {
559
- compatible = "haoyu,hym8563";
560
- reg = <0x51>;
561
- #clock-cells = <0>;
562
- clock-frequency = <32768>;
563
- clock-output-names = "xin32k";
564
- /* rtc_int is not connected */
565
- };
566
-};
567
-
568436 &mdio0 {
569437 rgmii_phy0: phy@0 {
570438 compatible = "ethernet-phy-ieee802.3-c22";
....@@ -579,51 +447,50 @@
579447 };
580448 };
581449
450
+&video_phy0 {
451
+ status = "disabled";
452
+};
582453
454
+&video_phy1 {
455
+ status = "disabled";
456
+};
583457
584458 &pcie30phy {
585459 status = "okay";
586460 };
587461
588
-&pcie2x1 {
589
- reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
462
+&pcie3x2 {
463
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
590464 vpcie3v3-supply = <&vcc3v3_pcie>;
591465 status = "okay";
592466 };
593467
594468 &pinctrl {
595
-// cam {
596
-// camera_pwr: camera-pwr {
597
-// rockchip,pins =
598
-// /* camera power en */
599
-// <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
600
-// };
601
-// };
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
+ };
602476 headphone {
603477 hp_det: hp-det {
604
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
605
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
478
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
606479 };
607480 };
608481
609482 wireless-wlan {
610483 wifi_host_wake_irq: wifi-host-wake-irq {
611
- rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
484
+ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
612485 };
613486 };
614487
615488 wireless-bluetooth {
616
- uart1_gpios: uart1-gpios {
617
- 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>;
618491 };
619492 };
620493
621
- lcd1 {
622
- lcd1_rst_gpio: lcd1-rst-gpio {
623
- rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
624
- };
625
- };
626
-
627494 nk_io_init{
628495 nk_io_gpio: nk-io-gpio{
629496 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -633,7 +500,7 @@
633500 <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
634501 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
635502 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
636
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
503
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>,
637504 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
638505 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
639506 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -651,6 +518,10 @@
651518 };
652519 };
653520
521
+&rk809_sound {
522
+ hp-det-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
523
+};
524
+
654525 &rkisp {
655526 status = "disabled";
656527 };
....@@ -660,7 +531,7 @@
660531 };
661532
662533 &rkisp_vir0 {
663
- status = "disabled";
534
+ status = "okay";
664535
665536 port {
666537 #address-cells = <1>;
....@@ -673,32 +544,34 @@
673544 };
674545 };
675546
547
+&route_dsi0 {
548
+ status = "disabled";
549
+ connect = <&vp1_out_dsi0>;
550
+};
676551
677
-
678
-
552
+&route_edp {
553
+ status = "okay";
554
+ connect = <&vp0_out_edp>;
555
+};
679556
680557 &sata2 {
681558 status = "okay";
682559 };
683560
684561 &sdmmc2 {
685
- status = "disabled";
686
-};
687
-
688
-&sdmmc1 {
689
- max-frequency = <150000000>;
690
- supports-sdio;
691
- bus-width = <4>;
692
- disable-wp;
693
- cap-sd-highspeed;
694
- cap-sdio-irq;
695
- keep-power-in-suspend;
696
- mmc-pwrseq = <&sdio_pwrseq>;
697
- non-removable;
698
- pinctrl-names = "default";
699
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
700
- sd-uhs-sdr104;
701
- 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";
702575 };
703576
704577 &spdif_8ch {
....@@ -708,25 +581,25 @@
708581 };
709582
710583 &uart8 {
711
- status = "disabled";
584
+ status = "okay";
712585 pinctrl-names = "default";
713586 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
714587 };
715588
716589 &vcc3v3_lcd0_n {
717
- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
590
+ gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
718591 enable-active-high;
719592 };
720593
721594 &vcc3v3_lcd1_n {
722
- gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
595
+ gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
723596 enable-active-high;
724597 };
725598
726599 &wireless_wlan {
727600 pinctrl-names = "default";
728601 pinctrl-0 = <&wifi_host_wake_irq>;
729
- WIFI,host_wake_irq = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
602
+ WIFI,host_wake_irq = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
730603 };
731604
732605 &wireless_bluetooth {
....@@ -734,47 +607,12 @@
734607 clocks = <&rk809 1>;
735608 clock-names = "ext_clock";
736609 //wifi-bt-power-toggle;
737
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
610
+ uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
738611 pinctrl-names = "default", "rts_gpio";
739
- pinctrl-0 = <&uart1m0_rtsn>;
740
- pinctrl-1 = <&uart1_gpios>;
741
- BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
742
- BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
743
- 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>;
744617 status = "okay";
745
-};
746
-
747
-&uart0 {
748
- status = "okay";
749
-};
750
-
751
-&uart1 {
752
- pinctrl-names = "default";
753
- pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
754
- status = "okay";
755
-};
756
-
757
-&uart3 {
758
- status = "okay";
759
- pinctrl-0 = <&uart3m1_xfer>;
760
-};
761
-
762
-&uart4 {
763
- status = "okay";
764
- pinctrl-0 = <&uart4m1_xfer>;
765
-};
766
-
767
-&uart5 {
768
- status = "okay";
769
- pinctrl-0 = <&uart5m1_xfer>;
770
-};
771
-
772
-&uart7 {
773
- status = "okay";
774
- pinctrl-0 = <&uart7m1_xfer>;
775
-};
776
-
777
-&uart9 {
778
- status = "okay";
779
- pinctrl-0 = <&uart9m1_xfer>;
780618 };