public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support
Date: Thu, 31 Jul 2014 12:21:02 -0600	[thread overview]
Message-ID: <53DA890E.5020206@wwwdotorg.org> (raw)
In-Reply-To: <1406828177-23047-1-git-send-email-stefan@agner.ch>

On 07/31/2014 11:36 AM, Stefan Agner wrote:
> This adds board support for the Toradex Colibri T30 module.
>
> Working functions:
> - SD card boot
> - eMMC environment and boot
> - USB host/USB client (on the dual role port)
> - Network (via ASIX USB)

>   arch/arm/Kconfig                                   |   4 +
>   arch/arm/dts/Makefile                              |   1 +
>   arch/arm/dts/tegra30-colibri.dts                   |  84 +++++
>   arch/arm/include/asm/mach-types.h                  |  13 +
>   board/toradex/colibri_t30/Makefile                 |   6 +
>   board/toradex/colibri_t30/colibri_t30.c            |  52 +++
>   .../colibri_t30/pinmux-config-colibri_t30.h        | 360 +++++++++++++++++++++
>   include/configs/colibri_t30.h                      |  73 +++++

I think in latest u-boot/master, you'll also need to add 
configs/colibri_t30_defconfig.

> diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts

> +	/* EHCI instance 0: USB1_DP/N -> USBC_P/N */
> +	usb at 7d000000 {
> +		status = "okay";
> +		dr_mode = "otg";
> +	};

For OTG support, VBUS needs to be able to be turned on/off. Should this 
port be host-mode, or a VBUS GPIO defined?

> diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c

> +void pin_mux_usb(void)
> +{
> +	/* Enable LAN_VBUS */
> +	gpio_request(GPIO_PDD2, NULL);
> +	gpio_direction_output(GPIO_PDD2, 1);
> +
> +	/* Reset ASIX using LAN_RESET */
> +	gpio_request(GPIO_PDD0, NULL);
> +	gpio_direction_output(GPIO_PDD0, 0);
> +
> +	udelay(5);
> +
> +	gpio_set_value(GPIO_PDD0, 1);
> +}

It might be nice to remove the blank lines around the udelay() call; I 
initially didn't notice that GOPIO_PDD0 was manipulated by the code both 
before and after the udelay() and hence there was already a comment 
saying what GPIO_PDD0 controlled. Nestling the lines together would make 
this more obvious.

> diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h

> +#define CONFIG_I2C_MULTI_BUS
> +#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS

Are those needed? They aren't defined in e.g. the Beaver config header.

> +#define BOARD_EXTRA_ENV_SETTINGS \
> +	"board_name=colibri-eval-v3\0" \
> +	"fdtfile=tegra30-colibri-eval-v3.dtb\0"

It'd be nice to name the board the same in U-Boot as the kernel DT 
filename. Then you wouldn't need to manually override the default values 
here.

> +#include "tegra-common-ums.h"

Did you test this? I mostly developed the USB device mode support on 
Tegra124. While at some point I did test it on Beaver/Tegra30, it was 
early on and not very extensive. I'd love to hear that it works well for 
you too:-)

(BTW, I sent a patch to rename that file to tegra-common-usb-gadget.h, 
since I added DFU support too, so depending on what order TomW applies 
our patches, one of us will need to rebase)

  parent reply	other threads:[~2014-07-31 18:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 17:36 [U-Boot] [PATCH] ARM: tegra: add Colibri T30 board support Stefan Agner
2014-07-31 17:41 ` Simon Glass
2014-07-31 18:00   ` Stefan Agner
2014-07-31 21:55     ` Simon Glass
2014-07-31 22:49       ` Stephen Warren
2014-08-02 13:24       ` Stefan Agner
2014-07-31 18:21 ` Stephen Warren [this message]
2014-08-02 14:09   ` Stefan Agner
2014-08-04 17:02     ` Stephen Warren
2014-08-04 17:16       ` Tom Rini
2014-08-04 18:22         ` Stefan Agner
2014-08-04 18:38       ` Stefan Agner
2014-08-04 19:04         ` 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=53DA890E.5020206@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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