2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2012-01-06 12:14:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/io.h>
|
2012-09-19 22:50:56 +00:00
|
|
|
#include <asm/arch/tegra.h>
|
2012-01-06 12:14:42 +00:00
|
|
|
#include <asm/arch/pinmux.h>
|
|
|
|
#include <asm/gpio.h>
|
|
|
|
|
2017-01-10 04:32:07 +00:00
|
|
|
#ifdef CONFIG_MMC_SDHCI_TEGRA
|
2012-01-06 12:14:42 +00:00
|
|
|
/*
|
|
|
|
* Routine: pin_mux_mmc
|
|
|
|
* Description: setup the pin muxes/tristate values for the SDMMC(s)
|
|
|
|
*/
|
2013-02-21 12:31:30 +00:00
|
|
|
void pin_mux_mmc(void)
|
2012-01-06 12:14:42 +00:00
|
|
|
{
|
|
|
|
/* SDMMC4: config 3, x8 on 2nd set of pins */
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_set_func(PMUX_PINGRP_ATB, PMUX_FUNC_SDIO4);
|
|
|
|
pinmux_set_func(PMUX_PINGRP_GMA, PMUX_FUNC_SDIO4);
|
|
|
|
pinmux_set_func(PMUX_PINGRP_GME, PMUX_FUNC_SDIO4);
|
2012-01-06 12:14:42 +00:00
|
|
|
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_ATB);
|
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_GMA);
|
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_GME);
|
2012-01-06 12:14:42 +00:00
|
|
|
|
2012-05-16 08:21:01 +00:00
|
|
|
/* SDIO1: SDIO1_CLK, SDIO1_CMD, SDIO1_DAT[3:0] */
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_set_func(PMUX_PINGRP_SDIO1, PMUX_FUNC_SDIO1);
|
2012-01-06 12:14:42 +00:00
|
|
|
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_SDIO1);
|
2012-01-06 12:14:42 +00:00
|
|
|
|
|
|
|
/* For power GPIO PV1 */
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_UAC);
|
2012-05-15 11:58:11 +00:00
|
|
|
/* For CD GPIO PV5 */
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_GPV);
|
2012-01-06 12:14:42 +00:00
|
|
|
}
|
|
|
|
#endif
|
2012-11-25 11:26:12 +00:00
|
|
|
|
2016-01-30 23:37:56 +00:00
|
|
|
#ifdef CONFIG_DM_VIDEO
|
2012-11-25 11:26:12 +00:00
|
|
|
/* this is a weak define that we are overriding */
|
|
|
|
void pin_mux_display(void)
|
|
|
|
{
|
|
|
|
debug("init display pinmux\n");
|
|
|
|
|
|
|
|
/* EN_VDD_PANEL GPIO A4 */
|
2014-03-21 18:28:58 +00:00
|
|
|
pinmux_tristate_disable(PMUX_PINGRP_DAP2);
|
2012-11-25 11:26:12 +00:00
|
|
|
}
|
|
|
|
#endif
|