huangcm
2024-10-17 15e1b5207a76de34ee6bde806c6e629241aff10a
longan/device/config/chips/a133/configs/c3/board.dts
....@@ -5,8 +5,8 @@
55 */
66
77 /dts-v1/;
8
-
98 #include "sun50iw10p1.dtsi"
9
+#include "dt-bindings/input/linux-event-codes.h"
1010
1111 /{
1212 model = "sun50iw10";
....@@ -19,7 +19,7 @@
1919
2020 reg_usb1_vbus: usb1-vbus {
2121 compatible = "regulator-fixed";
22
- gpio = <&r_pio PL 11 1 2 0 1>;
22
+ gpio = <&r_pio PL 8 1 2 0 1>;
2323 regulator-name = "usb1-vbus";
2424 regulator-min-microvolt = <5000000>;
2525 regulator-max-microvolt = <5000000>;
....@@ -27,7 +27,7 @@
2727 enable-active-high;
2828 };
2929
30
- soc@03000000 {
30
+ soc: soc@03000000 {
3131
3232 r_pio: pinctrl@07022000 {
3333
....@@ -49,25 +49,25 @@
4949 };
5050 };
5151 pio: pinctrl@0300b000 {
52
- twi0_pins_a: twi0@0 {
53
- allwinner,pins = "PH0", "PH1";
54
- allwinner,pname = "twi0_scl", "twi0_sda";
55
- allwinner,function = "twi0";
56
- allwinner,muxsel = <2>;
57
- allwinner,drive = <1>;
58
- allwinner,pull = <0>;
59
- };
52
+ twi0_pins_a: twi0@0 {
53
+ allwinner,pins = "PD22", "PD23";
54
+ allwinner,pname = "twi0_scl", "twi0_sda";
55
+ allwinner,function = "twi0";
56
+ allwinner,muxsel = <4>;
57
+ allwinner,drive = <1>;
58
+ allwinner,pull = <0>;
59
+ };
6060
61
- twi0_pins_b: twi0@1 {
62
- allwinner,pins = "PH0", "PH1";
63
- allwinner,function = "io_disabled";
64
- allwinner,muxsel = <7>;
65
- allwinner,drive = <1>;
66
- allwinner,pull = <0>;
67
- };
61
+ twi0_pins_b: twi0@1 {
62
+ allwinner,pins = "PD22", "PD23";
63
+ allwinner,function = "io_disabled";
64
+ allwinner,muxsel = <7>;
65
+ allwinner,drive = <1>;
66
+ allwinner,pull = <0>;
67
+ };
6868
6969 twi1_pins_a: twi1@0 {
70
- allwinner,pins = "PH2", "PH3";
70
+ allwinner,pins = "PB4", "PB5";
7171 allwinner,pname = "twi1_scl", "twi1_sda";
7272 allwinner,function = "twi1";
7373 allwinner,muxsel = <2>;
....@@ -76,7 +76,7 @@
7676 };
7777
7878 twi1_pins_b: twi1@1 {
79
- allwinner,pins = "PH2", "PH3";
79
+ allwinner,pins = "PB4", "PB5";
8080 allwinner,function = "io_disabled";
8181 allwinner,muxsel = <7>;
8282 allwinner,drive = <1>;
....@@ -101,24 +101,24 @@
101101 };
102102
103103 twi3_pins_a: twi3@0 {
104
- allwinner,pins = "PE3", "PE4";
104
+ allwinner,pins = "PH12", "PH13";
105105 allwinner,pname = "twi3_scl", "twi3_sda";
106106 allwinner,function = "twi3";
107
- allwinner,muxsel = <2>;
107
+ allwinner,muxsel = <3>;
108108 allwinner,drive = <1>;
109109 allwinner,pull = <1>;
110110 };
111111
112112 twi3_pins_b: twi3@1 {
113
- allwinner,pins = "PE3", "PE4";
113
+ allwinner,pins = "PH12", "PH13";
114114 allwinner,function = "io_disabled";
115115 allwinner,muxsel = <7>;
116116 allwinner,drive = <1>;
117117 allwinner,pull = <0>;
118118 };
119
-
119
+/*
120120 pwm0_pin_a: pwm0@0 {
121
- allwinner,pins = "PD23";
121
+ //allwinner,pins = "PD23";
122122 allwinner,function = "pwm0";
123123 allwinner,muxsel = <0x02>;
124124 allwinner,drive = <0x2>;
....@@ -127,7 +127,7 @@
127127 };
128128
129129 pwm0_pin_b: pwm0@1 {
130
- allwinner,pins = "PD23";
130
+ //allwinner,pins = "PD23";
131131 allwinner,function = "io_disabled";
132132 allwinner,muxsel = <0x07>;
133133 allwinner,drive = <0x2>;
....@@ -136,7 +136,7 @@
136136 };
137137
138138 pwm1_pin_a: pwm1@0 {
139
- allwinner,pins = "PD22";
139
+ //allwinner,pins = "PD22";
140140 allwinner,function = "pwm1";
141141 allwinner,muxsel = <0x02>;
142142 allwinner,drive = <0x2>;
....@@ -145,18 +145,18 @@
145145 };
146146
147147 pwm1_pin_b: pwm1@1 {
148
- allwinner,pins = "PD22";
148
+ //allwinner,pins = "PD22";
149149 allwinner,function = "io_disabled";
150150 allwinner,muxsel = <0x07>;
151151 allwinner,drive = <0x2>;
152152 allwinner,pull = <0>;
153153 allwinner,data = <0xffffffff>;
154154 };
155
-
155
+*/
156156 pwm2_pin_a: pwm2@0 {
157157 allwinner,pins = "PD20";
158158 allwinner,function = "pwm2";
159
- allwinner,muxsel = <0x02>;
159
+ allwinner,muxsel = <0x03>;
160160 allwinner,drive = <0x2>;
161161 allwinner,pull = <0>;
162162 allwinner,data = <0xffffffff>;
....@@ -170,11 +170,11 @@
170170 allwinner,pull = <0>;
171171 allwinner,data = <0xffffffff>;
172172 };
173
-
173
+/*
174174 pwm3_pin_a: pwm3@0 {
175175 allwinner,pins = "PD21";
176176 allwinner,function = "pwm3";
177
- allwinner,muxsel = <0x02>;
177
+ allwinner,muxsel = <0x03>;
178178 allwinner,drive = <0x2>;
179179 allwinner,pull = <0>;
180180 allwinner,data = <0xffffffff>;
....@@ -188,11 +188,13 @@
188188 allwinner,pull = <0>;
189189 allwinner,data = <0xffffffff>;
190190 };
191
-
191
+*/
192192 spi0_pins_a: spi0@0 {
193
- allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16";
194
- allwinner,pname = "spi0_mosi", "spi0_miso",
195
- "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";
196198 allwinner,function = "spi0";
197199 allwinner,muxsel = <4>;
198200 allwinner,drive = <1>;
....@@ -209,13 +211,14 @@
209211 };
210212
211213 spi0_pins_c: spi0@2 {
212
- 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";
213216 allwinner,function = "io_disabled";
214217 allwinner,muxsel = <7>;
215218 allwinner,drive = <1>;
216219 allwinner,pull = <0>;
217220 };
218
-
221
+/*
219222 spi1_pins_a: spi1@0 {
220223 allwinner,pins = "PD11", "PD12", "PD13";
221224 allwinner,pname = "spi1_sclk", "spi1_mosi",
....@@ -232,7 +235,7 @@
232235 allwinner,function = "spi1";
233236 allwinner,muxsel = <4>;
234237 allwinner,drive = <1>;
235
- allwinner,pull = <1>; /* only CS should be pulled up */
238
+ allwinner,pull = <1>; // only CS should be pulled up
236239 };
237240
238241 spi1_pins_c: spi1@2 {
....@@ -243,33 +246,41 @@
243246 allwinner,pull = <0>;
244247 };
245248
246
- spi2_pins_a: spi2@0 {
247
- allwinner,pins = "PB1", "PB2", "PB3";
248
- allwinner,pname = "spi2_sclk", "spi2_mosi",
249
- "spi2_miso";
250
- allwinner,function = "spi2";
251
- allwinner,muxsel = <3>;
252
- allwinner,drive = <1>;
253
- allwinner,pull = <0>;
254
- };
249
+ uart3_pins_a: uart3@0 {
250
+ allwinner,pins = "PD14", "PD15";
251
+ allwinner,pname = "uart3_tx", "uart3_rx";
252
+ allwinner,function = "uart3";
253
+ allwinner,muxsel = <4>;
254
+ allwinner,drive = <1>;
255
+ allwinner,pull = <1>;
256
+ };
255257
256
- spi2_pins_b: spi2@1 {
257
- allwinner,pins = "PB0";
258
- allwinner,pname = "spi2_cs0";
259
- allwinner,function = "spi2";
260
- allwinner,muxsel = <3>;
261
- allwinner,drive = <1>;
262
- allwinner,pull = <1>; /* only CS should be pulled up */
263
- };
258
+ uart3_pins_b: uart3@1 {
259
+ allwinner,pins = "PD14", "PD15";
260
+ allwinner,function = "io_disabled";
261
+ allwinner,muxsel = <7>;
262
+ allwinner,drive = <1>;
263
+ allwinner,pull = <0>;
264
+ };
264265
265
- spi2_pins_c: spi2@2 {
266
- allwinner,pins = "PB0", "PB1", "PB2", "PB3";
267
- allwinner,function = "io_disabled";
268
- allwinner,muxsel = <7>;
269
- allwinner,drive = <1>;
270
- allwinner,pull = <0>;
271
- };
266
+ uart4_pins_a: uart4@0 {
267
+ allwinner,pins = "PD18", "PD19";
268
+ allwinner,pname = "uart4_tx", "uart4_rx";
269
+ allwinner,function = "uart4";
270
+ allwinner,muxsel = <4>;
271
+ allwinner,drive = <1>;
272
+ allwinner,pull = <1>;
273
+ };
272274
275
+ uart4_pins_b: uart4@1 {
276
+ allwinner,pins = "PD18", "PD19";
277
+ allwinner,pins = "PD18", "PD19";
278
+ allwinner,function = "io_disabled";
279
+ allwinner,muxsel = <7>;
280
+ allwinner,drive = <1>;
281
+ allwinner,pull = <0>;
282
+ };
283
+*/
273284 };
274285
275286 twi0: twi@0x05002000{
....@@ -277,55 +288,81 @@
277288 pinctrl-0 = <&twi0_pins_a>;
278289 pinctrl-1 = <&twi0_pins_b>;
279290 status = "okay";
280
- ctp {
281
- compatible = "allwinner,gslX680";
282
- reg = <0x40>;
283
- device_type = "ctp";
284
- status = "disabled";
285
- ctp_name = "gslX680_3676_1280x800";
286
- ctp_twi_id = <0x0>;
287
- ctp_twi_addr = <0x40>;
288
- ctp_screen_max_x = <0x320>;
289
- ctp_screen_max_y = <0x500>;
290
- ctp_revert_x_flag = <1>;
291
- ctp_revert_y_flag = <1>;
292
-
293
- ctp_exchange_x_y_flag = <0x1>;
294
- ctp_int_port = <&pio PL 7 6 0xffffffff 0xffffffff 0>;
295
- ctp_wakeup = <&pio PH 9 1 0xffffffff 0xffffffff 1>;
296
- ctp-supply = <&reg_ldoio0>;
297
- ctp_power_ldo_vol = <3300>;
298
- };
291
+ ctp {
292
+ compatible = "gt9xx_ts";
293
+ ctp_used = <1>;
294
+ device_type = "ctp";
295
+ status = "okay";
296
+ ctp_twi_id = <0x0>;
297
+ ctp_name = "gt9xx";
298
+ reg = <0x5D>;
299
+ ctp_screen_max_x = <1024>;
300
+ ctp_screen_max_y = <600>;
301
+ ctp_revert_x_flag = <0x1>;
302
+ ctp_revert_y_flag = <0x1>;
303
+ ctp_exchange_x_y_flag = <0x0>;
304
+ ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
305
+ ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
306
+ ctp_power_ldo = <3300>;
307
+ ctp_power_ldo_vol = <3300>;
308
+ ctp_power = <3300>;
309
+ };
299310 };
311
+
312
+ spi0: spi@05010000 {
313
+ #address-cells = <1>;
314
+ #size-cells = <0>;
315
+ compatible = "allwinner,sun50i-spi";
316
+ device_type = "spi0";
317
+ reg = <0x0 0x05010000 0x0 0x1000>;
318
+ interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
319
+ clocks = <&clk_pll_periph0>, <&clk_spi0>;
320
+ clock-frequency = <100000000>;
321
+ pinctrl-names = "default", "sleep";
322
+ pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
323
+ pinctrl-1 = <&spi0_pins_c>;
324
+ spi0_cs_number = <1>;
325
+ spi0_cs_bitmap = <1>;
326
+ spi_slave_mode = <0>;
327
+ //status = "okay";
328
+ status = "disabled";
329
+ /*
330
+ spi_uart {
331
+ compatible = "wkmic,wk2124spi";
332
+ reg = <0>;
333
+ spi-max-frequency = <10000000>;
334
+ //irq_gpio = <&pio PH 11 6 0xffffffff 0xffffffff 0>;
335
+ };
336
+ */
337
+
338
+ dh2228@2 {
339
+ compatible = "rohm,dh2228fv";
340
+ reg = <0>;
341
+ spi-max-frequency = <100000>;
342
+ };
343
+
344
+ };
345
+/*
346
+ pwm3: pwm3@0300a000 {
347
+ pinctrl-names = "active", "sleep";
348
+ pinctrl-0 = <&pwm3_pin_a>;
349
+ pinctrl-1 = <&pwm3_pin_b>;
350
+ status = "disabled";
351
+ };
352
+*/
353
+ pwm2: pwm2@0300a000 {
354
+ pinctrl-names = "active", "sleep";
355
+ pinctrl-0 = <&pwm2_pin_a>;
356
+ pinctrl-1 = <&pwm2_pin_b>;
357
+ status = "okay";
358
+ };
300359
301360 twi1: twi@0x05002400{
302361 clock-frequency = <200000>;
303362 pinctrl-0 = <&twi1_pins_a>;
304363 pinctrl-1 = <&twi1_pins_b>;
305364 status = "okay";
306
- gsensor {
307
- compatible = "allwinner,sc7a20";
308
- reg = <0x19>;
309
- device_type = "gsensor";
310
- status = "disabled";
311
- gsensor_twi_id = <0x1>;
312
- gsensor_twi_addr = <0x19>;
313
- gsensor_int1 = <&pio PH 11 6 1 0xffffffff 0xffffffff>;
314
- gsensor-supply = <&reg_dcdc1>;
315
- gsensor_vcc_io_val = <3300>;
316
- };
317
- lightsensor {
318
- compatible = "allwinner,stk3x1x";
319
- reg = <0x48>;
320
- device_type = "lightsensor";
321
- status = "disabled";
322
- ls_twi_id = <0x1>;
323
- ls_twi_addr = <0x48>;
324
- ls_int = <&pio PH 4 6 1 0xffffffff 0xffffffff>;
325
- lightsensor-supply = <&reg_dcdc1>;
326
- };
327
-
328
-
365
+ // EXTEND GPIO
329366 };
330367
331368 twi2: twi@0x05002800{
....@@ -334,13 +371,9 @@
334371 pinctrl-1 = <&twi2_pins_b>;
335372 twi-supply = <&reg_dldo2>;
336373 status = "okay";
374
+ // CAMERA1
337375
338
-/* ac107@36 {
339
- compatible = "Allwinnertech,ac107_0";
340
- gpio-reset = "null";
341
- reg = <0x36>;
342
- status = "okay";
343
- }; */
376
+ // CAMERA2
344377 };
345378
346379 twi3: twi@0x05002c00{
....@@ -348,6 +381,15 @@
348381 pinctrl-0 = <&twi3_pins_a>;
349382 pinctrl-1 = <&twi3_pins_b>;
350383 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
+ };
351393 };
352394
353395 twi6: s_twi@0x07081400{
....@@ -384,10 +426,10 @@
384426
385427 usb_power_supply: usb_power_supply {
386428 compatible = "x-powers,axp803-usb-power-supply";
387
- status = "disabled";
429
+ status = "okay";
388430
389431 pmu_usbpc_vol = <4600>;
390
- pmu_usbpc_cur = <1000>;
432
+ pmu_usbpc_cur = <3000>;
391433 pmu_usbad_vol = <4600>;
392434 pmu_usbad_cur = <2500>;
393435
....@@ -498,6 +540,7 @@
498540 regulator-ramp-delay = <250>;
499541 regulator-enable-ramp-delay = <1000>;
500542 regulator-boot-on;
543
+ regulator-always-on;
501544 };
502545 reg_dcdc2: dcdc2 {
503546 regulator-name = "axp803-dcdc2";
....@@ -581,15 +624,20 @@
581624 };
582625 reg_dldo1: dldo1 {
583626 regulator-name = "axp803-dldo1";
584
- regulator-min-microvolt = <700000>;
585
- regulator-max-microvolt = <3300000>;
627
+ regulator-min-microvolt = <1800000>;
628
+ regulator-max-microvolt = <1900000>;
586629 regulator-enable-ramp-delay = <1000>;
630
+ regulator-always-on;
631
+ regulator-boot-on;
587632 };
588633 reg_dldo2: dldo2 {
589634 regulator-name = "axp803-dldo2";
590635 regulator-min-microvolt = <700000>;
591636 regulator-max-microvolt = <4200000>;
592637 regulator-enable-ramp-delay = <1000>;
638
+ regulator-always-on;
639
+ regulator-boot-on;
640
+ // kickpi
593641 };
594642 reg_dldo3: dldo3 {
595643 regulator-name = "axp803-dldo3";
....@@ -620,6 +668,9 @@
620668 regulator-min-microvolt = <700000>;
621669 regulator-max-microvolt = <1900000>;
622670 regulator-enable-ramp-delay = <1000>;
671
+ regulator-always-on;
672
+ regulator-boot-on;
673
+ // kickpi
623674 };
624675 reg_fldo1: fldo1 {
625676 regulator-name = "axp803-fldo1";
....@@ -639,6 +690,8 @@
639690 regulator-min-microvolt = <700000>;
640691 regulator-max-microvolt = <3300000>;
641692 regulator-enable-ramp-delay = <1000>;
693
+ regulator-boot-on;
694
+ regulator-always-on;
642695 };
643696 reg_ldoio1: ldoio1 {
644697 regulator-name = "axp803-ldoio1";
....@@ -769,18 +822,11 @@
769822
770823 osc24m-on = <0x1>;
771824 };
772
-
825
+/*
773826 pwm0: pwm0@0300a000 {
774827 pinctrl-names = "active", "sleep";
775828 pinctrl-0 = <&pwm0_pin_a>;
776829 pinctrl-1 = <&pwm0_pin_b>;
777
- };
778
-
779
- spi0: spi@05010000 {
780
- pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
781
- pinctrl-1 = <&spi1_pins_c>;
782
- spi_slave_mode = <0>;
783
- status = "disabled";
784830 };
785831
786832 spi1: spi@05011000 {
....@@ -796,7 +842,7 @@
796842 spi_slave_mode = <0>;
797843 status = "disabled";
798844 };
799
-
845
+*/
800846 gpadc:gpadc{
801847 channel_num = <1>;
802848 channel_select = <0x01>;
....@@ -832,7 +878,6 @@
832878
833879 sdc0: sdmmc@04020000 {
834880 bus-width = <4>;
835
- cd-gpios = <&pio PF 6 6 1 3 0xffffffff>;
836881 /*non-removable;*/
837882 /*broken-cd;*/
838883 /*cd-inverted*/
....@@ -868,7 +913,7 @@
868913 device_type = "usbc0";
869914 usb_port_type = <0x0>;
870915 usb_detect_type = <0x1>;
871
- usb_id_gpio = <&pio PH 8 0 0 0xffffffff 0xffffffff>;
916
+ usb_id_gpio = <&r_pio PL 9 0 0 0xffffffff 0xffffffff>;
872917 usb_det_vbus_gpio = "axp_ctrl";
873918 usb_regulator_io = "nocare";
874919 det_vbus_supply = <&usb_power_supply>;
....@@ -907,25 +952,29 @@
907952 };
908953
909954 sdc1: sdmmc@04021000 {
910
- bus-width = <4>;
911
- no-mmc;
912
- no-sd;
913
- cap-sd-highspeed;
914
- /*sd-uhs-sdr12*/
915
- /*sd-uhs-sdr25*/
916
- /*sd-uhs-sdr50;*/
917
- /*sd-uhs-ddr50;*/
918
- /*sd-uhs-sdr104*/
919
- /*sunxi-power-save-mode;*/
920
- /*sunxi-dis-signal-vol-sw;*/
921
- cap-sdio-irq;
922
- keep-power-in-suspend;
923
- ignore-pm-notify;
924
- max-frequency = <50000000>;
925
- ctl-spec-caps = <0x8>;
926
- 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
+
927975 };
928976
977
+ /* gpio-spk will output 0x00 when playing audio */
929978 /* Audio Driver Modules */
930979 codec:codec@0x05096000 {
931980 /* MIC and headphone gain setting */
....@@ -942,9 +991,9 @@
942991 lineout_vol = <0x1a>;
943992 headphonegain = <0x00>;
944993 /* Pa enabled about */
945
- pa_level = <0x01>;
994
+ pa_level = <0x00>;
946995 pa_msleep_time = <0x78>;
947
- gpio-spk = <&pio PH 11 1 1 1 1>;
996
+ //gpio-spk = <&pio PB 7 1 1 1 1>;
948997 /* regulator about */
949998 avcc-supply = <&reg_aldo1>;
950999 cpvin-supply = <&reg_eldo1>;
....@@ -952,15 +1001,16 @@
9521001 };
9531002
9541003 sndcodec:sound@0 {
1004
+ noheadphonemic = <1>;
9551005 status = "okay";
9561006 };
9571007
9581008 spdif:spdif-controller@0x05094000{
959
- status = "disabled";
1009
+ status = "okay";
9601010 };
9611011
9621012 sndspdif:sound@1{
963
- status = "disabled";
1013
+ status = "okay";
9641014 };
9651015
9661016 dmic:dmic-controller@0x05095000{
....@@ -984,7 +1034,7 @@
9841034 daudio_master = <0x04>;
9851035 signal_inversion = <0x01>;
9861036 slot_width_select = <0x20>;
987
- status = "disabled";
1037
+ status = "okay";
9881038 };
9891039
9901040 snddaudio0:sound@3 {
....@@ -993,7 +1043,7 @@
9931043
9941044 /* sunxi,snddaudio-codec = "ac107.1-0036";
9951045 sunxi,snddaudio-codec-dai = "ac107-pcm0"; */
996
- status = "disabled";
1046
+ status = "okay";
9971047 };
9981048
9991049 daudio1:daudio@0x05091000 {
....@@ -1055,10 +1105,11 @@
10551105 snddaudio3:sound@6 {
10561106 status = "disabled";
10571107 };
1108
+
10581109 vind0:vind@0 {
10591110 vind0_clk = <336000000>;
10601111 vind0_isp = <300000000>;
1061
- status = "okay";
1112
+ status = "disabled";
10621113
10631114 actuator0:actuator@0 {
10641115 device_type = "actuator0";
....@@ -1081,9 +1132,11 @@
10811132 };
10821133 sensor0:sensor@0 {
10831134 device_type = "sensor0";
1084
- sensor0_mname = "gc2385_mipi";
1135
+ sensor1_mname = "ov8858_r2a_4lane";
10851136 sensor0_twi_cci_id = <2>;
1086
- sensor0_twi_addr = <0x6e>;
1137
+ sensor0_twi_addr = <0x6c>;
1138
+ //sensor0_twi_addr = <0x20>;
1139
+
10871140 sensor0_mclk_id = <0>;
10881141 sensor0_pos = "rear";
10891142 sensor0_isp_used = <1>;
....@@ -1098,16 +1151,16 @@
10981151 sensor0_dvdd-supply = <&reg_eldo2>;
10991152 sensor0_dvdd_vol = <1200000>;
11001153 sensor0_power_en = <>;
1101
- sensor0_reset = <&pio PE 9 1 0 1 0>;
1102
- sensor0_pwdn = <&pio PE 8 1 0 1 0>;
1103
- status = "disabled";
1154
+ sensor0_reset = <&pio PE 6 1 0 1 0>;
1155
+ sensor0_pwdn = <&pio PE 7 1 0 1 0>;
1156
+ status = "okay";
11041157 };
11051158 sensor1:sensor@1 {
11061159 device_type = "sensor1";
1107
- sensor1_mname = "gc030a_mipi";
1108
- sensor1_twi_cci_id = <2>;
1109
- sensor1_twi_addr = <0x42>;
1110
- sensor1_mclk_id = <0>;
1160
+ sensor1_mname = "ov5648_mipi";
1161
+ sensor1_twi_cci_id = <3>;
1162
+ sensor1_twi_addr = <0x6c>;
1163
+ sensor1_mclk_id = <1>;
11111164 sensor1_pos = "front";
11121165 sensor1_isp_used = <1>;
11131166 sensor1_fmt = <1>;
....@@ -1118,13 +1171,14 @@
11181171 sensor1_iovdd_vol = <1800000>;
11191172 sensor1_avdd-supply = <&reg_dldo3>;
11201173 sensor1_avdd_vol = <2800000>;
1121
- sensor1_dvdd-supply = <>;
1122
- sensor1_dvdd_vol = <>;
1174
+ sensor1_dvdd-supply = <&reg_eldo2>;
1175
+ sensor1_dvdd_vol = <1500000>;
11231176 sensor1_power_en = <>;
1124
- sensor1_reset = <&pio PE 7 1 0 1 0>;
1125
- sensor1_pwdn = <&pio PE 6 1 0 1 0>;
1126
- status = "disabled";
1177
+ sensor1_reset = <&pio PE 8 1 0 1 0>;
1178
+ sensor1_pwdn = <&pio PE 9 1 0 1 0>;
1179
+ status = "okay";
11271180 };
1181
+
11281182 vinc0:vinc@0 {
11291183 vinc0_csi_sel = <0>;
11301184 vinc0_mipi_sel = <0>;
....@@ -1170,220 +1224,57 @@
11701224 status = "okay";
11711225 };
11721226 };
1173
-/*----------------------------------------------------------------------------------
1174
-disp init configuration
11751227
1176
-disp_mode (0:screen0<screen0,fb0>)
1177
-screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)
1178
-screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
1179
- (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
1180
-screenx_output_format (for hdmi, 0:RGB 1:yuv444 2:yuv422 3:yuv420)
1181
-screenx_output_bits (for hdmi, 0:8bit 1:10bit 2:12bit 2:16bit)
1182
-screenx_output_eotf (for hdmi, 0:reserve 4:SDR 16:HDR10 18:HLG)
1183
-screenx_output_cs (for hdmi, 0:undefined 257:BT709 260:BT601 263:BT2020)
1184
-screenx_output_dvi_hdmi (for hdmi, 0:undefined 1:dvi mode 2:hdmi mode)
1185
-screen0_output_range (for hdmi, 0:default 1:full 2:limited)
1186
-screen0_output_scan (for hdmi, 0:no data 1:overscan 2:underscan)
1187
-screen0_output_aspect_ratio (for hdmi, 8-same as original picture 9-4:3 10-16:9 11-14:9)
1188
-fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
1189
-fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
1190
-fb0_scaler_mode_enable(scaler mode enable, used FE)
1191
-fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
1192
-lcdx_backlight (lcd init backlight,the range:[0,256],default:197
1193
-lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
1194
-lcd0_contrast (LCD contrast, 0~100)
1195
-lcd0_saturation (LCD saturation, 0~100)
1196
-lcd0_hue (LCD hue, 0~100)
1197
-framebuffer software rotation setting:
1198
-disp_rotation_used: (0:disable; 1:enable,you must set fbX_width to lcd_y,
1199
-set fbX_height to lcd_x)
1200
-degreeX: (X:screen index; 0:0 degree; 1:90 degree; 3:270 degree)
1201
-degreeX_Y: (X:screen index; Y:layer index 0~15; 0:0 degree; 1:90 degree; 3:270 degree)
1202
-devX_output_type : config output type in bootGUI framework in UBOOT-2018.
1203
- (0:none; 1:lcd; 2:tv; 4:hdmi;)
1204
-devX_output_mode : config output resolution(see include/video/sunxi_display2.h) of bootGUI framework in UBOOT-2018
1205
-devX_screen_id : config display index of bootGUI framework in UBOOT-2018
1206
-devX_do_hpd : whether do hpd detectation or not in UBOOT-2018
1207
-chn_cfg_mode : Hardware DE channel allocation config. 0:single display with 6
1208
- channel, 1:dual display with 4 channel in main display and 2 channel in second
1209
- display, 2:dual display with 3 channel in main display and 3 channel in second
1210
- in display.
1211
-----------------------------------------------------------------------------------*/
1212
- disp: disp@06000000 {
1213
- disp_init_enable = <1>;
1214
- disp_mode = <0>;
1215
-
1216
- screen0_output_type = <1>;
1217
- screen0_output_mode = <4>;
1218
-
1219
- screen1_output_type = <1>;
1220
- screen1_output_mode = <4>;
1221
-
1222
- screen1_output_format = <0>;
1223
- screen1_output_bits = <0>;
1224
- screen1_output_eotf = <4>;
1225
- screen1_output_cs = <257>;
1226
- screen1_output_dvi_hdmi = <2>;
1227
- screen1_output_range = <2>;
1228
- screen1_output_scan = <0>;
1229
- screen1_output_aspect_ratio = <8>;
1230
-
1231
- dev0_output_type = <1>;
1232
- dev0_output_mode = <4>;
1233
- dev0_screen_id = <0>;
1234
- dev0_do_hpd = <0>;
1235
-
1236
- dev1_output_type = <4>;
1237
- dev1_output_mode = <10>;
1238
- dev1_screen_id = <1>;
1239
- dev1_do_hpd = <1>;
1240
-
1241
- def_output_dev = <0>;
1242
- hdmi_mode_check = <1>;
1243
-
1244
- fb0_format = <0>;
1245
- fb0_width = <600>;
1246
- fb0_height = <1024>;
1247
-
1248
- fb1_format = <0>;
1249
- fb1_width = <0>;
1250
- fb1_height = <0>;
1251
- chn_cfg_mode = <1>;
1252
-
1253
- disp_para_zone = <1>;
1254
- /*VCC-LCD*/
1255
- dc1sw-supply = <&reg_dc1sw>;
1256
- /*VCC-DSI*/
1257
- eldo3-supply = <&reg_eldo3>;
1258
- /*VCC-PD*/
1259
- dcdc1-supply = <&reg_dcdc1>;
1260
- };
1261
-/*----------------------------------------------------------------------------------
1262
-;lcd0 configuration
1263
-
1264
-;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
1265
-;lcd_hv_if 0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
1266
-;lcd_hv_clk_phase 0:0 degree;1:90 degree;2:180 degree;3:270 degree
1267
-;lcd_hv_sync_polarity 0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
1268
-;lcd_hv_syuv_seq 0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
1269
-;lcd_cpu_if 0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
1270
-; 6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
1271
-;lcd_cpu_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
1272
-;lcd_dsi_if 0:video mode; 1: Command mode; 2:video burst mode
1273
-;lcd_dsi_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
1274
-;lcd_x: lcd horizontal resolution
1275
-;lcd_y: lcd vertical resolution
1276
-;lcd_width: width of lcd in mm
1277
-;lcd_height: height of lcd in mm
1278
-;lcd_dclk_freq: in MHZ unit
1279
-;lcd_pwm_freq: in HZ unit
1280
-;lcd_pwm_pol: lcd backlight PWM polarity
1281
-;lcd_pwm_max_limit lcd backlight PWM max limit(<=255)
1282
-;lcd_hbp: hsync back porch(pixel) + hsync plus width(pixel);
1283
-;lcd_ht: hsync total cycle(pixel)
1284
-;lcd_vbp: vsync back porch(line) + vysnc plus width(line)
1285
-;lcd_vt: vysnc total cycle(line)
1286
-;lcd_hspw: hsync plus width(pixel)
1287
-;lcd_vspw: vysnc plus width(pixel)
1288
-;lcd_lvds_if: 0:single link; 1:dual link
1289
-;lcd_lvds_colordepth: 0:8bit; 1:6bit
1290
-;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode
1291
-;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
1292
-;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
1293
-; 8~11bit:dclk phase; 12~15bit:de phase)
1294
-;lcd_gamma_en lcd gamma correction enable
1295
-;lcd_bright_curve_en lcd bright curve correction enable
1296
-;lcd_cmap_en lcd color map function enable
1297
-;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
1298
-;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10;
1299
-; decrease it while lcd is not bright enough; increase while lcd is too bright
1300
-;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch)
1301
-;Pin setting for special function ie.LVDS, RGB data or vsync
1302
-; name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
1303
-;Pin setting for gpio:
1304
-; lcd_gpio_X = port:PD12<pin function><pull up or pull down><drive ability><output level>
1305
-;Pin setting for backlight enable pin
1306
-; lcd_bl_en = port:PD12<pin function><pull up or pull down><drive ability><output level>
1307
-;fsync setting, pulse to csi
1308
-;lcd_fsync_en (0:disable fsync,1:enable)
1309
-;lcd_fsync_act_time (active time of fsync, unit:pixel)
1310
-;lcd_fsync_dis_time (disactive time of fsync, unit:pixel)
1311
-;lcd_fsync_pol (0:positive;1:negative)
1312
-;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
1313
-pull up or pull down(default 0), driver level(default 1), data>
1314
-;For dual link lvds: use lvds2link_pins_a and lvds2link_pins_b instead
1315
-;For rgb24: use rgb24_pins_a and rgb24_pins_b instead
1316
-;For lvds1: use lvds1_pins_a and lvds1_pins_b instead
1317
-;For lvds0: use lvds0_pins_a and lvds0_pins_b instead
1318
-;----------------------------------------------------------------------------------*/
1319
- lcd0: lcd0@01c0c000 {
1320
- lcd_used = <1>;
1321
-
1322
- lcd_driver_name = "k101im2qa04";
1323
- lcd_backlight = <50>;
1324
- lcd_if = <4>;
1325
-
1326
- lcd_x = <600>;
1327
- lcd_y = <1024>;
1328
- lcd_width = <135>;
1329
- lcd_height = <216>;
1330
- lcd_dclk_freq = <68>;
1331
-
1332
- lcd_pwm_used = <1>;
1333
- lcd_pwm_ch = <0>;
1334
- lcd_pwm_freq = <50000>;
1335
- lcd_pwm_pol = <1>;
1336
- lcd_pwm_max_limit = <255>;
1337
-
1338
-
1339
- lcd_hbp = <36>;
1340
- lcd_ht = <854>;
1341
- lcd_hspw = <18>;
1342
- lcd_vbp = <12>;
1343
- lcd_vt = <1320>;
1344
- lcd_vspw = <4>;
1345
-
1346
- lcd_frm = <0>;
1347
- lcd_gamma_en = <0>;
1348
- lcd_bright_curve_en = <0>;
1349
- lcd_cmap_en = <0>;
1350
-
1351
- deu_mode = <0>;
1352
- lcdgamma4iep = <22>;
1353
- smart_color = <90>;
1354
-
1355
- lcd_dsi_if = <0>;
1356
- lcd_dsi_lane = <4>;
1357
- lcd_dsi_format = <0>;
1358
- lcd_dsi_te = <0>;
1359
- lcd_dsi_eotp = <0>;
1360
-
1361
- lcd_pin_power = "dcdc1";
1362
- lcd_pin_power1 = "eldo3";
1363
-
1364
- lcd_power = "dc1sw";
1365
- lcd_bl_en = <&pio PB 8 1 0 3 1>;
1366
- /*lcd_gpio_1 = <&pio PD 23 1 0 3 1>;*/
1367
- lcd_gpio_0 = <&pio PD 22 1 0 3 1>;
1368
- pinctrl-0 = <&dsi4lane_pins_a>;
1369
- pinctrl-1 = <&dsi4lane_pins_b>;
1370
- };
1371
-
1228
+/*
13721229 hall_para {
13731230 hall_name = "MH248";
13741231 status = "disabled";
13751232 hall_int_port = <&r_pio PL 9 6 1 0xffffffff 0xffffffff>;
13761233 };
1377
-
1234
+*/
13781235 keyboard {
13791236 compatible = "allwinner,keyboard_1350mv";
13801237 status = "okay";
1381
- key_cnt = <3>;
1382
- key0 = <475 0x7372>;
1383
- key1 = <646 0x73>;
1384
- key2 = <900 0x72>;
1238
+ key_cnt = <1>;
1239
+ key0 = <590 KEY_RESERVED>;
1240
+ //key0 = <475 0x7372>;
1241
+ //key1 = <646 0x73>;
1242
+ //key2 = <897 0x72>;
13851243 };
13861244
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
+/*
13871278 wlan: wlan@0 {
13881279 compatible = "allwinner,sunxi-wlan";
13891280 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
....@@ -1392,8 +1283,8 @@
13921283 wlan_busnum = <0x1>;
13931284 wlan_power = "axp803-dldo1";
13941285 wlan_io_regulator;
1395
- wlan_regon = <&r_pio PL 5 1 0xffffffff 0xffffffff 0>;
1396
- 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>;
13971288 chip_en;
13981289 power_en;
13991290 status = "okay";
....@@ -1403,19 +1294,20 @@
14031294 compatible = "allwinner,sunxi-bt";
14041295 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
14051296 bt_power = "axp803-dldo1";
1297
+ //bt_power = "axp803-dldo1";
14061298 bt_io_regulator;
1407
- bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>;
1299
+ //bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>;
14081300 status = "okay";
14091301 };
14101302
14111303 btlpm: btlpm@0 {
14121304 compatible = "allwinner,sunxi-btlpm";
14131305 uart_index = <0x1>;
1414
- bt_wake = <&r_pio PL 4 1 0xffffffff 0xffffffff 1>;
1415
- 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>;
14161308 status = "okay";
14171309 };
1418
-
1310
+*/
14191311 addr_mgt: addr_mgt@0 {
14201312 compatible = "allwinner,sunxi-addr_mgt";
14211313 type_addr_wifi = <0x0>;
....@@ -1423,12 +1315,23 @@
14231315 type_addr_eth = <0x0>;
14241316 status = "okay";
14251317 };
1426
-
14271318 uart0: uart@05000000 {
14281319 uart-supply = <&reg_dcdc1>;
14291320 };
14301321
14311322 uart1: uart@05000400 {
1323
+ status = "okay";
1324
+ };
1325
+
1326
+ uart2: uart@05000800 {
1327
+ status = "okay";
1328
+ };
1329
+
1330
+ uart3: uart@05000c00 {
1331
+ status = "okay";
1332
+ };
1333
+
1334
+ uart4: uart@05001000 {
14321335 status = "okay";
14331336 };
14341337 };
....@@ -1447,16 +1350,96 @@
14471350 gpu-supply = <&reg_dcdc4>;
14481351 };
14491352
1450
- leds:gpio-leds {
1451
- compatible = "gpio-leds";
1452
- status = "okay";
1453
- hbt{
1454
- gpios = <&pio PH 10 1 0xffffffff 0xffffffff 0>;
1455
- //linux,default-trigger = "heartbeat";
1456
- };
1457
- };
1353
+ leds {
1354
+ compatible = "gpio-leds";
1355
+ pinctrl-names = "default";
1356
+ status = "okay";
1357
+
1358
+ sysled {
1359
+ label = "sysled";
1360
+ gpios = <&r_pio PL 10 1 0 1 1>;
1361
+ linux,default_trigger = "heartbeat";
1362
+ };
1363
+
1364
+ spk_en {
1365
+ label = "spk_en";
1366
+ gpios = <&pio PB 7 1 0 1 0>;
1367
+ linux,default_trigger = "default-on";
1368
+ };
1369
+
1370
+ fan_en {
1371
+ label = "fan_en";
1372
+ gpios = <&r_pio PL 7 1 0 1 0>;
1373
+ linux,default_trigger = "default-on";
1374
+ };
1375
+
1376
+ PH8 {
1377
+ label = "PH8";
1378
+ gpios = <&pio PH 8 1 0 1 0>;
1379
+ linux,default_trigger = "default-on";
1380
+ };
1381
+
1382
+ PC2 {
1383
+ label = "PC2";
1384
+ gpios = <&pio PC 2 1 0 1 0>;
1385
+ linux,default_trigger = "default-on";
1386
+ };
1387
+
1388
+ PC3 {
1389
+ label = "PC3";
1390
+ gpios = <&pio PC 3 1 0 1 0>;
1391
+ linux,default_trigger = "default-on";
1392
+ };
1393
+
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
+
1412
+ };
14581413 };
14591414
14601415 &cpu0 {
14611416 cpu-supply = <&reg_dcdc2>;
14621417 };
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"