huangcm
2024-10-17 15e1b5207a76de34ee6bde806c6e629241aff10a
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";
....@@ -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{
....@@ -376,7 +388,7 @@
376388 interrupt-parent = <&pio>;
377389 interrupts = <PB 8 IRQ_TYPE_LEVEL_LOW>;
378390 status = "okay";
379
- //wakeup-source;
391
+ wakeup-source;
380392 };
381393 };
382394
....@@ -528,6 +540,7 @@
528540 regulator-ramp-delay = <250>;
529541 regulator-enable-ramp-delay = <1000>;
530542 regulator-boot-on;
543
+ regulator-always-on;
531544 };
532545 reg_dcdc2: dcdc2 {
533546 regulator-name = "axp803-dcdc2";
....@@ -988,6 +1001,7 @@
9881001 };
9891002
9901003 sndcodec:sound@0 {
1004
+ noheadphonemic = <1>;
9911005 status = "okay";
9921006 };
9931007
....@@ -1000,7 +1014,7 @@
10001014 };
10011015
10021016 dmic:dmic-controller@0x05095000{
1003
- status = "okay";
1017
+ status = "disabled";
10041018 };
10051019
10061020 snddmic:sound@2{
....@@ -1220,11 +1234,12 @@
12201234 */
12211235 keyboard {
12221236 compatible = "allwinner,keyboard_1350mv";
1223
- status = "disable";
1224
- key_cnt = <3>;
1225
- key0 = <475 0x7372>;
1226
- key1 = <646 0x73>;
1227
- 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>;
12281243 };
12291244
12301245 wlan: wlan@0 {
....@@ -1247,7 +1262,7 @@
12471262 clocks = <&clk_losc_out>, <&clk_dcxo_out>;
12481263 bt_power = "axp803-dldo1";
12491264 bt_io_regulator;
1250
- bt_rst_n = <&r_pio PL 3 1 0xffffffff 0xffffffff 0>;
1265
+ bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>;
12511266 status = "okay";
12521267 };
12531268
....@@ -1336,21 +1351,64 @@
13361351 };
13371352
13381353 leds {
1339
- compatible = "gpio-leds";
1340
- pinctrl-names = "default";
1341
- status = "okay";
1354
+ compatible = "gpio-leds";
1355
+ pinctrl-names = "default";
1356
+ status = "okay";
13421357
1343
- sysled {
1344
- label = "sysled";
1345
- gpios = <&r_pio PL 10 1 0 1 1>;
1346
- linux,default_trigger = "heartbeat";
1347
- };
1358
+ sysled {
1359
+ label = "sysled";
1360
+ gpios = <&r_pio PL 10 1 0 1 1>;
1361
+ linux,default_trigger = "heartbeat";
1362
+ };
13481363
1349
- spk_en {
1350
- label = "spk_en";
1351
- gpios = <&pio PB 7 1 0 1 0>;
1352
- linux,default_trigger = "default-on";
1353
- };
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
+
13541412 };
13551413 };
13561414
....@@ -1361,6 +1419,10 @@
13611419 &s_cir0 {
13621420 status = "okay";
13631421
1422
+ pinctrl-names = "default", "sleep";
1423
+ pinctrl-0 = <&s_cir0_pins_a>;
1424
+ pinctrl-1 = <&s_cir0_pins_a>;
1425
+
13641426 s_cir0_used = <1>;
13651427 ir_power_key_code0 = <0x4d>;
13661428 ir_addr_code0 = <0x4040>;
....@@ -1368,9 +1430,16 @@
13681430 ir_addr_code1 = <0x7f80>;
13691431 ir_power_key_code2 = <0x1c>;
13701432 ir_addr_code2 = <0xdf00>;
1371
- //wakeup-source;
1433
+ wakeup-source;
13721434 };
13731435
1436
+
1437
+&gmac0 {
1438
+ /delete-property/ phy-rst;
1439
+ rx-delay = <7>;
1440
+};
1441
+
1442
+
13741443 //#include "lcd-lvds-21-1920-1080.dtsi"
13751444 #include "lcd-lvds-7-1024-600.dtsi"
13761445 //#include "lcd-mipi-10-800-1280.dtsi"