Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010-2012 |
| 3 | * NVIDIA Corporation <www.nvidia.com> |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 9 | #include <asm/io.h> |
Tom Warren | 150c249 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 10 | #include <asm/arch/tegra.h> |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 11 | #include <asm/arch/clock.h> |
| 12 | #include <asm/arch/funcmux.h> |
| 13 | #include <asm/arch/pinmux.h> |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 14 | #include <asm/gpio.h> |
Tom Warren | 150c249 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 15 | #include <i2c.h> |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 16 | |
Stephen Warren | 7155dc9 | 2012-11-01 12:14:37 +0000 | [diff] [blame] | 17 | void pin_mux_usb(void) |
| 18 | { |
| 19 | /* |
| 20 | * USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO |
| 21 | * in the current device tree. |
| 22 | */ |
| 23 | pinmux_tristate_disable(PINGRP_UAC); |
| 24 | } |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 25 | |
Stephen Warren | 2db7b95 | 2012-06-12 08:33:41 +0000 | [diff] [blame] | 26 | void pin_mux_spi(void) |
| 27 | { |
| 28 | funcmux_select(PERIPH_ID_SPI1, FUNCMUX_SPI1_GMC_GMD); |
| 29 | } |
| 30 | |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 31 | /* |
| 32 | * Routine: pin_mux_mmc |
| 33 | * Description: setup the pin muxes/tristate values for the SDMMC(s) |
| 34 | */ |
Tom Warren | c9aa831 | 2013-02-21 12:31:30 +0000 | [diff] [blame] | 35 | void pin_mux_mmc(void) |
Stephen Warren | 39e3711 | 2012-05-16 13:54:07 +0000 | [diff] [blame] | 36 | { |
| 37 | funcmux_select(PERIPH_ID_SDMMC1, FUNCMUX_SDMMC1_SDIO1_4BIT); |
| 38 | funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT); |
| 39 | |
| 40 | /* For CD GPIO PP1 */ |
| 41 | pinmux_tristate_disable(PINGRP_DAP3); |
| 42 | } |