]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tegra: usb: Add USB support to nvidia boards
authorSimon Glass <sjg@chromium.org>
Mon, 27 Feb 2012 10:52:50 +0000 (10:52 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 29 Mar 2012 06:12:49 +0000 (08:12 +0200)
This adds basic USB support for port 0. The other port is not supported
yet.

Tegra2 (SeaBoard) # usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Tegra2 (SeaBoard) # ext2load usb 0:3 10000000 /boot/vmlinuz
Loading file "/boot/vmlinuz" from usb device 0:3 (ROOT-A)
2932976 bytes read

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
board/nvidia/common/board.c
board/nvidia/common/board.h
board/nvidia/seaboard/seaboard.c

index e8253a083d759fa493298edb588b45caedac04d1..72d863002401837c9c25ad1cc68eea89ee91a251 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/uart.h>
 #include <spi.h>
+#include <asm/arch/usb.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -50,6 +51,12 @@ int timer_init(void)
        return 0;
 }
 
+void __pin_mux_usb(void)
+{
+}
+
+void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb")));
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -69,6 +76,11 @@ int board_init(void)
        /* boot param addr */
        gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100);
 
+#ifdef CONFIG_USB_EHCI_TEGRA
+       pin_mux_usb();
+       board_usb_init(gd->fdt_blob);
+#endif
+
        return 0;
 }
 
index a638af20413b71fbfdd501ca5af42f9f0f62806e..09fb158f4e3ff164d87778f6eff81ad843219dd6 100644 (file)
 void gpio_config_uart(void);
 void gpio_early_init_uart(void);
 
+/*
+ * Set up any pin muxing needed for USB (for now, since fdt doesn't support
+ * it). Boards can overwrite the default fucction which does nothing.
+ */
+void pin_mux_usb(void);
+
 #endif /* BOARD_H */
index 9ab6825bb8fed3f5978c09ae9fd7a22231372944..94efb1e83d5eef8793ab78a43fa52e03eb47e7af 100644 (file)
@@ -90,3 +90,9 @@ int board_mmc_init(bd_t *bd)
        return 0;
 }
 #endif
+
+void pin_mux_usb(void)
+{
+       /* For USB's GPIO PD0. For now, since we have no pinmux in fdt */
+       pinmux_tristate_disable(PINGRP_SLXK);
+}