blob: c9da80d5eb1c31cd55909cb7cf0da1e11cb7b17f [file] [log] [blame]
Stephen Warrena69a33d2012-05-16 13:54:07 +00001/*
2 * (C) Copyright 2010-2012
3 * NVIDIA Corporation <www.nvidia.com>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stephen Warrena69a33d2012-05-16 13:54:07 +00006 */
7
8#include <common.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +00009#include <asm/io.h>
Tom Warrenab371962012-09-19 15:50:56 -070010#include <asm/arch/tegra.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000011#include <asm/arch/clock.h>
12#include <asm/arch/funcmux.h>
13#include <asm/arch/pinmux.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000014#include <asm/gpio.h>
Tom Warrenab371962012-09-19 15:50:56 -070015#include <i2c.h>
Thierry Reding811a9cc2014-12-09 22:25:14 -070016#include <netdev.h>
Stephen Warrena69a33d2012-05-16 13:54:07 +000017
Stephen Warrendbe5bb52012-11-01 12:14:37 +000018void pin_mux_usb(void)
19{
20 /*
21 * USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO
22 * in the current device tree.
23 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060024 pinmux_tristate_disable(PMUX_PINGRP_UAC);
Stephen Warrendbe5bb52012-11-01 12:14:37 +000025}
Stephen Warrena69a33d2012-05-16 13:54:07 +000026
Stephen Warren85acaba2012-06-12 08:33:41 +000027void pin_mux_spi(void)
28{
29 funcmux_select(PERIPH_ID_SPI1, FUNCMUX_SPI1_GMC_GMD);
30}
31
Stephen Warrena69a33d2012-05-16 13:54:07 +000032/*
33 * Routine: pin_mux_mmc
34 * Description: setup the pin muxes/tristate values for the SDMMC(s)
35 */
Tom Warren9745cf82013-02-21 12:31:30 +000036void pin_mux_mmc(void)
Stephen Warrena69a33d2012-05-16 13:54:07 +000037{
38 funcmux_select(PERIPH_ID_SDMMC1, FUNCMUX_SDMMC1_SDIO1_4BIT);
39 funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
40
41 /* For CD GPIO PP1 */
Stephen Warrenf27f4e82014-03-21 12:28:58 -060042 pinmux_tristate_disable(PMUX_PINGRP_DAP3);
Stephen Warrena69a33d2012-05-16 13:54:07 +000043}
Thierry Reding811a9cc2014-12-09 22:25:14 -070044
45#ifdef CONFIG_PCI
46int board_eth_init(bd_t *bis)
47{
48 return pci_eth_init(bis);
49}
50#endif