linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
To: Jim Lin <jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] ARM: tegra: Add support for USB2 port on Seaboard
Date: Wed, 8 Feb 2012 11:29:56 -0800	[thread overview]
Message-ID: <CAOesGMhPj2mikibbuJ-HbB5TbwM7b7kjWF_s1fAMkq8oMnEdOw@mail.gmail.com> (raw)
In-Reply-To: <1328700298-14408-1-git-send-email-jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Hi,

On Wed, Feb 8, 2012 at 3:24 AM, Jim Lin <jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> 1. ULPI_RESET* is routed to GPIO_PV1, based on schematic file.
> 2. Reference clock to ULPI PHY is 24MHz. It comes from PLL_P_OUT4.
> 3. Because PLL_P_OUT4 is assigned to provide clock to ULPI PHY. We use
> PLL_C_OUT1 as clock source to SCLK (also update its children like HCLK
> and PCLK).

This is something that is more or less true for all tegra2 platforms
(that could be using ULPI), correct? If so, these table changes should
be made in the common.c table instead.

> 4. Also modify the clock rate of SCLK from 108MHz to 120MHz (copied from
> ChromeOs kernel code).

Unrelated to this change so should be a separate patch. Also, the need
for the change needs to be motivated.

> diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
> index bf13ea3..462ba1d 100644
> --- a/arch/arm/mach-tegra/board-seaboard.c
> +++ b/arch/arm/mach-tegra/board-seaboard.c
> @@ -64,6 +64,11 @@ static struct platform_device debug_uart = {
>
>  static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = {
>        /* name         parent          rate            enabled */
> +       { "pll_p_out4", "pll_p",        24000000,       true },
> +       { "pll_c_out1", "pll_c",        120000000,      true },
> +       { "sclk",       "pll_c_out1",   120000000,      true },
> +       { "hclk",       "sclk",         120000000,      true },
> +       { "pclk",       "hclk",         60000000,       true },
>        { "uartb",      "pll_p",        216000000,      true},
>        { "uartd",      "pll_p",        216000000,      true},
>        { "pll_a",      "pll_p_out1",   56448000,       true },
> @@ -203,6 +208,7 @@ static int seaboard_ehci_init(void)
>        gpio_set_value(TEGRA_GPIO_USB1, 1);
>
>        platform_device_register(&tegra_ehci1_device);
> +       platform_device_register(&tegra_ehci2_device);
>        platform_device_register(&tegra_ehci3_device);
>
>        return 0;
> diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
> index 7a2a02d..977716e 100644
> --- a/arch/arm/mach-tegra/devices.c
> +++ b/arch/arm/mach-tegra/devices.c
> @@ -441,8 +441,13 @@ static struct resource tegra_usb3_resources[] = {
>  };
>
>  static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
> +#ifdef CONFIG_MACH_SEABOARD
> +       /* Use GPIO PV1 for phy reset */
> +       .reset_gpio = TEGRA_GPIO_PV1,
> +#else
>        /* All existing boards use GPIO PV0 for phy reset */
>        .reset_gpio = TEGRA_GPIO_PV0,
> +#endif

No ifdef in C files please. You should consider moving this to device
tree instead.


-Olof

  parent reply	other threads:[~2012-02-08 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 11:24 [PATCH 1/1] ARM: tegra: Add support for USB2 port on Seaboard Jim Lin
     [not found] ` <1328700298-14408-1-git-send-email-jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-08 19:29   ` Olof Johansson [this message]
     [not found] <4B9C9637D5087840A465BDCB251780E9E2D185633D@HKMAIL02.nvidia.com>
     [not found] ` <4B9C9637D5087840A465BDCB251780E9E2D185633D-jYPH5V5jAeRDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-02-02 19:21   ` Stephen Warren

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=CAOesGMhPj2mikibbuJ-HbB5TbwM7b7kjWF_s1fAMkq8oMnEdOw@mail.gmail.com \
    --to=olof-nzht3qvonbneowh0uzbu5w@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).