diff mbox

[v4,11/26] ARM: pxa: magician: Optimize EGPIO initial values

Message ID 5609B1E9.4020508@tul.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Petr Cvek Sept. 28, 2015, 9:32 p.m. UTC
This patch optimizes initial values of the EGPIO chip driver.

GSM and sound should be powered off during boot. A weak accumulator and
a powered GSM sometimes cause a system reboot. A charging current should be
as high as possible during boot.

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
---
 arch/arm/mach-pxa/magician.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Philipp Zabel Oct. 3, 2015, 12:35 p.m. UTC | #1
Am Montag, den 28.09.2015, 23:32 +0200 schrieb Petr Cvek:
> This patch optimizes initial values of the EGPIO chip driver.
> 
> GSM and sound should be powered off during boot. A weak accumulator
> and
> a powered GSM sometimes cause a system reboot. A charging current
> should be
> as high as possible during boot.

Wouldn't that violate USB spec if we boot the magician while plugged
into an unpowered USB host?

regards
Philipp
Robert Jarzmik Oct. 7, 2015, 7:45 p.m. UTC | #2
Philipp Zabel <philipp.zabel@gmail.com> writes:

> Am Montag, den 28.09.2015, 23:32 +0200 schrieb Petr Cvek:
>> This patch optimizes initial values of the EGPIO chip driver.
>> 
>> GSM and sound should be powered off during boot. A weak accumulator
>> and
>> a powered GSM sometimes cause a system reboot. A charging current
>> should be
>> as high as possible during boot.
>
> Wouldn't that violate USB spec if we boot the magician while plugged
> into an unpowered USB host?

You're right. As USB 2.0 device cannot draw more than 100mA until enumerated
(prior to battery charging spec 1.1). It is described in USB 2.0 specification,
chapter 7.3.2, in the table :
 - Unconfigured Function/Hub - ICCInit - maximum 100mA.

So I'll drop this patch for now I think.

Cheers.
diff mbox

Patch

diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 2c487ae..bf0760e 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -263,9 +263,12 @@  static struct htc_egpio_chip egpio_chips[] = {
 		.num_gpios	= 24,
 		.direction	= HTC_EGPIO_OUTPUT,
 		/*
-		 * Depends on modules configuration
+		 * NOTICE LCD valid power on sequence
+		 * Disable GSM and sound
+		 * Low accu can cause reboot, set 500mA charging
+		 * OR 0x8000 for LCD backlight (debug printks)
 		 */
-		.initial_values	= 0x40,
+		.initial_values	= 0x2020c0,
 	},
 	[1] = {
 		.reg_start	= 4,