From 87c7c0d90966d729ca3d39cbfca77a39a43960eb Mon Sep 17 00:00:00 2001
From: liyujie <2352380935@qq.com>
Date: Fri, 29 Aug 2025 09:04:04 +0000
Subject: [PATCH] 解决板卡插入usb摄像头上电,打不开摄像头的问题

---
 longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts |  132 +++++++++++++++++++++-----------------------
 1 files changed, 63 insertions(+), 69 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 42faca2..c8c2b60 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 {
 
@@ -288,25 +288,6 @@
 			pinctrl-0 = <&twi0_pins_a>;
 			pinctrl-1 = <&twi0_pins_b>;
 			status = "okay";
-                        ctp {
-                                compatible = "gt9xx_ts";
-				ctp_used = <1>;
-                                device_type = "ctp";
-				status = "okay";
-                                ctp_twi_id = <0x0>;
-				ctp_name = "gt9xx";
-                                reg = <0x5D>;
-                                ctp_screen_max_x = <1024>;
-                                ctp_screen_max_y = <600>;
-                                ctp_revert_x_flag = <0x1>;
-                                ctp_revert_y_flag = <0x1>;
-                                ctp_exchange_x_y_flag = <0x0>;
-                                ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>;
-                                ctp_wakeup =   <&pio PE 4 1 0xffffffff 0xffffffff 1>;
-                                ctp_power_ldo = <3300>;
-                                ctp_power_ldo_vol = <3300>;
-                                ctp_power = <3300>;
-                        };
 		};
 
 		spi0: spi@05010000 {
@@ -426,10 +407,10 @@
 
 				usb_power_supply: usb_power_supply {
 					compatible = "x-powers,axp803-usb-power-supply";
-					status = "disabled";
+					status = "okay";
 
 					pmu_usbpc_vol = <4600>;
-					pmu_usbpc_cur = <3000>;
+					pmu_usbpc_cur = <2500>;
 					pmu_usbad_vol = <4600>;
 					pmu_usbad_cur = <2500>;
 
@@ -442,21 +423,21 @@
 					status = "okay";
 
 					pmu_chg_ic_temp = <0>;
-					pmu_battery_rdc= <93>;
-					pmu_battery_cap = <5067>;
+					pmu_battery_rdc= <50>;
+					pmu_battery_cap = <8000>;
 					pmu_runtime_chgcur = <1000>;
 					pmu_suspend_chgcur = <2000>;
 					pmu_shutdown_chgcur = <2000>;
-					pmu_init_chgvol = <4200>;
+					pmu_init_chgvol = <4280>;
 					pmu_battery_warning_level1 = <15>;
 					pmu_battery_warning_level2 = <0>;
-					pmu_chgled_func = <0>;
+					pmu_chgled_func = <1>;
 					pmu_chgled_type = <0>;
 					ocv_coulumb_100 = <1>;
 					pmu_bat_para1 = <0>;
-					pmu_bat_para2 = <0>;
-					pmu_bat_para3 = <0>;
-					pmu_bat_para4 = <0>;
+					pmu_bat_para2 = <3>;
+					pmu_bat_para3 = <4>;
+					pmu_bat_para4 = <5>;
 					pmu_bat_para5 = <6>;
 					pmu_bat_para6 = <8>;
 					pmu_bat_para7 = <9>;
@@ -474,16 +455,16 @@
 					pmu_bat_para19 = <65>;
 					pmu_bat_para20 = <70>;
 					pmu_bat_para21 = <75>;
-					pmu_bat_para22 = <80>;
-					pmu_bat_para23 = <83>;
-					pmu_bat_para24 = <84>;
-					pmu_bat_para25 = <86>;
-					pmu_bat_para26 = <90>;
-					pmu_bat_para27 = <94>;
-					pmu_bat_para28 = <97>;
-					pmu_bat_para29 = <99>;
-					pmu_bat_para30 = <100>;
-					pmu_bat_para31 = <100>;
+					pmu_bat_para22 = <76>;
+					pmu_bat_para23 = <77>;
+					pmu_bat_para24 = <78>;
+					pmu_bat_para25 = <79>;
+					pmu_bat_para26 = <80>;
+					pmu_bat_para27 = <83>;
+					pmu_bat_para28 = <85>;
+					pmu_bat_para29 = <88>;
+					pmu_bat_para30 = <90>;
+					pmu_bat_para31 = <95>;
 					pmu_bat_para32 = <100>;
 
 					pmu_bat_temp_enable = <0>;
@@ -509,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; */
@@ -523,7 +504,7 @@
 				powerkey0: powerkey@0 {
 					status = "okay";
 					compatible = "x-powers,axp2101-pek";
-					pmu_powkey_off_time = <6000>;
+					pmu_powkey_off_time = <8000>;
 					pmu_powkey_off_func = <0>;
 					pmu_powkey_off_en = <1>;
 					pmu_powkey_long_time = <1500>;
@@ -943,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>;
@@ -960,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;*/
@@ -991,9 +972,9 @@
 			lineout_vol 	= <0x1a>;
 			headphonegain	= <0x00>;
 			/* Pa enabled about */
-			pa_level 	= <0x00>;
+			pa_level 	= <0x01>;
 			pa_msleep_time 	= <0x78>;
-			//gpio-spk = <&pio PB 7 1 1 1 1>;
+			gpio-spk = <&pio PB 7 1 1 1 1>;
 			/* regulator about */
 			avcc-supply = <&reg_aldo1>;
 			cpvin-supply = <&reg_eldo1>;
@@ -1334,6 +1315,10 @@
 		uart4: uart@05001000 {
 			status = "okay";
 		};
+
+        uart7: uart@07080000 {
+            status = "okay";
+        };
 	};
 	gpu: gpu@0x01800000 {
 			gpu_idle = <1>;/*ic version ctrl*/
@@ -1355,17 +1340,23 @@
 			pinctrl-names = "default";
 			status = "okay";
 
-			sysled {
-				label = "sysled";
-				gpios = <&r_pio PL 10 1 0 1 1>;
+			usb_vbus {
+				abel = "usb_vbus";
+				gpios = <&r_pio PL 8 1 2 0 1>;
+				linux,default_trigger = "default-on";
+			};
+
+			work-led {
+				label = "work-led";
+				gpios = <&r_pio PL 10 1 0 1 0>;
 				linux,default_trigger = "heartbeat";
 			};
 
-            spk_en {
-                label = "spk_en";
-                gpios = <&pio PB 7 1 0 1 0>;
-				linux,default_trigger = "default-on";
-            };
+            // spk_en {
+            //     label = "spk_en";
+            //     gpios = <&pio PB 7 1 0 1 0>;
+			// 	linux,default_trigger = "default-on";
+            // };
 
 			fan_en {
 				label = "fan_en";
@@ -1409,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";
@@ -1463,8 +1454,11 @@
    	rx-delay = <7>;
 };
 
-
+//#include "lcd-lvds-7-1024-600.dtsi"
 //#include "lcd-lvds-21-1920-1080.dtsi"
-#include "lcd-lvds-7-1024-600.dtsi"
-//#include "lcd-mipi-10-800-1280.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 "a133-kickpi-axp707-bat-5000mA.dtsi"

--
Gitblit v1.6.2