* [PATCH v4] ARM: pxa: hx4700: Fix basic suspend/resume
@ 2012-06-11 14:31 Paul Parsons
0 siblings, 0 replies; 2+ messages in thread
From: Paul Parsons @ 2012-06-11 14:31 UTC (permalink / raw)
To: linux-arm-kernel
Basic suspend/resume is fixed by ensuring that the PGSR registers are
set correctly before sleep mode is entered. In particular four of the
active low resets need to be driven high while in sleep mode, otherwise
the unit resets itself instead of suspending. Another problem was that
the PCFR_GPROD bit is set by the HTC bootloader; this caused GPIO reset
(i.e. the reset button) to fail immediately after returning from sleep
mode.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
---
V4:
Rebased from linux-3.3-rc6 to linux-3.5-rc2.
arch/arm/mach-pxa/hx4700.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index d09da6a..d3de84b 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -127,7 +127,11 @@ static unsigned long hx4700_pin_config[] __initdata = {
GPIO19_SSP2_SCLK,
GPIO86_SSP2_RXD,
GPIO87_SSP2_TXD,
- GPIO88_GPIO,
+ GPIO88_GPIO | MFP_LPM_DRIVE_HIGH, /* TSC2046_CS */
+
+ /* BQ24022 Regulator */
+ GPIO72_GPIO | MFP_LPM_KEEP_OUTPUT, /* BQ24022_nCHARGE_EN */
+ GPIO96_GPIO | MFP_LPM_KEEP_OUTPUT, /* BQ24022_ISET2 */
/* HX4700 specific input GPIOs */
GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, /* ASIC3_IRQ */
@@ -135,6 +139,10 @@ static unsigned long hx4700_pin_config[] __initdata = {
GPIO14_GPIO, /* nWLAN_IRQ */
/* HX4700 specific output GPIOs */
+ GPIO61_GPIO | MFP_LPM_DRIVE_HIGH, /* W3220_nRESET */
+ GPIO71_GPIO | MFP_LPM_DRIVE_HIGH, /* ASIC3_nRESET */
+ GPIO81_GPIO | MFP_LPM_DRIVE_HIGH, /* CPU_GP_nRESET */
+ GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, /* CPU_HW_nRESET */
GPIO102_GPIO | MFP_LPM_DRIVE_LOW, /* SYNAPTICS_POWER_ON */
GPIO10_GPIO, /* GSM_IRQ */
@@ -872,14 +880,19 @@ static struct gpio global_gpios[] = {
{ GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" },
{ GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" },
{ GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" },
+ { GPIO61_HX4700_W3220_nRESET, GPIOF_OUT_INIT_HIGH, "W3220_nRESET" },
{ GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" },
+ { GPIO81_HX4700_CPU_GP_nRESET, GPIOF_OUT_INIT_HIGH, "CPU_GP_nRESET" },
{ GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" },
+ { GPIO116_HX4700_CPU_HW_nRESET, GPIOF_OUT_INIT_HIGH, "CPU_HW_nRESET" },
};
static void __init hx4700_init(void)
{
int ret;
+ PCFR = PCFR_GPR_EN | PCFR_OPDE;
+
pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v4] ARM: pxa: hx4700: Fix basic suspend/resume
[not found] <4fd60135.0b52d80a.43ea.422eSMTPIN_ADDED@mx.google.com>
@ 2012-07-01 6:55 ` Haojian Zhuang
0 siblings, 0 replies; 2+ messages in thread
From: Haojian Zhuang @ 2012-07-01 6:55 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 11, 2012 at 10:31 PM, Paul Parsons <lost.distance@yahoo.com> wrote:
> Basic suspend/resume is fixed by ensuring that the PGSR registers are
> set correctly before sleep mode is entered. In particular four of the
> active low resets need to be driven high while in sleep mode, otherwise
> the unit resets itself instead of suspending. Another problem was that
> the PCFR_GPROD bit is set by the HTC bootloader; this caused GPIO reset
> (i.e. the reset button) to fail immediately after returning from sleep
> mode.
>
> Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
> Cc: Philipp Zabel <philipp.zabel@gmail.com>
> ---
>
> V4:
> Rebased from linux-3.3-rc6 to linux-3.5-rc2.
>
> ?arch/arm/mach-pxa/hx4700.c | ? 15 ++++++++++++++-
> ?1 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
> index d09da6a..d3de84b 100644
> --- a/arch/arm/mach-pxa/hx4700.c
> +++ b/arch/arm/mach-pxa/hx4700.c
> @@ -127,7 +127,11 @@ static unsigned long hx4700_pin_config[] __initdata = {
> ? ? ? ? GPIO19_SSP2_SCLK,
> ? ? ? ? GPIO86_SSP2_RXD,
> ? ? ? ? GPIO87_SSP2_TXD,
> - ? ? ? GPIO88_GPIO,
> + ? ? ? GPIO88_GPIO | MFP_LPM_DRIVE_HIGH, ? ? ? /* TSC2046_CS */
> +
> + ? ? ? /* BQ24022 Regulator */
> + ? ? ? GPIO72_GPIO | MFP_LPM_KEEP_OUTPUT, ? ? ?/* BQ24022_nCHARGE_EN */
> + ? ? ? GPIO96_GPIO | MFP_LPM_KEEP_OUTPUT, ? ? ?/* BQ24022_ISET2 */
>
> ? ? ? ? /* HX4700 specific input GPIOs */
> ? ? ? ? GPIO12_GPIO | WAKEUP_ON_EDGE_RISE, ? ? ?/* ASIC3_IRQ */
> @@ -135,6 +139,10 @@ static unsigned long hx4700_pin_config[] __initdata = {
> ? ? ? ? GPIO14_GPIO, ? ?/* nWLAN_IRQ */
>
> ? ? ? ? /* HX4700 specific output GPIOs */
> + ? ? ? GPIO61_GPIO | MFP_LPM_DRIVE_HIGH, ? ? ? /* W3220_nRESET */
> + ? ? ? GPIO71_GPIO | MFP_LPM_DRIVE_HIGH, ? ? ? /* ASIC3_nRESET */
> + ? ? ? GPIO81_GPIO | MFP_LPM_DRIVE_HIGH, ? ? ? /* CPU_GP_nRESET */
> + ? ? ? GPIO116_GPIO | MFP_LPM_DRIVE_HIGH, ? ? ?/* CPU_HW_nRESET */
> ? ? ? ? GPIO102_GPIO | MFP_LPM_DRIVE_LOW, ? ? ? /* SYNAPTICS_POWER_ON */
>
> ? ? ? ? GPIO10_GPIO, ? ?/* GSM_IRQ */
> @@ -872,14 +880,19 @@ static struct gpio global_gpios[] = {
> ? ? ? ? { GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" },
> ? ? ? ? { GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" },
> ? ? ? ? { GPIO32_HX4700_RS232_ON, ? ? ? ? GPIOF_OUT_INIT_HIGH, "RS232_ON" },
> + ? ? ? { GPIO61_HX4700_W3220_nRESET, ? ? GPIOF_OUT_INIT_HIGH, "W3220_nRESET" },
> ? ? ? ? { GPIO71_HX4700_ASIC3_nRESET, ? ? GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" },
> + ? ? ? { GPIO81_HX4700_CPU_GP_nRESET, ? ?GPIOF_OUT_INIT_HIGH, "CPU_GP_nRESET" },
> ? ? ? ? { GPIO82_HX4700_EUART_RESET, ? ? ?GPIOF_OUT_INIT_HIGH, "EUART_RESET" },
> + ? ? ? { GPIO116_HX4700_CPU_HW_nRESET, ? GPIOF_OUT_INIT_HIGH, "CPU_HW_nRESET" },
> ?};
>
> ?static void __init hx4700_init(void)
> ?{
> ? ? ? ? int ret;
>
> + ? ? ? PCFR = PCFR_GPR_EN | PCFR_OPDE;
> +
> ? ? ? ? pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
> ? ? ? ? gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
> ? ? ? ? ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
> --
> 1.7.3.4
>
>
>
>
Applied
Regards
Haojian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-01 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11 14:31 [PATCH v4] ARM: pxa: hx4700: Fix basic suspend/resume Paul Parsons
[not found] <4fd60135.0b52d80a.43ea.422eSMTPIN_ADDED@mx.google.com>
2012-07-01 6:55 ` Haojian Zhuang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).