[PATCH 3/10] deadbat-soft-start.patch

Werner Almesberger werner at openmoko.org
Tue Jul 15 12:59:16 CEST 2008


This patch sets the maximum USB fast charge current to 100mA instead of
1A. This is an attempt to reduce the inrush current of the battery and
circuits directly attached to the battery.

Without change, the comparably large capacitors on subsystems that are
directly supplied from the battery would cause a sharp drop of VB_SYS,
which prompted the PMU to reset.

Signed-off-by: Werner Almesberger <werner at openmoko.org>

Index: u-boot/board/neo1973/gta02/pcf50633.c
===================================================================
--- u-boot.orig/board/neo1973/gta02/pcf50633.c	2008-07-14 19:53:31.000000000 -0300
+++ u-boot/board/neo1973/gta02/pcf50633.c	2008-07-14 19:54:25.000000000 -0300
@@ -93,7 +93,7 @@
 	[PCF50633_REG_MBCC2]	= 0x28,	/* Vbatconid=2.7V, Vmax=4.20V */
 	[PCF50633_REG_MBCC3]	= 0x19,	/* 25/255 == 98mA pre-charge */
 	[PCF50633_REG_MBCC4]	= 0xff, /* 255/255 == 1A adapter fast */
-	[PCF50633_REG_MBCC5]	= 0xff,	/* 255/255 == 1A usb fast */
+	[PCF50633_REG_MBCC5]	= 0x19,	/* 25/255 == 98mA soft-start usb fast */
 	[PCF50633_REG_MBCC6]	= 0x00, /* cutoff current 1/32 * Ichg */
 	[PCF50633_REG_MBCC7]	= 0x00,	/* 1.6A max bat curr, USB 100mA */
 	[PCF50633_REG_MBCC8]	= 0x00,
Index: u-boot/board/neo1973/gta02/gta02.c
===================================================================
--- u-boot.orig/board/neo1973/gta02/gta02.c	2008-07-14 19:54:30.000000000 -0300
+++ u-boot/board/neo1973/gta02/gta02.c	2008-07-14 19:54:40.000000000 -0300
@@ -359,6 +359,8 @@
 	pcf50633_reg_write(PCF50633_REG_LDO2ENA, 2); /* enabled if GPIO1 = H */
 	pcf50633_reg_write(PCF50633_REG_LDO5ENA, recent);
 	pcf50633_reg_write(PCF50633_REG_LDO6ENA, recent);
+
+	pcf50633_reg_write(PCF50633_REG_MBCC5, 0xff); /* 1A USB fast charge */
 }
 
 int board_late_init(void)




More information about the openmoko-kernel mailing list