]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tegra2: Fix conflicting pinmux for UARTA
authorStephen Warren <swarren@nvidia.com>
Fri, 6 Jan 2012 12:14:40 +0000 (12:14 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 12 Feb 2012 09:11:22 +0000 (10:11 +0100)
Tegra appears to boot with function UARTA pre-selected on mux
group SDB. If two mux groups are both set to the same function,
it's unclear which group's pins drive the RX signals into the
HW module. For UARTA, SDB certainly overrides group IRTX in
practice. To solve this, configure some alternative function on
SDB to avoid the conflict. Also, tri-state the group to avoid
driving any signal onto it until we know what's connected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/armv7/tegra2/funcmux.c

index 0878f511104f0dedfde820a76ea663d5823c75f6..140f8a7370170ea7bbdd276b6213e5f46ac70f7f 100644 (file)
@@ -37,6 +37,18 @@ int funcmux_select(enum periph_id id, int config)
                pinmux_set_func(PINGRP_IRTX, PMUX_FUNC_UARTA);
                pinmux_tristate_disable(PINGRP_IRRX);
                pinmux_tristate_disable(PINGRP_IRTX);
+               /*
+                * Tegra appears to boot with function UARTA pre-selected on
+                * mux group SDB. If two mux groups are both set to the same
+                * function, it's unclear which group's pins drive the RX
+                * signals into the HW module. For UARTA, SDB certainly
+                * overrides group IRTX in practice. To solve this, configure
+                * some alternative function on SDB to avoid the conflict. Also,
+                * tri-state the group to avoid driving any signal onto it until
+                * we know what's connected.
+                */
+               pinmux_tristate_enable(PINGRP_SDB);
+               pinmux_set_func(PINGRP_SDB,  PMUX_FUNC_SDIO3);
                break;
 
        case PERIPH_ID_UART2: