public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/8] smdk5420: Correct the vbus gpio configuration for USB controller
Date: Tue, 7 Jan 2014 10:15:31 +0100	[thread overview]
Message-ID: <201401071015.31344.marex@denx.de> (raw)
In-Reply-To: <CAFp+6iFN3qno_fjOy2F9xLgg+nhRb968_5jjkeDE7N7D0Mh79w@mail.gmail.com>

On Tuesday, January 07, 2014 at 10:03:01 AM, Vivek Gautam wrote:
> On Tue, Jan 7, 2014 at 1:19 PM, Marek Vasut <marex@denx.de> wrote:
> > On Tuesday, January 07, 2014 at 07:37:46 AM, Vivek Gautam wrote:
> >> Hi Marek,
> >> 
> >> On Mon, Jan 6, 2014 at 9:22 PM, Marek Vasut <marex@denx.de> wrote:
> >> > On Monday, January 06, 2014 at 10:29:42 AM, Vivek Gautam wrote:
> >> >> On smdk5420 two availbale XHCI controllers require VBUS GPIO
> >> >> to be configured, the EHCI however doesn't have any such VBUS
> >> >> GPIO. So correcting the available board_usb_vbus_init() function
> >> >> to the needs.
> >> >> 
> >> >> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> >> >> ---
> >> >> 
> >> >>  board/samsung/smdk5420/smdk5420.c |   11 ++++++-----
> >> >>  1 file changed, 6 insertions(+), 5 deletions(-)
> >> >> 
> >> >> diff --git a/board/samsung/smdk5420/smdk5420.c
> >> >> b/board/samsung/smdk5420/smdk5420.c index 3ad2ad0..4f23000 100644
> >> >> --- a/board/samsung/smdk5420/smdk5420.c
> >> >> +++ b/board/samsung/smdk5420/smdk5420.c
> >> >> @@ -18,14 +18,15 @@
> >> >> 
> >> >>  DECLARE_GLOBAL_DATA_PTR;
> >> >> 
> >> >> -#ifdef CONFIG_USB_EHCI_EXYNOS
> >> >> +#ifdef CONFIG_USB_XHCI_EXYNOS
> >> >> 
> >> >>  static int board_usb_vbus_init(void)
> >> >>  {
> >> >> 
> >> >> -     struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1
> >> >> *) -
> >> >> samsung_get_base_gpio_part1(); +     struct exynos5420_gpio_part4
> >> >> *gpio4 = (struct exynos5420_gpio_part4 *) +
> >> >> 
> >> >>                 samsung_get_base_gpio_part4();
> >> >>       
> >> >>       /* Enable VBUS power switch */
> >> >> 
> >> >> -     s5p_gpio_direction_output(&gpio1->x2, 6, 1);
> >> >> +     s5p_gpio_direction_output(&gpio4->g0, 5, 1);
> >> >> +     s5p_gpio_direction_output(&gpio4->g1, 4, 1);
> >> > 
> >> > This VBUS toggling should happen on per-port basis, right ?
> >> 
> >> No this VBUS gpio toggling is actually enabling the VBUS line of the
> >> controller. And since we have 2 controllers on exynos5420, so added the
> >> required 2 gpios for the purpose
> >> (GPG0[5], and GPG1[4]).
> > 
> > So if I understand this correctly, it should happen on per-controller
> > basis then?
> 
> True, i thought of putting this in DT actually, similar to what we do
> for exynos5250 as also available in the patch :
> [PATCH 1/2] exynos5250: usb: Fix VBus gpio numbers for ehci and xhci
> controllers  (http://patchwork.ozlabs.org/patch/306553/)
> 
> But then the mathematics involved in gpio_direction_output() api
> doesn't yield me the correct gpio pin (which actually gave in case of
> Exynos5250).

Ugh, does that mean we have a breakage in the GPIO or DT stuff ?
[...]

Best regards,
Marek Vasut

  reply	other threads:[~2014-01-07  9:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06  9:29 [U-Boot] [PATCH 0/8] Exynos5420: Add support for XHCI controller Vivek Gautam
2014-01-06  9:29 ` [U-Boot] [PATCH 1/8] arm: exynos5420: Fix base address for USBPHY Vivek Gautam
2014-01-06 15:47   ` Marek Vasut
2014-01-06  9:29 ` [U-Boot] [PATCH 2/8] arm: exynos5420: Add base addresses for USB 3.0 Vivek Gautam
2014-01-06 15:47   ` Marek Vasut
2014-01-06  9:29 ` [U-Boot] [PATCH 3/8] dts: exynos5250: Remove explicit device node of 'xhci' Vivek Gautam
2014-01-06 15:47   ` Marek Vasut
2014-01-06  9:29 ` [U-Boot] [PATCH 4/8] config: exynos5: Enable XHCI on all Exynos5 systems Vivek Gautam
2014-01-06 15:47   ` Marek Vasut
2014-01-06  9:29 ` [U-Boot] [PATCH 5/8] usb: xhci-exynos5: Add support for multiple USB 3.0 controllers Vivek Gautam
2014-01-06 15:51   ` Marek Vasut
2014-01-07  9:48     ` Vivek Gautam
2014-01-07  5:30   ` Minkyu Kang
2014-01-07  9:15     ` Vivek Gautam
2014-01-07 10:59       ` Marek Vasut
2014-01-07 11:41         ` Vivek Gautam
2014-01-06  9:29 ` [U-Boot] [PATCH 6/8] dts: exynos5420: Move device node for xhci 2nd controller Vivek Gautam
2014-01-06 15:51   ` Marek Vasut
2014-01-06  9:29 ` [U-Boot] [PATCH 7/8] smdk5420: Correct the vbus gpio configuration for USB controller Vivek Gautam
2014-01-06 15:52   ` Marek Vasut
2014-01-07  6:37     ` Vivek Gautam
2014-01-07  7:49       ` Marek Vasut
2014-01-07  9:03         ` Vivek Gautam
2014-01-07  9:15           ` Marek Vasut [this message]
2014-01-06  9:29 ` [U-Boot] [PATCH 8/8] config: smdk5420: Enable support for multiple XHCI controllers Vivek Gautam
2014-01-06 15:54   ` Marek Vasut
2014-01-07  8:55     ` Vivek Gautam
2014-01-07  9:14       ` Marek Vasut
2014-01-07  9:37         ` Vivek Gautam
2014-01-07 11:09           ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201401071015.31344.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox