huangcm
2025-02-24 69ed55dec4b2116a19e4cca4393cbc014fce5fb2
longan/device/config/chips/a133/configs/c3/board.dts
....@@ -6,7 +6,7 @@
66
77 /dts-v1/;
88 #include "sun50iw10p1.dtsi"
9
-
9
+#include "dt-bindings/input/linux-event-codes.h"
1010
1111 /{
1212 model = "sun50iw10";
....@@ -104,7 +104,7 @@
104104 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 };
....@@ -190,9 +190,11 @@
190190 };
191191 */
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,7 +211,8 @@
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>;
....@@ -298,7 +301,7 @@
298301 ctp_revert_x_flag = <0x1>;
299302 ctp_revert_y_flag = <0x1>;
300303 ctp_exchange_x_y_flag = <0x0>;
301
- ctp_int_port = <&pio PE 3 3 0xffffffff 0xffffffff 0>;
304
+ ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
302305 ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>;
303306 ctp_power_ldo = <3300>;
304307 ctp_power_ldo_vol = <3300>;
....@@ -320,29 +323,38 @@
320323 pinctrl-1 = <&spi0_pins_c>;
321324 spi0_cs_number = <1>;
322325 spi0_cs_bitmap = <1>;
323
- spi_slave_mode = <0>;
326
+ spi_slave_mode = <0>;
324327 //status = "okay";
325328 status = "disabled";
329
+ /*
326330 spi_uart {
327331 compatible = "wkmic,wk2124spi";
328332 reg = <0>;
329333 spi-max-frequency = <10000000>;
330334 //irq_gpio = <&pio PH 11 6 0xffffffff 0xffffffff 0>;
331335 };
336
+ */
337
+
338
+ dh2228@2 {
339
+ compatible = "rohm,dh2228fv";
340
+ reg = <0>;
341
+ spi-max-frequency = <100000>;
342
+ };
343
+
332344 };
333345 /*
334346 pwm3: pwm3@0300a000 {
335347 pinctrl-names = "active", "sleep";
336348 pinctrl-0 = <&pwm3_pin_a>;
337349 pinctrl-1 = <&pwm3_pin_b>;
338
- status = "disabled";
350
+ status = "disabled";
339351 };
340352 */
341353 pwm2: pwm2@0300a000 {
342354 pinctrl-names = "active", "sleep";
343355 pinctrl-0 = <&pwm2_pin_a>;
344356 pinctrl-1 = <&pwm2_pin_b>;
345
- status = "okay";
357
+ status = "okay";
346358 };
347359
348360 twi1: twi@0x05002400{
....@@ -370,10 +382,13 @@
370382 pinctrl-1 = <&twi3_pins_b>;
371383 status = "okay";
372384 // RTC
373
- pcf8563@51 {
374
- compatible = "haoyu,hym8563";
375
- reg = <0x51>;
376
- status = "okay";
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;
377392 };
378393 };
379394
....@@ -525,6 +540,7 @@
525540 regulator-ramp-delay = <250>;
526541 regulator-enable-ramp-delay = <1000>;
527542 regulator-boot-on;
543
+ regulator-always-on;
528544 };
529545 reg_dcdc2: dcdc2 {
530546 regulator-name = "axp803-dcdc2";
....@@ -985,6 +1001,7 @@
9851001 };
9861002
9871003 sndcodec:sound@0 {
1004
+ noheadphonemic = <1>;
9881005 status = "okay";
9891006 };
9901007
....@@ -997,7 +1014,7 @@
9971014 };
9981015
9991016 dmic:dmic-controller@0x05095000{
1000
- status = "okay";
1017
+ status = "disabled";
10011018 };
10021019
10031020 snddmic:sound@2{
....@@ -1217,11 +1234,12 @@
12171234 */
12181235 keyboard {
12191236 compatible = "allwinner,keyboard_1350mv";
1220
- status = "disable";
1221
- key_cnt = <3>;
1222
- key0 = <475 0x7372>;
1223
- key1 = <646 0x73>;
1224
- 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>;
12251243 };
12261244
12271245 wlan: wlan@0 {
....@@ -1244,7 +1262,7 @@
12441262 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
12451263 bt_power = "axp803-dldo1";
12461264 bt_io_regulator;
1247
- bt_rst_n = <&r_pio PL 3 1 0xffffffff 0xffffffff 0>;
1265
+ bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>;
12481266 status = "okay";
12491267 };
12501268
....@@ -1333,21 +1351,64 @@
13331351 };
13341352
13351353 leds {
1336
- compatible = "gpio-leds";
1337
- pinctrl-names = "default";
1338
- status = "okay";
1354
+ compatible = "gpio-leds";
1355
+ pinctrl-names = "default";
1356
+ status = "okay";
13391357
1340
- sysled {
1341
- label = "sysled";
1342
- gpios = <&r_pio PL 11 1 0 1 1>;
1343
- linux,default_trigger = "heartbeat";
1344
- };
1358
+ sysled {
1359
+ label = "sysled";
1360
+ gpios = <&r_pio PL 10 1 0 1 1>;
1361
+ linux,default_trigger = "heartbeat";
1362
+ };
13451363
1346
- spk_en {
1347
- label = "spk_en";
1348
- gpios = <&pio PB 7 1 0 1 0>;
1349
- linux,default_trigger = "default-on";
1350
- };
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
+
13511412 };
13521413 };
13531414
....@@ -1355,6 +1416,30 @@
13551416 cpu-supply = <&reg_dcdc2>;
13561417 };
13571418
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
+
13581443 //#include "lcd-lvds-21-1920-1080.dtsi"
13591444 #include "lcd-lvds-7-1024-600.dtsi"
13601445 //#include "lcd-mipi-10-800-1280.dtsi"