All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem
@ 2012-11-15 16:06 Matthias Brugger
  2012-11-15 16:42 ` Robert Nelson
  0 siblings, 1 reply; 22+ messages in thread
From: Matthias Brugger @ 2012-11-15 16:06 UTC (permalink / raw)
  To: Russell King, Tony Lindgren, linux-omap
  Cc: martinez.javier, eballetbo, Matthias Brugger

When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
This patch adds a generic power save script, which resets the TWL4030 when a
warm reset occures. This way the OMAP3530 does not hang on reboot.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 arch/arm/mach-omap2/board-igep0020.c |   36 ++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 48d5e41..9ba1c4b 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -487,11 +487,47 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
 	.rep		= 1,
 };
 
+static struct twl4030_ins wrst_seq[] __initdata = {
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+	{MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wrst_script __initdata = {
+	.script = wrst_seq,
+	.size   = ARRAY_SIZE(wrst_seq),
+	.flags  = TWL4030_WRST_SCRIPT,
+};
+
+static struct twl4030_script *twl4030_scripts[] __initdata = {
+	&wrst_script,
+};
+
+static struct twl4030_resconfig twl4030_rconfig[] = {
+	{ .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ 0, 0},
+};
+
+static struct twl4030_power_data igep_twl4030_power_data = {
+	.scripts	= twl4030_scripts,
+	.num		= ARRAY_SIZE(twl4030_scripts),
+	.resource_config = twl4030_rconfig,
+};
+
 static struct twl4030_platform_data igep_twldata = {
 	/* platform_data for children goes here */
 	.gpio		= &igep_twl4030_gpio_pdata,
 	.vmmc1          = &igep_vmmc1,
 	.vio		= &igep_vio,
+	.power		= &igep_twl4030_power_data,
 };
 
 static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem
  2012-11-15 16:06 [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem Matthias Brugger
@ 2012-11-15 16:42 ` Robert Nelson
  2012-12-14 17:19   ` Tony Lindgren
  0 siblings, 1 reply; 22+ messages in thread
From: Robert Nelson @ 2012-11-15 16:42 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Russell King, Tony Lindgren, linux-omap, martinez.javier,
	eballetbo, Matthias Brugger

On Thu, Nov 15, 2012 at 10:06 AM, Matthias Brugger
<matthias.bgg@googlemail.com> wrote:
> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> This patch adds a generic power save script, which resets the TWL4030 when a
> warm reset occures. This way the OMAP3530 does not hang on reboot.
>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  arch/arm/mach-omap2/board-igep0020.c |   36 ++++++++++++++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
> index 48d5e41..9ba1c4b 100644
> --- a/arch/arm/mach-omap2/board-igep0020.c
> +++ b/arch/arm/mach-omap2/board-igep0020.c
> @@ -487,11 +487,47 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
>         .rep            = 1,
>  };
>
> +static struct twl4030_ins wrst_seq[] __initdata = {
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> +};
> +
> +static struct twl4030_script wrst_script __initdata = {
> +       .script = wrst_seq,
> +       .size   = ARRAY_SIZE(wrst_seq),
> +       .flags  = TWL4030_WRST_SCRIPT,
> +};
> +
> +static struct twl4030_script *twl4030_scripts[] __initdata = {
> +       &wrst_script,
> +};
> +
> +static struct twl4030_resconfig twl4030_rconfig[] = {
> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { 0, 0},
> +};
> +
> +static struct twl4030_power_data igep_twl4030_power_data = {
> +       .scripts        = twl4030_scripts,
> +       .num            = ARRAY_SIZE(twl4030_scripts),
> +       .resource_config = twl4030_rconfig,
> +};
> +
>  static struct twl4030_platform_data igep_twldata = {
>         /* platform_data for children goes here */
>         .gpio           = &igep_twl4030_gpio_pdata,
>         .vmmc1          = &igep_vmmc1,
>         .vio            = &igep_vio,
> +       .power          = &igep_twl4030_power_data,
>  };
>
>  static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
> --
> 1.7.9.5
>
> --

Sweet, this also fixes the software reboot lockup I've been bisecting
on the Beagle C4 (omap3530), when the ONDEMAND governor is enabled..
(applied the same changes to the beagle's board file:
board-omap3beagle.c)

Can we make this script generic for all omap35xx/twl4030 boards that need it?

So far, no regressions in a quick boot/reboot test of DM3730 Beagle xM
C that shares the board file...

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem
  2012-11-15 16:42 ` Robert Nelson
@ 2012-12-14 17:19   ` Tony Lindgren
  2012-12-18 21:32     ` Matthias Brugger
  0 siblings, 1 reply; 22+ messages in thread
From: Tony Lindgren @ 2012-12-14 17:19 UTC (permalink / raw)
  To: Robert Nelson
  Cc: Matthias Brugger, Russell King, linux-omap, martinez.javier,
	eballetbo, Matthias Brugger

* Robert Nelson <robertcnelson@gmail.com> [121115 08:44]:
> On Thu, Nov 15, 2012 at 10:06 AM, Matthias Brugger
> <matthias.bgg@googlemail.com> wrote:
> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> > This patch adds a generic power save script, which resets the TWL4030 when a
> > warm reset occures. This way the OMAP3530 does not hang on reboot.
> >
> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> > ---
> >  arch/arm/mach-omap2/board-igep0020.c |   36 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> >
> > diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
> > index 48d5e41..9ba1c4b 100644
> > --- a/arch/arm/mach-omap2/board-igep0020.c
> > +++ b/arch/arm/mach-omap2/board-igep0020.c
> > @@ -487,11 +487,47 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
> >         .rep            = 1,
> >  };
> >
> > +static struct twl4030_ins wrst_seq[] __initdata = {
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> > +};
> > +
> > +static struct twl4030_script wrst_script __initdata = {
> > +       .script = wrst_seq,
> > +       .size   = ARRAY_SIZE(wrst_seq),
> > +       .flags  = TWL4030_WRST_SCRIPT,
> > +};
> > +
> > +static struct twl4030_script *twl4030_scripts[] __initdata = {
> > +       &wrst_script,
> > +};
> > +
> > +static struct twl4030_resconfig twl4030_rconfig[] = {
> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { 0, 0},
> > +};
> > +
> > +static struct twl4030_power_data igep_twl4030_power_data = {
> > +       .scripts        = twl4030_scripts,
> > +       .num            = ARRAY_SIZE(twl4030_scripts),
> > +       .resource_config = twl4030_rconfig,
> > +};
> > +
> >  static struct twl4030_platform_data igep_twldata = {
> >         /* platform_data for children goes here */
> >         .gpio           = &igep_twl4030_gpio_pdata,
> >         .vmmc1          = &igep_vmmc1,
> >         .vio            = &igep_vio,
> > +       .power          = &igep_twl4030_power_data,
> >  };
> >
> >  static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
> > --
> > 1.7.9.5
> >
> > --
> 
> Sweet, this also fixes the software reboot lockup I've been bisecting
> on the Beagle C4 (omap3530), when the ONDEMAND governor is enabled..
> (applied the same changes to the beagle's board file:
> board-omap3beagle.c)
> 
> Can we make this script generic for all omap35xx/twl4030 boards that need it?
> 
> So far, no regressions in a quick boot/reboot test of DM3730 Beagle xM
> C that shares the board file...

