pxa/hx4700: Reduce sleep mode power consumption by 35%
Subsystems (3)
PATCH 1/1 pxa/hx4700: Reduce sleep mode power consumption by 35%
Drive the two Bluetooth UART output GPIOs (GPIO43_BTUART_TXD, GPIO45_BTUART_RTS) LOW during sleep mode instead of HIGH. This reduces sleep mode power consumption from approximately 46 mA/h to approximately 30 mA/h.
---
Thanks to Oliver Winker for finding this.
arch/arm/mach-pxa/hx4700.c +2 -2
@@ -97,9 +97,9 @@ static unsigned long hx4700_pin_config[]/* BTUART */ GPIO42_BTUART_RXD , -GPIO43_BTUART_TXD , +GPIO43_GPIO |MFP_AF2 |MFP_LPM_DRIVE_LOW ,GPIO44_BTUART_CTS , -GPIO45_BTUART_RTS , +GPIO45_GPIO |MFP_AF2 |MFP_LPM_DRIVE_LOW ,/* PWM 1 (Backlight) */ GPIO17_PWM1_OUT,
PATCH 1/1 pxa/hx4700: Reduce sleep mode power consumption by 35%
Quoted 4 lines · Paul Parsons
Drive the two Bluetooth UART output GPIOs (
GPIO43_BTUART_TXD,GPIO45_BTUART_RTS) LOW during sleep mode instead of HIGH. This reduces sleep mode power consumption from approximately 46 mA/h to approximately 30 mA/h.
What are you saying here? I think you're confusing power with current. Also, current is measured in amps, not amps per second (or a scaled version of that.)
Quoted 10 lines
Signed-off-by Oliver Winker <[email protected]>Signed-off-by Paul Parsons <[email protected]>---
Thanks to Oliver Winker for finding this.
diff -uprN
clean-3.3-rc6/arch/arm/mach-pxa/hx4700.clinux-3.3-rc6/arch/arm/mach-pxa/hx4700.c
arch/arm/mach-pxa/hx4700.c static unsigned long hx4700_pin_config[] · line 100
Quoted 5 lines
arch/arm/mach-pxa/hx4700.c +1
-1@@ -97,9 +97,9 @@ static unsigned long hx4700_pin_config[]/* BTUART */ GPIO42_BTUART_RXD , - GPIO43_BTUART_TXD, + GPIO43_GPIO | MFP_AF2 | MFP_LPM_DRIVE_LOW,
I don't believe that's right.
This expands to:
MFP_CFG_IN(GPIO43, AF0) | MFP_AF2 | MFP_LPM_DRIVE_LOW
and:
(MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) | (MFP_PIN(MFP_PIN_GPIO43) | MFP_AF0 | MFP_DIR_IN) | MFP_AF2 | MFP_LPM_DRIVE_LOW
Note the presence of both MFP_AF2 and MFP_AF0 in there.
The default for GPIO43_BTUART_TXD is:
MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
and I'd suggest defining a new GPIO43_BTUART_TXD_LPM_LOW to cover your case.
PATCH 1/1 pxa/hx4700: Reduce sleep mode power consumption by 35%
Quoted 5 lines · Russell King - ARM Linux
Quoted 1 line
Drive the two Bluetooth UART output GPIOs
(
GPIO43_BTUART_TXD,Quoted 1 line
GPIO45_BTUART_RTS) LOW during sleep mode instead ofHIGH. This
Quoted 1 line
reduces sleep mode power consumption from approximately
Quoted 8 lines
46 mA/h
Quoted 1 line
to approximately 30 mA/h.
What are you saying here?? I think you're confusing power with current.
Also, current is measured in amps, not amps per second (or a scaled
version of that.)
Apologies for the sloppy nomenclature; evidently electronics is not my thing.
The figures I quoted were the reduction in accumulated current (charge) over time. For example in the second case, the charge reduced from 1853500 ?Ah to 1782750 ?Ah over 8610 seconds = 29.58 mA.
If that seems high it is: it should be nearer 4.7 mA.
Quoted 23 lines
Quoted 4 lines
? ??? /* BTUART */
? ???GPIO42_BTUART_RXD,
-???GPIO43_BTUART_TXD,
+???GPIO43_GPIO|MFP_AF2|
MFP_LPM_DRIVE_LOW,I don't believe that's right.
This expands to:
???
MFP_CFG_IN(GPIO43, AF0)|MFP_AF2|MFP_LPM_DRIVE_LOWand:
??? (
MFP_CFG_DEFAULT& ~(MFP_AF_MASK |MFP_DIR_MASK)) |
??? (MFP_PIN(MFP_PIN_GPIO43)|MFP_AF0|MFP_DIR_IN)
??? |MFP_AF2|MFP_LPM_DRIVE_LOWNote the presence of both
MFP_AF2andMFP_AF0in there.
Quoted 7 lines
The default for
GPIO43_BTUART_TXDis:???
MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)and I'd suggest defining a new
GPIO43_BTUART_TXD_LPM_LOWto cover your
case.
It wasn't right but it evaluated to the correct value because MFP_AF0 = 0. What I intended was: MFP_PIN_GPIO43 | MFP_AF2 | MFP_LPM_DRIVE_LOW But I'll add the new values to <mach/mfp-pxa27x.h> if that's preferable.
Oddly the absence of direction didn't seem to matter; GPIO43 and GPIO45 default to input here, yet are still being driven as outputs in low power mode contrary to what the manual says.
Haojian Zhuang
maintainerPATCH 1/1 pxa/hx4700: Reduce sleep mode power consumption by 35%
Quoted 28 lines · Paul Parsons
Quoted 27 lines · Russell King - ARM Linux
Quoted 4 lines
? ??? /* BTUART */
? ???GPIO42_BTUART_RXD,
-???GPIO43_BTUART_TXD,
+???GPIO43_GPIO|MFP_AF2|
MFP_LPM_DRIVE_LOW,I don't believe that's right.
This expands to:
???
MFP_CFG_IN(GPIO43, AF0)|MFP_AF2|MFP_LPM_DRIVE_LOWand:
??? (
MFP_CFG_DEFAULT& ~(MFP_AF_MASK |MFP_DIR_MASK)) |
??? (MFP_PIN(MFP_PIN_GPIO43)|MFP_AF0|MFP_DIR_IN)
??? |MFP_AF2|MFP_LPM_DRIVE_LOWNote the presence of both
MFP_AF2andMFP_AF0in there.The default for
GPIO43_BTUART_TXDis:???
MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
Quoted 8 lines
Quoted 3 lines
and I'd suggest defining a new
GPIO43_BTUART_TXD_LPM_LOWto cover your
case.It wasn't right but it evaluated to the correct value because
MFP_AF0= 0. What I intended was:MFP_PIN_GPIO43|MFP_AF2|MFP_LPM_DRIVE_LOWBut I'll add the new values to <mach/mfp-pxa27x.h> if that's preferable.
Yes, you can do it. It's prefer to append new values in <mfp-pxa27x.h>.