From 42999913ba3a76221fceb04b1f935ed4e0e71476 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 2 Jan 2022 20:09:28 +0000 Subject: [PATCH] x1000: Increase USB current limit to 500 mA at all times The 100 mA USB current limit added in commit 90dd2f84a9 is a problem when booting with a completely dead battery. Often 100 mA isn't enough to power the player, never mind charge the battery, so revert to the old behavior of only limiting charge current. Given that the original firmware on these devices isn't following the USB spec to the letter, it's probably not worth trying to make Rockbox do so unless and until it causes a real problem - which hasn't happened yet. Change-Id: I179a08310c226fe01460680c62fd25fd69079256 --- .../target/mips/ingenic_x1000/erosqnative/power-erosqnative.c | 4 ++-- firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | 4 ++-- .../target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c b/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c index 7ad9479a96..9cf64cee01 100644 --- a/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c +++ b/firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c @@ -103,8 +103,8 @@ void usb_charging_maxcurrent_change(int maxcurrent) * reduced dynamically by the AXP192 so the combined load is less * than the set VBUS current limit. */ if(maxcurrent <= 100) { - vbus_limit = AXP_VBUS_LIMIT_100mA; - charge_current = 550; + vbus_limit = AXP_VBUS_LIMIT_500mA; + charge_current = 100; } else { vbus_limit = AXP_VBUS_LIMIT_500mA; charge_current = 550; diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c index c8498c4dbc..b20bbd9e8c 100644 --- a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c @@ -96,8 +96,8 @@ void usb_charging_maxcurrent_change(int maxcurrent) * reduced dynamically by the AXP192 so the combined load is less * than the set VBUS current limit. */ if(maxcurrent <= 100) { - vbus_limit = AXP_VBUS_LIMIT_100mA; - charge_current = 550; + vbus_limit = AXP_VBUS_LIMIT_500mA; + charge_current = 100; } else { vbus_limit = AXP_VBUS_LIMIT_500mA; charge_current = 550; diff --git a/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c b/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c index 9637ceef2f..86ee84c37a 100644 --- a/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c +++ b/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c @@ -116,8 +116,8 @@ void usb_charging_maxcurrent_change(int maxcurrent) * reduced dynamically by the AXP192 so the combined load is less * than the set VBUS current limit. */ if(maxcurrent <= 100) { - vbus_limit = AXP_VBUS_LIMIT_100mA; - charge_current = 550; + vbus_limit = AXP_VBUS_LIMIT_500mA; + charge_current = 100; } else { vbus_limit = AXP_VBUS_LIMIT_500mA; charge_current = 550;