1 /*
2  *  (C) Copyright 2010-2012
3  *  NVIDIA Corporation <www.nvidia.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <asm/io.h>
10 #include <asm/arch/tegra.h>
11 #include <asm/arch/clock.h>
12 #include <asm/arch/funcmux.h>
13 #include <asm/arch/pinmux.h>
14 #include <asm/gpio.h>
15 #include <i2c.h>
16 #include <netdev.h>
17 
18 void 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 	 */
24 	pinmux_tristate_disable(PMUX_PINGRP_UAC);
25 }
26 
27 void pin_mux_spi(void)
28 {
29 	funcmux_select(PERIPH_ID_SPI1, FUNCMUX_SPI1_GMC_GMD);
30 }
31 
32 /*
33  * Routine: pin_mux_mmc
34  * Description: setup the pin muxes/tristate values for the SDMMC(s)
35  */
36 void pin_mux_mmc(void)
37 {
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 */
42 	pinmux_tristate_disable(PMUX_PINGRP_DAP3);
43 }
44 
45 #ifdef CONFIG_PCI
46 int board_eth_init(bd_t *bis)
47 {
48 	return pci_eth_init(bis);
49 }
50 #endif
51