]> git.sur5r.net Git - u-boot/commitdiff
tegra: add ULPI on USB2 funcmux entry
authorLucas Stach <dev@lynxeye.de>
Thu, 31 May 2012 01:51:01 +0000 (01:51 +0000)
committerAlbert ARIBAUD (U-Boot) <uboot@lilith.(none)>
Mon, 9 Jul 2012 20:44:33 +0000 (22:44 +0200)
This is needed as a prerequisite for Tegra USB ULPI support
within U-Boot.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/armv7/tegra2/funcmux.c
arch/arm/include/asm/arch-tegra2/funcmux.h

index 820ba4e902dc0e08163c882498c6d1496ada5942..455d01011f874230101448d719d483993cd6445a 100644 (file)
@@ -209,9 +209,20 @@ int funcmux_select(enum periph_id id, int config)
                                pinmux_set_func(grp[i], PMUX_FUNC_KBC);
                                pinmux_set_pullupdown(grp[i], PMUX_PULL_UP);
                        }
+               }
+               break;
 
-                       break;
+       case PERIPH_ID_USB2:
+               if (config == FUNCMUX_USB2_ULPI) {
+                       pinmux_set_func(PINGRP_UAA, PMUX_FUNC_ULPI);
+                       pinmux_set_func(PINGRP_UAB, PMUX_FUNC_ULPI);
+                       pinmux_set_func(PINGRP_UDA, PMUX_FUNC_ULPI);
+
+                       pinmux_tristate_disable(PINGRP_UAA);
+                       pinmux_tristate_disable(PINGRP_UAB);
+                       pinmux_tristate_disable(PINGRP_UDA);
                }
+               break;
 
        default:
                debug("%s: invalid periph_id %d", __func__, id);
index b16c496122a06422b2da7ca92d8f0dab4bd3ab49..3cbc7d2fe1a3f13658dd1adb4023a3a8d941af88 100644 (file)
@@ -51,6 +51,9 @@ enum {
        FUNCMUX_SDMMC4_ATC_ATD_8BIT = 0,
        FUNCMUX_SDMMC4_ATB_GMA_4_BIT,
        FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT,
+
+       /* USB configs */
+       FUNCMUX_USB2_ULPI = 0,
 };
 
 /**