blob: 21ff0cda7f70ac47ef85b1b99eeb9ea4dde89e3c [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Stephen Warrena69a33d2012-05-16 13:54:07 +00002/*
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
Stephen Warrena69a33d2012-05-16 13:54:07 +00005 */
6
7#include <common.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +00008#include <asm/io.h>
Tom Warrenab371962012-09-19 15:50:56 -07009#include <asm/arch/tegra.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000010#include <asm/arch/clock.h>
11#include <asm/arch/funcmux.h>
12#include <asm/arch/pinmux.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000013#include <asm/gpio.h>
Tom Warrenab371962012-09-19 15:50:56 -070014#include <i2c.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000015
Stephen Warrendbe5bb52012-11-01 12:14:37 +000016void pin_mux_usb(void)
17{
18 /*
19 * USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO
20 * in the current device tree.
21 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060022 pinmux_tristate_disable(PMUX_PINGRP_UAC);
Stephen Warrendbe5bb52012-11-01 12:14:37 +000023}
Stephen Warrena69a33d2012-05-16 13:54:07 +000024
Stephen Warren85acaba2012-06-12 08:33:41 +000025void pin_mux_spi(void)
26{
27 funcmux_select(PERIPH_ID_SPI1, FUNCMUX_SPI1_GMC_GMD);
28}
29
Stephen Warrena69a33d2012-05-16 13:54:07 +000030/*
31 * Routine: pin_mux_mmc
32 * Description: setup the pin muxes/tristate values for the SDMMC(s)
33 */
Tom Warren9745cf82013-02-21 12:31:30 +000034void pin_mux_mmc(void)
Stephen Warrena69a33d2012-05-16 13:54:07 +000035{
36 funcmux_select(PERIPH_ID_SDMMC1, FUNCMUX_SDMMC1_SDIO1_4BIT);
37 funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
38
39 /* For CD GPIO PP1 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060040 pinmux_tristate_disable(PMUX_PINGRP_DAP3);
Stephen Warrena69a33d2012-05-16 13:54:07 +000041}