blob: cd992941aa61189a4ef27bf6ff31a771e4839103 [file] [log] [blame]
Stephen Warrenf5dc27a2012-01-06 12:14:42 +00001/*
2 * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
Tom Rinie2378802016-01-14 22:05:13 -05007 * SPDX-License-Identifier: GPL-2.0
Stephen Warrenf5dc27a2012-01-06 12:14:42 +00008 */
9
10#include <common.h>
11#include <asm/io.h>
Tom Warrenab371962012-09-19 15:50:56 -070012#include <asm/arch/tegra.h>
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000013#include <asm/arch/pinmux.h>
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000014#include <asm/gpio.h>
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000015
Tom Warren2967d482012-06-01 08:22:14 +000016#ifdef CONFIG_TEGRA_MMC
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000017/*
18 * Routine: pin_mux_mmc
19 * Description: setup the pin muxes/tristate values for the SDMMC(s)
20 */
Tom Warren9745cf82013-02-21 12:31:30 +000021void pin_mux_mmc(void)
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000022{
23 /* SDMMC4: config 3, x8 on 2nd set of pins */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060024 pinmux_set_func(PMUX_PINGRP_ATB, PMUX_FUNC_SDIO4);
25 pinmux_set_func(PMUX_PINGRP_GMA, PMUX_FUNC_SDIO4);
26 pinmux_set_func(PMUX_PINGRP_GME, PMUX_FUNC_SDIO4);
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000027
Stephen Warrenf27f4e82014-03-21 12:28:58 -060028 pinmux_tristate_disable(PMUX_PINGRP_ATB);
29 pinmux_tristate_disable(PMUX_PINGRP_GMA);
30 pinmux_tristate_disable(PMUX_PINGRP_GME);
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000031
Lucas Stach2249fb62012-05-16 08:21:01 +000032 /* SDIO1: SDIO1_CLK, SDIO1_CMD, SDIO1_DAT[3:0] */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060033 pinmux_set_func(PMUX_PINGRP_SDIO1, PMUX_FUNC_SDIO1);
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000034
Stephen Warrenf27f4e82014-03-21 12:28:58 -060035 pinmux_tristate_disable(PMUX_PINGRP_SDIO1);
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000036
37 /* For power GPIO PV1 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060038 pinmux_tristate_disable(PMUX_PINGRP_UAC);
Stephen Warren07dde1e2012-05-15 11:58:11 +000039 /* For CD GPIO PV5 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060040 pinmux_tristate_disable(PMUX_PINGRP_GPV);
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000041}
Stephen Warrenf5dc27a2012-01-06 12:14:42 +000042#endif
Marc Dietrichb81dfe12012-11-25 11:26:12 +000043
44#ifdef CONFIG_LCD
45/* this is a weak define that we are overriding */
46void pin_mux_display(void)
47{
48 debug("init display pinmux\n");
49
50 /* EN_VDD_PANEL GPIO A4 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060051 pinmux_tristate_disable(PMUX_PINGRP_DAP2);
Marc Dietrichb81dfe12012-11-25 11:26:12 +000052}
53#endif