forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
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 };
....@@ -33,6 +34,15 @@
3334 vin-supply = <&vcc3v3_sys>;
3435 };
3536
37
+ vcc3v3_vga: vcc3v3-vga {
38
+ compatible = "regulator-fixed";
39
+ regulator-name = "vcc3v3_vga";
40
+ regulator-always-on;
41
+ regulator-boot-on;
42
+ gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
43
+ enable-active-high;
44
+ vin-supply = <&vcc3v3_sys>;
45
+ };
3646
3747 pcie30_avdd0v9: pcie30-avdd0v9 {
3848 compatible = "regulator-fixed";
....@@ -88,10 +98,108 @@
8898 regulator-boot-on;
8999 };
90100 #endif
91
-
101
+ ndj_io_init {
102
+ compatible = "nk_io_control";
103
+ pinctrl-names = "default";
104
+ pinctrl-0 = <&nk_io_gpio>;
105
+
106
+ //gpio_op0 = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
107
+
108
+ vcc_5v {
109
+ gpio_num = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
110
+ gpio_function = <0>;
111
+ };
112
+
113
+ vcc_12v {
114
+ gpio_num = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; //VCC12_IO_EN_GPIO0_C7_3V3
115
+ gpio_function = <0>;
116
+ };
117
+
118
+ hub_host2_rst {
119
+ gpio_num = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
120
+ gpio_function = <3>;
121
+ };
122
+
123
+ hub_host3 {
124
+ gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
125
+ gpio_function = <0>;
126
+ };
127
+
128
+ wake_4g {
129
+ gpio_num = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; //4G_WAKEUP_GPIO01_B1_3V3
130
+ gpio_function = <0>;
131
+ };
132
+
133
+ air_mode_4g {
134
+ gpio_num = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; //4G_AIR_MODE_GPIO01_B0_3V3
135
+ gpio_function = <0>;
136
+ };
137
+
138
+ reset_4g {
139
+ gpio_num = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; //4G_RST_GPIO01_B2_3V3
140
+ gpio_function = <3>;
141
+ };
142
+
143
+ en_4g {
144
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; //4G_PWREN_H_GPIO0_C6
145
+ gpio_function = <0>;
146
+ };
147
+
148
+ hp_en {
149
+ gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
150
+ gpio_function = <0>;
151
+ };
152
+
153
+ wifi_power_en {
154
+ gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
155
+ gpio_function = <0>;
156
+ };
157
+ #if 0
158
+ do1 {
159
+ gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
160
+ gpio_function = <0>;
161
+ };
162
+
163
+ do2 {
164
+ gpio_num = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
165
+ gpio_function = <0>;
166
+ };
167
+
168
+ do3 {
169
+ gpio_num = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
170
+ gpio_function = <0>;
171
+ };
172
+
173
+ do4 {
174
+ gpio_num = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
175
+ gpio_function = <0>;
176
+ };
177
+
178
+ do5 {
179
+ gpio_num = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>;
180
+ gpio_function = <0>;
181
+ };
182
+
183
+ do6 {
184
+ gpio_num = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>;
185
+ gpio_function = <0>;
186
+ };
187
+
188
+ do7 {
189
+ gpio_num = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
190
+ gpio_function = <0>;
191
+ };
192
+
193
+ di1 {
194
+ gpio_num = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
195
+ gpio_function = <1>;
196
+ };
197
+ #endif
198
+ };
199
+#if 0
92200 nk_io_init {
93201 compatible = "nk_io_control";
94
- vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
202
+// vcc3_io_en_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; //VCC3_IO_EN_GPIO0_C4_3V3
95203 hub_host2_5V_rest_gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; //HUB_RST_GPIO4_D2_3V3
96204 hub_host3_5v_gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; //HOST3_EN_GPIO4_B2_1V8
97205 vcc_5v_io = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
....@@ -101,13 +209,13 @@
101209 air_mode_4g_gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; //4G_AIR_MODE_GPIO01_B0_3V3
102210 wake_4g_gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>; //4G_WAKEUP_GPIO01_B1_3V3
103211 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
212
+// spk_out_gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;//AMP_SD_GPIO4_C2_3V3
105213 wifi_power_en_gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
106214 // pcie_power_en_gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;//PCIE_PWREN_H_GPIO0_D4
107215 pinctrl-names = "default";
108216 pinctrl-0 = <&nk_io_gpio>;
109217 };
110
-
218
+#endif
111219 panel: panel {
112220 compatible = "simple-panel";
113221 backlight = <&backlight>;
....@@ -124,21 +232,21 @@
124232 lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3
125233 lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4
126234 lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
127
- nodka-lvds = <9>;
235
+ nodka-lvds = <15>;
128236
129237 display-timings {
130238 native-mode = <&timing0>;
131239 timing0: timing0 {
132
- clock-frequency = <142300000>;
133
- hactive = <1920>;
134
- vactive = <1080>;
135
- hfront-porch = <48>;
136
- hsync-len = <32>;
137
- hback-porch = <100>;
240
+ clock-frequency = <72500000>;
241
+ hactive = <1280>;
242
+ vactive = <800>;
243
+ hfront-porch = <70>;
244
+ hsync-len = <2>;
245
+ hback-porch = <88>;
138246 vfront-porch = <7>;
139
- vsync-len = <20>;
140
- vback-porch = <23>;
141
- hsync-active = <0>;
247
+ vsync-len = <4>;
248
+ vback-porch = <17>;
249
+ hsync-active = <21>;
142250 vsync-active = <0>;
143251 de-active = <0>;
144252 pixelclk-active = <0>;
....@@ -238,7 +346,7 @@
238346 */
239347
240348 &video_phy1 {
241
- status = "disabled";
349
+ status = "okay";
242350 };
243351 &dsi1 {
244352 status = "disabled";
....@@ -249,12 +357,23 @@
249357 };
250358
251359 &dsi1_in_vp1 {
252
- status = "disabled";
360
+ status = "okay";
253361 };
254362
255363 &dsi1_panel {
256
- power-supply = <&vcc3v3_lcd1_n>;
364
+ power-supply = <&vcc3v3_lcd1_n>; //MIPI_3V3EN_GPIO3_A3_d_3V3
365
+ vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
366
+ reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
367
+ vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
368
+ pinctrl-names = "default";
369
+ pinctrl-0 = <&lcd1_rst_gpio>;
257370 };
371
+
372
+&route_dsi1 {
373
+ status = "disabled";
374
+ connect = <&vp1_out_dsi1>;
375
+};
376
+
258377
259378 /*
260379 * edp_start
....@@ -270,11 +389,12 @@
270389 remote-endpoint = <&panel_in>;
271390 };
272391 };
273
- };
392
+
393
+ };
274394 };
275395
276396 &edp_phy {
277
- status = "okay";
397
+ status = "okay";
278398 };
279399
280400 &edp_in_vp0 {
....@@ -283,6 +403,7 @@
283403
284404 &edp_in_vp1 {
285405 status = "okay";
406
+
286407 };
287408
288409 &route_edp {
....@@ -337,7 +458,7 @@
337458 phy-mode = "rgmii";
338459 clock_in_out = "output";
339460
340
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
461
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
341462 snps,reset-active-low;
342463 /* Reset time is 20ms, 100ms for rtl8211f */
343464 snps,reset-delays-us = <0 20000 100000>;
....@@ -357,7 +478,9 @@
357478 rx_delay = <0x2f>;
358479
359480 phy-handle = <&rgmii_phy0>;
481
+
360482 status = "disabled";
483
+
361484 };
362485
363486 &gmac1 {
....@@ -391,9 +514,7 @@
391514 * power-supply should switche to vcc3v3_lcd1_n
392515 * when mipi panel is connected to dsi1.
393516 */
394
-&gt1x {
395
- power-supply = <&vcc3v3_lcd0_n>;
396
-};
517
+
397518
398519 &i2c3 {
399520 status = "okay";
....@@ -412,7 +533,7 @@
412533 };
413534
414535 &i2c4 {
415
- status = "okay";
536
+ status = "disabled";
416537 gc8034: gc8034@37 {
417538 compatible = "galaxycore,gc8034";
418539 status = "okay";
....@@ -424,7 +545,6 @@
424545 reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
425546 pwdn-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;
426547 rockchip,grf = <&grf>;
427
- power-domains = <&power RK3568_PD_VI>;
428548 rockchip,camera-module-index = <0>;
429549 rockchip,camera-module-facing = "back";
430550 rockchip,camera-module-name = "RK-CMK-8M-2-v1";
....@@ -458,7 +578,7 @@
458578 };
459579 };
460580 ov5695: ov5695@36 {
461
- status = "okay";
581
+ status = "disabled";
462582 compatible = "ovti,ov5695";
463583 reg = <0x36>;
464584 clocks = <&cru CLK_CIF_OUT>;
....@@ -530,7 +650,8 @@
530650 // };
531651 headphone {
532652 hp_det: hp-det {
533
- rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
653
+ rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>,
654
+ <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
534655 };
535656 };
536657
....@@ -545,6 +666,13 @@
545666 rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
546667 };
547668 };
669
+
670
+ lcd1 {
671
+ lcd1_rst_gpio: lcd1-rst-gpio {
672
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
673
+ };
674
+ };
675
+
548676 nk_io_init{
549677 nk_io_gpio: nk-io-gpio{
550678 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
....@@ -558,12 +686,15 @@
558686 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
559687 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
560688 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
561
- <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>,
562689 <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
563690 <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
564691 <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
565692 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
566693 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
694
+ <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
695
+ <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
696
+ <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
697
+ <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,//96 SPI2_CLK_M1_3V3
567698 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
568699 };
569700 };
....@@ -589,11 +720,6 @@
589720 remote-endpoint = <&csidphy_out>;
590721 };
591722 };
592
-};
593
-
594
-&route_dsi0 {
595
- status = "disabled";
596
- connect = <&vp1_out_dsi0>;
597723 };
598724
599725
....@@ -640,7 +766,7 @@
640766 };
641767
642768 &vcc3v3_lcd1_n {
643
- gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
769
+ gpio = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; //MIPI_3V3EN_GPIO3_A3_d_3V3
644770 enable-active-high;
645771 };
646772
....@@ -656,20 +782,25 @@
656782 clock-names = "ext_clock";
657783 //wifi-bt-power-toggle;
658784 uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
659
- BT,power_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
660785 pinctrl-names = "default", "rts_gpio";
661786 pinctrl-0 = <&uart1m0_rtsn>;
662787 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>;
666
- status = "disabled";
788
+ BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
789
+ BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
790
+ BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
791
+ status = "okay";
667792 };
668793
669794 &uart0 {
670795 status = "okay";
671796 };
672797
798
+&uart1 {
799
+ pinctrl-names = "default";
800
+ pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
801
+ status = "okay";
802
+};
803
+
673804 &uart3 {
674805 status = "okay";
675806 pinctrl-0 = <&uart3m1_xfer>;