linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
@ 2009-03-31  8:53 Koen Kooi
  2009-04-02 18:58 ` David Brownell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Koen Kooi @ 2009-03-31  8:53 UTC (permalink / raw)
  To: linux-omap; +Cc: Koen Kooi

The ldp board was left behind when other boards got updated. The ldp info was copied from the beagleboard board file and s/beagle/ldp/g

Changes since v2:
 * fixed email address
Changes since v1:
 * dropped vsim portion since only 4 pins are hooked up

Signed-off-by: Koen Kooi <koen@beagleboard.org>
---
 arch/arm/mach-omap2/board-ldp.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 30926b0..19a5c15 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
+#include <linux/regulator/machine.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/hardware.h>
@@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
 	&wrst_script,
 };
 
+static const struct twl4030_resconfig ldp_resconfig[] = {
+	/* disable regulators that u-boot left enabled; the
+	 * devices' drivers should be managing these.
+	 */
+	{ .resource = RES_VMMC1, },
+	{ 0, },
+};
+
 static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
+	.resource_config	= ldp_resconfig,
 	.scripts	= twl4030_scripts,
 	.size		= ARRAY_SIZE(twl4030_scripts),
 };
@@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data ldp_madc_data = {
 	.irq_line	= 1,
 };
 
+static struct regulator_consumer_supply ldp_vmmc1_supply = {
+	.supply			= "vmmc",
+};
+
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+static struct regulator_init_data ldp_vmmc1 = {
+	.constraints = {
+		.min_uV			= 1850000,
+		.max_uV			= 3150000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &ldp_vmmc1_supply,
+};
+
 static struct twl4030_platform_data ldp_twldata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
@@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = {
 	.madc		= &ldp_madc_data,
 	.usb		= &ldp_usb_data,
 	.power		= &sdp3430_t2scripts_data,
+	.vmmc1		= &ldp_vmmc1,
 	.gpio		= &ldp_gpio_data,
 	.keypad		= &ldp_kp_twl4030_data,
 };
@@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
 	omap_serial_init();
 	usb_musb_init();
 	twl4030_mmc_init(mmc);
+	/* link regulators to MMC adapters */
+	ldp_vmmc1_supply.dev = mmc[0].dev;
 }
 
 static void __init omap_ldp_map_io(void)
-- 
1.6.2


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

* Re: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
  2009-03-31  8:53 [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again Koen Kooi
@ 2009-04-02 18:58 ` David Brownell
  2009-04-14  6:21   ` Koen Kooi
  2009-04-21  7:28 ` Koen Kooi
  2009-04-28 19:43 ` Koen Kooi
  2 siblings, 1 reply; 6+ messages in thread
From: David Brownell @ 2009-04-02 18:58 UTC (permalink / raw)
  To: Koen Kooi; +Cc: linux-omap

Ack on that v3 patch, FWIW ... but also:

On Tuesday 31 March 2009, Koen Kooi wrote:
> +static const struct twl4030_resconfig ldp_resconfig[] = {
> +       /* disable regulators that u-boot left enabled; the
> +        * devices' drivers should be managing these.
> +        */
> +       { .resource = RES_VMMC1, },
> +       { 0, },
> +};
> +

Purely for information -- as in, maybe *more* regulators should
be disabled -- here's a patch I tend to run with.  Obviously it's
better to set the resconfig stuff than to do what this originally
tried to do, but this predates resconfig.

All this does (now) is print some messages that highlight when
regulators end up in wierd states after initialization.

- Dave

===============
--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -39,6 +39,9 @@ struct twlreg_info {
 	/* FIXED_LDO voltage */
 	u8			deciV;
 
+	/* true iff regulator is set up for Linux*/
+	bool			in_use;
+
 	/* voltage in mV = table[VSEL]; table_len must be a power-of-two */
 	u8			table_len;
 	const u16		*table;
@@ -419,6 +422,8 @@ static struct twlreg_info twl4030_regs[]
 	/* VUSBCP is managed *only* by the USB subchip */
 };
 
+static bool is_4030;
+
 static int twl4030reg_probe(struct platform_device *pdev)
 {
 	int				i;
@@ -430,6 +435,8 @@ static int twl4030reg_probe(struct platf
 	for (i = 0, info = NULL; i < ARRAY_SIZE(twl4030_regs); i++) {
 		if (twl4030_regs[i].desc.id != pdev->id)
 			continue;
+		if (pdev->id == TWL4030_REG_VAUX2_4030)
+			is_4030 = true;
 		info = twl4030_regs + i;
 		break;
 	}
@@ -458,6 +465,8 @@ static int twl4030reg_probe(struct platf
 	}
 	platform_set_drvdata(pdev, rdev);
 
+	info->in_use = true;
+
 	/* NOTE:  many regulators support short-circuit IRQs (presentable
 	 * as REGULATOR_OVER_CURRENT notifications?) configured via:
 	 *  - SC_CONFIG
@@ -469,6 +478,64 @@ static int twl4030reg_probe(struct platf
 	return 0;
 }
 
+/*
+ * Make sure all LDOs are in the P1 (Linux) group or none; and that
+ * if Linux can't have enabled them, they're in no group (disabled).
+ * Unused-but-enabled LDOs are a constant power drain.
+ *
+ * NOTE:  something else must disable LDOs which Linux manages, but
+ * which may have been wrongly enabled during system startup.
+ */
+static __init int twl4030_ldo_tweak(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(twl4030_regs); i++) {
+		struct twlreg_info *info = &twl4030_regs[i];
+		int dev_grp, new_grp;
+		int status;
+
+		/* ignore the "other" VAUX2 descriptor */
+		if (info->base == 0x1b) {
+			if (info->desc.id == TWL4030_REG_VAUX2_4030) {
+				if (!is_4030)
+					continue;
+			} else {
+				if (is_4030)
+					continue;
+			}
+		}
+
+		dev_grp = twl4030reg_read(info, VREG_GRP);
+		if (dev_grp < 0)
+			continue;
+		dev_grp &= 0xf0;
+
+		if (info->in_use)
+			new_grp = dev_grp & (P1_GRP | WARM_CFG);
+		else
+			new_grp = 0;
+		if (dev_grp == new_grp)
+			continue;
+
+		/* reset and report this; the bootloader might be fixable */
+#if 0
+		status = twl4030reg_write(info, VREG_GRP, new_grp);
+#else
+		status = 0;
+#endif
+		if (status < 0)
+			pr_err("TWL: can't update LDO %s, err %d\n",
+				info->desc.name, status);
+		else
+			pr_info("TWL: LDO %s, dev_grp %02x --> %02x\n",
+				info->desc.name, dev_grp, new_grp);
+
+	}
+	return 0;
+}
+late_initcall(twl4030_ldo_tweak);
+
 static int __devexit twl4030reg_remove(struct platform_device *pdev)
 {
 	regulator_unregister(platform_get_drvdata(pdev));



--
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] 6+ messages in thread

* Re: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
  2009-04-02 18:58 ` David Brownell
