huangcm
2025-07-03 5fc6eec0444a62f7a596240b200dd837059dba70
feat(longan): add uart7 & 5000mA bat
1 files added
3 files modified
160 ■■■■ changed files
longan/brandy/brandy-2.0/u-boot-2018/board/sunxi/power_manage.c 4 ●●● patch | view | raw | blame | history
longan/device/config/chips/a133/configs/c3/kickpi-k5.fex 2 ●●● patch | view | raw | blame | history
longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts 40 ●●●●● patch | view | raw | blame | history
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/a133-kickpi-axp707-bat-5000mA.dtsi 114 ●●●●● patch | view | raw | blame | history
longan/brandy/brandy-2.0/u-boot-2018/board/sunxi/power_manage.c
....@@ -476,6 +476,7 @@
476476 pmu_set_sys_mode(0);
477477 }
478478
479
+#if 0
479480 if (bat_exist == 1) {
480481 /* When the battery exists, it can only be turned on by power key */
481482 if (pmu_axp707_get_poweron_source() != AXP_BOOT_SOURCE_BUTTON &&
....@@ -489,8 +490,9 @@
489490 pmu_set_sys_mode(0);
490491 }
491492 }
493
+#endif
492494
493
- switch (val) {
495
+ switch (val) {
494496 case AXP_BOOT_SOURCE_BUTTON:
495497 strncpy(bootreason, "button", sizeof("button"));
496498 break;
longan/device/config/chips/a133/configs/c3/kickpi-k5.fex
....@@ -881,4 +881,4 @@
881881 keep-power-in-suspend =
882882 ignore-pm-notify =
883883 ;max-frequency = 150000000
884
-min-frequency = 150000
884
+min-frequency = 50000000
longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
....@@ -401,8 +401,8 @@
401401 pmu_ac_vol = <4600>;
402402 pmu_ac_cur = <3000>;
403403
404
- // wakeup_ac_in;
405
- // wakeup_ac_out;
404
+ wakeup_ac_in;
405
+ wakeup_ac_out;
406406 };
407407
408408 usb_power_supply: usb_power_supply {
....@@ -414,8 +414,8 @@
414414 pmu_usbad_vol = <4600>;
415415 pmu_usbad_cur = <2500>;
416416
417
- // wakeup_usb_in;
418
- // wakeup_usb_out;
417
+ wakeup_usb_in;
418
+ wakeup_usb_out;
419419 };
420420
421421 battery_power_supply: battery-power-supply {
....@@ -490,7 +490,7 @@
490490 pmu_bat_temp_para16 = <66>;
491491
492492 wakeup_bat_out;
493
- /* wakeup_bat_in; */
493
+ wakeup_bat_in;
494494 /* wakeup_bat_charging; */
495495 /* wakeup_bat_charge_over; */
496496 /* wakeup_low_warning1; */
....@@ -1315,6 +1315,10 @@
13151315 uart4: uart@05001000 {
13161316 status = "okay";
13171317 };
1318
+
1319
+ uart7: uart@07080000 {
1320
+ status = "okay";
1321
+ };
13181322 };
13191323 gpu: gpu@0x01800000 {
13201324 gpu_idle = <1>;/*ic version ctrl*/
....@@ -1390,17 +1394,17 @@
13901394 linux,default_trigger = "default-on";
13911395 };
13921396
1393
- PL2 {
1394
- label = "PL2";
1395
- gpios = <&r_pio PL 2 1 0 1 0>;
1396
- linux,default_trigger = "default-on";
1397
- };
1397
+ // PL2 {
1398
+ // label = "PL2";
1399
+ // gpios = <&r_pio PL 2 1 0 1 0>;
1400
+ // linux,default_trigger = "default-on";
1401
+ // };
13981402
1399
- PL3 {
1400
- label = "PL3";
1401
- gpios = <&r_pio PL 3 1 0 1 0>;
1402
- linux,default_trigger = "default-on";
1403
- };
1403
+ // PL3 {
1404
+ // label = "PL3";
1405
+ // gpios = <&r_pio PL 3 1 0 1 0>;
1406
+ // linux,default_trigger = "default-on";
1407
+ // };
14041408
14051409 PL4 {
14061410 label = "PL4";
....@@ -1444,9 +1448,11 @@
14441448 rx-delay = <7>;
14451449 };
14461450
1447
-#include "lcd-lvds-7-1024-600.dtsi"
1451
+//#include "lcd-lvds-7-1024-600.dtsi"
14481452 //#include "lcd-lvds-21-1920-1080.dtsi"
14491453 //#include "lcd-mipi-10-800-1280-v1.dtsi"
1450
-//#include "lcd-mipi-10-800-1280-v2.dtsi"
1454
+#include "lcd-mipi-10-800-1280-v2.dtsi"
14511455 //#include "lcd-mipi-8-800-1280.dtsi"
14521456 //#include "lcd-mipi-5-720-1280.dtsi"
1457
+
1458
+#include "a133-kickpi-axp707-bat-5000mA.dtsi"
longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/a133-kickpi-axp707-bat-5000mA.dtsi
....@@ -0,0 +1,114 @@
1
+&battery_power_supply {
2
+ status = "okay";
3
+
4
+ pmu_chg_ic_temp = <0>;
5
+ pmu_battery_rdc= <100>;
6
+ pmu_battery_cap = <5000>;
7
+ pmu_runtime_chgcur = <1000>;
8
+ pmu_suspend_chgcur = <2000>;
9
+ pmu_shutdown_chgcur = <2000>;
10
+ pmu_init_chgvol = <4204>;
11
+ pmu_battery_warning_level1 = <15>;
12
+ pmu_battery_warning_level2 = <0>;
13
+ pmu_chgled_func = <1>;
14
+ pmu_chgled_type = <0>;
15
+ ocv_coulumb_100 = <1>;
16
+
17
+ /* 3.1328 */
18
+ pmu_bat_para1 = <0>;
19
+ /* 3.2736 */
20
+ pmu_bat_para2 = <0>;
21
+ /* 3.3440 */
22
+ pmu_bat_para3 = <0>;
23
+ /* 3.4144 */
24
+ pmu_bat_para4 = <0>;
25
+ /* 3.4848 */
26
+ pmu_bat_para5 = <1>;
27
+ /* 3.5552 */
28
+ pmu_bat_para6 = <3>;
29
+ /* 3.5904 */
30
+ pmu_bat_para7 = <6>;
31
+ /* 3.6080 */
32
+ pmu_bat_para8 = <8>;
33
+ /* 3.6256 */
34
+ pmu_bat_para9 = <10>;
35
+ /* 3.6432 */
36
+ pmu_bat_para10 = <12>;
37
+ /* 3.6608 */
38
+ pmu_bat_para11 = <15>;
39
+ /* 3.6960 */
40
+ pmu_bat_para12 = <21>;
41
+ /* 3.7312 */
42
+ pmu_bat_para13 = <29>;
43
+ /* 3.7664 */
44
+ pmu_bat_para14 = <36>;
45
+ /* 3.8016 */
46
+ pmu_bat_para15 = <41>;
47
+ /* 3.8192 */
48
+ pmu_bat_para16 = <43>;
49
+ /* 3.8368 */
50
+ pmu_bat_para17 = <45>;
51
+ /* 3.8544 */
52
+ pmu_bat_para18 = <47>;
53
+ /* 3.8720 */
54
+ pmu_bat_para19 = <49>;
55
+ /* 3.9072 */
56
+ pmu_bat_para20 = <53>;
57
+ /* 3.9424 */
58
+ pmu_bat_para21 = <57>;
59
+ /* 3.9776 */
60
+ pmu_bat_para22 = <63>;
61
+ /* 4.0128 */
62
+ pmu_bat_para23 = <70>;
63
+ /* 4.0480 */
64
+ pmu_bat_para24 = <74>;
65
+ /* 4.0832 */
66
+ pmu_bat_para25 = <79>;
67
+ /* 4.1184 */
68
+ pmu_bat_para26 = <83>;
69
+ /* 4.1360 */
70
+ pmu_bat_para27 = <87>;
71
+ /* 4.1536 */
72
+ pmu_bat_para28 = <90>;
73
+ /* 4.1888 */
74
+ pmu_bat_para29 = <94>;
75
+ /* 4.224 */
76
+ pmu_bat_para30 = <100>;
77
+ /* 4.2592 */
78
+ pmu_bat_para31 = <100>;
79
+ /* 4.2944 */
80
+ pmu_bat_para32 = <100>;
81
+
82
+ pmu_bat_temp_enable = <0>;
83
+ pmu_bat_charge_ltf = <1105>;
84
+ pmu_bat_charge_htf = <121>;
85
+ pmu_bat_shutdown_ltf = <1381>;
86
+ pmu_bat_shutdown_htf = <89>;
87
+ pmu_bat_temp_para1 = <2814>;
88
+ pmu_bat_temp_para2 = <2202>;
89
+ pmu_bat_temp_para3 = <1737>;
90
+ pmu_bat_temp_para4 = <1381>;
91
+ pmu_bat_temp_para5 = <1105>;
92
+ pmu_bat_temp_para6 = <890>;
93
+ pmu_bat_temp_para7 = <722>;
94
+ pmu_bat_temp_para8 = <484>;
95
+ pmu_bat_temp_para9 = <332>;
96
+ pmu_bat_temp_para10 = <233>;
97
+ pmu_bat_temp_para11 = <196>;
98
+ pmu_bat_temp_para12 = <166>;
99
+ pmu_bat_temp_para13 = <141>;
100
+ pmu_bat_temp_para14 = <121>;
101
+ pmu_bat_temp_para15 = <89>;
102
+ pmu_bat_temp_para16 = <66>;
103
+
104
+ wakeup_bat_out;
105
+ /* wakeup_bat_in; */
106
+ /* wakeup_bat_charging; */
107
+ /* wakeup_bat_charge_over; */
108
+ /* wakeup_low_warning1; */
109
+ /* wakeup_low_warning2; */
110
+ /* wakeup_bat_untemp_work; */
111
+ /* wakeup_bat_ovtemp_work; */
112
+ /* wakeup_bat_untemp_chg; */
113
+ /* wakeup_bat_ovtemp_chg; */
114
+};