Any news on making this fix generic?

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem
  2012-12-14 17:19   ` Tony Lindgren
@ 2012-12-18 21:32     ` Matthias Brugger
  2013-01-23 18:21         ` Matthias Brugger
  0 siblings, 1 reply; 22+ messages in thread
From: Matthias Brugger @ 2012-12-18 21:32 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Robert Nelson, Matthias Brugger, Russell King, linux-omap,
	martinez.javier, eballetbo

2012/12/14 Tony Lindgren <tony@atomide.com>:
> * Robert Nelson <robertcnelson@gmail.com> [121115 08:44]:
>> On Thu, Nov 15, 2012 at 10:06 AM, Matthias Brugger
>> <matthias.bgg@googlemail.com> wrote:
>> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>> > This patch adds a generic power save script, which resets the TWL4030 when a
>> > warm reset occures. This way the OMAP3530 does not hang on reboot.
>> >
>> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>> > ---
>> >  arch/arm/mach-omap2/board-igep0020.c |   36 ++++++++++++++++++++++++++++++++++
>> >  1 file changed, 36 insertions(+)
>> >
>> > diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
>> > index 48d5e41..9ba1c4b 100644
>> > --- a/arch/arm/mach-omap2/board-igep0020.c
>> > +++ b/arch/arm/mach-omap2/board-igep0020.c
>> > @@ -487,11 +487,47 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
>> >         .rep            = 1,
>> >  };
>> >
>> > +static struct twl4030_ins wrst_seq[] __initdata = {
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>> > +};
>> > +
>> > +static struct twl4030_script wrst_script __initdata = {
>> > +       .script = wrst_seq,
>> > +       .size   = ARRAY_SIZE(wrst_seq),
>> > +       .flags  = TWL4030_WRST_SCRIPT,
>> > +};
>> > +
>> > +static struct twl4030_script *twl4030_scripts[] __initdata = {
>> > +       &wrst_script,
>> > +};
>> > +
>> > +static struct twl4030_resconfig twl4030_rconfig[] = {
>> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { 0, 0},
>> > +};
>> > +
>> > +static struct twl4030_power_data igep_twl4030_power_data = {
>> > +       .scripts        = twl4030_scripts,
>> > +       .num            = ARRAY_SIZE(twl4030_scripts),
>> > +       .resource_config = twl4030_rconfig,
>> > +};
>> > +
>> >  static struct twl4030_platform_data igep_twldata = {
>> >         /* platform_data for children goes here */
>> >         .gpio           = &igep_twl4030_gpio_pdata,
>> >         .vmmc1          = &igep_vmmc1,
>> >         .vio            = &igep_vio,
>> > +       .power          = &igep_twl4030_power_data,
>> >  };
>> >
>> >  static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
>> > --
>> > 1.7.9.5
>> >
>> > --
>>
>> Sweet, this also fixes the software reboot lockup I've been bisecting
>> on the Beagle C4 (omap3530), when the ONDEMAND governor is enabled..
>> (applied the same changes to the beagle's board file:
>> board-omap3beagle.c)
>>
>> Can we make this script generic for all omap35xx/twl4030 boards that need it?
>>
>> So far, no regressions in a quick boot/reboot test of DM3730 Beagle xM
>> C that shares the board file...
>
> Any news on making this fix generic?
>
> Regards,
>
> Tony

I will try to have a look on it the next days.

Cheers,
Matthias


-- 
---
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
  2012-12-18 21:32     ` Matthias Brugger
@ 2013-01-23 18:21         ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-01-23 18:21 UTC (permalink / raw)
  To: Tony Lindgren, Russell King, martinez.javier, eballetbo,
	ezequiel.garcia, robertcnelson, linux-omap, linux-arm-kernel
  Cc: Matthias Brugger

This patch adds a generic power script configuration.
When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
With the generic power script, TWL4030 will be reset
when a warm reset occures. This way the OMAP3530 does not
hang on reboot.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 arch/arm/mach-omap2/twl-common.c | 41 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index d78180c..f096beb 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -121,41 +121,40 @@ static struct twl4030_audio_data omap3_audio_pdata = {
 };
 
 static struct twl4030_ins wrst_seq[] __initdata = {
-       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
-       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
-       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+	{MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
 };
 
 static struct twl4030_script wrst_script __initdata = {
-       .script = wrst_seq,
-       .size   = ARRAY_SIZE(wrst_seq),
-       .flags  = TWL4030_WRST_SCRIPT,
+	.script = wrst_seq,
+	.size	= ARRAY_SIZE(wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
 };
 
 static struct twl4030_script *omap3_power_scripts[] __initdata = {
-       &wrst_script,
+	&wrst_script,
 };
 
 static struct twl4030_resconfig omap3_rconfig[] = {
-       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
-               .type2 = -1 },
-       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
-               .type2 = -1 },
-       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
-               .type2 = -1 },
-       { 0, 0},
+	{ .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ 0, 0},
 };
 
 static struct twl4030_power_data omap3_power_pdata = {
-       .scripts        = omap3_power_scripts,
-       .num            = ARRAY_SIZE(omap3_power_scripts),
-       .resource_config = omap3_rconfig,
+	.scripts	= omap3_power_scripts,
+	.num		= ARRAY_SIZE(omap3_power_scripts),
+	.resource_config = omap3_rconfig,
 };
 
-
 static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
 	REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
 };
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-01-23 18:21         ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-01-23 18:21 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a generic power script configuration.
When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
With the generic power script, TWL4030 will be reset
when a warm reset occures. This way the OMAP3530 does not
hang on reboot.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 arch/arm/mach-omap2/twl-common.c | 41 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index d78180c..f096beb 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -121,41 +121,40 @@ static struct twl4030_audio_data omap3_audio_pdata = {
 };
 
 static struct twl4030_ins wrst_seq[] __initdata = {
-       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
-       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
-       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
-       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+	{MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
 };
 
 static struct twl4030_script wrst_script __initdata = {
-       .script = wrst_seq,
-       .size   = ARRAY_SIZE(wrst_seq),
-       .flags  = TWL4030_WRST_SCRIPT,
+	.script = wrst_seq,
+	.size	= ARRAY_SIZE(wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
 };
 
 static struct twl4030_script *omap3_power_scripts[] __initdata = {
-       &wrst_script,
+	&wrst_script,
 };
 
 static struct twl4030_resconfig omap3_rconfig[] = {
-       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
-               .type2 = -1 },
-       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
-               .type2 = -1 },
-       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
-               .type2 = -1 },
-       { 0, 0},
+	{ .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ 0, 0},
 };
 
 static struct twl4030_power_data omap3_power_pdata = {
-       .scripts        = omap3_power_scripts,
-       .num            = ARRAY_SIZE(omap3_power_scripts),
-       .resource_config = omap3_rconfig,
+	.scripts	= omap3_power_scripts,
+	.num		= ARRAY_SIZE(omap3_power_scripts),
+	.resource_config = omap3_rconfig,
 };
 
-
 static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
 	REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
 };
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-03-12 16:57             ` Tony Lindgren
@ 2013-03-15  9:11               ` Peter Ujfalusi
  -1 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2013-03-15  9:11 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Matthias Brugger, Kristo, Tero, Robert Nelson, linux,
	martinez.javier, eballetbo, ezequiel.garcia, linux-omap,
	linux-arm-kernel

Hi Tony,

On 03/12/2013 05:57 PM, Tony Lindgren wrote:
> Sorry looks like this got missed. I suggest Peter collects the twl
> patches and then provides me + mfd + asoc and whoever needs the
> pull requests.

OK. Lets get things going forward. I have sent a pull request for you with
this patch.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-03-15  9:11               ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2013-03-15  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

On 03/12/2013 05:57 PM, Tony Lindgren wrote:
> Sorry looks like this got missed. I suggest Peter collects the twl
> patches and then provides me + mfd + asoc and whoever needs the
> pull requests.

OK. Lets get things going forward. I have sent a pull request for you with
this patch.

-- 
P?ter

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-03-08 18:58           ` Matthias Brugger
@ 2013-03-12 16:57             ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2013-03-12 16:57 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Peter Ujfalusi, Kristo, Tero, Robert Nelson, linux,
	martinez.javier, eballetbo, ezequiel.garcia, linux-omap,
	linux-arm-kernel

Hi,

* Matthias Brugger <matthias.bgg@gmail.com> [130308 11:02]:
> Hello Tony and Peter,
> 
> 2013/2/19 Peter Ujfalusi <peter.ujfalusi@ti.com>:
> > Hi Matthias,
> >
> > On 02/15/2013 04:59 PM, Matthias Brugger wrote:
> >> 2013/2/1 Tony Lindgren <tony@atomide.com>:
> >>> Hi,
> >>>
> >>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
> >>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
> >>>> <matthias.bgg@gmail.com> wrote:
> >>>>> This patch adds a generic power script configuration.
> >>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> >>>>> With the generic power script, TWL4030 will be reset
> >>>>> when a warm reset occures. This way the OMAP3530 does not
> >>>>> hang on reboot.
> >>>
> >>> Both look OK to me. I've added Peter to cc, it's best that he queues
> >>> all the twl changes.
> >>>
> >>
> >> Peter any comments on this patch?
> >
> > The patch looks good to me as well.
> 
> It looks like the patch wasn't added to the 3.9 series. Is there any
> reason for that, or was it just a misunderstanding between you two,
> about who will push it to Linus?

Sorry looks like this got missed. I suggest Peter collects the twl
patches and then provides me + mfd + asoc and whoever needs the
pull requests.

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-03-12 16:57             ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2013-03-12 16:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

* Matthias Brugger <matthias.bgg@gmail.com> [130308 11:02]:
> Hello Tony and Peter,
> 
> 2013/2/19 Peter Ujfalusi <peter.ujfalusi@ti.com>:
> > Hi Matthias,
> >
> > On 02/15/2013 04:59 PM, Matthias Brugger wrote:
> >> 2013/2/1 Tony Lindgren <tony@atomide.com>:
> >>> Hi,
> >>>
> >>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
> >>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
> >>>> <matthias.bgg@gmail.com> wrote:
> >>>>> This patch adds a generic power script configuration.
> >>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> >>>>> With the generic power script, TWL4030 will be reset
> >>>>> when a warm reset occures. This way the OMAP3530 does not
> >>>>> hang on reboot.
> >>>
> >>> Both look OK to me. I've added Peter to cc, it's best that he queues
> >>> all the twl changes.
> >>>
> >>
> >> Peter any comments on this patch?
> >
> > The patch looks good to me as well.
> 
> It looks like the patch wasn't added to the 3.9 series. Is there any
> reason for that, or was it just a misunderstanding between you two,
> about who will push it to Linus?

Sorry looks like this got missed. I suggest Peter collects the twl
patches and then provides me + mfd + asoc and whoever needs the
pull requests.

Regards,

Tony

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-02-19 10:37         ` Peter Ujfalusi
@ 2013-03-08 18:58           ` Matthias Brugger
  -1 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-03-08 18:58 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Kristo, Tero, Tony Lindgren, Robert Nelson, linux,
	martinez.javier, eballetbo, ezequiel.garcia, linux-omap,
	linux-arm-kernel

Hello Tony and Peter,

2013/2/19 Peter Ujfalusi <peter.ujfalusi@ti.com>:
> Hi Matthias,
>
> On 02/15/2013 04:59 PM, Matthias Brugger wrote:
>> 2013/2/1 Tony Lindgren <tony@atomide.com>:
>>> Hi,
>>>
>>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>>>> <matthias.bgg@gmail.com> wrote:
>>>>> This patch adds a generic power script configuration.
>>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>>>>> With the generic power script, TWL4030 will be reset
>>>>> when a warm reset occures. This way the OMAP3530 does not
>>>>> hang on reboot.
>>>
>>> Both look OK to me. I've added Peter to cc, it's best that he queues
>>> all the twl changes.
>>>
>>
>> Peter any comments on this patch?
>
> The patch looks good to me as well.

It looks like the patch wasn't added to the 3.9 series. Is there any
reason for that, or was it just a misunderstanding between you two,
about who will push it to Linus?

Cheers,
Matthias

>
>> Are you maintaining the whole twl4030 support or just the codec driver?
>
> Right now I'm maintaining the audio support (audio MFD, vibra, ASoC) in twl*
> While I have done some cleanup in the twl-core and related drivers recently
> and I'm reviewing patches sent for any *twl* driver (if I'm in the CC) I have
> not declared myself as Maintainer of the twl stack.
> The problem with the twl stack is that the drivers are spread around in
> different subsystem so if one takes maintainer responsibility for the stack,
> he/she need to have several entries in MAINTAINERS file to cover twl. I still
> don't think it is a good idea to 'bloat' the MAINTAINERS file for this.
> I'm happy to review patches. About a year ago we had internal discussion
> regarding to twl in upstream and Tero Kristo 'volunteered' to review patches
> as well.
>
> I still think that the twl patches should be queued via the corresponding
> subsystem (OMAP, MFD, Input, GPIO, PWM, etc).
>
> --
> Péter
>
>>
>> Best regards,
>> Matthias
>>
>>
>>> Regards,
>>>
>>> Tony
>>>
>>>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>>>> ---
>>>>>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>>>>>  arch/arm/mach-omap2/twl-common.h |  1 +
>>>>>  2 files changed, 39 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>>>>> index e49b40b..f096beb 100644
>>>>> --- a/arch/arm/mach-omap2/twl-common.c
>>>>> +++ b/arch/arm/mach-omap2/twl-common.c
>>>>> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>>>>>         .codec = &omap3_codec,
>>>>>  };
>>>>>
>>>>> +static struct twl4030_ins wrst_seq[] __initdata = {
>>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_script wrst_script __initdata = {
>>>>> +       .script = wrst_seq,
>>>>> +       .size   = ARRAY_SIZE(wrst_seq),
>>>>> +       .flags  = TWL4030_WRST_SCRIPT,
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>>>>> +       &wrst_script,
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_resconfig omap3_rconfig[] = {
>>>>> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { 0, 0},
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_power_data omap3_power_pdata = {
>>>>> +       .scripts        = omap3_power_scripts,
>>>>> +       .num            = ARRAY_SIZE(omap3_power_scripts),
>>>>> +       .resource_config = omap3_rconfig,
>>>>> +};
>>>>> +
>>>>>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>>>>>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>>>>>  };
>>>>> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>>>>>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>>>>>                 pmic_data->audio = &omap3_audio_pdata;
>>>>>
>>>>> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>>>>> +               pmic_data->power = &omap3_power_pdata;
>>>>> +
>>>>>         /* Common regulator configurations */
>>>>>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>>>>>                 pmic_data->vdac = &omap3_vdac_idata;
>>>>> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>>>>> index dcfbad5..dbeb905 100644
>>>>> --- a/arch/arm/mach-omap2/twl-common.h
>>>>> +++ b/arch/arm/mach-omap2/twl-common.h
>>>>> @@ -7,6 +7,7 @@
>>>>>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>>>>>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>>>>>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>>>>> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>>>>>
>>>>>  /* Common LDO regulators for TWL4030/TWL6030 */
>>>>>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>>>>> --
>>>>> 1.7.11.7
>>>>
>>>> Thanks for making this generic Matthias..
>>>>
>>>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>>>
>>>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>>>> with this patch to enable it on the Beagle..
>>>>
>>>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>>>> From: Robert Nelson <robertcnelson@gmail.com>
>>>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>>>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>>>
>>>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>>>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>>>
>>>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>>>> ---
>>>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>>>> b/arch/arm/mach-omap2/board-omap3beagle.c
>>>> index 22c483d..0974e08 100644
>>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>>>  {
>>>>       omap3_pmic_get_config(&beagle_twldata,
>>>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>>>> -                     TWL_COMMON_PDATA_AUDIO,
>>>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>>>
>>>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>>>> --
>>>> 1.7.10.4
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Robert Nelson
>>>> http://www.rcn-ee.com/
>>
>>
>>
>
>



-- 
---
motzblog.wordpress.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-03-08 18:58           ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-03-08 18:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Tony and Peter,

2013/2/19 Peter Ujfalusi <peter.ujfalusi@ti.com>:
> Hi Matthias,
>
> On 02/15/2013 04:59 PM, Matthias Brugger wrote:
>> 2013/2/1 Tony Lindgren <tony@atomide.com>:
>>> Hi,
>>>
>>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>>>> <matthias.bgg@gmail.com> wrote:
>>>>> This patch adds a generic power script configuration.
>>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>>>>> With the generic power script, TWL4030 will be reset
>>>>> when a warm reset occures. This way the OMAP3530 does not
>>>>> hang on reboot.
>>>
>>> Both look OK to me. I've added Peter to cc, it's best that he queues
>>> all the twl changes.
>>>
>>
>> Peter any comments on this patch?
>
> The patch looks good to me as well.

It looks like the patch wasn't added to the 3.9 series. Is there any
reason for that, or was it just a misunderstanding between you two,
about who will push it to Linus?

Cheers,
Matthias

>
>> Are you maintaining the whole twl4030 support or just the codec driver?
>
> Right now I'm maintaining the audio support (audio MFD, vibra, ASoC) in twl*
> While I have done some cleanup in the twl-core and related drivers recently
> and I'm reviewing patches sent for any *twl* driver (if I'm in the CC) I have
> not declared myself as Maintainer of the twl stack.
> The problem with the twl stack is that the drivers are spread around in
> different subsystem so if one takes maintainer responsibility for the stack,
> he/she need to have several entries in MAINTAINERS file to cover twl. I still
> don't think it is a good idea to 'bloat' the MAINTAINERS file for this.
> I'm happy to review patches. About a year ago we had internal discussion
> regarding to twl in upstream and Tero Kristo 'volunteered' to review patches
> as well.
>
> I still think that the twl patches should be queued via the corresponding
> subsystem (OMAP, MFD, Input, GPIO, PWM, etc).
>
> --
> P?ter
>
>>
>> Best regards,
>> Matthias
>>
>>
>>> Regards,
>>>
>>> Tony
>>>
>>>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>>>> ---
>>>>>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>>>>>  arch/arm/mach-omap2/twl-common.h |  1 +
>>>>>  2 files changed, 39 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>>>>> index e49b40b..f096beb 100644
>>>>> --- a/arch/arm/mach-omap2/twl-common.c
>>>>> +++ b/arch/arm/mach-omap2/twl-common.c
>>>>> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>>>>>         .codec = &omap3_codec,
>>>>>  };
>>>>>
>>>>> +static struct twl4030_ins wrst_seq[] __initdata = {
>>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_script wrst_script __initdata = {
>>>>> +       .script = wrst_seq,
>>>>> +       .size   = ARRAY_SIZE(wrst_seq),
>>>>> +       .flags  = TWL4030_WRST_SCRIPT,
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>>>>> +       &wrst_script,
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_resconfig omap3_rconfig[] = {
>>>>> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>>>>> +               .type2 = -1 },
>>>>> +       { 0, 0},
>>>>> +};
>>>>> +
>>>>> +static struct twl4030_power_data omap3_power_pdata = {
>>>>> +       .scripts        = omap3_power_scripts,
>>>>> +       .num            = ARRAY_SIZE(omap3_power_scripts),
>>>>> +       .resource_config = omap3_rconfig,
>>>>> +};
>>>>> +
>>>>>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>>>>>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>>>>>  };
>>>>> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>>>>>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>>>>>                 pmic_data->audio = &omap3_audio_pdata;
>>>>>
>>>>> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>>>>> +               pmic_data->power = &omap3_power_pdata;
>>>>> +
>>>>>         /* Common regulator configurations */
>>>>>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>>>>>                 pmic_data->vdac = &omap3_vdac_idata;
>>>>> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>>>>> index dcfbad5..dbeb905 100644
>>>>> --- a/arch/arm/mach-omap2/twl-common.h
>>>>> +++ b/arch/arm/mach-omap2/twl-common.h
>>>>> @@ -7,6 +7,7 @@
>>>>>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>>>>>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>>>>>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>>>>> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>>>>>
>>>>>  /* Common LDO regulators for TWL4030/TWL6030 */
>>>>>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>>>>> --
>>>>> 1.7.11.7
>>>>
>>>> Thanks for making this generic Matthias..
>>>>
>>>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>>>
>>>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>>>> with this patch to enable it on the Beagle..
>>>>
>>>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>>>> From: Robert Nelson <robertcnelson@gmail.com>
>>>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>>>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>>>
>>>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>>>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>>>
>>>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>>>> ---
>>>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>>>> b/arch/arm/mach-omap2/board-omap3beagle.c
>>>> index 22c483d..0974e08 100644
>>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>>>  {
>>>>       omap3_pmic_get_config(&beagle_twldata,
>>>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>>>> -                     TWL_COMMON_PDATA_AUDIO,
>>>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>>>
>>>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>>>> --
>>>> 1.7.10.4
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Robert Nelson
>>>> http://www.rcn-ee.com/
>>
>>
>>
>
>



-- 
---
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-02-15 15:59       ` Matthias Brugger
@ 2013-02-19 10:37         ` Peter Ujfalusi
  -1 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2013-02-19 10:37 UTC (permalink / raw)
  To: Matthias Brugger, Kristo, Tero
  Cc: Tony Lindgren, Robert Nelson, linux, martinez.javier, eballetbo,
	ezequiel.garcia, linux-omap, linux-arm-kernel

Hi Matthias,

On 02/15/2013 04:59 PM, Matthias Brugger wrote:
> 2013/2/1 Tony Lindgren <tony@atomide.com>:
>> Hi,
>>
>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>>> <matthias.bgg@gmail.com> wrote:
>>>> This patch adds a generic power script configuration.
>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>>>> With the generic power script, TWL4030 will be reset
>>>> when a warm reset occures. This way the OMAP3530 does not
>>>> hang on reboot.
>>
>> Both look OK to me. I've added Peter to cc, it's best that he queues
>> all the twl changes.
>>
> 
> Peter any comments on this patch?

The patch looks good to me as well.

> Are you maintaining the whole twl4030 support or just the codec driver?

Right now I'm maintaining the audio support (audio MFD, vibra, ASoC) in twl*
While I have done some cleanup in the twl-core and related drivers recently
and I'm reviewing patches sent for any *twl* driver (if I'm in the CC) I have
not declared myself as Maintainer of the twl stack.
The problem with the twl stack is that the drivers are spread around in
different subsystem so if one takes maintainer responsibility for the stack,
he/she need to have several entries in MAINTAINERS file to cover twl. I still
don't think it is a good idea to 'bloat' the MAINTAINERS file for this.
I'm happy to review patches. About a year ago we had internal discussion
regarding to twl in upstream and Tero Kristo 'volunteered' to review patches
as well.

I still think that the twl patches should be queued via the corresponding
subsystem (OMAP, MFD, Input, GPIO, PWM, etc).

-- 
Péter

> 
> Best regards,
> Matthias
> 
> 
>> Regards,
>>
>> Tony
>>
>>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>>> ---
>>>>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>>>>  arch/arm/mach-omap2/twl-common.h |  1 +
>>>>  2 files changed, 39 insertions(+)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>>>> index e49b40b..f096beb 100644
>>>> --- a/arch/arm/mach-omap2/twl-common.c
>>>> +++ b/arch/arm/mach-omap2/twl-common.c
>>>> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>>>>         .codec = &omap3_codec,
>>>>  };
>>>>
>>>> +static struct twl4030_ins wrst_seq[] __initdata = {
>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>>>> +};
>>>> +
>>>> +static struct twl4030_script wrst_script __initdata = {
>>>> +       .script = wrst_seq,
>>>> +       .size   = ARRAY_SIZE(wrst_seq),
>>>> +       .flags  = TWL4030_WRST_SCRIPT,
>>>> +};
>>>> +
>>>> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>>>> +       &wrst_script,
>>>> +};
>>>> +
>>>> +static struct twl4030_resconfig omap3_rconfig[] = {
>>>> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { 0, 0},
>>>> +};
>>>> +
>>>> +static struct twl4030_power_data omap3_power_pdata = {
>>>> +       .scripts        = omap3_power_scripts,
>>>> +       .num            = ARRAY_SIZE(omap3_power_scripts),
>>>> +       .resource_config = omap3_rconfig,
>>>> +};
>>>> +
>>>>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>>>>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>>>>  };
>>>> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>>>>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>>>>                 pmic_data->audio = &omap3_audio_pdata;
>>>>
>>>> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>>>> +               pmic_data->power = &omap3_power_pdata;
>>>> +
>>>>         /* Common regulator configurations */
>>>>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>>>>                 pmic_data->vdac = &omap3_vdac_idata;
>>>> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>>>> index dcfbad5..dbeb905 100644
>>>> --- a/arch/arm/mach-omap2/twl-common.h
>>>> +++ b/arch/arm/mach-omap2/twl-common.h
>>>> @@ -7,6 +7,7 @@
>>>>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>>>>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>>>>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>>>> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>>>>
>>>>  /* Common LDO regulators for TWL4030/TWL6030 */
>>>>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>>>> --
>>>> 1.7.11.7
>>>
>>> Thanks for making this generic Matthias..
>>>
>>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>>
>>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>>> with this patch to enable it on the Beagle..
>>>
>>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>>> From: Robert Nelson <robertcnelson@gmail.com>
>>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>>
>>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>>
>>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>>> ---
>>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>>> b/arch/arm/mach-omap2/board-omap3beagle.c
>>> index 22c483d..0974e08 100644
>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>>  {
>>>       omap3_pmic_get_config(&beagle_twldata,
>>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>>> -                     TWL_COMMON_PDATA_AUDIO,
>>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>>
>>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>>> --
>>> 1.7.10.4
>>>
>>> Regards,
>>>
>>> --
>>> Robert Nelson
>>> http://www.rcn-ee.com/
> 
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-02-19 10:37         ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2013-02-19 10:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Matthias,

On 02/15/2013 04:59 PM, Matthias Brugger wrote:
> 2013/2/1 Tony Lindgren <tony@atomide.com>:
>> Hi,
>>
>> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>>> <matthias.bgg@gmail.com> wrote:
>>>> This patch adds a generic power script configuration.
>>>> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>>>> With the generic power script, TWL4030 will be reset
>>>> when a warm reset occures. This way the OMAP3530 does not
>>>> hang on reboot.
>>
>> Both look OK to me. I've added Peter to cc, it's best that he queues
>> all the twl changes.
>>
> 
> Peter any comments on this patch?

The patch looks good to me as well.

> Are you maintaining the whole twl4030 support or just the codec driver?

Right now I'm maintaining the audio support (audio MFD, vibra, ASoC) in twl*
While I have done some cleanup in the twl-core and related drivers recently
and I'm reviewing patches sent for any *twl* driver (if I'm in the CC) I have
not declared myself as Maintainer of the twl stack.
The problem with the twl stack is that the drivers are spread around in
different subsystem so if one takes maintainer responsibility for the stack,
he/she need to have several entries in MAINTAINERS file to cover twl. I still
don't think it is a good idea to 'bloat' the MAINTAINERS file for this.
I'm happy to review patches. About a year ago we had internal discussion
regarding to twl in upstream and Tero Kristo 'volunteered' to review patches
as well.

I still think that the twl patches should be queued via the corresponding
subsystem (OMAP, MFD, Input, GPIO, PWM, etc).

-- 
P?ter

> 
> Best regards,
> Matthias
> 
> 
>> Regards,
>>
>> Tony
>>
>>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>>> ---
>>>>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>>>>  arch/arm/mach-omap2/twl-common.h |  1 +
>>>>  2 files changed, 39 insertions(+)
>>>>
>>>> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>>>> index e49b40b..f096beb 100644
>>>> --- a/arch/arm/mach-omap2/twl-common.c
>>>> +++ b/arch/arm/mach-omap2/twl-common.c
>>>> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>>>>         .codec = &omap3_codec,
>>>>  };
>>>>
>>>> +static struct twl4030_ins wrst_seq[] __initdata = {
>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>>>> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>>>> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>>>> +};
>>>> +
>>>> +static struct twl4030_script wrst_script __initdata = {
>>>> +       .script = wrst_seq,
>>>> +       .size   = ARRAY_SIZE(wrst_seq),
>>>> +       .flags  = TWL4030_WRST_SCRIPT,
>>>> +};
>>>> +
>>>> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>>>> +       &wrst_script,
>>>> +};
>>>> +
>>>> +static struct twl4030_resconfig omap3_rconfig[] = {
>>>> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>>>> +               .type2 = -1 },
>>>> +       { 0, 0},
>>>> +};
>>>> +
>>>> +static struct twl4030_power_data omap3_power_pdata = {
>>>> +       .scripts        = omap3_power_scripts,
>>>> +       .num            = ARRAY_SIZE(omap3_power_scripts),
>>>> +       .resource_config = omap3_rconfig,
>>>> +};
>>>> +
>>>>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>>>>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>>>>  };
>>>> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>>>>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>>>>                 pmic_data->audio = &omap3_audio_pdata;
>>>>
>>>> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>>>> +               pmic_data->power = &omap3_power_pdata;
>>>> +
>>>>         /* Common regulator configurations */
>>>>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>>>>                 pmic_data->vdac = &omap3_vdac_idata;
>>>> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>>>> index dcfbad5..dbeb905 100644
>>>> --- a/arch/arm/mach-omap2/twl-common.h
>>>> +++ b/arch/arm/mach-omap2/twl-common.h
>>>> @@ -7,6 +7,7 @@
>>>>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>>>>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>>>>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>>>> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>>>>
>>>>  /* Common LDO regulators for TWL4030/TWL6030 */
>>>>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>>>> --
>>>> 1.7.11.7
>>>
>>> Thanks for making this generic Matthias..
>>>
>>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>>
>>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>>> with this patch to enable it on the Beagle..
>>>
>>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>>> From: Robert Nelson <robertcnelson@gmail.com>
>>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>>
>>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>>
>>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>>> ---
>>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>>> b/arch/arm/mach-omap2/board-omap3beagle.c
>>> index 22c483d..0974e08 100644
>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>>  {
>>>       omap3_pmic_get_config(&beagle_twldata,
>>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>>> -                     TWL_COMMON_PDATA_AUDIO,
>>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>>
>>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>>> --
>>> 1.7.10.4
>>>
>>> Regards,
>>>
>>> --
>>> Robert Nelson
>>> http://www.rcn-ee.com/
> 
> 
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-02-01 22:42     ` Tony Lindgren
@ 2013-02-15 15:59       ` Matthias Brugger
  -1 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-02-15 15:59 UTC (permalink / raw)
  To: Tony Lindgren, Peter Ujfalusi
  Cc: Robert Nelson, linux, martinez.javier, eballetbo,
	ezequiel.garcia, linux-omap, linux-arm-kernel

2013/2/1 Tony Lindgren <tony@atomide.com>:
> Hi,
>
> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>> <matthias.bgg@gmail.com> wrote:
>> > This patch adds a generic power script configuration.
>> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>> > With the generic power script, TWL4030 will be reset
>> > when a warm reset occures. This way the OMAP3530 does not
>> > hang on reboot.
>
> Both look OK to me. I've added Peter to cc, it's best that he queues
> all the twl changes.
>

Peter any comments on this patch?
Are you maintaining the whole twl4030 support or just the codec driver?

Best regards,
Matthias


> Regards,
>
> Tony
>
>> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>> > ---
>> >  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>> >  arch/arm/mach-omap2/twl-common.h |  1 +
>> >  2 files changed, 39 insertions(+)
>> >
>> > diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>> > index e49b40b..f096beb 100644
>> > --- a/arch/arm/mach-omap2/twl-common.c
>> > +++ b/arch/arm/mach-omap2/twl-common.c
>> > @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>> >         .codec = &omap3_codec,
>> >  };
>> >
>> > +static struct twl4030_ins wrst_seq[] __initdata = {
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>> > +};
>> > +
>> > +static struct twl4030_script wrst_script __initdata = {
>> > +       .script = wrst_seq,
>> > +       .size   = ARRAY_SIZE(wrst_seq),
>> > +       .flags  = TWL4030_WRST_SCRIPT,
>> > +};
>> > +
>> > +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>> > +       &wrst_script,
>> > +};
>> > +
>> > +static struct twl4030_resconfig omap3_rconfig[] = {
>> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { 0, 0},
>> > +};
>> > +
>> > +static struct twl4030_power_data omap3_power_pdata = {
>> > +       .scripts        = omap3_power_scripts,
>> > +       .num            = ARRAY_SIZE(omap3_power_scripts),
>> > +       .resource_config = omap3_rconfig,
>> > +};
>> > +
>> >  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>> >         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>> >  };
>> > @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>> >         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>> >                 pmic_data->audio = &omap3_audio_pdata;
>> >
>> > +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>> > +               pmic_data->power = &omap3_power_pdata;
>> > +
>> >         /* Common regulator configurations */
>> >         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>> >                 pmic_data->vdac = &omap3_vdac_idata;
>> > diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>> > index dcfbad5..dbeb905 100644
>> > --- a/arch/arm/mach-omap2/twl-common.h
>> > +++ b/arch/arm/mach-omap2/twl-common.h
>> > @@ -7,6 +7,7 @@
>> >  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>> >  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>> >  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>> > +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>> >
>> >  /* Common LDO regulators for TWL4030/TWL6030 */
>> >  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>> > --
>> > 1.7.11.7
>>
>> Thanks for making this generic Matthias..
>>
>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>
>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>> with this patch to enable it on the Beagle..
>>
>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>> From: Robert Nelson <robertcnelson@gmail.com>
>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>
>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>
>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>> ---
>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>> b/arch/arm/mach-omap2/board-omap3beagle.c
>> index 22c483d..0974e08 100644
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>  {
>>       omap3_pmic_get_config(&beagle_twldata,
>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>> -                     TWL_COMMON_PDATA_AUDIO,
>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>
>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>> --
>> 1.7.10.4
>>
>> Regards,
>>
>> --
>> Robert Nelson
>> http://www.rcn-ee.com/



-- 
---
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-02-15 15:59       ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-02-15 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

2013/2/1 Tony Lindgren <tony@atomide.com>:
> Hi,
>
> * Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
>> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
>> <matthias.bgg@gmail.com> wrote:
>> > This patch adds a generic power script configuration.
>> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
>> > With the generic power script, TWL4030 will be reset
>> > when a warm reset occures. This way the OMAP3530 does not
>> > hang on reboot.
>
> Both look OK to me. I've added Peter to cc, it's best that he queues
> all the twl changes.
>

Peter any comments on this patch?
Are you maintaining the whole twl4030 support or just the codec driver?

Best regards,
Matthias


> Regards,
>
> Tony
>
>> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>> > ---
>> >  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>> >  arch/arm/mach-omap2/twl-common.h |  1 +
>> >  2 files changed, 39 insertions(+)
>> >
>> > diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
>> > index e49b40b..f096beb 100644
>> > --- a/arch/arm/mach-omap2/twl-common.c
>> > +++ b/arch/arm/mach-omap2/twl-common.c
>> > @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>> >         .codec = &omap3_codec,
>> >  };
>> >
>> > +static struct twl4030_ins wrst_seq[] __initdata = {
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
>> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
>> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
>> > +};
>> > +
>> > +static struct twl4030_script wrst_script __initdata = {
>> > +       .script = wrst_seq,
>> > +       .size   = ARRAY_SIZE(wrst_seq),
>> > +       .flags  = TWL4030_WRST_SCRIPT,
>> > +};
>> > +
>> > +static struct twl4030_script *omap3_power_scripts[] __initdata = {
>> > +       &wrst_script,
>> > +};
>> > +
>> > +static struct twl4030_resconfig omap3_rconfig[] = {
>> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
>> > +               .type2 = -1 },
>> > +       { 0, 0},
>> > +};
>> > +
>> > +static struct twl4030_power_data omap3_power_pdata = {
>> > +       .scripts        = omap3_power_scripts,
>> > +       .num            = ARRAY_SIZE(omap3_power_scripts),
>> > +       .resource_config = omap3_rconfig,
>> > +};
>> > +
>> >  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>> >         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>> >  };
>> > @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>> >         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>> >                 pmic_data->audio = &omap3_audio_pdata;
>> >
>> > +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
>> > +               pmic_data->power = &omap3_power_pdata;
>> > +
>> >         /* Common regulator configurations */
>> >         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>> >                 pmic_data->vdac = &omap3_vdac_idata;
>> > diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
>> > index dcfbad5..dbeb905 100644
>> > --- a/arch/arm/mach-omap2/twl-common.h
>> > +++ b/arch/arm/mach-omap2/twl-common.h
>> > @@ -7,6 +7,7 @@
>> >  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>> >  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>> >  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
>> > +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>> >
>> >  /* Common LDO regulators for TWL4030/TWL6030 */
>> >  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
>> > --
>> > 1.7.11.7
>>
>> Thanks for making this generic Matthias..
>>
>> Tested-by: Robert Nelson <robertcnelson@gmail.com>
>>
>> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
>> with this patch to enable it on the Beagle..
>>
>> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
>> From: Robert Nelson <robertcnelson@gmail.com>
>> Date: Thu, 24 Jan 2013 09:43:51 -0600
>> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
>>
>> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
>> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
>>
>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>> ---
>>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>> b/arch/arm/mach-omap2/board-omap3beagle.c
>> index 22c483d..0974e08 100644
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>>  {
>>       omap3_pmic_get_config(&beagle_twldata,
>>                       TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
>> -                     TWL_COMMON_PDATA_AUDIO,
>> +                     TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>>                       TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
>>
>>       beagle_twldata.vpll2->constraints.name = "VDVI";
>> --
>> 1.7.10.4
>>
>> Regards,
>>
>> --
>> Robert Nelson
>> http://www.rcn-ee.com/



-- 
---
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-01-24 15:54   ` Robert Nelson
@ 2013-02-01 22:42     ` Tony Lindgren
  -1 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2013-02-01 22:42 UTC (permalink / raw)
  To: Robert Nelson
  Cc: Matthias Brugger, linux, martinez.javier, eballetbo,
	ezequiel.garcia, linux-omap, linux-arm-kernel, Peter Ujfalusi

Hi,

* Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
> <matthias.bgg@gmail.com> wrote:
> > This patch adds a generic power script configuration.
> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> > With the generic power script, TWL4030 will be reset
> > when a warm reset occures. This way the OMAP3530 does not
> > hang on reboot.

Both look OK to me. I've added Peter to cc, it's best that he queues
all the twl changes.

Regards,

Tony

> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> > ---
> >  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
> >  arch/arm/mach-omap2/twl-common.h |  1 +
> >  2 files changed, 39 insertions(+)
> >
> > diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
> > index e49b40b..f096beb 100644
> > --- a/arch/arm/mach-omap2/twl-common.c
> > +++ b/arch/arm/mach-omap2/twl-common.c
> > @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
> >         .codec = &omap3_codec,
> >  };
> >
> > +static struct twl4030_ins wrst_seq[] __initdata = {
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> > +};
> > +
> > +static struct twl4030_script wrst_script __initdata = {
> > +       .script = wrst_seq,
> > +       .size   = ARRAY_SIZE(wrst_seq),
> > +       .flags  = TWL4030_WRST_SCRIPT,
> > +};
> > +
> > +static struct twl4030_script *omap3_power_scripts[] __initdata = {
> > +       &wrst_script,
> > +};
> > +
> > +static struct twl4030_resconfig omap3_rconfig[] = {
> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { 0, 0},
> > +};
> > +
> > +static struct twl4030_power_data omap3_power_pdata = {
> > +       .scripts        = omap3_power_scripts,
> > +       .num            = ARRAY_SIZE(omap3_power_scripts),
> > +       .resource_config = omap3_rconfig,
> > +};
> > +
> >  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
> >         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
> >  };
> > @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
> >         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
> >                 pmic_data->audio = &omap3_audio_pdata;
> >
> > +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
> > +               pmic_data->power = &omap3_power_pdata;
> > +
> >         /* Common regulator configurations */
> >         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
> >                 pmic_data->vdac = &omap3_vdac_idata;
> > diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
> > index dcfbad5..dbeb905 100644
> > --- a/arch/arm/mach-omap2/twl-common.h
> > +++ b/arch/arm/mach-omap2/twl-common.h
> > @@ -7,6 +7,7 @@
> >  #define TWL_COMMON_PDATA_BCI           (1 << 1)
> >  #define TWL_COMMON_PDATA_MADC          (1 << 2)
> >  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
> > +#define TWL_COMMON_PDATA_POWER         (1 << 4)
> >
> >  /* Common LDO regulators for TWL4030/TWL6030 */
> >  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
> > --
> > 1.7.11.7
> 
> Thanks for making this generic Matthias..
> 
> Tested-by: Robert Nelson <robertcnelson@gmail.com>
> 
> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
> with this patch to enable it on the Beagle..
> 
> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
> From: Robert Nelson <robertcnelson@gmail.com>
> Date: Thu, 24 Jan 2013 09:43:51 -0600
> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
> 
> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index 22c483d..0974e08 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>  {
>  	omap3_pmic_get_config(&beagle_twldata,
>  			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
> -			TWL_COMMON_PDATA_AUDIO,
> +			TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>  			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
> 
>  	beagle_twldata.vpll2->constraints.name = "VDVI";
> -- 
> 1.7.10.4
> 
> Regards,
> 
> -- 
> Robert Nelson
> http://www.rcn-ee.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-02-01 22:42     ` Tony Lindgren
  0 siblings, 0 replies; 22+ messages in thread
From: Tony Lindgren @ 2013-02-01 22:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

* Robert Nelson <robertcnelson@gmail.com> [130124 07:58]:
> On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
> <matthias.bgg@gmail.com> wrote:
> > This patch adds a generic power script configuration.
> > When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> > With the generic power script, TWL4030 will be reset
> > when a warm reset occures. This way the OMAP3530 does not
> > hang on reboot.

Both look OK to me. I've added Peter to cc, it's best that he queues
all the twl changes.

Regards,

Tony

> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> > ---
> >  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
> >  arch/arm/mach-omap2/twl-common.h |  1 +
> >  2 files changed, 39 insertions(+)
> >
> > diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
> > index e49b40b..f096beb 100644
> > --- a/arch/arm/mach-omap2/twl-common.c
> > +++ b/arch/arm/mach-omap2/twl-common.c
> > @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
> >         .codec = &omap3_codec,
> >  };
> >
> > +static struct twl4030_ins wrst_seq[] __initdata = {
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> > +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> > +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> > +};
> > +
> > +static struct twl4030_script wrst_script __initdata = {
> > +       .script = wrst_seq,
> > +       .size   = ARRAY_SIZE(wrst_seq),
> > +       .flags  = TWL4030_WRST_SCRIPT,
> > +};
> > +
> > +static struct twl4030_script *omap3_power_scripts[] __initdata = {
> > +       &wrst_script,
> > +};
> > +
> > +static struct twl4030_resconfig omap3_rconfig[] = {
> > +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> > +               .type2 = -1 },
> > +       { 0, 0},
> > +};
> > +
> > +static struct twl4030_power_data omap3_power_pdata = {
> > +       .scripts        = omap3_power_scripts,
> > +       .num            = ARRAY_SIZE(omap3_power_scripts),
> > +       .resource_config = omap3_rconfig,
> > +};
> > +
> >  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
> >         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
> >  };
> > @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
> >         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
> >                 pmic_data->audio = &omap3_audio_pdata;
> >
> > +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
> > +               pmic_data->power = &omap3_power_pdata;
> > +
> >         /* Common regulator configurations */
> >         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
> >                 pmic_data->vdac = &omap3_vdac_idata;
> > diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
> > index dcfbad5..dbeb905 100644
> > --- a/arch/arm/mach-omap2/twl-common.h
> > +++ b/arch/arm/mach-omap2/twl-common.h
> > @@ -7,6 +7,7 @@
> >  #define TWL_COMMON_PDATA_BCI           (1 << 1)
> >  #define TWL_COMMON_PDATA_MADC          (1 << 2)
> >  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
> > +#define TWL_COMMON_PDATA_POWER         (1 << 4)
> >
> >  /* Common LDO regulators for TWL4030/TWL6030 */
> >  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
> > --
> > 1.7.11.7
> 
> Thanks for making this generic Matthias..
> 
> Tested-by: Robert Nelson <robertcnelson@gmail.com>
> 
> Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
> with this patch to enable it on the Beagle..
> 
> From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
> From: Robert Nelson <robertcnelson@gmail.com>
> Date: Thu, 24 Jan 2013 09:43:51 -0600
> Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script
> 
> Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
> Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index 22c483d..0974e08 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
>  {
>  	omap3_pmic_get_config(&beagle_twldata,
>  			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
> -			TWL_COMMON_PDATA_AUDIO,
> +			TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
>  			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
> 
>  	beagle_twldata.vpll2->constraints.name = "VDVI";
> -- 
> 1.7.10.4
> 
> Regards,
> 
> -- 
> Robert Nelson
> http://www.rcn-ee.com/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] omap2: twl-common: Add default power configuration
  2013-01-23 18:50 ` Matthias Brugger
@ 2013-01-24 15:54   ` Robert Nelson
  -1 siblings, 0 replies; 22+ messages in thread
From: Robert Nelson @ 2013-01-24 15:54 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: tony, linux, martinez.javier, eballetbo, ezequiel.garcia,
	linux-omap, linux-arm-kernel

On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
<matthias.bgg@gmail.com> wrote:
> This patch adds a generic power script configuration.
> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> With the generic power script, TWL4030 will be reset
> when a warm reset occures. This way the OMAP3530 does not
> hang on reboot.
>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/twl-common.h |  1 +
>  2 files changed, 39 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
> index e49b40b..f096beb 100644
> --- a/arch/arm/mach-omap2/twl-common.c
> +++ b/arch/arm/mach-omap2/twl-common.c
> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>         .codec = &omap3_codec,
>  };
>
> +static struct twl4030_ins wrst_seq[] __initdata = {
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> +};
> +
> +static struct twl4030_script wrst_script __initdata = {
> +       .script = wrst_seq,
> +       .size   = ARRAY_SIZE(wrst_seq),
> +       .flags  = TWL4030_WRST_SCRIPT,
> +};
> +
> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
> +       &wrst_script,
> +};
> +
> +static struct twl4030_resconfig omap3_rconfig[] = {
> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { 0, 0},
> +};
> +
> +static struct twl4030_power_data omap3_power_pdata = {
> +       .scripts        = omap3_power_scripts,
> +       .num            = ARRAY_SIZE(omap3_power_scripts),
> +       .resource_config = omap3_rconfig,
> +};
> +
>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>  };
> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>                 pmic_data->audio = &omap3_audio_pdata;
>
> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
> +               pmic_data->power = &omap3_power_pdata;
> +
>         /* Common regulator configurations */
>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>                 pmic_data->vdac = &omap3_vdac_idata;
> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
> index dcfbad5..dbeb905 100644
> --- a/arch/arm/mach-omap2/twl-common.h
> +++ b/arch/arm/mach-omap2/twl-common.h
> @@ -7,6 +7,7 @@
>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>
>  /* Common LDO regulators for TWL4030/TWL6030 */
>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
> --
> 1.7.11.7

Thanks for making this generic Matthias..

Tested-by: Robert Nelson <robertcnelson@gmail.com>

Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
with this patch to enable it on the Beagle..

>From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Thu, 24 Jan 2013 09:43:51 -0600
Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script

Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d..0974e08 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
 {
 	omap3_pmic_get_config(&beagle_twldata,
 			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
-			TWL_COMMON_PDATA_AUDIO,
+			TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
 			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);

 	beagle_twldata.vpll2->constraints.name = "VDVI";
-- 
1.7.10.4

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-01-24 15:54   ` Robert Nelson
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Nelson @ 2013-01-24 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 12:50 PM, Matthias Brugger
<matthias.bgg@gmail.com> wrote:
> This patch adds a generic power script configuration.
> When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
> With the generic power script, TWL4030 will be reset
> when a warm reset occures. This way the OMAP3530 does not
> hang on reboot.
>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/twl-common.h |  1 +
>  2 files changed, 39 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
> index e49b40b..f096beb 100644
> --- a/arch/arm/mach-omap2/twl-common.c
> +++ b/arch/arm/mach-omap2/twl-common.c
> @@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
>         .codec = &omap3_codec,
>  };
>
> +static struct twl4030_ins wrst_seq[] __initdata = {
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
> +       {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
> +       {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
> +};
> +
> +static struct twl4030_script wrst_script __initdata = {
> +       .script = wrst_seq,
> +       .size   = ARRAY_SIZE(wrst_seq),
> +       .flags  = TWL4030_WRST_SCRIPT,
> +};
> +
> +static struct twl4030_script *omap3_power_scripts[] __initdata = {
> +       &wrst_script,
> +};
> +
> +static struct twl4030_resconfig omap3_rconfig[] = {
> +       { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
> +               .type2 = -1 },
> +       { 0, 0},
> +};
> +
> +static struct twl4030_power_data omap3_power_pdata = {
> +       .scripts        = omap3_power_scripts,
> +       .num            = ARRAY_SIZE(omap3_power_scripts),
> +       .resource_config = omap3_rconfig,
> +};
> +
>  static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
>         REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
>  };
> @@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
>         if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
>                 pmic_data->audio = &omap3_audio_pdata;
>
> +       if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
> +               pmic_data->power = &omap3_power_pdata;
> +
>         /* Common regulator configurations */
>         if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
>                 pmic_data->vdac = &omap3_vdac_idata;
> diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
> index dcfbad5..dbeb905 100644
> --- a/arch/arm/mach-omap2/twl-common.h
> +++ b/arch/arm/mach-omap2/twl-common.h
> @@ -7,6 +7,7 @@
>  #define TWL_COMMON_PDATA_BCI           (1 << 1)
>  #define TWL_COMMON_PDATA_MADC          (1 << 2)
>  #define TWL_COMMON_PDATA_AUDIO         (1 << 3)
> +#define TWL_COMMON_PDATA_POWER         (1 << 4)
>
>  /* Common LDO regulators for TWL4030/TWL6030 */
>  #define TWL_COMMON_REGULATOR_VDAC      (1 << 0)
> --
> 1.7.11.7

Thanks for making this generic Matthias..

Tested-by: Robert Nelson <robertcnelson@gmail.com>

Tested on Beagle C4 (omap3530) and Beagle xM (DM3730, no regressions)
with this patch to enable it on the Beagle..

>From 65004dafc8d37c69dd839803dc8ea5dcefd993df Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Thu, 24 Jan 2013 09:43:51 -0600
Subject: [PATCH] ARM: OMAP: Beagle: use TWL4030 generic reset script

Enable TWL_COMMON_PDATA_POWER such that OMAP3530 revisions of the
Beagle (Bx/Cx) will not hang on reboot when running at 125 Mhz.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d..0974e08 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -353,7 +353,7 @@ static int __init omap3_beagle_i2c_init(void)
 {
 	omap3_pmic_get_config(&beagle_twldata,
 			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
-			TWL_COMMON_PDATA_AUDIO,
+			TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_POWER,
 			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);

 	beagle_twldata.vpll2->constraints.name = "VDVI";
-- 
1.7.10.4

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-01-23 18:50 ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-01-23 18:50 UTC (permalink / raw)
  To: tony, linux, martinez.javier, eballetbo, ezequiel.garcia,
	robertcnelson, linux-omap, linux-arm-kernel
  Cc: Matthias Brugger

This patch adds a generic power script configuration.
When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
With the generic power script, TWL4030 will be reset
when a warm reset occures. This way the OMAP3530 does not
hang on reboot.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/twl-common.h |  1 +
 2 files changed, 39 insertions(+)

diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index e49b40b..f096beb 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
 	.codec = &omap3_codec,
 };
 
+static struct twl4030_ins wrst_seq[] __initdata = {
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+	{MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wrst_script __initdata = {
+	.script = wrst_seq,
+	.size	= ARRAY_SIZE(wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
+};
+
+static struct twl4030_script *omap3_power_scripts[] __initdata = {
+	&wrst_script,
+};
+
+static struct twl4030_resconfig omap3_rconfig[] = {
+	{ .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ 0, 0},
+};
+
+static struct twl4030_power_data omap3_power_pdata = {
+	.scripts	= omap3_power_scripts,
+	.num		= ARRAY_SIZE(omap3_power_scripts),
+	.resource_config = omap3_rconfig,
+};
+
 static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
 	REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
 };
@@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
 	if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
 		pmic_data->audio = &omap3_audio_pdata;
 
+	if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
+		pmic_data->power = &omap3_power_pdata;
+
 	/* Common regulator configurations */
 	if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
 		pmic_data->vdac = &omap3_vdac_idata;
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index dcfbad5..dbeb905 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -7,6 +7,7 @@
 #define TWL_COMMON_PDATA_BCI		(1 << 1)
 #define TWL_COMMON_PDATA_MADC		(1 << 2)
 #define TWL_COMMON_PDATA_AUDIO		(1 << 3)
+#define TWL_COMMON_PDATA_POWER		(1 << 4)
 
 /* Common LDO regulators for TWL4030/TWL6030 */
 #define TWL_COMMON_REGULATOR_VDAC	(1 << 0)
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH] omap2: twl-common: Add default power configuration
@ 2013-01-23 18:50 ` Matthias Brugger
  0 siblings, 0 replies; 22+ messages in thread
From: Matthias Brugger @ 2013-01-23 18:50 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a generic power script configuration.
When rebooting an OMAP3530 at 125 MHz, the reboot hangs.
With the generic power script, TWL4030 will be reset
when a warm reset occures. This way the OMAP3530 does not
hang on reboot.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 arch/arm/mach-omap2/twl-common.c | 38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/twl-common.h |  1 +
 2 files changed, 39 insertions(+)

diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index e49b40b..f096beb 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -120,6 +120,41 @@ static struct twl4030_audio_data omap3_audio_pdata = {
 	.codec = &omap3_codec,
 };
 
+static struct twl4030_ins wrst_seq[] __initdata = {
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
+	{MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
+	{MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
+	{MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
+};
+
+static struct twl4030_script wrst_script __initdata = {
+	.script = wrst_seq,
+	.size	= ARRAY_SIZE(wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
+};
+
+static struct twl4030_script *omap3_power_scripts[] __initdata = {
+	&wrst_script,
+};
+
+static struct twl4030_resconfig omap3_rconfig[] = {
+	{ .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
+		.type2 = -1 },
+	{ 0, 0},
+};
+
+static struct twl4030_power_data omap3_power_pdata = {
+	.scripts	= omap3_power_scripts,
+	.num		= ARRAY_SIZE(omap3_power_scripts),
+	.resource_config = omap3_rconfig,
+};
+
 static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
 	REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
 };
@@ -224,6 +259,9 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
 	if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
 		pmic_data->audio = &omap3_audio_pdata;
 
+	if (pdata_flags & TWL_COMMON_PDATA_POWER && !pmic_data->power)
+		pmic_data->power = &omap3_power_pdata;
+
 	/* Common regulator configurations */
 	if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
 		pmic_data->vdac = &omap3_vdac_idata;
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index dcfbad5..dbeb905 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -7,6 +7,7 @@
 #define TWL_COMMON_PDATA_BCI		(1 << 1)
 #define TWL_COMMON_PDATA_MADC		(1 << 2)
 #define TWL_COMMON_PDATA_AUDIO		(1 << 3)
+#define TWL_COMMON_PDATA_POWER		(1 << 4)
 
 /* Common LDO regulators for TWL4030/TWL6030 */
 #define TWL_COMMON_REGULATOR_VDAC	(1 << 0)
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-03-15  9:11 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 16:06 [PATCH] mach-omap2/board-igep0020.c: Fix reboot problem Matthias Brugger
2012-11-15 16:42 ` Robert Nelson
2012-12-14 17:19   ` Tony Lindgren
2012-12-18 21:32     ` Matthias Brugger
2013-01-23 18:21       ` [PATCH] omap2: twl-common: Add default power configuration Matthias Brugger
2013-01-23 18:21         ` Matthias Brugger
2013-01-23 18:50 Matthias Brugger
2013-01-23 18:50 ` Matthias Brugger
2013-01-24 15:54 ` Robert Nelson
2013-01-24 15:54   ` Robert Nelson
2013-02-01 22:42   ` Tony Lindgren
2013-02-01 22:42     ` Tony Lindgren
2013-02-15 15:59     ` Matthias Brugger
2013-02-15 15:59       ` Matthias Brugger
2013-02-19 10:37       ` Peter Ujfalusi
2013-02-19 10:37         ` Peter Ujfalusi
2013-03-08 18:58         ` Matthias Brugger
2013-03-08 18:58           ` Matthias Brugger
2013-03-12 16:57           ` Tony Lindgren
2013-03-12 16:57             ` Tony Lindgren
2013-03-15  9:11             ` Peter Ujfalusi
2013-03-15  9:11               ` Peter Ujfalusi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.