@ 2009-04-14  6:21   ` Koen Kooi
  0 siblings, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2009-04-14  6:21 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 4003 bytes --]

Tony, can this to into git?

regards,

Koen

Op 2 apr 2009, om 20:58 heeft David Brownell het volgende geschreven:

> Ack on that v3 patch, FWIW ... but also:
>
> On Tuesday 31 March 2009, Koen Kooi wrote:
>> +static const struct twl4030_resconfig ldp_resconfig[] = {
>> +       /* disable regulators that u-boot left enabled; the
>> +        * devices' drivers should be managing these.
>> +        */
>> +       { .resource = RES_VMMC1, },
>> +       { 0, },
>> +};
>> +
>
> Purely for information -- as in, maybe *more* regulators should
> be disabled -- here's a patch I tend to run with.  Obviously it's
> better to set the resconfig stuff than to do what this originally
> tried to do, but this predates resconfig.
>
> All this does (now) is print some messages that highlight when
> regulators end up in wierd states after initialization.
>
> - Dave
>
> ===============
> --- a/drivers/regulator/twl4030-regulator.c
> +++ b/drivers/regulator/twl4030-regulator.c
> @@ -39,6 +39,9 @@ struct twlreg_info {
> 	/* FIXED_LDO voltage */
> 	u8			deciV;
>
> +	/* true iff regulator is set up for Linux*/
> +	bool			in_use;
> +
> 	/* voltage in mV = table[VSEL]; table_len must be a power-of-two */
> 	u8			table_len;
> 	const u16		*table;
> @@ -419,6 +422,8 @@ static struct twlreg_info twl4030_regs[]
> 	/* VUSBCP is managed *only* by the USB subchip */
> };
>
> +static bool is_4030;
> +
> static int twl4030reg_probe(struct platform_device *pdev)
> {
> 	int				i;
> @@ -430,6 +435,8 @@ static int twl4030reg_probe(struct platf
> 	for (i = 0, info = NULL; i < ARRAY_SIZE(twl4030_regs); i++) {
> 		if (twl4030_regs[i].desc.id != pdev->id)
> 			continue;
> +		if (pdev->id == TWL4030_REG_VAUX2_4030)
> +			is_4030 = true;
> 		info = twl4030_regs + i;
> 		break;
> 	}
> @@ -458,6 +465,8 @@ static int twl4030reg_probe(struct platf
> 	}
> 	platform_set_drvdata(pdev, rdev);
>
> +	info->in_use = true;
> +
> 	/* NOTE:  many regulators support short-circuit IRQs (presentable
> 	 * as REGULATOR_OVER_CURRENT notifications?) configured via:
> 	 *  - SC_CONFIG
> @@ -469,6 +478,64 @@ static int twl4030reg_probe(struct platf
> 	return 0;
> }
>
> +/*
> + * Make sure all LDOs are in the P1 (Linux) group or none; and that
> + * if Linux can't have enabled them, they're in no group (disabled).
> + * Unused-but-enabled LDOs are a constant power drain.
> + *
> + * NOTE:  something else must disable LDOs which Linux manages, but
> + * which may have been wrongly enabled during system startup.
> + */
> +static __init int twl4030_ldo_tweak(void)
> +{
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(twl4030_regs); i++) {
> +		struct twlreg_info *info = &twl4030_regs[i];
> +		int dev_grp, new_grp;
> +		int status;
> +
> +		/* ignore the "other" VAUX2 descriptor */
> +		if (info->base == 0x1b) {
> +			if (info->desc.id == TWL4030_REG_VAUX2_4030) {
> +				if (!is_4030)
> +					continue;
> +			} else {
> +				if (is_4030)
> +					continue;
> +			}
> +		}
> +
> +		dev_grp = twl4030reg_read(info, VREG_GRP);
> +		if (dev_grp < 0)
> +			continue;
> +		dev_grp &= 0xf0;
> +
> +		if (info->in_use)
> +			new_grp = dev_grp & (P1_GRP | WARM_CFG);
> +		else
> +			new_grp = 0;
> +		if (dev_grp == new_grp)
> +			continue;
> +
> +		/* reset and report this; the bootloader might be fixable */
> +#if 0
> +		status = twl4030reg_write(info, VREG_GRP, new_grp);
> +#else
> +		status = 0;
> +#endif
> +		if (status < 0)
> +			pr_err("TWL: can't update LDO %s, err %d\n",
> +				info->desc.name, status);
> +		else
> +			pr_info("TWL: LDO %s, dev_grp %02x --> %02x\n",
> +				info->desc.name, dev_grp, new_grp);
> +
> +	}
> +	return 0;
> +}
> +late_initcall(twl4030_ldo_tweak);
> +
> static int __devexit twl4030reg_remove(struct platform_device *pdev)
> {
> 	regulator_unregister(platform_get_drvdata(pdev));
>
>
>
> --
> 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
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
  2009-03-31  8:53 [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again Koen Kooi
  2009-04-02 18:58 ` David Brownell
