All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] tegra: add ULPI on USB2 funcmux entry
@ 2012-05-31 11:51 Lucas Stach
  2012-05-31 11:51 ` [U-Boot] [PATCH 2/2] tegra: usb: fix wrong error check Lucas Stach
       [not found] ` <5FBF8E85CA34454794F0F7ECBA79798F379C416005@HQMAIL04.nvidia.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Lucas Stach @ 2012-05-31 11:51 UTC (permalink / raw)
  To: u-boot

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>
---
 arch/arm/cpu/armv7/tegra2/funcmux.c        |   13 ++++++++++++-
 arch/arm/include/asm/arch-tegra2/funcmux.h |    3 +++
 2 Dateien ge?ndert, 15 Zeilen hinzugef?gt(+), 1 Zeile entfernt(-)

diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c b/arch/arm/cpu/armv7/tegra2/funcmux.c
index 820ba4e9..455d010 100644
--- a/arch/arm/cpu/armv7/tegra2/funcmux.c
+++ b/arch/arm/cpu/armv7/tegra2/funcmux.c
@@ -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);
diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h b/arch/arm/include/asm/arch-tegra2/funcmux.h
index b16c496..3cbc7d2 100644
--- a/arch/arm/include/asm/arch-tegra2/funcmux.h
+++ b/arch/arm/include/asm/arch-tegra2/funcmux.h
@@ -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,
 };
 
 /**
-- 
1.7.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-31 19:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 11:51 [U-Boot] [PATCH 1/2] tegra: add ULPI on USB2 funcmux entry Lucas Stach
2012-05-31 11:51 ` [U-Boot] [PATCH 2/2] tegra: usb: fix wrong error check Lucas Stach
2012-05-31 13:14   ` Marek Vasut
2012-05-31 17:44   ` Stephen Warren
     [not found] ` <5FBF8E85CA34454794F0F7ECBA79798F379C416005@HQMAIL04.nvidia.com>
2012-05-31 19:43   ` [U-Boot] [PATCH 1/2] tegra: add ULPI on USB2 funcmux entry Lucas Stach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.