forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
....@@ -19,6 +19,7 @@
1919 rk_headset: rk-headset {
2020 compatible = "rockchip_headset";
2121 headset_gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
22
+ spk_ctl_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;//AMP_SD_GPIO4_C2_3V3
2223 pinctrl-names = "default";
2324 pinctrl-0 = <&hp_det>;
2425 };
....@@ -89,9 +90,136 @@
8990 };
9091 #endif
9192
93
+#if 0
94
+ leds: leds {
95
+ compatible = "gpio-leds";
96
+ sig_led: sig_led {
97
+ gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
98
+ default-state = "on";
99
+ };
100
+ };
101
+
102
+ leds: leds {
103
+ compatible = "gpio-leds";
104
+ err_led: err_led {
105
+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
106
+ default-state = "on";
107
+ };
108
+ };
109
+#endif
110
+
111
+ ndj_io_init {
112
+ compatible = "nk_io_control";
113
+ pinctrl-names = "default";
114
+ pinctrl-0 = <&nk_io_gpio>;
115
+
116
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
117
+
118
+ vcc_5v {
119
+ gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
120
+ gpio_function = <0>;
121
+ };
122
+
123
+ vcc_12v {
124
+ gpio_num = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
125
+ gpio_function = <0>;
126
+ };
127
+
128
+ vcc_3.3v {
129
+ gpio_num = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
130
+ gpio_function = <0>;
131
+ };
132
+
133
+ ax88772_rst {
134
+ gpio_num = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>; //AX88772_RST_GPIO3_B5_3V3
135
+ gpio_function = <3>;
136
+ };
137
+
138
+ ax88631_rst {
139
+ gpio_num = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>; //AX88772_RST_GPIO3_B6_3V3
140
+ gpio_function = <3>;
141
+ };
142
+/*
143
+ hub_host3 {
144
+ gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
145
+ gpio_function = <0>;
146
+ };
147
+*/
148
+ wake_4g {
149
+ gpio_num = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //4G_WAKEUP_GPIO01_B1_3V3
150
+ gpio_function = <0>;
151
+ };
152
+
153
+ air_mode_4g {
154
+ gpio_num = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; //4G_AIR_MODE_GPIO01_B0_3V3
155
+ gpio_function = <0>;
156
+ };
157
+
158
+ reset_4g {
159
+ gpio_num = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //4G_RST_GPIO01_B2_3V3
160
+ gpio_function = <3>;
161
+ };
162
+
163
+ en_4g {
164
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
165
+ gpio_function = <0>;
166
+ };
167
+
168
+ //gpio99 {
169
+ // gpio_num = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;//HP_EN_GPIO3_A6_3V3
170
+ // gpio_function = <1>;
171
+ //};
172
+
173
+ wifi_power_en {
174
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
175
+ gpio_function = <0>;
176
+ };
177
+ #if 0
178
+ do1 {
179
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
180
+ gpio_function = <0>;
181
+ };
182
+
183
+ do2 {
184
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
185
+ gpio_function = <0>;
186
+ };
187
+
188
+ do3 {
189
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
190
+ gpio_function = <0>;
191
+ };
192
+
193
+ do4 {
194
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
195
+ gpio_function = <0>;
196
+ };
197
+
198
+ do5 {
199
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
200
+ gpio_function = <0>;
201
+ };
202
+
203
+ do6 {
204
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
205
+ gpio_function = <0>;
206
+ };
207
+
208
+ do7 {
209
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
210
+ gpio_function = <0>;
211
+ };
212
+
213
+ di1 {
214
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
215
+ gpio_function = <1>;
216
+ };
217
+ #endif
218
+ };
219
+#if 0
92220 nk_io_init {
93221 compatible = "nk_io_control";
94
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
222
+// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
95223 hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
96224 hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
97225 vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
....@@ -101,13 +229,13 @@
101229 air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
102230 wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
103231 hp_en_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
104
- spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
232
+// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
105233 wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
106234 // pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
107235 pinctrl-names = "default";
108236 pinctrl-0 = <&nk_io_gpio>;
109237 };
110
-
238
+#endif
111239 panel: panel {
112240 compatible = "simple-panel";
113241 backlight = <&backlight>;
....@@ -127,8 +255,8 @@
127255 nodka-lvds = <15>;
128256
129257 display-timings {
130
- native-mode = <&timing0>;
131
- timing0: timing0 {
258
+ native-mode = <&timing>;
259
+ timing: timing {
132260 clock-frequency = <72500000>;
133261 hactive = <1280>;
134262 vactive = <800>;
....@@ -145,8 +273,8 @@
145273 };
146274 };
147275 ports {
148
- panel_in: endpoint {
149
- remote-endpoint = <&edp_out>;
276
+ panel_in_lvds: endpoint {
277
+ remote-endpoint = <&lvds_out>;
150278 };
151279 };
152280 };
....@@ -253,8 +381,19 @@
253381 };
254382
255383 &dsi1_panel {
256
- power-supply = <&vcc3v3_lcd1_n>;
384
+// power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
385
+ vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
386
+ reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
387
+ vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
388
+ pinctrl-names = "default";
389
+ pinctrl-0 = <&lcd1_rst_gpio>;
257390 };
391
+
392
+&route_dsi1 {
393
+ status = "disabled";
394
+ connect = <&vp1_out_dsi1>;
395
+};
396
+
258397
259398 /*
260399 * edp_start
....@@ -262,19 +401,11 @@
262401
263402 &edp {
264403 force-hpd;
265
- status = "okay";
266
- ports {
267
- port@1 {
268
- reg = <1>;
269
- edp_out: endpoint {
270
- remote-endpoint = <&panel_in>;
271
- };
272
- };
273
- };
404
+ status = "disabled";
274405 };
275406
276407 &edp_phy {
277
- status = "okay";
408
+ status = "disabled";
278409 };
279410
280411 &edp_in_vp0 {
....@@ -282,17 +413,40 @@
282413 };
283414
284415 &edp_in_vp1 {
285
- status = "okay";
416
+ status = "disabled";
417
+
286418 };
287419
288420 &route_edp {
289
- status = "okay";
421
+ status = "disabled";
290422 connect = <&vp1_out_edp>;
291423 };
292424
293425 &route_edp {
294
- status = "okay";
426
+ status = "disabled";
295427 };
428
+
429
+&lvds {
430
+ status = "disabled";
431
+ ports {
432
+ port@1 {
433
+ reg = <1>;
434
+ lvds_out:endpoint {
435
+ remote-endpoint = <&panel_in_lvds>;
436
+ };
437
+ };
438
+ };
439
+};
440
+
441
+&route_lvds{
442
+ status = "okay";
443
+ connect = <&vp1_out_lvds>;
444
+};
445
+
446
+&lvds_in_vp1 {
447
+ status = "disabled";
448
+};
449
+
296450 /*
297451 * edp_end
298452 */
....@@ -337,7 +491,7 @@
337491 phy-mode = "rgmii";
338492 clock_in_out = "output";
339493
340
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
494
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
341495 snps,reset-active-low;
342496 /* Reset time is 20ms, 100ms for rtl8211f */
343497 snps,reset-delays-us = <0 20000 100000>;
....@@ -357,7 +511,9 @@
357511 rx_delay = <0x2f>;
358512
359513 phy-handle = <&rgmii_phy0>;
514
+
360515 status = "disabled";
516
+
361517 };
362518
363519 &gmac1 {
....@@ -391,9 +547,7 @@
391547 * power-supply should switche to vcc3v3_lcd1_n
392548 * when mipi panel is connected to dsi1.
393549 */
394
-&gt1x {
395
- power-supply = <&vcc3v3_lcd0_n>;
396
-};
550
+
397551
398552 &i2c3 {
399553 status = "okay";
....@@ -412,7 +566,7 @@
412566 };
413567
414568 &i2c4 {
415
- status = "okay";
569
+ status = "disabled";
416570 gc8034: gc8034@37 {
417571 compatible = "galaxycore,gc8034";
418572 status = "okay";
....@@ -424,7 +578,6 @@
424578 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
425579 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
426580 rockchip,grf = <&grf>;
427
- power-domains = <&power RK3568_PD_VI>;
428581 rockchip,camera-module-index = <0>;
429582 rockchip,camera-module-facing = "back";
430583 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -458,7 +611,7 @@
458611 };
459612 };
460613 ov5695: ov5695@36 {
461
- status = "okay";
614
+ status = "disabled";
462615 compatible = "ovti,ov5695";
463616 reg = <0x36>;
464617 clocks = <&cru CLK_CIF_OUT>;
....@@ -511,7 +664,7 @@
511664
512665
513666 &pcie30phy {
514
- status = "okay";
667
+ status = "disabled";
515668 };
516669
517670 &pcie2x1 {
....@@ -530,7 +683,8 @@
530683 // };
531684 headphone {
532685 hp_det: hp-det {
533
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
686
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
687
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
534688 };
535689 };
536690
....@@ -545,6 +699,13 @@
545699 rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
546700 };
547701 };
702
+
703
+ lcd1 {
704
+ lcd1_rst_gpio: lcd1-rst-gpio {
705
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
706
+ };
707
+ };
708
+
548709 nk_io_init{
549710 nk_io_gpio: nk-io-gpio{
550711 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -558,13 +719,31 @@
558719 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
559720 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
560721 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
561
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
562722 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
563723 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
564724 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
565725 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
726
+ <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
727
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
728
+ <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
566729 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
567
- <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
730
+ <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B0_u_3V3 DO1 8
731
+ <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B3_u_3V3 DO2 11
732
+ <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B4_u_3V3 DO3 12
733
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B5_u_3V3 DO4 13
734
+ <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B6_u_3V3 DO5 14
735
+
736
+ <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C0_d_3V3 DI1 16
737
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C1_d_3V3 DI2 17
738
+ <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C2_d_3V3 DI3 18
739
+ <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C3_d_3V3 DI4 19
740
+ <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C5_d_3V3 DI5 21
741
+ <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
742
+ <4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>, //sig_led
743
+ <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>, //err_led
744
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>, //run_led
745
+ <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; //HOST3_EN_GPIO4_B2_1V8
746
+
568747 };
569748 };
570749 };
....@@ -589,11 +768,6 @@
589768 remote-endpoint = <&csidphy_out>;
590769 };
591770 };
592
-};
593
-
594
-&route_dsi0 {
595
- status = "disabled";
596
- connect = <&vp1_out_dsi0>;
597771 };
598772
599773
....@@ -634,15 +808,6 @@
634808 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
635809 };
636810
637
-&vcc3v3_lcd0_n {
638
- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
639
- enable-active-high;
640
-};
641
-
642
-&vcc3v3_lcd1_n {
643
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
644
- enable-active-high;
645
-};
646811
647812 &wireless_wlan {
648813 pinctrl-names = "default";
....@@ -656,18 +821,23 @@
656821 clock-names = "ext_clock";
657822 //wifi-bt-power-toggle;
658823 uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
659
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
660824 pinctrl-names = "default", "rts_gpio";
661825 pinctrl-0 = <&uart1m0_rtsn>;
662826 pinctrl-1 = <&uart1_gpios>;
663
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
664
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
665
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
827
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
828
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
829
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
666830 status = "disabled";
667831 };
668832
669833 &uart0 {
670
- status = "okay";
834
+ status = "disabled";
835
+};
836
+
837
+&uart1 {
838
+ pinctrl-names = "default";
839
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
840
+ status = "disabled";
671841 };
672842
673843 &uart3 {
....@@ -676,7 +846,7 @@
676846 };
677847
678848 &uart4 {
679
- status = "okay";
849
+ status = "disabled";
680850 pinctrl-0 = <&uart4m1_xfer>;
681851 };
682852
....@@ -685,12 +855,18 @@
685855 pinctrl-0 = <&uart5m1_xfer>;
686856 };
687857
858
+
688859 &uart7 {
689860 status = "okay";
690861 pinctrl-0 = <&uart7m1_xfer>;
691862 };
692863
864
+&uart8 {
865
+ status = "disabled";
866
+ pinctrl-0 = <&uart8m1_xfer>;
867
+};
868
+
693869 &uart9 {
694
- status = "okay";
870
+ status = "disabled";
695871 pinctrl-0 = <&uart9m1_xfer>;
696872 };