@ 2009-04-21  7:28 ` Koen Kooi
  2009-04-28 19:43 ` Koen Kooi
  2 siblings, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2009-04-21  7:28 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org List

[-- Attachment #1: Type: text/plain, Size: 3046 bytes --]

ping


Op 31 mrt 2009, om 10:53 heeft Koen Kooi het volgende geschreven:

> The ldp board was left behind when other boards got updated. The ldp  
> info was copied from the beagleboard board file and s/beagle/ldp/g
>
> Changes since v2:
> * fixed email address
> Changes since v1:
> * dropped vsim portion since only 4 pins are hooked up
>
> Signed-off-by: Koen Kooi <koen@beagleboard.org>
> ---
> arch/arm/mach-omap2/board-ldp.c |   32 ++++++++++++++++++++++++++++++ 
> ++
> 1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/ 
> board-ldp.c
> index 30926b0..19a5c15 100644
> --- a/arch/arm/mach-omap2/board-ldp.c
> +++ b/arch/arm/mach-omap2/board-ldp.c
> @@ -22,6 +22,7 @@
> #include <linux/clk.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/ads7846.h>
> +#include <linux/regulator/machine.h>
> #include <linux/i2c/twl4030.h>
>
> #include <mach/hardware.h>
> @@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[]  
> __initdata = {
> 	&wrst_script,
> };
>
> +static const struct twl4030_resconfig ldp_resconfig[] = {
> +	/* disable regulators that u-boot left enabled; the
> +	 * devices' drivers should be managing these.
> +	 */
> +	{ .resource = RES_VMMC1, },
> +	{ 0, },
> +};
> +
> static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
> +	.resource_config	= ldp_resconfig,
> 	.scripts	= twl4030_scripts,
> 	.size		= ARRAY_SIZE(twl4030_scripts),
> };
> @@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data  
> ldp_madc_data = {
> 	.irq_line	= 1,
> };
>
> +static struct regulator_consumer_supply ldp_vmmc1_supply = {
> +	.supply			= "vmmc",
> +};
> +
> +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card ==  
> max 220 mA) */
> +static struct regulator_init_data ldp_vmmc1 = {
> +	.constraints = {
> +		.min_uV			= 1850000,
> +		.max_uV			= 3150000,
> +		.valid_modes_mask	= REGULATOR_MODE_NORMAL
> +					| REGULATOR_MODE_STANDBY,
> +		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
> +					| REGULATOR_CHANGE_MODE
> +					| REGULATOR_CHANGE_STATUS,
> +	},
> +	.num_consumer_supplies	= 1,
> +	.consumer_supplies	= &ldp_vmmc1_supply,
> +};
> +
> static struct twl4030_platform_data ldp_twldata = {
> 	.irq_base	= TWL4030_IRQ_BASE,
> 	.irq_end	= TWL4030_IRQ_END,
> @@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata  
> = {
> 	.madc		= &ldp_madc_data,
> 	.usb		= &ldp_usb_data,
> 	.power		= &sdp3430_t2scripts_data,
> +	.vmmc1		= &ldp_vmmc1,
> 	.gpio		= &ldp_gpio_data,
> 	.keypad		= &ldp_kp_twl4030_data,
> };
> @@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
> 	omap_serial_init();
> 	usb_musb_init();
> 	twl4030_mmc_init(mmc);
> +	/* link regulators to MMC adapters */
> +	ldp_vmmc1_supply.dev = mmc[0].dev;
> }
>
> static void __init omap_ldp_map_io(void)
> -- 
> 1.6.2
>
> --
> 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
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
  2009-03-31  8:53 [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again Koen Kooi
  2009-04-02 18:58 ` David Brownell
  2009-04-21  7:28 ` Koen Kooi
@ 2009-04-28 19:43 ` Koen Kooi
  2009-04-28 20:07   ` Tony Lindgren
  2 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2009-04-28 19:43 UTC (permalink / raw)
  To: linux-omap List

[-- Attachment #1: Type: text/plain, Size: 3144 bytes --]

Seeing that a similar change to the pandora board went in, can this  
*please* get applied as well now?

Op 31 mrt 2009, om 10:53 heeft Koen Kooi het volgende geschreven:

> The ldp board was left behind when other boards got updated. The ldp  
> info was copied from the beagleboard board file and s/beagle/ldp/g
>
> Changes since v2:
> * fixed email address
> Changes since v1:
> * dropped vsim portion since only 4 pins are hooked up
>
> Signed-off-by: Koen Kooi <koen@beagleboard.org>
> ---
> arch/arm/mach-omap2/board-ldp.c |   32 ++++++++++++++++++++++++++++++ 
> ++
> 1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/ 
> board-ldp.c
> index 30926b0..19a5c15 100644
> --- a/arch/arm/mach-omap2/board-ldp.c
> +++ b/arch/arm/mach-omap2/board-ldp.c
> @@ -22,6 +22,7 @@
> #include <linux/clk.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/ads7846.h>
> +#include <linux/regulator/machine.h>
> #include <linux/i2c/twl4030.h>
>
> #include <mach/hardware.h>
> @@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[]  
> __initdata = {
> 	&wrst_script,
> };
>
> +static const struct twl4030_resconfig ldp_resconfig[] = {
> +	/* disable regulators that u-boot left enabled; the
> +	 * devices' drivers should be managing these.
> +	 */
> +	{ .resource = RES_VMMC1, },
> +	{ 0, },
> +};
> +
> static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
> +	.resource_config	= ldp_resconfig,
> 	.scripts	= twl4030_scripts,
> 	.size		= ARRAY_SIZE(twl4030_scripts),
> };
> @@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data  
> ldp_madc_data = {
> 	.irq_line	= 1,
> };
>
> +static struct regulator_consumer_supply ldp_vmmc1_supply = {
> +	.supply			= "vmmc",
> +};
> +
> +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card ==  
> max 220 mA) */
> +static struct regulator_init_data ldp_vmmc1 = {
> +	.constraints = {
> +		.min_uV			= 1850000,
> +		.max_uV			= 3150000,
> +		.valid_modes_mask	= REGULATOR_MODE_NORMAL
> +					| REGULATOR_MODE_STANDBY,
> +		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
> +					| REGULATOR_CHANGE_MODE
> +					| REGULATOR_CHANGE_STATUS,
> +	},
> +	.num_consumer_supplies	= 1,
> +	.consumer_supplies	= &ldp_vmmc1_supply,
> +};
> +
> static struct twl4030_platform_data ldp_twldata = {
> 	.irq_base	= TWL4030_IRQ_BASE,
> 	.irq_end	= TWL4030_IRQ_END,
> @@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata  
> = {
> 	.madc		= &ldp_madc_data,
> 	.usb		= &ldp_usb_data,
> 	.power		= &sdp3430_t2scripts_data,
> +	.vmmc1		= &ldp_vmmc1,
> 	.gpio		= &ldp_gpio_data,
> 	.keypad		= &ldp_kp_twl4030_data,
> };
> @@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
> 	omap_serial_init();
> 	usb_musb_init();
> 	twl4030_mmc_init(mmc);
> +	/* link regulators to MMC adapters */
> +	ldp_vmmc1_supply.dev = mmc[0].dev;
> }
>
> static void __init omap_ldp_map_io(void)
> -- 
> 1.6.2
>
> --
> 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
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again
  2009-04-28 19:43 ` Koen Kooi
@ 2009-04-28 20:07   ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2009-04-28 20:07 UTC (permalink / raw)
  To: Koen Kooi; +Cc: linux-omap List

* Koen Kooi <koen@beagleboard.org> [090428 12:44]:
> Seeing that a similar change to the pandora board went in, can this  
> *please* get applied as well now?

Should be there since 23rd, can you please verify?

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=c42e73b956f346cb9a0b3afb064f69afc4761d2a

Cheers,

Tony



> Op 31 mrt 2009, om 10:53 heeft Koen Kooi het volgende geschreven:
>
>> The ldp board was left behind when other boards got updated. The ldp  
>> info was copied from the beagleboard board file and s/beagle/ldp/g
>>
>> Changes since v2:
>> * fixed email address
>> Changes since v1:
>> * dropped vsim portion since only 4 pins are hooked up
>>
>> Signed-off-by: Koen Kooi <koen@beagleboard.org>
>> ---
>> arch/arm/mach-omap2/board-ldp.c |   32 ++++++++++++++++++++++++++++++ 
>> ++
>> 1 files changed, 32 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/ 
>> board-ldp.c
>> index 30926b0..19a5c15 100644
>> --- a/arch/arm/mach-omap2/board-ldp.c
>> +++ b/arch/arm/mach-omap2/board-ldp.c
>> @@ -22,6 +22,7 @@
>> #include <linux/clk.h>
>> #include <linux/spi/spi.h>
>> #include <linux/spi/ads7846.h>
>> +#include <linux/regulator/machine.h>
>> #include <linux/i2c/twl4030.h>
>>
>> #include <mach/hardware.h>
>> @@ -450,7 +451,16 @@ static struct twl4030_script *twl4030_scripts[]  
>> __initdata = {
>> 	&wrst_script,
>> };
>>
>> +static const struct twl4030_resconfig ldp_resconfig[] = {
>> +	/* disable regulators that u-boot left enabled; the
>> +	 * devices' drivers should be managing these.
>> +	 */
>> +	{ .resource = RES_VMMC1, },
>> +	{ 0, },
>> +};
>> +
>> static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
>> +	.resource_config	= ldp_resconfig,
>> 	.scripts	= twl4030_scripts,
>> 	.size		= ARRAY_SIZE(twl4030_scripts),
>> };
>> @@ -474,6 +484,25 @@ static struct twl4030_madc_platform_data  
>> ldp_madc_data = {
>> 	.irq_line	= 1,
>> };
>>
>> +static struct regulator_consumer_supply ldp_vmmc1_supply = {
>> +	.supply			= "vmmc",
>> +};
>> +
>> +/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 
>> 220 mA) */
>> +static struct regulator_init_data ldp_vmmc1 = {
>> +	.constraints = {
>> +		.min_uV			= 1850000,
>> +		.max_uV			= 3150000,
>> +		.valid_modes_mask	= REGULATOR_MODE_NORMAL
>> +					| REGULATOR_MODE_STANDBY,
>> +		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
>> +					| REGULATOR_CHANGE_MODE
>> +					| REGULATOR_CHANGE_STATUS,
>> +	},
>> +	.num_consumer_supplies	= 1,
>> +	.consumer_supplies	= &ldp_vmmc1_supply,
>> +};
>> +
>> static struct twl4030_platform_data ldp_twldata = {
>> 	.irq_base	= TWL4030_IRQ_BASE,
>> 	.irq_end	= TWL4030_IRQ_END,
>> @@ -483,6 +512,7 @@ static struct twl4030_platform_data ldp_twldata = {
>> 	.madc		= &ldp_madc_data,
>> 	.usb		= &ldp_usb_data,
>> 	.power		= &sdp3430_t2scripts_data,
>> +	.vmmc1		= &ldp_vmmc1,
>> 	.gpio		= &ldp_gpio_data,
>> 	.keypad		= &ldp_kp_twl4030_data,
>> };
>> @@ -530,6 +560,8 @@ static void __init omap_ldp_init(void)
>> 	omap_serial_init();
>> 	usb_musb_init();
>> 	twl4030_mmc_init(mmc);
>> +	/* link regulators to MMC adapters */
>> +	ldp_vmmc1_supply.dev = mmc[0].dev;
>> }
>>
>> static void __init omap_ldp_map_io(void)
>> -- 
>> 1.6.2
>>
>> --
>> 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] 6+ messages in thread

end of thread, other threads:[~2009-04-28 20:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31  8:53 [PATCH v3] ARM: OMAP: board-ldp: add regulator info to get the microSD slot working again Koen Kooi
2009-04-02 18:58 ` David Brownell
2009-04-14  6:21   ` Koen Kooi
2009-04-21  7:28 ` Koen Kooi
2009-04-28 19:43 ` Koen Kooi
2009-04-28 20:07   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).