forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
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,135 @@
8990 };
9091 #endif
9192
93
+ leds: leds {
94
+ compatible = "gpio-leds";
95
+ sig_led: sig_led {
96
+ gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
97
+ default-state = "on";
98
+ };
99
+ };
100
+
101
+ leds: leds {
102
+ compatible = "gpio-leds";
103
+ err_led: err_led {
104
+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
105
+ default-state = "on";
106
+ };
107
+ };
108
+
109
+
110
+ ndj_io_init {
111
+ compatible = "nk_io_control";
112
+ pinctrl-names = "default";
113
+ pinctrl-0 = <&nk_io_gpio>;
114
+
115
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
116
+
117
+ vcc_5v {
118
+ gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
119
+ gpio_function = <0>;
120
+ };
121
+
122
+ vcc_12v {
123
+ gpio_num = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
124
+ gpio_function = <0>;
125
+ };
126
+
127
+ vcc_3.3v {
128
+ gpio_num = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
129
+ gpio_function = <0>;
130
+ };
131
+
132
+ ax88772_rst {
133
+ gpio_num = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>; //AX88772_RST_GPIO3_B5_3V3
134
+ gpio_function = <3>;
135
+ };
136
+
137
+ ax88631_rst {
138
+ gpio_num = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>; //AX88772_RST_GPIO3_B6_3V3
139
+ gpio_function = <3>;
140
+ };
141
+
142
+ hub_host3 {
143
+ gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
144
+ gpio_function = <0>;
145
+ };
146
+
147
+ wake_4g {
148
+ gpio_num = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //4G_WAKEUP_GPIO01_B1_3V3
149
+ gpio_function = <0>;
150
+ };
151
+
152
+ air_mode_4g {
153
+ gpio_num = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; //4G_AIR_MODE_GPIO01_B0_3V3
154
+ gpio_function = <0>;
155
+ };
156
+
157
+ reset_4g {
158
+ gpio_num = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //4G_RST_GPIO01_B2_3V3
159
+ gpio_function = <3>;
160
+ };
161
+
162
+ en_4g {
163
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
164
+ gpio_function = <0>;
165
+ };
166
+
167
+ //gpio99 {
168
+ // gpio_num = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;//HP_EN_GPIO3_A6_3V3
169
+ // gpio_function = <1>;
170
+ //};
171
+
172
+ wifi_power_en {
173
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
174
+ gpio_function = <0>;
175
+ };
176
+ #if 0
177
+ do1 {
178
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
179
+ gpio_function = <0>;
180
+ };
181
+
182
+ do2 {
183
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
184
+ gpio_function = <0>;
185
+ };
186
+
187
+ do3 {
188
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
189
+ gpio_function = <0>;
190
+ };
191
+
192
+ do4 {
193
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
194
+ gpio_function = <0>;
195
+ };
196
+
197
+ do5 {
198
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
199
+ gpio_function = <0>;
200
+ };
201
+
202
+ do6 {
203
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
204
+ gpio_function = <0>;
205
+ };
206
+
207
+ do7 {
208
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
209
+ gpio_function = <0>;
210
+ };
211
+
212
+ di1 {
213
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
214
+ gpio_function = <1>;
215
+ };
216
+ #endif
217
+ };
218
+#if 0
92219 nk_io_init {
93220 compatible = "nk_io_control";
94
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
221
+// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
95222 hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
96223 hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
97224 vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
....@@ -101,13 +228,13 @@
101228 air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
102229 wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
103230 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
231
+// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
105232 wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
106233 // pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
107234 pinctrl-names = "default";
108235 pinctrl-0 = <&nk_io_gpio>;
109236 };
110
-
237
+#endif
111238 panel: panel {
112239 compatible = "simple-panel";
113240 backlight = <&backlight>;
....@@ -127,8 +254,8 @@
127254 nodka-lvds = <15>;
128255
129256 display-timings {
130
- native-mode = <&timing0>;
131
- timing0: timing0 {
257
+ native-mode = <&timing>;
258
+ timing: timing {
132259 clock-frequency = <72500000>;
133260 hactive = <1280>;
134261 vactive = <800>;
....@@ -145,8 +272,8 @@
145272 };
146273 };
147274 ports {
148
- panel_in: endpoint {
149
- remote-endpoint = <&edp_out>;
275
+ panel_in_lvds: endpoint {
276
+ remote-endpoint = <&lvds_out>;
150277 };
151278 };
152279 };
....@@ -238,7 +365,7 @@
238365 */
239366
240367 &video_phy1 {
241
- status = "okay";
368
+ status = "disabled";
242369 };
243370 &dsi1 {
244371 status = "disabled";
....@@ -249,11 +376,11 @@
249376 };
250377
251378 &dsi1_in_vp1 {
252
- status = "okay";
379
+ status = "disabled";
253380 };
254381
255382 &dsi1_panel {
256
- power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
383
+// power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
257384 vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
258385 reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
259386 vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
....@@ -273,20 +400,11 @@
273400
274401 &edp {
275402 force-hpd;
276
- status = "okay";
277
- ports {
278
- port@1 {
279
- reg = <1>;
280
- edp_out: endpoint {
281
- remote-endpoint = <&panel_in>;
282
- };
283
- };
284
- };
403
+ status = "disabled";
285404 };
286405
287406 &edp_phy {
288
- status = "okay";
289
-
407
+ status = "disabled";
290408 };
291409
292410 &edp_in_vp0 {
....@@ -294,18 +412,40 @@
294412 };
295413
296414 &edp_in_vp1 {
297
- status = "okay";
415
+ status = "disabled";
298416
299417 };
300418
301419 &route_edp {
302
- status = "okay";
420
+ status = "disabled";
303421 connect = <&vp1_out_edp>;
304422 };
305423
306424 &route_edp {
307
- status = "okay";
425
+ status = "disabled";
308426 };
427
+
428
+&lvds {
429
+ status = "disabled";
430
+ ports {
431
+ port@1 {
432
+ reg = <1>;
433
+ lvds_out:endpoint {
434
+ remote-endpoint = <&panel_in_lvds>;
435
+ };
436
+ };
437
+ };
438
+};
439
+
440
+&route_lvds{
441
+ status = "okay";
442
+ connect = <&vp1_out_lvds>;
443
+};
444
+
445
+&lvds_in_vp1 {
446
+ status = "disabled";
447
+};
448
+
309449 /*
310450 * edp_end
311451 */
....@@ -350,7 +490,7 @@
350490 phy-mode = "rgmii";
351491 clock_in_out = "output";
352492
353
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
493
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
354494 snps,reset-active-low;
355495 /* Reset time is 20ms, 100ms for rtl8211f */
356496 snps,reset-delays-us = <0 20000 100000>;
....@@ -370,7 +510,9 @@
370510 rx_delay = <0x2f>;
371511
372512 phy-handle = <&rgmii_phy0>;
513
+
373514 status = "disabled";
515
+
374516 };
375517
376518 &gmac1 {
....@@ -404,9 +546,7 @@
404546 * power-supply should switche to vcc3v3_lcd1_n
405547 * when mipi panel is connected to dsi1.
406548 */
407
-&gt1x {
408
- power-supply = <&vcc3v3_lcd0_n>;
409
-};
549
+
410550
411551 &i2c3 {
412552 status = "okay";
....@@ -425,7 +565,7 @@
425565 };
426566
427567 &i2c4 {
428
- status = "okay";
568
+ status = "disabled";
429569 gc8034: gc8034@37 {
430570 compatible = "galaxycore,gc8034";
431571 status = "okay";
....@@ -437,7 +577,6 @@
437577 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
438578 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
439579 rockchip,grf = <&grf>;
440
- power-domains = <&power RK3568_PD_VI>;
441580 rockchip,camera-module-index = <0>;
442581 rockchip,camera-module-facing = "back";
443582 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -471,7 +610,7 @@
471610 };
472611 };
473612 ov5695: ov5695@36 {
474
- status = "okay";
613
+ status = "disabled";
475614 compatible = "ovti,ov5695";
476615 reg = <0x36>;
477616 clocks = <&cru CLK_CIF_OUT>;
....@@ -524,7 +663,7 @@
524663
525664
526665 &pcie30phy {
527
- status = "okay";
666
+ status = "disabled";
528667 };
529668
530669 &pcie2x1 {
....@@ -543,7 +682,8 @@
543682 // };
544683 headphone {
545684 hp_det: hp-det {
546
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
685
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
686
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
547687 };
548688 };
549689
....@@ -578,12 +718,25 @@
578718 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
579719 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
580720 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
581
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
582721 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
583722 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
584723 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
585724 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
725
+ <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
726
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
727
+ <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
586728 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
729
+ <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B0_u_3V3 DO1 8
730
+ <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B3_u_3V3 DO2 11
731
+ <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B4_u_3V3 DO3 12
732
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B5_u_3V3 DO4 13
733
+ <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B6_u_3V3 DO5 14
734
+
735
+ <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C0_d_3V3 DI1 16
736
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C1_d_3V3 DI2 17
737
+ <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C2_d_3V3 DI3 18
738
+ <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C3_d_3V3 DI4 19
739
+ <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C5_d_3V3 DI5 21
587740 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
588741 };
589742 };
....@@ -610,8 +763,6 @@
610763 };
611764 };
612765 };
613
-
614
-
615766
616767
617768
....@@ -651,15 +802,6 @@
651802 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
652803 };
653804
654
-&vcc3v3_lcd0_n {
655
- gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
656
- enable-active-high;
657
-};
658
-
659
-&vcc3v3_lcd1_n {
660
- gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
661
- enable-active-high;
662
-};
663805
664806 &wireless_wlan {
665807 pinctrl-names = "default";
....@@ -673,18 +815,23 @@
673815 clock-names = "ext_clock";
674816 //wifi-bt-power-toggle;
675817 uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
676
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
677818 pinctrl-names = "default", "rts_gpio";
678819 pinctrl-0 = <&uart1m0_rtsn>;
679820 pinctrl-1 = <&uart1_gpios>;
680
- BT,reset_gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
681
- BT,wake_gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
682
- BT,wake_host_irq = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
821
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
822
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
823
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
683824 status = "disabled";
684825 };
685826
686827 &uart0 {
687
- status = "okay";
828
+ status = "disabled";
829
+};
830
+
831
+&uart1 {
832
+ pinctrl-names = "default";
833
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
834
+ status = "disabled";
688835 };
689836
690837 &uart3 {
....@@ -693,7 +840,7 @@
693840 };
694841
695842 &uart4 {
696
- status = "okay";
843
+ status = "disabled";
697844 pinctrl-0 = <&uart4m1_xfer>;
698845 };
699846
....@@ -702,12 +849,18 @@
702849 pinctrl-0 = <&uart5m1_xfer>;
703850 };
704851
852
+
705853 &uart7 {
706854 status = "okay";
707855 pinctrl-0 = <&uart7m1_xfer>;
708856 };
709857
858
+&uart8 {
859
+ status = "disabled";
860
+ pinctrl-0 = <&uart8m1_xfer>;
861
+};
862
+
710863 &uart9 {
711
- status = "okay";
864
+ status = "disabled";
712865 pinctrl-0 = <&uart9m1_xfer>;
713866 };