forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
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,130 @@
8990 };
9091 #endif
9192
93
+ leds: leds {
94
+ compatible = "gpio-leds";
95
+ sig_led: sig_led {
96
+ gpios = <&gpio4 RK_PC3 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
+ hub_host2_rst {
133
+ gpio_num = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
134
+ gpio_function = <3>;
135
+ };
136
+
137
+ hub_host3 {
138
+ gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
139
+ gpio_function = <0>;
140
+ };
141
+
142
+ wake_4g {
143
+ gpio_num = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //4G_WAKEUP_GPIO01_B1_3V3
144
+ gpio_function = <0>;
145
+ };
146
+
147
+ air_mode_4g {
148
+ gpio_num = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; //4G_AIR_MODE_GPIO01_B0_3V3
149
+ gpio_function = <0>;
150
+ };
151
+
152
+ reset_4g {
153
+ gpio_num = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //4G_RST_GPIO01_B2_3V3
154
+ gpio_function = <3>;
155
+ };
156
+
157
+ en_4g {
158
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
159
+ gpio_function = <0>;
160
+ };
161
+
162
+ //gpio99 {
163
+ // gpio_num = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;//HP_EN_GPIO3_A6_3V3
164
+ // gpio_function = <1>;
165
+ //};
166
+
167
+ wifi_power_en {
168
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
169
+ gpio_function = <0>;
170
+ };
171
+ #if 0
172
+ do1 {
173
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
174
+ gpio_function = <0>;
175
+ };
176
+
177
+ do2 {
178
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
179
+ gpio_function = <0>;
180
+ };
181
+
182
+ do3 {
183
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
184
+ gpio_function = <0>;
185
+ };
186
+
187
+ do4 {
188
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
189
+ gpio_function = <0>;
190
+ };
191
+
192
+ do5 {
193
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
194
+ gpio_function = <0>;
195
+ };
196
+
197
+ do6 {
198
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
199
+ gpio_function = <0>;
200
+ };
201
+
202
+ do7 {
203
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
204
+ gpio_function = <0>;
205
+ };
206
+
207
+ di1 {
208
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
209
+ gpio_function = <1>;
210
+ };
211
+ #endif
212
+ };
213
+#if 0
92214 nk_io_init {
93215 compatible = "nk_io_control";
94
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
216
+// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
95217 hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
96218 hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
97219 vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
....@@ -101,13 +223,13 @@
101223 air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
102224 wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
103225 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
226
+// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
105227 wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
106228 // pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
107229 pinctrl-names = "default";
108230 pinctrl-0 = <&nk_io_gpio>;
109231 };
110
-
232
+#endif
111233 panel: panel {
112234 compatible = "simple-panel";
113235 backlight = <&backlight>;
....@@ -124,29 +246,29 @@
124246 lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
125247 lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
126248 lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
127
- nodka-lvds = <9>;
249
+ nodka-lvds = <15>;
128250
129251 display-timings {
130
- native-mode = <&timing0>;
131
- timing0: timing0 {
132
- clock-frequency = <142300000>;
133
- hactive = <1920>;
134
- vactive = <1080>;
135
- hfront-porch = <48>;
136
- hsync-len = <32>;
137
- hback-porch = <100>;
252
+ native-mode = <&timing>;
253
+ timing: timing {
254
+ clock-frequency = <72500000>;
255
+ hactive = <1280>;
256
+ vactive = <800>;
257
+ hfront-porch = <70>;
258
+ hsync-len = <2>;
259
+ hback-porch = <88>;
138260 vfront-porch = <7>;
139
- vsync-len = <20>;
140
- vback-porch = <23>;
141
- hsync-active = <0>;
261
+ vsync-len = <4>;
262
+ vback-porch = <17>;
263
+ hsync-active = <21>;
142264 vsync-active = <0>;
143265 de-active = <0>;
144266 pixelclk-active = <0>;
145267 };
146268 };
147269 ports {
148
- panel_in: endpoint {
149
- remote-endpoint = <&edp_out>;
270
+ panel_in_lvds: endpoint {
271
+ remote-endpoint = <&lvds_out>;
150272 };
151273 };
152274 };
....@@ -253,8 +375,19 @@
253375 };
254376
255377 &dsi1_panel {
256
- power-supply = <&vcc3v3_lcd1_n>;
378
+// power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
379
+ vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
380
+ reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
381
+ vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
382
+ pinctrl-names = "default";
383
+ pinctrl-0 = <&lcd1_rst_gpio>;
257384 };
385
+
386
+&route_dsi1 {
387
+ status = "disabled";
388
+ connect = <&vp1_out_dsi1>;
389
+};
390
+
258391
259392 /*
260393 * edp_start
....@@ -262,19 +395,11 @@
262395
263396 &edp {
264397 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
- };
398
+ status = "disabled";
274399 };
275400
276401 &edp_phy {
277
- status = "okay";
402
+ status = "disabled";
278403 };
279404
280405 &edp_in_vp0 {
....@@ -282,17 +407,40 @@
282407 };
283408
284409 &edp_in_vp1 {
285
- status = "okay";
410
+ status = "disabled";
411
+
286412 };
287413
288414 &route_edp {
289
- status = "okay";
415
+ status = "disabled";
290416 connect = <&vp1_out_edp>;
291417 };
292418
293419 &route_edp {
294
- status = "okay";
420
+ status = "disabled";
295421 };
422
+
423
+&lvds {
424
+ status = "disabled";
425
+ ports {
426
+ port@1 {
427
+ reg = <1>;
428
+ lvds_out:endpoint {
429
+ remote-endpoint = <&panel_in_lvds>;
430
+ };
431
+ };
432
+ };
433
+};
434
+
435
+&route_lvds{
436
+ status = "okay";
437
+ connect = <&vp1_out_lvds>;
438
+};
439
+
440
+&lvds_in_vp1 {
441
+ status = "disabled";
442
+};
443
+
296444 /*
297445 * edp_end
298446 */
....@@ -337,7 +485,7 @@
337485 phy-mode = "rgmii";
338486 clock_in_out = "output";
339487
340
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
488
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
341489 snps,reset-active-low;
342490 /* Reset time is 20ms, 100ms for rtl8211f */
343491 snps,reset-delays-us = <0 20000 100000>;
....@@ -357,7 +505,9 @@
357505 rx_delay = <0x2f>;
358506
359507 phy-handle = <&rgmii_phy0>;
508
+
360509 status = "disabled";
510
+
361511 };
362512
363513 &gmac1 {
....@@ -391,9 +541,7 @@
391541 * power-supply should switche to vcc3v3_lcd1_n
392542 * when mipi panel is connected to dsi1.
393543 */
394
-&gt1x {
395
- power-supply = <&vcc3v3_lcd0_n>;
396
-};
544
+
397545
398546 &i2c3 {
399547 status = "okay";
....@@ -412,7 +560,7 @@
412560 };
413561
414562 &i2c4 {
415
- status = "okay";
563
+ status = "disabled";
416564 gc8034: gc8034@37 {
417565 compatible = "galaxycore,gc8034";
418566 status = "okay";
....@@ -424,7 +572,6 @@
424572 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
425573 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
426574 rockchip,grf = <&grf>;
427
- power-domains = <&power RK3568_PD_VI>;
428575 rockchip,camera-module-index = <0>;
429576 rockchip,camera-module-facing = "back";
430577 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -458,7 +605,7 @@
458605 };
459606 };
460607 ov5695: ov5695@36 {
461
- status = "okay";
608
+ status = "disabled";
462609 compatible = "ovti,ov5695";
463610 reg = <0x36>;
464611 clocks = <&cru CLK_CIF_OUT>;
....@@ -511,7 +658,7 @@
511658
512659
513660 &pcie30phy {
514
- status = "okay";
661
+ status = "disabled";
515662 };
516663
517664 &pcie2x1 {
....@@ -530,7 +677,8 @@
530677 // };
531678 headphone {
532679 hp_det: hp-det {
533
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
680
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
681
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
534682 };
535683 };
536684
....@@ -545,6 +693,13 @@
545693 rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
546694 };
547695 };
696
+
697
+ lcd1 {
698
+ lcd1_rst_gpio: lcd1-rst-gpio {
699
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
700
+ };
701
+ };
702
+
548703 nk_io_init{
549704 nk_io_gpio: nk-io-gpio{
550705 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -558,12 +713,25 @@
558713 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
559714 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
560715 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
561
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
562716 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
563717 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
564718 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
565719 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
720
+ <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>,
721
+ <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
722
+ <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
566723 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
724
+ <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B0_u_3V3 DO1
725
+ <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B3_u_3V3 DO2
726
+ <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B4_u_3V3 DO3
727
+ <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B5_u_3V3 DO4
728
+ <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_B6_u_3V3 DO5
729
+
730
+ <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C0_d_3V3 DI1_1
731
+ <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C1_d_3V3 DI2_1
732
+ <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C2_d_3V3 DI3_1
733
+ <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C3_d_3V3 DI4_1
734
+ <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,//GPIO0_C5_d_3V3 DI5_1
567735 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
568736 };
569737 };
....@@ -589,11 +757,6 @@
589757 remote-endpoint = <&csidphy_out>;
590758 };
591759 };
592
-};
593
-
594
-&route_dsi0 {
595
- status = "disabled";
596
- connect = <&vp1_out_dsi0>;
597760 };
598761
599762
....@@ -634,15 +797,6 @@
634797 pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
635798 };
636799
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
-};
646800
647801 &wireless_wlan {
648802 pinctrl-names = "default";
....@@ -656,18 +810,23 @@
656810 clock-names = "ext_clock";
657811 //wifi-bt-power-toggle;
658812 uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
659
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
660813 pinctrl-names = "default", "rts_gpio";
661814 pinctrl-0 = <&uart1m0_rtsn>;
662815 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>;
816
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
817
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
818
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
666819 status = "disabled";
667820 };
668821
669822 &uart0 {
670
- status = "okay";
823
+ status = "disabled";
824
+};
825
+
826
+&uart1 {
827
+ pinctrl-names = "default";
828
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
829
+ status = "disabled";
671830 };
672831
673832 &uart3 {
....@@ -676,7 +835,7 @@
676835 };
677836
678837 &uart4 {
679
- status = "okay";
838
+ status = "disabled";
680839 pinctrl-0 = <&uart4m1_xfer>;
681840 };
682841
....@@ -685,12 +844,18 @@
685844 pinctrl-0 = <&uart5m1_xfer>;
686845 };
687846
847
+
688848 &uart7 {
689849 status = "okay";
690850 pinctrl-0 = <&uart7m1_xfer>;
691851 };
692852
853
+&uart8 {
854
+ status = "disabled";
855
+ pinctrl-0 = <&uart8m1_xfer>;
856
+};
857
+
693858 &uart9 {
694
- status = "okay";
859
+ status = "disabled";
695860 pinctrl-0 = <&uart9m1_xfer>;
696861 };