2 * (C) Copyright 2010,2011
3 * NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/tegra.h>
11 #include <asm/arch/clock.h>
12 #include <asm/arch/funcmux.h>
13 #include <asm/arch/gpio.h>
14 #include <asm/arch/pinmux.h>
17 /* TODO: Remove this code when the SPI switch is working */
18 #if (CONFIG_MACH_TYPE != MACH_TYPE_VENTANA)
19 void gpio_early_init_uart(void)
21 /* Enable UART via GPIO_PI3 (port 8, bit 3) so serial console works */
22 #ifndef CONFIG_SPL_BUILD
23 gpio_request(GPIO_PI3, NULL);
25 gpio_direction_output(GPIO_PI3, 0);
29 #ifdef CONFIG_TEGRA_MMC
31 * Routine: pin_mux_mmc
32 * Description: setup the pin muxes/tristate values for the SDMMC(s)
34 void pin_mux_mmc(void)
36 funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
37 funcmux_select(PERIPH_ID_SDMMC3, FUNCMUX_SDMMC3_SDB_4BIT);
39 /* For power GPIO PI6 */
40 pinmux_tristate_disable(PMUX_PINGRP_ATA);
42 pinmux_tristate_disable(PMUX_PINGRP_ATC);
46 void pin_mux_usb(void)
48 /* For USB's GPIO PD0. For now, since we have no pinmux in fdt */
49 pinmux_tristate_disable(PMUX_PINGRP_SLXK);