public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] RX-51: add full regulator definitions
@ 2011-05-02  6:28 Kalle Jokiniemi
  2011-05-02  6:28 ` [PATCH v2 1/1] OMAP3: rx-51: Add " Kalle Jokiniemi
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Jokiniemi @ 2011-05-02  6:28 UTC (permalink / raw)
  To: tony; +Cc: broonie, jhnikula, linux-omap, Kalle Jokiniemi

Adding regulator definitions to correctly shut down unneeded
regulators. Needed, but previously undefined regulators were
marked "always_on".

Tested on top of MeeGo N900 DE daily release (.37 kernel) and
with linux-omap. Patch based on linux-omap HEAD.

v2: updated as per comments from Jarkko Nikula and Mark Brown.

Kalle Jokiniemi (1):
  OMAP3: rx-51: Add full regulator definitions

 arch/arm/mach-omap2/board-rx51-peripherals.c |   69 ++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)


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

* [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
  2011-05-02  6:28 [PATCH v2 0/1] RX-51: add full regulator definitions Kalle Jokiniemi
@ 2011-05-02  6:28 ` Kalle Jokiniemi
  2011-05-02  6:58   ` Jarkko Nikula
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Jokiniemi @ 2011-05-02  6:28 UTC (permalink / raw)
  To: tony; +Cc: broonie, jhnikula, linux-omap, Kalle Jokiniemi

The vaux2 (VCSI) regulator is left on by the bootloader
in rx-51. Since there the product has shipped and there
won't be any bootloader updates to fix this issue, we
need to define all the regulators and declare full
constraints for the regulator FW. This will allow the
regulator FW to disable unused regulators.

Also this helps in adding more fine grain regulator
support for rx-51 in the future.

Thanks for Mark Brown for pointing out the correct
solution.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   69 ++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index bbcb677..4026b4b 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -475,6 +475,32 @@ static struct regulator_init_data rx51_vmmc2 = {
 	.consumer_supplies	= rx51_vmmc2_supplies,
 };
 
+static struct regulator_init_data rx51_vpll1 = {
+	.constraints = {
+		.name			= "VPLL",
+		.min_uV			= 1800000,
+		.max_uV			= 1800000,
+		.apply_uV		= true,
+		.always_on		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE,
+	},
+};
+
+static struct regulator_init_data rx51_vpll2 = {
+	.constraints = {
+		.name			= "VSDI_CSI",
+		.min_uV			= 1800000,
+		.max_uV			= 1800000,
+		.apply_uV		= true,
+		.always_on		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE,
+	},
+};
+
 static struct regulator_init_data rx51_vsim = {
 	.constraints = {
 		.name			= "VMMC2_IO_18",
@@ -519,6 +545,43 @@ static struct regulator_init_data rx51_vio = {
 	.consumer_supplies	= rx51_vio_supplies,
 };
 
+static struct regulator_init_data rx51_vintana1 = {
+	.constraints = {
+		.name			= "VINTANA1",
+		.min_uV			= 1500000,
+		.max_uV			= 1500000,
+		.always_on		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE,
+	},
+};
+
+static struct regulator_init_data rx51_vintana2 = {
+	.constraints = {
+		.name			= "VINTANA2",
+		.min_uV			= 2750000,
+		.max_uV			= 2750000,
+		.apply_uV		= true,
+		.always_on		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE,
+	},
+};
+
+static struct regulator_init_data rx51_vintdig = {
+	.constraints = {
+		.name			= "VINTDIG",
+		.min_uV			= 1500000,
+		.max_uV			= 1500000,
+		.always_on		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE,
+	},
+};
+
 static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
 	.gpio_reset	= RX51_FMTX_RESET_GPIO,
 };
@@ -767,8 +830,13 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
 	.vaux2			= &rx51_vaux2,
 	.vaux4			= &rx51_vaux4,
 	.vmmc1			= &rx51_vmmc1,
+	.vpll1			= &rx51_vpll1,
+	.vpll2			= &rx51_vpll2,
 	.vsim			= &rx51_vsim,
 	.vdac			= &rx51_vdac,
+	.vintana1		= &rx51_vintana1,
+	.vintana2		= &rx51_vintana2,
+	.vintdig		= &rx51_vintdig,
 	.vio			= &rx51_vio,
 };
 
@@ -969,6 +1037,7 @@ error:
 void __init rx51_peripherals_init(void)
 {
 	rx51_i2c_init();
+	regulator_has_full_constraints();
 	gpmc_onenand_init(board_onenand_data);
 	board_smc91x_init();
 	rx51_add_gpio_keys();
-- 
1.7.1


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

* Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
  2011-05-02  6:28 ` [PATCH v2 1/1] OMAP3: rx-51: Add " Kalle Jokiniemi
@ 2011-05-02  6:58   ` Jarkko Nikula
  2011-05-12  8:59     ` kalle.jokiniemi
  0 siblings, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2011-05-02  6:58 UTC (permalink / raw)
  To: Kalle Jokiniemi; +Cc: tony, broonie, linux-omap

On Mon,  2 May 2011 09:28:53 +0300
Kalle Jokiniemi <kalle.jokiniemi@nokia.com> wrote:

> The vaux2 (VCSI) regulator is left on by the bootloader
> in rx-51. Since there the product has shipped and there
> won't be any bootloader updates to fix this issue, we
> need to define all the regulators and declare full
> constraints for the regulator FW. This will allow the
> regulator FW to disable unused regulators.
> 
> Also this helps in adding more fine grain regulator
> support for rx-51 in the future.
> 
> Thanks for Mark Brown for pointing out the correct
> solution.
> 
> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---

Reviewed-by: Jarkko Nikula <jhnikula@gmail.com>

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

* RE: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
  2011-05-02  6:58   ` Jarkko Nikula
@ 2011-05-12  8:59     ` kalle.jokiniemi
  2011-05-31 12:57       ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: kalle.jokiniemi @ 2011-05-12  8:59 UTC (permalink / raw)
  To: tony; +Cc: broonie, linux-omap, jhnikula

Hi Tony,

 > -----Original Message-----
 > From: ext Jarkko Nikula [mailto:jhnikula@gmail.com]
 > Sent: 2. toukokuuta 2011 9:58
 > To: Jokiniemi Kalle (Nokia-SD/Tampere)
 > Cc: tony@atomide.com; broonie@opensource.wolfsonmicro.com; linux-
 > omap@vger.kernel.org
 > Subject: Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions

Did this one get pushed to linux-omap? Just checking on my old patches...

- Kalle


 > 
 > On Mon,  2 May 2011 09:28:53 +0300
 > Kalle Jokiniemi <kalle.jokiniemi@nokia.com> wrote:
 > 
 > > The vaux2 (VCSI) regulator is left on by the bootloader
 > > in rx-51. Since there the product has shipped and there
 > > won't be any bootloader updates to fix this issue, we
 > > need to define all the regulators and declare full
 > > constraints for the regulator FW. This will allow the
 > > regulator FW to disable unused regulators.
 > >
 > > Also this helps in adding more fine grain regulator
 > > support for rx-51 in the future.
 > >
 > > Thanks for Mark Brown for pointing out the correct
 > > solution.
 > >
 > > Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>
 > > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
 > > ---
 > 
 > Reviewed-by: Jarkko Nikula <jhnikula@gmail.com>




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

* Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
  2011-05-12  8:59     ` kalle.jokiniemi
@ 2011-05-31 12:57       ` Tony Lindgren
  2011-05-31 12:59         ` kalle.jokiniemi
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2011-05-31 12:57 UTC (permalink / raw)
  To: kalle.jokiniemi; +Cc: broonie, linux-omap, jhnikula

* kalle.jokiniemi@nokia.com <kalle.jokiniemi@nokia.com> [110512 01:56]:
> Hi Tony,
> 
>  > -----Original Message-----
>  > From: ext Jarkko Nikula [mailto:jhnikula@gmail.com]
>  > Sent: 2. toukokuuta 2011 9:58
>  > To: Jokiniemi Kalle (Nokia-SD/Tampere)
>  > Cc: tony@atomide.com; broonie@opensource.wolfsonmicro.com; linux-
>  > omap@vger.kernel.org
>  > Subject: Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
> 
> Did this one get pushed to linux-omap? Just checking on my old patches...

Adding to devel-board for a future merge window when we can add some
new code.

Tony

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

* RE: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
  2011-05-31 12:57       ` Tony Lindgren
@ 2011-05-31 12:59         ` kalle.jokiniemi
  0 siblings, 0 replies; 6+ messages in thread
From: kalle.jokiniemi @ 2011-05-31 12:59 UTC (permalink / raw)
  To: tony; +Cc: broonie, linux-omap, jhnikula



> -----Original Message-----
> From: ext Tony Lindgren [mailto:tony@atomide.com]
> Sent: 31. toukokuuta 2011 15:57
> To: Jokiniemi Kalle (Nokia-SD/Tampere)
> Cc: broonie@opensource.wolfsonmicro.com; linux-omap@vger.kernel.org;
> jhnikula@gmail.com
> Subject: Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
> 
> * kalle.jokiniemi@nokia.com <kalle.jokiniemi@nokia.com> [110512 01:56]:
> > Hi Tony,
> >
> >  > -----Original Message-----
> >  > From: ext Jarkko Nikula [mailto:jhnikula@gmail.com]
> >  > Sent: 2. toukokuuta 2011 9:58
> >  > To: Jokiniemi Kalle (Nokia-SD/Tampere)
> >  > Cc: tony@atomide.com; broonie@opensource.wolfsonmicro.com; linux-
> >  > omap@vger.kernel.org
> >  > Subject: Re: [PATCH v2 1/1] OMAP3: rx-51: Add full regulator definitions
> >
> > Did this one get pushed to linux-omap? Just checking on my old patches...
> 
> Adding to devel-board for a future merge window when we can add some
> new code.

Excellent, thanks.

- Kalle

> 
> Tony

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

end of thread, other threads:[~2011-05-31 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02  6:28 [PATCH v2 0/1] RX-51: add full regulator definitions Kalle Jokiniemi
2011-05-02  6:28 ` [PATCH v2 1/1] OMAP3: rx-51: Add " Kalle Jokiniemi
2011-05-02  6:58   ` Jarkko Nikula
2011-05-12  8:59     ` kalle.jokiniemi
2011-05-31 12:57       ` Tony Lindgren
2011-05-31 12:59         ` kalle.jokiniemi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox