* [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB
@ 2012-12-03 13:18 Rajeshwari Shinde
2012-12-03 13:18 ` [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus Rajeshwari Shinde
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Rajeshwari Shinde @ 2012-12-03 13:18 UTC (permalink / raw)
To: u-boot
This patch sets adds pinmux for USB and function to init VBus.
Rajeshwari Shinde (2):
EXYNOS5: Add pinmux for VBus
SMDK5250: Enable VBus for USB
arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
arch/arm/include/asm/arch-exynos/periph.h | 1 +
board/samsung/smdk5250/smdk5250.c | 17 +++++++++++++++++
3 files changed, 28 insertions(+), 0 deletions(-)
--
1.7.4.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus
2012-12-03 13:18 [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB Rajeshwari Shinde
@ 2012-12-03 13:18 ` Rajeshwari Shinde
2012-12-03 13:30 ` Kyungmin Park
2012-12-03 13:18 ` [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB Rajeshwari Shinde
2012-12-03 14:38 ` [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required " Marek Vasut
2 siblings, 1 reply; 8+ messages in thread
From: Rajeshwari Shinde @ 2012-12-03 13:18 UTC (permalink / raw)
To: u-boot
This patch sets pinmux for VBus of USB.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
arch/arm/include/asm/arch-exynos/periph.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index f9f6911..d65ffc7 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -285,6 +285,14 @@ void exynos5_spi_config(int peripheral)
}
}
+void exynos5_usb20_config(void)
+{
+ struct exynos5_gpio_part1 *gpio1 =
+ (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
+ /* Enable VBUS power switch */
+ s5p_gpio_direction_output(&gpio1->x2,6, 1);
+}
+
static int exynos5_pinmux_config(int peripheral, int flags)
{
switch (peripheral) {
@@ -322,6 +330,8 @@ static int exynos5_pinmux_config(int peripheral, int flags)
case PERIPH_ID_SPI4:
exynos5_spi_config(peripheral);
break;
+ case PERIPH_ID_USB20:
+ exynos5_usb20_config();
default:
debug("%s: invalid peripheral %d", __func__, peripheral);
return -1;
diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
index 783b77c..84593f6 100644
--- a/arch/arm/include/asm/arch-exynos/periph.h
+++ b/arch/arm/include/asm/arch-exynos/periph.h
@@ -46,6 +46,7 @@ enum periph_id {
PERIPH_ID_SPI0 = 68,
PERIPH_ID_SPI1,
PERIPH_ID_SPI2,
+ PERIPH_ID_USB20,
PERIPH_ID_SDMMC0 = 75,
PERIPH_ID_SDMMC1,
PERIPH_ID_SDMMC2,
--
1.7.4.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB
2012-12-03 13:18 [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB Rajeshwari Shinde
2012-12-03 13:18 ` [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus Rajeshwari Shinde
@ 2012-12-03 13:18 ` Rajeshwari Shinde
2012-12-04 1:24 ` Simon Glass
2012-12-03 14:38 ` [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required " Marek Vasut
2 siblings, 1 reply; 8+ messages in thread
From: Rajeshwari Shinde @ 2012-12-03 13:18 UTC (permalink / raw)
To: u-boot
This patch enables Vbus required for USB.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
board/samsung/smdk5250/smdk5250.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 5ebc665..fb4c70e 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -63,6 +63,19 @@ void board_poll_devices(void)
#endif
}
+int board_usb_vbus_init(void)
+{
+ int err;
+ err = exynos_pinmux_config(PERIPH_ID_USB20, PINMUX_FLAG_NONE);
+ if (err) {
+ debug("VBUS not configured\n");
+ return err;
+ }
+ /* VBUS turn ON time */
+ mdelay(3);
+ return 0;
+}
+
int board_init(void)
{
gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
@@ -80,6 +93,10 @@ int board_init(void)
#ifdef CONFIG_EXYNOS_SPI
spi_init();
#endif
+
+#ifdef CONFIG_USB_EHCI_EXYNOS
+ board_usb_vbus_init();
+#endif
return 0;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus
2012-12-03 13:18 ` [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus Rajeshwari Shinde
@ 2012-12-03 13:30 ` Kyungmin Park
2012-12-03 13:38 ` Rajeshwari Birje
0 siblings, 1 reply; 8+ messages in thread
From: Kyungmin Park @ 2012-12-03 13:30 UTC (permalink / raw)
To: u-boot
On Mon, Dec 3, 2012 at 10:18 PM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch sets pinmux for VBus of USB.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
> arch/arm/include/asm/arch-exynos/periph.h | 1 +
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
> index f9f6911..d65ffc7 100644
> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
> @@ -285,6 +285,14 @@ void exynos5_spi_config(int peripheral)
> }
> }
>
> +void exynos5_usb20_config(void)
> +{
> + struct exynos5_gpio_part1 *gpio1 =
> + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
> + /* Enable VBUS power switch */
> + s5p_gpio_direction_output(&gpio1->x2,6, 1);
it seems to be board specific GPIO value. doesn't it?
Thank you,
Kyungmin Park
> +}
> +
> static int exynos5_pinmux_config(int peripheral, int flags)
> {
> switch (peripheral) {
> @@ -322,6 +330,8 @@ static int exynos5_pinmux_config(int peripheral, int flags)
> case PERIPH_ID_SPI4:
> exynos5_spi_config(peripheral);
> break;
> + case PERIPH_ID_USB20:
> + exynos5_usb20_config();
> default:
> debug("%s: invalid peripheral %d", __func__, peripheral);
> return -1;
> diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
> index 783b77c..84593f6 100644
> --- a/arch/arm/include/asm/arch-exynos/periph.h
> +++ b/arch/arm/include/asm/arch-exynos/periph.h
> @@ -46,6 +46,7 @@ enum periph_id {
> PERIPH_ID_SPI0 = 68,
> PERIPH_ID_SPI1,
> PERIPH_ID_SPI2,
> + PERIPH_ID_USB20,
> PERIPH_ID_SDMMC0 = 75,
> PERIPH_ID_SDMMC1,
> PERIPH_ID_SDMMC2,
> --
> 1.7.4.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus
2012-12-03 13:30 ` Kyungmin Park
@ 2012-12-03 13:38 ` Rajeshwari Birje
2012-12-03 14:06 ` Kyungmin Park
0 siblings, 1 reply; 8+ messages in thread
From: Rajeshwari Birje @ 2012-12-03 13:38 UTC (permalink / raw)
To: u-boot
Hi Kyungmin Park,
On Mon, Dec 3, 2012 at 7:00 PM, Kyungmin Park <kmpark@infradead.org> wrote:
> On Mon, Dec 3, 2012 at 10:18 PM, Rajeshwari Shinde
> <rajeshwari.s@samsung.com> wrote:
>> This patch sets pinmux for VBus of USB.
>>
>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
>> ---
>> arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
>> arch/arm/include/asm/arch-exynos/periph.h | 1 +
>> 2 files changed, 11 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
>> index f9f6911..d65ffc7 100644
>> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
>> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
>> @@ -285,6 +285,14 @@ void exynos5_spi_config(int peripheral)
>> }
>> }
>>
>> +void exynos5_usb20_config(void)
>> +{
>> + struct exynos5_gpio_part1 *gpio1 =
>> + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
>> + /* Enable VBUS power switch */
>> + s5p_gpio_direction_output(&gpio1->x2,6, 1);
> it seems to be board specific GPIO value. doesn't it?
Yes it is smdk5250 specific.
> Thank you,
> Kyungmin Park
>> +}
>> +
>> static int exynos5_pinmux_config(int peripheral, int flags)
>> {
>> switch (peripheral) {
>> @@ -322,6 +330,8 @@ static int exynos5_pinmux_config(int peripheral, int flags)
>> case PERIPH_ID_SPI4:
>> exynos5_spi_config(peripheral);
>> break;
>> + case PERIPH_ID_USB20:
>> + exynos5_usb20_config();
>> default:
>> debug("%s: invalid peripheral %d", __func__, peripheral);
>> return -1;
>> diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
>> index 783b77c..84593f6 100644
>> --- a/arch/arm/include/asm/arch-exynos/periph.h
>> +++ b/arch/arm/include/asm/arch-exynos/periph.h
>> @@ -46,6 +46,7 @@ enum periph_id {
>> PERIPH_ID_SPI0 = 68,
>> PERIPH_ID_SPI1,
>> PERIPH_ID_SPI2,
>> + PERIPH_ID_USB20,
>> PERIPH_ID_SDMMC0 = 75,
>> PERIPH_ID_SDMMC1,
>> PERIPH_ID_SDMMC2,
>> --
>> 1.7.4.4
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Rajeshwari shinde.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus
2012-12-03 13:38 ` Rajeshwari Birje
@ 2012-12-03 14:06 ` Kyungmin Park
0 siblings, 0 replies; 8+ messages in thread
From: Kyungmin Park @ 2012-12-03 14:06 UTC (permalink / raw)
To: u-boot
On Mon, Dec 3, 2012 at 10:38 PM, Rajeshwari Birje
<rajeshwari.birje@gmail.com> wrote:
> Hi Kyungmin Park,
>
> On Mon, Dec 3, 2012 at 7:00 PM, Kyungmin Park <kmpark@infradead.org> wrote:
>> On Mon, Dec 3, 2012 at 10:18 PM, Rajeshwari Shinde
>> <rajeshwari.s@samsung.com> wrote:
>>> This patch sets pinmux for VBus of USB.
>>>
>>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>>> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
>>> ---
>>> arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
>>> arch/arm/include/asm/arch-exynos/periph.h | 1 +
>>> 2 files changed, 11 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
>>> index f9f6911..d65ffc7 100644
>>> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
>>> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
>>> @@ -285,6 +285,14 @@ void exynos5_spi_config(int peripheral)
>>> }
>>> }
>>>
>>> +void exynos5_usb20_config(void)
>>> +{
>>> + struct exynos5_gpio_part1 *gpio1 =
>>> + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
>>> + /* Enable VBUS power switch */
>>> + s5p_gpio_direction_output(&gpio1->x2,6, 1);
>> it seems to be board specific GPIO value. doesn't it?
> Yes it is smdk5250 specific.
So it's not proper place to add.
>> Thank you,
>> Kyungmin Park
>>> +}
>>> +
>>> static int exynos5_pinmux_config(int peripheral, int flags)
>>> {
>>> switch (peripheral) {
>>> @@ -322,6 +330,8 @@ static int exynos5_pinmux_config(int peripheral, int flags)
>>> case PERIPH_ID_SPI4:
>>> exynos5_spi_config(peripheral);
>>> break;
>>> + case PERIPH_ID_USB20:
>>> + exynos5_usb20_config();
>>> default:
>>> debug("%s: invalid peripheral %d", __func__, peripheral);
>>> return -1;
>>> diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
>>> index 783b77c..84593f6 100644
>>> --- a/arch/arm/include/asm/arch-exynos/periph.h
>>> +++ b/arch/arm/include/asm/arch-exynos/periph.h
>>> @@ -46,6 +46,7 @@ enum periph_id {
>>> PERIPH_ID_SPI0 = 68,
>>> PERIPH_ID_SPI1,
>>> PERIPH_ID_SPI2,
>>> + PERIPH_ID_USB20,
>>> PERIPH_ID_SDMMC0 = 75,
>>> PERIPH_ID_SDMMC1,
>>> PERIPH_ID_SDMMC2,
>>> --
>>> 1.7.4.4
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
> Regards,
> Rajeshwari shinde.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB
2012-12-03 13:18 [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB Rajeshwari Shinde
2012-12-03 13:18 ` [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus Rajeshwari Shinde
2012-12-03 13:18 ` [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB Rajeshwari Shinde
@ 2012-12-03 14:38 ` Marek Vasut
2 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-12-03 14:38 UTC (permalink / raw)
To: u-boot
Dear Rajeshwari Shinde,
> This patch sets adds pinmux for USB and function to init VBus.
>
> Rajeshwari Shinde (2):
> EXYNOS5: Add pinmux for VBus
> SMDK5250: Enable VBus for USB
>
> arch/arm/cpu/armv7/exynos/pinmux.c | 10 ++++++++++
> arch/arm/include/asm/arch-exynos/periph.h | 1 +
> board/samsung/smdk5250/smdk5250.c | 17 +++++++++++++++++
> 3 files changed, 28 insertions(+), 0 deletions(-)
I'll not apply this until you sort out the issue with Kyungmin .
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB
2012-12-03 13:18 ` [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB Rajeshwari Shinde
@ 2012-12-04 1:24 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2012-12-04 1:24 UTC (permalink / raw)
To: u-boot
Hi Rajeshwari,
On Mon, Dec 3, 2012 at 5:18 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch enables Vbus required for USB.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> board/samsung/smdk5250/smdk5250.c | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 5ebc665..fb4c70e 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -63,6 +63,19 @@ void board_poll_devices(void)
> #endif
> }
>
> +int board_usb_vbus_init(void)
> +{
> + int err;
blank line here
> + err = exynos_pinmux_config(PERIPH_ID_USB20, PINMUX_FLAG_NONE);
> + if (err) {
> + debug("VBUS not configured\n");
> + return err;
> + }
> + /* VBUS turn ON time */
> + mdelay(3);
and here
> + return 0;
> +}
> +
> int board_init(void)
> {
> gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
> @@ -80,6 +93,10 @@ int board_init(void)
> #ifdef CONFIG_EXYNOS_SPI
> spi_init();
> #endif
> +
Perhaps could omit this blank line.
> +#ifdef CONFIG_USB_EHCI_EXYNOS
> + board_usb_vbus_init();
> +#endif
> return 0;
> }
>
> --
> 1.7.4.4
>
Regards
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-12-04 1:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 13:18 [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required for USB Rajeshwari Shinde
2012-12-03 13:18 ` [U-Boot] [PATCH 1/2] EXYNOS5: Add pinmux for VBus Rajeshwari Shinde
2012-12-03 13:30 ` Kyungmin Park
2012-12-03 13:38 ` Rajeshwari Birje
2012-12-03 14:06 ` Kyungmin Park
2012-12-03 13:18 ` [U-Boot] [PATCH 2/2] SMDK5250: Enable VBus for USB Rajeshwari Shinde
2012-12-04 1:24 ` Simon Glass
2012-12-03 14:38 ` [U-Boot] [PATCH 0/2] EXYNOS5: Add VBus init required " Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox