From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: tegra: TrimSlice: add support for USB1 port
Date: Fri, 02 Nov 2012 00:17:43 +0100 [thread overview]
Message-ID: <1351811863.19243.5.camel@tellur> (raw)
In-Reply-To: <1351808077-11932-1-git-send-email-swarren@wwwdotorg.org>
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
> From: Stephen Warren <swarren@nvidia.com>
>
> TrimSlice's USB1 port has two purposes; it either acts as a device port
> hosting Tegra's USB recovery protocol, or acts as a host port connected
> to the internal USB->SATA bridge chip, which may in turn be connected to
> an SSD or HDD. Add the appropriate device tree and board configuration
> options to enable this port as a host port, and route the port to the
> SATA bridge using the VBUS GPIO.
>
Hm, I don't really like to abuse the VBUS GPIO for this function. As the
GPIO controlled routing is more a sort of pinmux can't you just add the
GPIO enable to pin_mux_usb()?
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> board/compulab/dts/tegra20-trimslice.dts | 3 ++-
> board/compulab/trimslice/trimslice.c | 8 ++++++++
> include/configs/trimslice.h | 1 +
> 3 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/board/compulab/dts/tegra20-trimslice.dts b/board/compulab/dts/tegra20-trimslice.dts
> index db79e77..4450674 100644
> --- a/board/compulab/dts/tegra20-trimslice.dts
> +++ b/board/compulab/dts/tegra20-trimslice.dts
> @@ -8,6 +8,7 @@
>
> aliases {
> usb0 = "/usb at c5008000";
> + usb1 = "/usb at c5000000";
> };
>
> memory {
> @@ -48,7 +49,7 @@
> };
>
> usb at c5000000 {
> - status = "disabled";
> + nvidia,vbus-gpio = <&gpio 170 0>; /* PV2 */
> };
>
> usb at c5004000 {
> diff --git a/board/compulab/trimslice/trimslice.c b/board/compulab/trimslice/trimslice.c
> index 9ef66fd..8f4dd09 100644
> --- a/board/compulab/trimslice/trimslice.c
> +++ b/board/compulab/trimslice/trimslice.c
> @@ -34,6 +34,14 @@
> #include <mmc.h>
> #endif
>
> +void pin_mux_usb(void)
> +{
> + /*
> + * USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO
> + * in the current device tree.
> + */
> + pinmux_tristate_disable(PINGRP_UAC);
> +}
>
> void pin_mux_spi(void)
> {
> diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h
> index eeb0dbe..165bc73 100644
> --- a/include/configs/trimslice.h
> +++ b/include/configs/trimslice.h
> @@ -80,6 +80,7 @@
> #define CONFIG_ENV_OFFSET (512 * 1024)
>
> /* USB Host support */
> +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3
> #define CONFIG_USB_EHCI
> #define CONFIG_USB_EHCI_TEGRA
> #define CONFIG_USB_STORAGE
next prev parent reply other threads:[~2012-11-01 23:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 22:14 [U-Boot] [PATCH] ARM: tegra: TrimSlice: add support for USB1 port Stephen Warren
2012-11-01 23:17 ` Lucas Stach [this message]
2012-11-01 23:30 ` Stephen Warren
2012-11-01 23:34 ` Lucas Stach
2012-11-02 14:45 ` Stephen Warren
2012-11-02 15:30 ` Lucas Stach
2012-11-02 16:06 ` Stephen Warren
2012-11-02 2:14 ` Simon Glass
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=1351811863.19243.5.camel@tellur \
--to=dev@lynxeye.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