lin
2025-03-21 36aaa54056c4f4e150f6ee0636610d9a68470a08
longan/device/config/chips/a133/configs/c3/board.dts
....@@ -6,6 +6,7 @@
66
77 /dts-v1/;
88 #include "sun50iw10p1.dtsi"
9
+#include "dt-bindings/input/linux-event-codes.h"
910
1011 /{
1112 model = "sun50iw10";
....@@ -18,7 +19,7 @@
1819
1920 reg_usb1_vbus: usb1-vbus {
2021 compatible = "regulator-fixed";
21
- //gpio = <&r_pio PL 11 1 2 0 1>;
22
+ gpio = <&r_pio PL 8 1 2 0 1>;
2223 regulator-name = "usb1-vbus";
2324 regulator-min-microvolt = <5000000>;
2425 regulator-max-microvolt = <5000000>;
....@@ -26,7 +27,7 @@
2627 enable-active-high;
2728 };
2829
29
- soc@03000000 {
30
+ soc: soc@03000000 {
3031
3132 r_pio: pinctrl@07022000 {
3233
....@@ -100,22 +101,22 @@
100101 };
101102
102103 twi3_pins_a: twi3@0 {
103
- allwinner,pins = "PE3", "PE4";
104
+ allwinner,pins = "PH12", "PH13";
104105 allwinner,pname = "twi3_scl", "twi3_sda";
105106 allwinner,function = "twi3";
106
- allwinner,muxsel = <2>;
107
+ allwinner,muxsel = <3>;
107108 allwinner,drive = <1>;
108109 allwinner,pull = <1>;
109110 };
110111
111112 twi3_pins_b: twi3@1 {
112
- allwinner,pins = "PE3", "PE4";
113
+ allwinner,pins = "PH12", "PH13";
113114 allwinner,function = "io_disabled";
114115 allwinner,muxsel = <7>;
115116 allwinner,drive = <1>;
116117 allwinner,pull = <0>;
117118 };
118
-
119
+/*
119120 pwm0_pin_a: pwm0@0 {
120121 //allwinner,pins = "PD23";
121122 allwinner,function = "pwm0";
....@@ -151,7 +152,7 @@
151152 allwinner,pull = <0>;
152153 allwinner,data = <0xffffffff>;
153154 };
154
-
155
+*/
155156 pwm2_pin_a: pwm2@0 {
156157 allwinner,pins = "PD20";
157158 allwinner,function = "pwm2";
....@@ -169,7 +170,7 @@
169170 allwinner,pull = <0>;
170171 allwinner,data = <0xffffffff>;
171172 };
172
-
173
+/*
173174 pwm3_pin_a: pwm3@0 {
174175 allwinner,pins = "PD21";
175176 allwinner,function = "pwm3";
....@@ -187,11 +188,13 @@
187188 allwinner,pull = <0>;
188189 allwinner,data = <0xffffffff>;
189190 };
190
-
191
+*/
191192 spi0_pins_a: spi0@0 {
192
- allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16";
193
- allwinner,pname = "spi0_mosi", "spi0_miso",
194
- "spi0_sclk", "spi0_wp", "spi0_hold";
193
+ // allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16";
194
+ allwinner,pins = "PC2", "PC4", "PC12";
195
+ // allwinner,pname = "spi0_mosi", "spi0_miso",
196
+ // "spi0_sclk", "spi0_wp", "spi0_hold";
197
+ allwinner,pname = "spi0_mosi", "spi0_miso", "spi0_sclk";
195198 allwinner,function = "spi0";
196199 allwinner,muxsel = <4>;
197200 allwinner,drive = <1>;
....@@ -208,12 +211,14 @@
208211 };
209212
210213 spi0_pins_c: spi0@2 {
211
- allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12", "PC15", "PC16";
214
+ // allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12", "PC15", "PC16";
215
+ allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12";
212216 allwinner,function = "io_disabled";
213217 allwinner,muxsel = <7>;
214218 allwinner,drive = <1>;
215219 allwinner,pull = <0>;
216220 };
221
+/*
217222 spi1_pins_a: spi1@0 {
218223 allwinner,pins = "PD11", "PD12", "PD13";
219224 allwinner,pname = "spi1_sclk", "spi1_mosi",
....@@ -230,7 +235,7 @@
230235 allwinner,function = "spi1";
231236 allwinner,muxsel = <4>;
232237 allwinner,drive = <1>;
233
- allwinner,pull = <1>; /* only CS should be pulled up */
238
+ allwinner,pull = <1>; // only CS should be pulled up
234239 };
235240
236241 spi1_pins_c: spi1@2 {
....@@ -275,6 +280,7 @@
275280 allwinner,drive = <1>;
276281 allwinner,pull = <0>;
277282 };
283
+*/
278284 };
279285
280286 twi0: twi@0x05002000{
....@@ -295,8 +301,8 @@
295301 ctp_revert_x_flag = <0x1>;
296302 ctp_revert_y_flag = <0x1>;
297303 ctp_exchange_x_y_flag = <0x0>;
298
- ctp_int_port = <&r_pio PL 7 3 0xffffffff 0xffffffff 0>;
299
- ctp_wakeup = <&pio PB 2 1 0xffffffff 0xffffffff 1>;
304
+ ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
305
+ ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
300306 ctp_power_ldo = <3300>;
301307 ctp_power_ldo_vol = <3300>;
302308 ctp_power = <3300>;
....@@ -317,29 +323,38 @@
317323 pinctrl-1 = <&spi0_pins_c>;
318324 spi0_cs_number = <1>;
319325 spi0_cs_bitmap = <1>;
320
- spi_slave_mode = <0>;
326
+ spi_slave_mode = <0>;
321327 //status = "okay";
322328 status = "disabled";
329
+ /*
323330 spi_uart {
324331 compatible = "wkmic,wk2124spi";
325332 reg = <0>;
326333 spi-max-frequency = <10000000>;
327334 //irq_gpio = <&pio PH 11 6 0xffffffff 0xffffffff 0>;
328335 };
329
- };
336
+ */
330337
338
+ dh2228@2 {
339
+ compatible = "rohm,dh2228fv";
340
+ reg = <0>;
341
+ spi-max-frequency = <100000>;
342
+ };
343
+
344
+ };
345
+/*
331346 pwm3: pwm3@0300a000 {
332347 pinctrl-names = "active", "sleep";
333348 pinctrl-0 = <&pwm3_pin_a>;
334349 pinctrl-1 = <&pwm3_pin_b>;
335
- status = "okay";
350
+ status = "disabled";
336351 };
337
-
352
+*/
338353 pwm2: pwm2@0300a000 {
339354 pinctrl-names = "active", "sleep";
340355 pinctrl-0 = <&pwm2_pin_a>;
341356 pinctrl-1 = <&pwm2_pin_b>;
342
- status = "okay";
357
+ status = "okay";
343358 };
344359
345360 twi1: twi@0x05002400{
....@@ -347,46 +362,7 @@
347362 pinctrl-0 = <&twi1_pins_a>;
348363 pinctrl-1 = <&twi1_pins_b>;
349364 status = "okay";
350
- gsensor {
351
- compatible = "allwinner,sc7a20";
352
- reg = <0x19>;
353
- device_type = "gsensor";
354
- status = "disabled";
355
- gsensor_twi_id = <0x1>;
356
- gsensor_twi_addr = <0x19>;
357
- //gsensor_int1 = <&pio PH 11 6 1 0xffffffff 0xffffffff>;
358
- gsensor-supply = <&reg_dcdc1>;
359
- gsensor_vcc_io_val = <3300>;
360
- };
361
- lightsensor {
362
- compatible = "allwinner,stk3x1x";
363
- reg = <0x48>;
364
- device_type = "lightsensor";
365
- status = "disabled";
366
- ls_twi_id = <0x1>;
367
- ls_twi_addr = <0x48>;
368
- //ls_int = <&pio PH 4 6 1 0xffffffff 0xffffffff>;
369
- lightsensor-supply = <&reg_dcdc1>;
370
- };
371
- pcf85063@51 {
372
- compatible = "haoyu,hym8563";
373
- reg = <0x51>;
374
- status = "okay";
375
- };
376
- mpu6050@68 {
377
- compatible = "invensense,mpu6500";
378
- reg = <0x68>;
379
- mount-matrix = "-0.984807753012208", /* x0 */
380
- "0", /* y0 */
381
- "-0.173648177666930", /* z0 */
382
- "0", /* x1 */
383
- "-1", /* y1 */
384
- "0", /* z1 */
385
- "-0.173648177666930", /* x2 */
386
- "0", /* y2 */
387
- "0.984807753012208"; /* z2 */
388
- status = "disabled";
389
- };
365
+ // EXTEND GPIO
390366 };
391367
392368 twi2: twi@0x05002800{
....@@ -394,21 +370,26 @@
394370 pinctrl-0 = <&twi2_pins_a>;
395371 pinctrl-1 = <&twi2_pins_b>;
396372 twi-supply = <&reg_dldo2>;
397
- status = "ok";
373
+ status = "okay";
374
+ // CAMERA1
398375
399
-/* ac107@36 {
400
- compatible = "Allwinnertech,ac107_0";
401
- gpio-reset = "null";
402
- reg = <0x36>;
403
- status = "okay";
404
- }; */
376
+ // CAMERA2
405377 };
406378
407379 twi3: twi@0x05002c00{
408380 clock-frequency = <200000>;
409381 pinctrl-0 = <&twi3_pins_a>;
410382 pinctrl-1 = <&twi3_pins_b>;
411
- status = "ok";
383
+ status = "okay";
384
+ // RTC
385
+ pcf8563@51 {
386
+ compatible = "haoyu,hym8563";
387
+ reg = <0x51>;
388
+ interrupt-parent = <&pio>;
389
+ interrupts = <PB 8 IRQ_TYPE_LEVEL_LOW>;
390
+ status = "okay";
391
+ wakeup-source;
392
+ };
412393 };
413394
414395 twi6: s_twi@0x07081400{
....@@ -559,6 +540,7 @@
559540 regulator-ramp-delay = <250>;
560541 regulator-enable-ramp-delay = <1000>;
561542 regulator-boot-on;
543
+ regulator-always-on;
562544 };
563545 reg_dcdc2: dcdc2 {
564546 regulator-name = "axp803-dcdc2";
....@@ -642,15 +624,20 @@
642624 };
643625 reg_dldo1: dldo1 {
644626 regulator-name = "axp803-dldo1";
645
- regulator-min-microvolt = <700000>;
646
- regulator-max-microvolt = <3300000>;
627
+ regulator-min-microvolt = <1800000>;
628
+ regulator-max-microvolt = <1900000>;
647629 regulator-enable-ramp-delay = <1000>;
630
+ regulator-always-on;
631
+ regulator-boot-on;
648632 };
649633 reg_dldo2: dldo2 {
650634 regulator-name = "axp803-dldo2";
651635 regulator-min-microvolt = <700000>;
652636 regulator-max-microvolt = <4200000>;
653637 regulator-enable-ramp-delay = <1000>;
638
+ regulator-always-on;
639
+ regulator-boot-on;
640
+ // kickpi
654641 };
655642 reg_dldo3: dldo3 {
656643 regulator-name = "axp803-dldo3";
....@@ -681,6 +668,9 @@
681668 regulator-min-microvolt = <700000>;
682669 regulator-max-microvolt = <1900000>;
683670 regulator-enable-ramp-delay = <1000>;
671
+ regulator-always-on;
672
+ regulator-boot-on;
673
+ // kickpi
684674 };
685675 reg_fldo1: fldo1 {
686676 regulator-name = "axp803-fldo1";
....@@ -832,7 +822,7 @@
832822
833823 osc24m-on = <0x1>;
834824 };
835
-
825
+/*
836826 pwm0: pwm0@0300a000 {
837827 pinctrl-names = "active", "sleep";
838828 pinctrl-0 = <&pwm0_pin_a>;
....@@ -852,7 +842,7 @@
852842 spi_slave_mode = <0>;
853843 status = "disabled";
854844 };
855
-
845
+*/
856846 gpadc:gpadc{
857847 channel_num = <1>;
858848 channel_select = <0x01>;
....@@ -923,8 +913,7 @@
923913 device_type = "usbc0";
924914 usb_port_type = <0x0>;
925915 usb_detect_type = <0x1>;
926
- //usb_id_gpio = <&pio PH 8 0 0 0xffffffff 0xffffffff>;
927
- usb_id_gpio = <&r_pio PL 10 0 0 0xffffffff 0xffffffff>;
916
+ usb_id_gpio = <&r_pio PL 9 0 0 0xffffffff 0xffffffff>;
928917 usb_det_vbus_gpio = "axp_ctrl";
929918 usb_regulator_io = "nocare";
930919 det_vbus_supply = <&usb_power_supply>;
....@@ -963,23 +952,26 @@
963952 };
964953
965954 sdc1: sdmmc@04021000 {
966
- bus-width = <4>;
967
- no-mmc;
968
- no-sd;
969
- cap-sd-highspeed;
970
- /*sd-uhs-sdr12*/
971
- /*sd-uhs-sdr25*/
972
- /*sd-uhs-sdr50;*/
973
- /*sd-uhs-ddr50;*/
974
- /*sd-uhs-sdr104*/
975
- /*sunxi-power-save-mode;*/
976
- /*sunxi-dis-signal-vol-sw;*/
977
- cap-sdio-irq;
978
- keep-power-in-suspend;
979
- ignore-pm-notify;
980
- max-frequency = <50000000>;
981
- ctl-spec-caps = <0x8>;
982
- status = "okay";
955
+ bus-width = <4>;
956
+ no-mmc;
957
+ no-sd;
958
+ cap-sd-highspeed;
959
+ /*sd-uhs-sdr12*/
960
+ /*sd-uhs-sdr25*/
961
+ sd-uhs-sdr50;
962
+ sd-uhs-ddr50;
963
+ sd-uhs-sdr104;
964
+ // kickpi
965
+ //sunxi-power-save-mode;
966
+ /*sunxi-dis-signal-vol-sw;*/
967
+ sdio-used-1v8;
968
+ cap-sdio-irq;
969
+ keep-power-in-suspend;
970
+ ignore-pm-notify;
971
+ max-frequency = <50000000>;
972
+ ctl-spec-caps = <0x8>;
973
+ status = "okay";
974
+
983975 };
984976
985977 /* gpio-spk will output 0x00 when playing audio */
....@@ -1001,7 +993,7 @@
1001993 /* Pa enabled about */
1002994 pa_level = <0x00>;
1003995 pa_msleep_time = <0x78>;
1004
- gpio-spk = <&pio PH 17 1 1 1 1>;
996
+ //gpio-spk = <&pio PB 7 1 1 1 1>;
1005997 /* regulator about */
1006998 avcc-supply = <&reg_aldo1>;
1007999 cpvin-supply = <&reg_eldo1>;
....@@ -1009,6 +1001,7 @@
10091001 };
10101002
10111003 sndcodec:sound@0 {
1004
+ noheadphonemic = <1>;
10121005 status = "okay";
10131006 };
10141007
....@@ -1021,7 +1014,7 @@
10211014 };
10221015
10231016 dmic:dmic-controller@0x05095000{
1024
- status = "okay";
1017
+ status = "disabled";
10251018 };
10261019
10271020 snddmic:sound@2{
....@@ -1041,7 +1034,7 @@
10411034 daudio_master = <0x04>;
10421035 signal_inversion = <0x01>;
10431036 slot_width_select = <0x20>;
1044
- status = "disabled";
1037
+ status = "okay";
10451038 };
10461039
10471040 snddaudio0:sound@3 {
....@@ -1050,7 +1043,7 @@
10501043
10511044 /* sunxi,snddaudio-codec = "ac107.1-0036";
10521045 sunxi,snddaudio-codec-dai = "ac107-pcm0"; */
1053
- status = "disabled";
1046
+ status = "okay";
10541047 };
10551048
10561049 daudio1:daudio@0x05091000 {
....@@ -1116,7 +1109,7 @@
11161109 vind0:vind@0 {
11171110 vind0_clk = <336000000>;
11181111 vind0_isp = <300000000>;
1119
- status = "okay";
1112
+ status = "disabled";
11201113
11211114 actuator0:actuator@0 {
11221115 device_type = "actuator0";
....@@ -1231,212 +1224,57 @@
12311224 status = "okay";
12321225 };
12331226 };
1234
-/*----------------------------------------------------------------------------------
1235
-disp init configuration
12361227
1237
-disp_mode (0:screen0<screen0,fb0>)
1238
-screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)
1239
-screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
1240
- (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
1241
-screenx_output_format (for hdmi, 0:RGB 1:yuv444 2:yuv422 3:yuv420)
1242
-screenx_output_bits (for hdmi, 0:8bit 1:10bit 2:12bit 2:16bit)
1243
-screenx_output_eotf (for hdmi, 0:reserve 4:SDR 16:HDR10 18:HLG)
1244
-screenx_output_cs (for hdmi, 0:undefined 257:BT709 260:BT601 263:BT2020)
1245
-screenx_output_dvi_hdmi (for hdmi, 0:undefined 1:dvi mode 2:hdmi mode)
1246
-screen0_output_range (for hdmi, 0:default 1:full 2:limited)
1247
-screen0_output_scan (for hdmi, 0:no data 1:overscan 2:underscan)
1248
-screen0_output_aspect_ratio (for hdmi, 8-same as original picture 9-4:3 10-16:9 11-14:9)
1249
-fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
1250
-fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
1251
-fb0_scaler_mode_enable(scaler mode enable, used FE)
1252
-fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
1253
-lcdx_backlight (lcd init backlight,the range:[0,256],default:197
1254
-lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
1255
-lcd0_contrast (LCD contrast, 0~100)
1256
-lcd0_saturation (LCD saturation, 0~100)
1257
-lcd0_hue (LCD hue, 0~100)
1258
-framebuffer software rotation setting:
1259
-disp_rotation_used: (0:disable; 1:enable,you must set fbX_width to lcd_y,
1260
-set fbX_height to lcd_x)
1261
-degreeX: (X:screen index; 0:0 degree; 1:90 degree; 3:270 degree)
1262
-degreeX_Y: (X:screen index; Y:layer index 0~15; 0:0 degree; 1:90 degree; 3:270 degree)
1263
-devX_output_type : config output type in bootGUI framework in UBOOT-2018.
1264
- (0:none; 1:lcd; 2:tv; 4:hdmi;)
1265
-devX_output_mode : config output resolution(see include/video/sunxi_display2.h) of bootGUI framework in UBOOT-2018
1266
-devX_screen_id : config display index of bootGUI framework in UBOOT-2018
1267
-devX_do_hpd : whether do hpd detectation or not in UBOOT-2018
1268
-chn_cfg_mode : Hardware DE channel allocation config. 0:single display with 6
1269
- channel, 1:dual display with 4 channel in main display and 2 channel in second
1270
- display, 2:dual display with 3 channel in main display and 3 channel in second
1271
- in display.
1272
-----------------------------------------------------------------------------------*/
1273
- disp: disp@06000000 {
1274
- disp_init_enable = <1>;
1275
- disp_mode = <0>;
1276
-
1277
- screen0_output_type = <1>;
1278
- screen0_output_mode = <4>;
1279
-
1280
- screen1_output_type = <1>;
1281
- screen1_output_mode = <4>;
1282
-
1283
- screen1_output_format = <0>;
1284
- screen1_output_bits = <0>;
1285
- screen1_output_eotf = <4>;
1286
- screen1_output_cs = <257>;
1287
- screen1_output_dvi_hdmi = <2>;
1288
- screen1_output_range = <2>;
1289
- screen1_output_scan = <0>;
1290
- screen1_output_aspect_ratio = <8>;
1291
-
1292
- dev0_output_type = <1>;
1293
- dev0_output_mode = <4>;
1294
- dev0_screen_id = <0>;
1295
- dev0_do_hpd = <0>;
1296
-
1297
- dev1_output_type = <4>;
1298
- dev1_output_mode = <10>;
1299
- dev1_screen_id = <1>;
1300
- dev1_do_hpd = <1>;
1301
-
1302
- def_output_dev = <0>;
1303
- hdmi_mode_check = <1>;
1304
-
1305
- fb0_format = <0>;
1306
- fb0_width = <1024>;
1307
- fb0_height = <600>;
1308
-
1309
- fb1_format = <0>;
1310
- fb1_width = <0>;
1311
- fb1_height = <0>;
1312
- chn_cfg_mode = <1>;
1313
-
1314
- disp_para_zone = <1>;
1315
- dc1sw-supply = <&reg_dc1sw>;
1316
- eldo3-supply = <&reg_eldo3>;
1317
- dcdc1-supply = <&reg_dcdc1>;
1318
- };
1319
-/*----------------------------------------------------------------------------------
1320
-;lcd0 configuration
1321
-
1322
-;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
1323
-;lcd_hv_if 0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
1324
-;lcd_hv_clk_phase 0:0 degree;1:90 degree;2:180 degree;3:270 degree
1325
-;lcd_hv_sync_polarity 0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
1326
-;lcd_hv_syuv_seq 0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
1327
-;lcd_cpu_if 0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
1328
-; 6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
1329
-;lcd_cpu_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
1330
-;lcd_dsi_if 0:video mode; 1: Command mode; 2:video burst mode
1331
-;lcd_dsi_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
1332
-;lcd_x: lcd horizontal resolution
1333
-;lcd_y: lcd vertical resolution
1334
-;lcd_width: width of lcd in mm
1335
-;lcd_height: height of lcd in mm
1336
-;lcd_dclk_freq: in MHZ unit
1337
-;lcd_pwm_freq: in HZ unit
1338
-;lcd_pwm_pol: lcd backlight PWM polarity
1339
-;lcd_pwm_max_limit lcd backlight PWM max limit(<=255)
1340
-;lcd_hbp: hsync back porch(pixel) + hsync plus width(pixel);
1341
-;lcd_ht: hsync total cycle(pixel)
1342
-;lcd_vbp: vsync back porch(line) + vysnc plus width(line)
1343
-;lcd_vt: vysnc total cycle(line)
1344
-;lcd_hspw: hsync plus width(pixel)
1345
-;lcd_vspw: vysnc plus width(pixel)
1346
-;lcd_lvds_if: 0:single link; 1:dual link
1347
-;lcd_lvds_colordepth: 0:8bit; 1:6bit
1348
-;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode
1349
-;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
1350
-;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
1351
-; 8~11bit:dclk phase; 12~15bit:de phase)
1352
-;lcd_gamma_en lcd gamma correction enable
1353
-;lcd_bright_curve_en lcd bright curve correction enable
1354
-;lcd_cmap_en lcd color map function enable
1355
-;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
1356
-;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10;
1357
-; decrease it while lcd is not bright enough; increase while lcd is too bright
1358
-;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch)
1359
-;Pin setting for special function ie.LVDS, RGB data or vsync
1360
-; name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
1361
-;Pin setting for gpio:
1362
-; lcd_gpio_X = port:PD12<pin function><pull up or pull down><drive ability><output level>
1363
-;Pin setting for backlight enable pin
1364
-; lcd_bl_en = port:PD12<pin function><pull up or pull down><drive ability><output level>
1365
-;fsync setting, pulse to csi
1366
-;lcd_fsync_en (0:disable fsync,1:enable)
1367
-;lcd_fsync_act_time (active time of fsync, unit:pixel)
1368
-;lcd_fsync_dis_time (disactive time of fsync, unit:pixel)
1369
-;lcd_fsync_pol (0:positive;1:negative)
1370
-;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
1371
-pull up or pull down(default 0), driver level(default 1), data>
1372
-;For dual link lvds: use lvds2link_pins_a and lvds2link_pins_b instead
1373
-;For rgb24: use rgb24_pins_a and rgb24_pins_b instead
1374
-;For lvds1: use lvds1_pins_a and lvds1_pins_b instead
1375
-;For lvds0: use lvds0_pins_a and lvds0_pins_b instead
1376
-;----------------------------------------------------------------------------------*/
1377
- lcd0: lcd0@01c0c000 {
1378
- lcd_used = <1>;
1379
-
1380
- lcd_driver_name = "default_lcd";
1381
- lcd_backlight = <100>;
1382
- lcd_if = <3>;
1383
-
1384
- lcd_x = <1024>;
1385
- lcd_y = <600>;
1386
- lcd_width = <217>;
1387
- lcd_height = <136>;
1388
- lcd_dclk_freq = <49>;
1389
-
1390
- lcd_pwm_used = <1>;
1391
- lcd_pwm_ch = <3>;
1392
- lcd_pwm_freq = <50000>;
1393
- lcd_pwm_pol = <1>;
1394
- lcd_pwm_max_limit = <255>;
1395
-
1396
- lcd_hbp = <124>;
1397
- lcd_ht = <1264>;
1398
- lcd_hspw = <24>;
1399
- lcd_vbp = <24>;
1400
- lcd_vt = <648>;
1401
- lcd_vspw = <4>;
1402
-
1403
- lcd_frm = <0>;
1404
- lcd_gamma_en = <0>;
1405
- lcd_bright_curve_en = <0>;
1406
- lcd_cmap_en = <0>;
1407
-
1408
- deu_mode = <0>;
1409
- lcdgamma4iep = <22>;
1410
- smart_color = <90>;
1411
-
1412
- lcd_lvds_if = <0>;
1413
- lcd_lvds_colordepth = <0>;
1414
- lcd_lvds_mode = <0>;
1415
-
1416
- lcd_pin_power = "dcdc1";
1417
- lcd_pin_power1 = "eldo3";
1418
-
1419
- lcd_power = "dc1sw";
1420
- lcd_gpio_0 = <&r_pio PL 11 1 0 3 1>;
1421
- pinctrl-0 = <&lvds0_pins_a>;
1422
- pinctrl-1 = <&lvds0_pins_b>;
1423
- };
1424
-
1228
+/*
14251229 hall_para {
14261230 hall_name = "MH248";
14271231 status = "disabled";
14281232 hall_int_port = <&r_pio PL 9 6 1 0xffffffff 0xffffffff>;
14291233 };
1430
-
1234
+*/
14311235 keyboard {
14321236 compatible = "allwinner,keyboard_1350mv";
1433
- status = "disable";
1434
- key_cnt = <3>;
1435
- key0 = <475 0x7372>;
1436
- key1 = <646 0x73>;
1437
- key2 = <900 0x72>;
1237
+ status = "okay";
1238
+ key_cnt = <1>;
1239
+ key0 = <590 KEY_RESERVED>;
1240
+ //key0 = <475 0x7372>;
1241
+ //key1 = <646 0x73>;
1242
+ //key2 = <897 0x72>;
14381243 };
14391244
1245
+ wlan: wlan@0 {
1246
+ compatible = "allwinner,sunxi-wlan";
1247
+ clocks;
1248
+ pinctrl-0;
1249
+ pinctrl-names;
1250
+ wlan_busnum = <0x1>;
1251
+ wlan_power = "axp803-dldo1";
1252
+ wlan_io_regulator;
1253
+ wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 1>;
1254
+ wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>;
1255
+ //chip_en;
1256
+ //power_en = <&pio PG 10 1 0xffffffff 0xffffffff 0>;
1257
+ status = "okay";
1258
+ };
1259
+
1260
+ bt: bt@0 {
1261
+ compatible = "allwinner,sunxi-bt";
1262
+ clocks = <&clk_losc_out>, <&clk_dcxo_out>;
1263
+ bt_power = "axp803-dldo1";
1264
+ bt_io_regulator;
1265
+ bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>;
1266
+ status = "okay";
1267
+ };
1268
+
1269
+ btlpm: btlpm@0 {
1270
+ compatible = "allwinner,sunxi-btlpm";
1271
+ uart_index = <0x1>;
1272
+ bt_wake = <&pio PG 12 1 0xffffffff 0xffffffff 1>;
1273
+ bt_hostwake = <&pio PG 11 6 0xffffffff 0xffffffff 1>;
1274
+ status = "okay";
1275
+ };
1276
+
1277
+/*
14401278 wlan: wlan@0 {
14411279 compatible = "allwinner,sunxi-wlan";
14421280 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
....@@ -1445,30 +1283,31 @@
14451283 wlan_busnum = <0x1>;
14461284 wlan_power = "axp803-dldo1";
14471285 wlan_io_regulator;
1448
- wlan_regon = <&r_pio PL 5 1 0xffffffff 0xffffffff 0>;
1449
- wlan_hostwake = <&r_pio PL 6 6 0xffffffff 0xffffffff 0>;
1286
+ wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 0>;
1287
+ wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>;
14501288 chip_en;
14511289 power_en;
14521290 status = "okay";
14531291 };
1292
+
14541293 bt: bt@0 {
14551294 compatible = "allwinner,sunxi-bt";
14561295 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
14571296 bt_power = "axp803-dldo1";
14581297 //bt_power = "axp803-dldo1";
14591298 bt_io_regulator;
1460
- bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>;
1299
+ //bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>;
14611300 status = "okay";
14621301 };
14631302
14641303 btlpm: btlpm@0 {
14651304 compatible = "allwinner,sunxi-btlpm";
14661305 uart_index = <0x1>;
1467
- bt_wake = <&r_pio PL 4 1 0xffffffff 0xffffffff 1>;
1468
- bt_hostwake = <&r_pio PL 3 6 0xffffffff 0xffffffff 1>;
1306
+ bt_wake = <&pio PG 11 1 0xffffffff 0xffffffff 1>;
1307
+ bt_hostwake = <&pio PG 12 6 0xffffffff 0xffffffff 1>;
14691308 status = "okay";
14701309 };
1471
-
1310
+*/
14721311 addr_mgt: addr_mgt@0 {
14731312 compatible = "allwinner,sunxi-addr_mgt";
14741313 type_addr_wifi = <0x0>;
....@@ -1512,73 +1351,95 @@
15121351 };
15131352
15141353 leds {
1515
- compatible = "gpio-leds";
1516
- pinctrl-names = "default";
1517
- status = "okay";
1354
+ compatible = "gpio-leds";
1355
+ pinctrl-names = "default";
1356
+ status = "okay";
15181357
1519
- sys {
1520
- label = "sysled";
1521
- gpios = <&pio PH 19 1 0 1 0>;
1522
- linux,default_trigger = "heartbeat";
1523
- };
1524
-
1525
- hubrst {
1526
- label = "hubrst";
1527
- gpios = <&pio PC 7 1 0 1 1>;
1528
- default_state="on";
1529
- };
1530
-
1531
- usb1_pwr {
1532
- label = "usb1_pwr";
1533
- gpios = <&r_pio PL 9 1 0 1 1>;
1534
- default_state="on";
1535
- };
1358
+ sysled {
1359
+ label = "sysled";
1360
+ gpios = <&r_pio PL 10 1 0 1 1>;
1361
+ linux,default_trigger = "heartbeat";
1362
+ };
15361363
1537
- usb2_pwr {
1538
- label = "usb2_pwr";
1539
- gpios = <&pio PH 15 1 0 1 1>;
1540
- default_state="on";
1541
- };
1542
-
1543
- usb3_pwr {
1544
- label = "usb3_pwr";
1545
- gpios = <&pio PH 16 1 0 1 1>;
1546
- default_state="on";
1547
- };
1364
+ spk_en {
1365
+ label = "spk_en";
1366
+ gpios = <&pio PB 7 1 0 1 0>;
1367
+ linux,default_trigger = "default-on";
1368
+ };
15481369
1549
- usb4_pwr {
1550
- label = "usb4_pwr";
1551
- gpios = <&r_pio PL 8 1 0 1 1>;
1552
- default_state="on";
1553
- };
1370
+ fan_en {
1371
+ label = "fan_en";
1372
+ gpios = <&r_pio PL 7 1 0 1 0>;
1373
+ linux,default_trigger = "default-on";
1374
+ };
15541375
1555
- usb5_pwr {
1556
- label = "usb5_pwr";
1557
- gpios = <&pio PH 18 1 0 1 1>;
1558
- default_state="on";
1559
- };
1376
+ PH8 {
1377
+ label = "PH8";
1378
+ gpios = <&pio PH 8 1 0 1 0>;
1379
+ linux,default_trigger = "default-on";
1380
+ };
15601381
1561
- usb6_pwr {
1562
- label = "usb6_pwr";
1563
- gpios = <&pio PB 6 1 0 1 1>;
1564
- default_state="on";
1565
- };
1382
+ PC2 {
1383
+ label = "PC2";
1384
+ gpios = <&pio PC 2 1 0 1 0>;
1385
+ linux,default_trigger = "default-on";
1386
+ };
15661387
1567
- usb7_pwr {
1568
- label = "usb7_pwr";
1569
- gpios = <&pio PB 8 1 0 1 1>;
1570
- default_state="on";
1571
- };
1388
+ PC3 {
1389
+ label = "PC3";
1390
+ gpios = <&pio PC 3 1 0 1 0>;
1391
+ linux,default_trigger = "default-on";
1392
+ };
15721393
1573
- spkmute {
1574
- label = "spkmute";
1575
- gpios = <&pio PH 13 1 0 1 0>;
1576
- default_state="on";
1577
- };
1394
+ PC4 {
1395
+ label = "PC4";
1396
+ gpios = <&pio PC 4 1 0 1 0>;
1397
+ linux,default_trigger = "default-on";
1398
+ };
1399
+
1400
+ PC7 {
1401
+ label = "PC7";
1402
+ gpios = <&pio PC 7 1 0 1 0>;
1403
+ linux,default_trigger = "default-on";
1404
+ };
1405
+
1406
+ PC12 {
1407
+ label = "PC12";
1408
+ gpios = <&pio PC 12 1 0 1 0>;
1409
+ linux,default_trigger = "default-on";
1410
+ };
1411
+
15781412 };
1579
-
15801413 };
15811414
15821415 &cpu0 {
15831416 cpu-supply = <&reg_dcdc2>;
15841417 };
1418
+
1419
+&s_cir0 {
1420
+ status = "okay";
1421
+
1422
+ pinctrl-names = "default", "sleep";
1423
+ pinctrl-0 = <&s_cir0_pins_a>;
1424
+ pinctrl-1 = <&s_cir0_pins_a>;
1425
+
1426
+ s_cir0_used = <1>;
1427
+ ir_power_key_code0 = <0x4d>;
1428
+ ir_addr_code0 = <0x4040>;
1429
+ ir_power_key_code1 = <0x51>;
1430
+ ir_addr_code1 = <0x7f80>;
1431
+ ir_power_key_code2 = <0x1c>;
1432
+ ir_addr_code2 = <0xdf00>;
1433
+ wakeup-source;
1434
+};
1435
+
1436
+
1437
+&gmac0 {
1438
+ /delete-property/ phy-rst;
1439
+ rx-delay = <7>;
1440
+};
1441
+
1442
+
1443
+//#include "lcd-lvds-21-1920-1080.dtsi"
1444
+#include "lcd-lvds-7-1024-600.dtsi"
1445
+//#include "lcd-mipi-10-800-1280.dtsi"