* [PATCH] OMAP3EVM: ehci: Fix EHCI support
@ 2011-08-23 15:16 Bryan DE FARIA
2011-08-24 8:07 ` Igor Grinberg
0 siblings, 1 reply; 2+ messages in thread
From: Bryan DE FARIA @ 2011-08-23 15:16 UTC (permalink / raw)
To: tony; +Cc: Bryan DE FARIA, linux-omap
Set the VAUX2 regulator supply to 1.8V for the HSUSB host interface.
Gpio 2 of the TPS65950 has to be set to zero in order to enable the HSUBS2 clock.
Signed-off-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
---
arch/arm/mach-omap2/board-omap3evm.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c452b3f..ce09e9e 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -377,6 +377,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
if (r)
printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
+ /* gpio + 2 == HSUSB2 Clock Enable */
+ if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
+ gpio_request_one(gpio + 2, GPIOF_OUT_INIT_LOW, "EN_HSUSB2_CLK");
+
/* gpio + 7 == DVI Enable */
gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
@@ -450,6 +454,25 @@ static struct regulator_init_data omap3evm_vio = {
.consumer_supplies = omap3evm_vio_supply,
};
+/* VAUX2 for EHCI */
+static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
+ REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
+};
+
+static struct regulator_init_data omap3evm_vaux2 = {
+ .constraints = {
+ .min_uV = 1800000,
+ .max_uV = 1800000,
+ .apply_uV = true,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(omap3evm_vaux2_supplies),
+ .consumer_supplies = omap3evm_vaux2_supplies,
+};
+
#ifdef CONFIG_WL12XX_PLATFORM_DATA
#define OMAP3EVM_WLAN_PMENA_GPIO (150)
@@ -645,6 +668,7 @@ static void __init omap3_evm_init(void)
usb_nop_xceiv_register();
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
+ omap3evm_twldata.vaux2 = &omap3evm_vaux2;
/* enable EHCI VBUS using GPIO22 */
omap_mux_init_gpio(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP);
/* Select EHCI port on main board */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAP3EVM: ehci: Fix EHCI support
2011-08-23 15:16 [PATCH] OMAP3EVM: ehci: Fix EHCI support Bryan DE FARIA
@ 2011-08-24 8:07 ` Igor Grinberg
0 siblings, 0 replies; 2+ messages in thread
From: Igor Grinberg @ 2011-08-24 8:07 UTC (permalink / raw)
To: Bryan DE FARIA; +Cc: tony, linux-omap, linux-arm-kernel
Once again my mailer played me... sending for the second time... sorry
Hi Bryan,
Please, CC linux-arm-kernel@lists.infradead.org for patches like this.
One question below
On 08/23/11 18:16, Bryan DE FARIA wrote:
> Set the VAUX2 regulator supply to 1.8V for the HSUSB host interface.
> Gpio 2 of the TPS65950 has to be set to zero in order to enable the HSUBS2 clock.
>
> Signed-off-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
> ---
> arch/arm/mach-omap2/board-omap3evm.c | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index c452b3f..ce09e9e 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -377,6 +377,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
> if (r)
> printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
>
> + /* gpio + 2 == HSUSB2 Clock Enable */
> + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
> + gpio_request_one(gpio + 2, GPIOF_OUT_INIT_LOW, "EN_HSUSB2_CLK");
> +
> /* gpio + 7 == DVI Enable */
> gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
>
> @@ -450,6 +454,25 @@ static struct regulator_init_data omap3evm_vio = {
> .consumer_supplies = omap3evm_vio_supply,
> };
>
> +/* VAUX2 for EHCI */
> +static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
> + REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
> +};
> +
> +static struct regulator_init_data omap3evm_vaux2 = {
> + .constraints = {
> + .min_uV = 1800000,
> + .max_uV = 1800000,
> + .apply_uV = true,
> + .valid_modes_mask = REGULATOR_MODE_NORMAL
> + | REGULATOR_MODE_STANDBY,
> + .valid_ops_mask = REGULATOR_CHANGE_MODE
> + | REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(omap3evm_vaux2_supplies),
> + .consumer_supplies = omap3evm_vaux2_supplies,
> +};
> +
> #ifdef CONFIG_WL12XX_PLATFORM_DATA
>
> #define OMAP3EVM_WLAN_PMENA_GPIO (150)
> @@ -645,6 +668,7 @@ static void __init omap3_evm_init(void)
> usb_nop_xceiv_register();
>
> if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
> + omap3evm_twldata.vaux2 = &omap3evm_vaux2;
Wouldn't it be better to put this inside the omap3_evm_i2c_init() function
so all the initialization of that type be close to each other
and done before the omap3_pmic_init() call?
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-24 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 15:16 [PATCH] OMAP3EVM: ehci: Fix EHCI support Bryan DE FARIA
2011-08-24 8:07 ` Igor Grinberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox