From 53d8e046ac1bf2ebe94f671983e3d3be059df91a Mon Sep 17 00:00:00 2001
From: huangcm <1263938474@qq.com>
Date: Mon, 01 Sep 2025 02:06:02 +0000
Subject: [PATCH] feat(bat): fix real cap & add bat 8000mA 2.0A charge config

---
 longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts |   70 +++++++++++++++++++++--------------
 1 files changed, 42 insertions(+), 28 deletions(-)

diff --git a/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
index 683f3e4..f9f3d81 100755
--- a/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
+++ b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts
@@ -17,15 +17,15 @@
 		standby_param = &standby_param;
 	};
 
-	reg_usb1_vbus: usb1-vbus {
+ 	reg_usb1_vbus: usb1-vbus {
 		compatible = "regulator-fixed";
-		gpio = <&r_pio PL 8 1 2 0 1>;
+		//gpio = <&r_pio PL 8 1 2 0 1>;
 		regulator-name = "usb1-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-enable-ramp-delay = <1000>;
 		enable-active-high;
-	};
+	}; 
 
 	soc: soc@03000000 {
 
@@ -401,8 +401,8 @@
 					pmu_ac_vol = <4600>;
 					pmu_ac_cur = <3000>;
 
-					// wakeup_ac_in;
-					// wakeup_ac_out;
+					wakeup_ac_in;
+					wakeup_ac_out;
 				};
 
 				usb_power_supply: usb_power_supply {
@@ -410,12 +410,12 @@
 					status = "okay";
 
 					pmu_usbpc_vol = <4600>;
-					pmu_usbpc_cur = <2500>;
+					pmu_usbpc_cur = <3000>;
 					pmu_usbad_vol = <4600>;
-					pmu_usbad_cur = <2500>;
+					pmu_usbad_cur = <3000>;
 
-					// wakeup_usb_in;
-					// wakeup_usb_out;
+					wakeup_usb_in;
+					wakeup_usb_out;
 				};
 
 				battery_power_supply: battery-power-supply {
@@ -425,9 +425,9 @@
 					pmu_chg_ic_temp = <0>;
 					pmu_battery_rdc= <50>;
 					pmu_battery_cap = <8000>;
-					pmu_runtime_chgcur = <1000>;
-					pmu_suspend_chgcur = <2000>;
-					pmu_shutdown_chgcur = <2000>;
+					pmu_runtime_chgcur = <2800>;
+					pmu_suspend_chgcur = <2800>;
+					pmu_shutdown_chgcur = <2800>;
 					pmu_init_chgvol = <4280>;
 					pmu_battery_warning_level1 = <15>;
 					pmu_battery_warning_level2 = <0>;
@@ -490,7 +490,7 @@
 					pmu_bat_temp_para16 = <66>;
 
 					wakeup_bat_out;
-					/* wakeup_bat_in; */
+					wakeup_bat_in;
 					/* wakeup_bat_charging; */
 					/* wakeup_bat_charge_over; */
 					/* wakeup_low_warning1; */
@@ -924,13 +924,13 @@
 			status = "okay";
 		};
 
-		ehci1:ehci1-controller@0x05200000 {
+ 		ehci1:ehci1-controller@0x05200000 {
 			drvvbus-supply = <&reg_usb1_vbus>;
 		};
 
 		ohci1:ohci1-controller@0x05200400 {
 			drvvbus-supply = <&reg_usb1_vbus>;
-		};
+		}; 
 
 		sdc1: sdmmc@04021000 {
                         bus-width = <4>;
@@ -941,7 +941,7 @@
                         /*sd-uhs-sdr25*/
                         sd-uhs-sdr50;
                         sd-uhs-ddr50;
-                        sd-uhs-sdr104;
+                        //sd-uhs-sdr104;
 			// kickpi
                         //sunxi-power-save-mode;
                         /*sunxi-dis-signal-vol-sw;*/
@@ -1315,6 +1315,10 @@
 		uart4: uart@05001000 {
 			status = "okay";
 		};
+
+        uart7: uart@07080000 {
+            status = "okay";
+        };
 	};
 	gpu: gpu@0x01800000 {
 			gpu_idle = <1>;/*ic version ctrl*/
@@ -1335,6 +1339,12 @@
 			compatible = "gpio-leds";
 			pinctrl-names = "default";
 			status = "okay";
+
+			usb_vbus {
+				abel = "usb_vbus";
+				gpios = <&r_pio PL 8 1 2 0 1>;
+				linux,default_trigger = "default-on";
+			};
 
 			work-led {
 				label = "work-led";
@@ -1390,17 +1400,17 @@
 				linux,default_trigger = "default-on";
 			};
 
-			PL2 {
-				label = "PL2";
-				gpios = <&r_pio PL 2 1 0 1 0>;
-				linux,default_trigger = "default-on";
-			};
+			// PL2 {
+			// 	label = "PL2";
+			// 	gpios = <&r_pio PL 2 1 0 1 0>;
+			// 	linux,default_trigger = "default-on";
+			// };
 
-			PL3 {
-				label = "PL3";
-				gpios = <&r_pio PL 3 1 0 1 0>;
-				linux,default_trigger = "default-on";
-			};
+			// PL3 {
+			// 	label = "PL3";
+			// 	gpios = <&r_pio PL 3 1 0 1 0>;
+			// 	linux,default_trigger = "default-on";
+			// };
 
 			PL4 {
 				label = "PL4";
@@ -1444,9 +1454,13 @@
    	rx-delay = <7>;
 };
 
-#include "lcd-lvds-7-1024-600.dtsi"
+//#include "lcd-lvds-7-1024-600.dtsi"
 //#include "lcd-lvds-21-1920-1080.dtsi"
 //#include "lcd-mipi-10-800-1280-v1.dtsi"
 //#include "lcd-mipi-10-800-1280-v2.dtsi"
 //#include "lcd-mipi-8-800-1280.dtsi"
-//#include "lcd-mipi-5-720-1280.dtsi"
+#include "lcd-mipi-5-720-1280.dtsi"
+
+//#include "a133-kickpi-axp707-bat-5000mA.dtsi"
+#include "a133-kickpi-axp707-bat-8000mA.dtsi"
+

--
Gitblit v1.6.2