hc
2024-08-13 72be3801e63d82671c9d90577a9efb3126a6aa37
kernel/arch/arm64/boot/dts/rockchip/NK-6A13_V0A.dtsi
....@@ -38,10 +38,10 @@
3838 io-channels = <&saradc 3>;
3939 io-channel-names = "adc-detect";
4040 keyup-threshold-microvolt = <1800000>;
41
- pinctrl-0 = <&hp_det>;
41
+ pinctrl-0 = <&spk_con>;
4242 pinctrl-names = "default";
43
- hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
44
- spk-con-gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
43
+ //hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
44
+ //spk-con-gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
4545 play-pause-key {
4646 label = "playpause";
4747 linux,code = <164>;
....@@ -128,13 +128,14 @@
128128 * - PDN (power down when low)
129129 */
130130 post-power-on-delay-ms = <200>;
131
- reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; //WIFI_REG_ON_H
131
+ reset-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; //BT_DISABLE_GPIO1_C6_d_1V8
132132 };
133133
134134 rk_headset: rk-headset {
135
- status = "disabled";
135
+ status = "okay";
136136 compatible = "rockchip_headset";
137
- headset_gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
137
+ headset_gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;//HP_DET_L_GPIO3_D5_d_3V3
138
+ spk_ctl_gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_LOW>;//SPK_CTL_GPIO4_B4_u_3V3
138139 pinctrl-names = "default";
139140 pinctrl-0 = <&hp_det>;
140141 io-channels = <&saradc 3>;
....@@ -158,7 +159,7 @@
158159 regulator-boot-on;
159160 enable-active-high;
160161 //gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
161
- gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
162
+ gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
162163 vin-supply = <&vcc_1v8_s0>;
163164 };
164165
....@@ -216,9 +217,9 @@
216217 */
217218 vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator {
218219 compatible = "regulator-fixed";
219
- gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
220
- pinctrl-names = "default";
221
- pinctrl-0 = <&sd_s0_pwr>;
220
+ //gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
221
+ //pinctrl-names = "default";
222
+ //pinctrl-0 = <&sd_s0_pwr>;
222223 regulator-name = "vcc_3v3_sd_s0";
223224 enable-active-high;
224225 };
....@@ -229,20 +230,20 @@
229230 clock-names = "ext_clock";
230231 uart_rts_gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>; //UART9_RTSn_M0_BT
231232 pinctrl-names = "default", "rts_gpio";
232
- pinctrl-0 = <&uart9m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
233
+ pinctrl-0 = <&uart9m0_rtsn>, <&bt_reset_gpio>;
233234 pinctrl-1 = <&uart9_gpios>;
234
- BT,reset_gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; //BT_REG_ON_H
235
- BT,wake_gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;//HOST_WAKE_BT_H
236
- BT,wake_host_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;//BT_WAKE_HOST_H
235
+ BT,reset_gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>; //BT_DISABLE_GPIO0_B2_u_1V8
236
+ //BT,wake_gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;//HOST_WAKE_BT_H
237
+ //BT,wake_host_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;//BT_WAKE_HOST_H
237238 status = "okay";
238239 };
239240
240241 wireless_wlan: wireless-wlan {
241242 compatible = "wlan-platdata";
242243 wifi_chip_type = "ap6398s";
243
- pinctrl-names = "default";
244
- pinctrl-0 = <&wifi_host_wake_irq>;
245
- WIFI,host_wake_irq = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>; //WIFI_WAKE_HOST_H
244
+ // pinctrl-names = "default";
245
+ // pinctrl-0 = <&wifi_host_wake_irq>;
246
+ // WIFI,host_wake_irq = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; //GPIO2_B5_u_1V8_WF-BT_WAKEUP_IN
246247 // WIFI,poweren_gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
247248 status = "okay";
248249 };
....@@ -251,58 +252,41 @@
251252 compatible = "nk_io_control";
252253 pinctrl-names = "default";
253254 pinctrl-0 = <&ndj_io_gpio>;
254
-
255
-// vcc_5v {
256
-// gpio_num = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
257
-// gpio_function = <0>;
258
-// };
259
-
255
+
260256 vcc_12v {
261
- gpio_num = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
257
+ gpio_num = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
262258 gpio_function = <0>;
263
- };
259
+ };//VCC12_IO_EN_GPIO0_D3_u_3V3
264260
265261 vcc_3v {
266
- gpio_num = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
262
+ gpio_num = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
267263 gpio_function = <0>;
268
- };
264
+ };//VCC3_IO_EN_GPIO4_A1_d_3V3
269265
270266 hub_5V_reset {
271
- gpio_num = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
267
+ gpio_num = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
272268 gpio_function = <3>;
273
- };
269
+ };//HUB_RESET_GPIO4_B6_d_3V3
274270
275271 4g_power {
276
- gpio_num = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
272
+ gpio_num = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
277273 gpio_function = <0>;
278
- };
274
+ };//4G_PWREN_GPIO3_C7_u_3V3
279275
280
- wake_4g {
276
+ wake_wifi_bt {
281277 gpio_num = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
282278 gpio_function = <0>;
283
- };
279
+ };//GPIO2_B5_u_1V8_WF-BT_WAKEUP_IN
284280
285281 air_mode_4g {
286282 gpio_num = <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>;
287283 gpio_function = <0>;
288
- };
284
+ }; //GPIO2_B4_u_1V8_4G_AIR_MODE_IN
289285
290286 reset_4g {
291287 gpio_num = <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
292288 gpio_function = <3>;
293
- };
294
-/*
295
- spk_ctl {
296
- gpio_num = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
297
- gpio_function = <0>;
298
- };
299
-
300
- hp_det
301
- {
302
- gpio_num = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
303
- gpio_function = <1>;
304
- };
305
-*/
289
+ }; //GPIO2_C3_d_1V8_4G_RESET_N_IN
306290 };
307291
308292
....@@ -310,12 +294,11 @@
310294 compatible = "simple-panel";
311295 backlight = <&backlight>;
312296 power-supply = <&vcc3v3_lcd_n>;
313
- vcc-5v-gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
314
- vddio-mipi = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; //MIPIDIS_PWR_EN_1V8
315
- enable-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //LCD_VDD_EN
316
- reset-gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>; //CH7511_RESET_N_1V8
317
- edp-bl-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //LCD_BLK-PWR_EN
318
- edp-bl-en = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD_BKL_EN_GPIO3_D4_d_3V3
297
+ vcc-5v-gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO4_B5_d_3V3
298
+ enable-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //LCD_VDD_EN_GPIO3_C6_u_3V3
299
+ reset-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; //CH7511_RESET_N_1V8
300
+ edp-bl-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; //LCD_BKL_PWM3_3V3
301
+ edp-bl-en = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; //LCD_BKL_EN_GPIO3_A6_d_3V3
319302 bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
320303 bpc = <8>;
321304 prepare-delay-ms = <200>;
....@@ -386,9 +369,22 @@
386369 status = "okay";
387370 };
388371
372
+&backlight1 {
373
+ pwms = <&pwm11 0 25000 0>;
374
+ status = "okay";
375
+};
376
+
389377 &combphy0_ps {
390378 status = "okay";
391379 };
380
+
381
+/*
382
+&usbdrd_dwc3_0 {
383
+ dr_mode = "otg";
384
+ extcon = <&u2phy0>;
385
+ status = "okay";
386
+};
387
+*/
392388
393389 &combphy1_ps {
394390 status = "okay";
....@@ -423,6 +419,10 @@
423419 * mipi_dcphy0 needs to be enabled
424420 * when dsi0 is enabled
425421 */
422
+&mipi_dcphy0 {
423
+ status = "disabled";
424
+};
425
+
426426 &dsi0 {
427427 status = "disabled";
428428 };
....@@ -432,14 +432,7 @@
432432 };
433433
434434 &dsi0_in_vp3 {
435
- status = "disabled";
436
-};
437
-
438
-&dsi0_panel {
439
- power-supply = <&vcc3v3_lcd_n>;
440
- reset-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>;
441
- pinctrl-names = "default";
442
- pinctrl-0 = <&lcd_rst_gpio>;
435
+ status = "okay";
443436 };
444437
445438 /*
....@@ -493,7 +486,7 @@
493486 /* rx_delay = <0x3f>; */
494487
495488 phy-handle = <&rgmii_phy>;
496
- status = "disabled";
489
+ status = "okay";
497490 };
498491
499492 &hdmi0 {
....@@ -700,6 +693,12 @@
700693 compatible = "atmel,24c256";
701694 reg = <0x50>;
702695 };
696
+
697
+ eeprom@53 {
698
+ //compatible = "atmel,24c02";
699
+ compatible = "atmel,24c256";
700
+ reg = <0x53>;
701
+ };
703702 #if 0
704703 usbc0: fusb302@22 {
705704 compatible = "fcs,fusb302";
....@@ -824,9 +823,7 @@
824823 };
825824 };
826825
827
-&mipi_dcphy0 {
828
- status = "okay";
829
-};
826
+
830827
831828 &mipi_dcphy1 {
832829 status = "disabled";
....@@ -834,21 +831,21 @@
834831
835832 &pcie2x1l2 {
836833 phys = <&combphy0_ps PHY_TYPE_PCIE>;
837
- reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
834
+ reset-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_HIGH>;//PCIE20x1_2_RSTn_GPIO3_D0_3V3
838835 vpcie3v3-supply = <&vcc3v3_pcie30>;
839836 status = "okay";
840837 };//MINIPCIE
841838
842839 &pcie2x1l1 {
843840 phys = <&combphy2_psu PHY_TYPE_PCIE>;
844
- reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
841
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;//PCIEX1_1_PERSTn_M1_L
845842 vpcie3v3-supply = <&vcc3v3_pcie30>;
846843 status = "okay";
847844 };//M.2 WIFI6
848845
849846 &pcie2x1l0 {
850847 phys = <&combphy1_ps PHY_TYPE_PCIE>;
851
- reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
848
+ reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; //PCIEx1_0_PERSTn_M1_L
852849 vpcie3v3-supply = <&vcc3v3_pcie30>;
853850 status = "okay";
854851 };//RTL8111H
....@@ -899,7 +896,11 @@
899896
900897 headphone {
901898 hp_det: hp-det {
902
- rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
899
+ rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
900
+ };
901
+
902
+ spk_con: spk-con {
903
+ rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
903904 };
904905 };
905906
....@@ -911,7 +912,7 @@
911912
912913 lcd {
913914 lcd_rst_gpio: lcd-rst-gpio {
914
- rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
915
+ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
915916 };
916917 };
917918
....@@ -923,16 +924,16 @@
923924
924925 sdio-pwrseq {
925926 wifi_enable_h: wifi-enable-h {
926
- rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
927
+ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
927928 };
928929 };
929
-
930
+/*
930931 sdmmc {
931932 sd_s0_pwr: sd-s0-pwr {
932933 rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
933934 };
934935 };
935
-
936
+*/
936937 touch {
937938 touch_gpio: touch-gpio {
938939 rockchip,pins =
....@@ -954,45 +955,35 @@
954955 };
955956
956957 bt_reset_gpio: bt-reset-gpio {
957
- rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
958
- };
959
-
960
- bt_wake_gpio: bt-wake-gpio {
961
- rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
962
- };
963
-
964
- bt_irq_gpio: bt-irq-gpio {
965
- rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
958
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
966959 };
967960 };
968
-
961
+/*
969962 wireless-wlan {
970963 wifi_host_wake_irq: wifi-host-wake-irq {
971
- rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
964
+ rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
972965 };
973966 };
974
-
967
+*/
975968
976969 ndj_io_init{
977970 ndj_io_gpio: ndj_io_gpio_col{
978971 rockchip,pins =
979
- <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
980
- <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
981
- <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,
982
- <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
983
- <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
972
+ <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>,
973
+ <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>,
974
+ <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
975
+ <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
984976 <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
985977 <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>,
986
- <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, //vcc_5v
987
- <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO4_B5_d_3V3
988
- <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO4_B6_d_3V3
989
- <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO3_B0_u_3V3
990
- <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO3_B2_d_3V3
991
- <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO3_B3_u_3V3
992
- <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO3_B4_u_3V3
993
- <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>, //GPIO3_A7_u_3V3
994
- <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; //GPIO3_A0_u_3V3
995
-
978
+ <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>, //vcc_5v
979
+ <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>, //SPI0_MISO_M2_1V8 41
980
+ <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>, //SPI4_MISO_M2_1V8 32
981
+ <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, //SPI0_MOSI_M2_3V3 42
982
+ <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>, //SPI4_MOSI_M2_1V8 33
983
+ <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, //SPI0_CLK_M2_1V8 43
984
+ <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>, //SPI4_CLK_M2_1V8 34
985
+ <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>, //SPI0_CS0_M2_1V8 44
986
+ <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; //SPI4_CS0_M2_1V8 35
996987 };
997988 };
998989 };
....@@ -1002,7 +993,7 @@
1002993 };
1003994
1004995 &route_dsi0 {
1005
- status = "okay";
996
+ status = "disabled";
1006997 connect = <&vp3_out_dsi0>;
1007998 };
1008999
....@@ -1014,6 +1005,11 @@
10141005 &pwm10 {
10151006 status = "okay";
10161007 pinctrl-0 = <&pwm10m2_pins>;
1008
+};
1009
+
1010
+&pwm11 {
1011
+ status = "okay";
1012
+ pinctrl-0 = <&pwm11m3_pins>;
10171013 };
10181014
10191015 &route_hdmi0 {
....@@ -1050,14 +1046,9 @@
10501046 vmmc-supply = <&vcc_3v3_sd_s0>;
10511047 };
10521048
1053
-&uart9 {
1054
- status = "okay";
1055
- pinctrl-names = "default";
1056
- pinctrl-0 = <&uart9m0_xfer &uart9m0_ctsn>;
1057
-};
1058
-
10591049 &u2phy0_otg {
10601050 status = "okay";
1051
+ phy-supply = <&vcc5v0_host>;
10611052 };
10621053
10631054 &u2phy1_otg {
....@@ -1071,7 +1062,7 @@
10711062 &u2phy3_host {
10721063 phy-supply = <&vcc5v0_host>;
10731064 };
1074
-
1065
+#if 0
10751066 &usbdp_phy0 {
10761067 rockchip,dp-lane-mux = <2 3>;
10771068 status = "okay";
....@@ -1099,17 +1090,12 @@
10991090 status = "okay";
11001091 };
11011092
1102
-&usbdrd_dwc3_0 {
1103
- dr_mode = "otg";
1104
- extcon = <&u2phy0>;
1105
- status = "okay";
1106
-};
1107
-
11081093 &usbdrd_dwc3_1 {
11091094 dr_mode = "host";
11101095 maximum-speed = "high-speed";
11111096 status = "okay";
11121097 };
1098
+#endif
11131099
11141100 &uart1 {
11151101 status = "okay";
....@@ -1119,7 +1105,7 @@
11191105 };
11201106
11211107 &uart3 {
1122
- status = "okay";
1108
+ status = "disabled";
11231109 pinctrl-names = "default";
11241110 pinctrl-0 = <&uart3m1_xfer>;
11251111 };
....@@ -1150,7 +1136,7 @@
11501136 };
11511137
11521138 &uart8 {
1153
- status = "okay";
1139
+ status = "disabled";
11541140 pinctrl-names = "default";
11551141 pinctrl-0 = <&uart8m1_xfer>;
11561142 };
....@@ -1161,3 +1147,17 @@
11611147 pinctrl-names = "default";
11621148 pinctrl-0 = <&uart9m0_xfer &uart9m0_ctsn>;
11631149 };
1150
+
1151
+
1152
+&can0 {
1153
+ status = "okay";
1154
+ pinctrl-names = "default";
1155
+ pinctrl-0 = <&can0m0_pins>;
1156
+};
1157
+
1158
+
1159
+&can1 {
1160
+ status = "okay";
1161
+ pinctrl-names = "default";
1162
+ pinctrl-0 = <&can1m1_pins>;
1163
+};