Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2010,2011 |
| 4 | * NVIDIA Corporation <www.nvidia.com> |
Thierry Reding | 99f9668 | 2012-06-04 20:02:24 +0000 | [diff] [blame] | 5 | * (C) Copyright 2011-2012 |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 6 | * Avionic Design GmbH <www.avionic-design.de> |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 9 | #include <ns16550.h> |
| 10 | #include <asm/io.h> |
| 11 | #include <asm/gpio.h> |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 12 | #include <asm/arch/clock.h> |
Simon Glass | b73aa38 | 2012-01-11 12:42:26 +0000 | [diff] [blame] | 13 | #include <asm/arch/funcmux.h> |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 14 | #include <asm/arch/pinmux.h> |
Tom Warren | ab37196 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 15 | #include <asm/arch/tegra.h> |
| 16 | #include <asm/arch-tegra/board.h> |
| 17 | #include <asm/arch-tegra/clk_rst.h> |
Tom Warren | ab37196 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 18 | #include <asm/arch-tegra/sys_proto.h> |
| 19 | #include <asm/arch-tegra/uart.h> |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 20 | |
Thierry Reding | 1cf1036 | 2012-06-04 20:02:28 +0000 | [diff] [blame] | 21 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
| 22 | void gpio_early_init(void) |
| 23 | { |
Stephen Warren | 7f20bb2 | 2016-05-12 12:07:39 -0600 | [diff] [blame] | 24 | gpio_request(TEGRA_GPIO(I, 4), NULL); |
| 25 | gpio_direction_output(TEGRA_GPIO(I, 4), 1); |
Thierry Reding | 1cf1036 | 2012-06-04 20:02:28 +0000 | [diff] [blame] | 26 | } |
| 27 | #endif |
| 28 | |
Masahiro Yamada | b2c8868 | 2017-01-10 13:32:07 +0900 | [diff] [blame] | 29 | #ifdef CONFIG_MMC_SDHCI_TEGRA |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +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) |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 35 | { |
Simon Glass | b73aa38 | 2012-01-11 12:42:26 +0000 | [diff] [blame] | 36 | funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT); |
Thierry Reding | 67f69db | 2012-06-04 20:02:29 +0000 | [diff] [blame] | 37 | /* for write-protect GPIO PI6 */ |
Stephen Warren | f27f4e8 | 2014-03-21 12:28:58 -0600 | [diff] [blame] | 38 | pinmux_tristate_disable(PMUX_PINGRP_ATA); |
Thierry Reding | 99f9668 | 2012-06-04 20:02:24 +0000 | [diff] [blame] | 39 | /* for CD GPIO PH2 */ |
Stephen Warren | f27f4e8 | 2014-03-21 12:28:58 -0600 | [diff] [blame] | 40 | pinmux_tristate_disable(PMUX_PINGRP_ATD); |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 41 | } |
Thierry Reding | bc2e7f8 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 42 | #endif |