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