Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010,2011 |
| 3 | * NVIDIA Corporation <www.nvidia.com> |
Thierry Reding | ed900c5 | 2012-06-04 20:02:24 +0000 | [diff] [blame] | 4 | * (C) Copyright 2011-2012 |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 5 | * Avionic Design GmbH <www.avionic-design.de> |
| 6 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <ns16550.h> |
| 12 | #include <asm/io.h> |
| 13 | #include <asm/gpio.h> |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 14 | #include <asm/arch/clock.h> |
Simon Glass | f448302 | 2012-01-11 12:42:26 +0000 | [diff] [blame] | 15 | #include <asm/arch/funcmux.h> |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 16 | #include <asm/arch/pinmux.h> |
Tom Warren | 150c249 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 17 | #include <asm/arch/tegra.h> |
| 18 | #include <asm/arch-tegra/board.h> |
| 19 | #include <asm/arch-tegra/clk_rst.h> |
Tom Warren | 150c249 | 2012-09-19 15:50:56 -0700 | [diff] [blame] | 20 | #include <asm/arch-tegra/sys_proto.h> |
| 21 | #include <asm/arch-tegra/uart.h> |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 22 | |
Thierry Reding | 22d5850 | 2012-06-04 20:02:28 +0000 | [diff] [blame] | 23 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
| 24 | void gpio_early_init(void) |
| 25 | { |
| 26 | gpio_request(GPIO_PI4, NULL); |
| 27 | gpio_direction_output(GPIO_PI4, 1); |
| 28 | } |
| 29 | #endif |
| 30 | |
Tom Warren | 1e2d785 | 2012-06-01 08:22:14 +0000 | [diff] [blame] | 31 | #ifdef CONFIG_TEGRA_MMC |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 32 | /* |
| 33 | * Routine: pin_mux_mmc |
| 34 | * Description: setup the pin muxes/tristate values for the SDMMC(s) |
| 35 | */ |
Tom Warren | c9aa831 | 2013-02-21 12:31:30 +0000 | [diff] [blame] | 36 | void pin_mux_mmc(void) |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 37 | { |
Simon Glass | f448302 | 2012-01-11 12:42:26 +0000 | [diff] [blame] | 38 | funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT); |
Thierry Reding | 7925454 | 2012-06-04 20:02:29 +0000 | [diff] [blame] | 39 | /* for write-protect GPIO PI6 */ |
| 40 | pinmux_tristate_disable(PINGRP_ATA); |
Thierry Reding | ed900c5 | 2012-06-04 20:02:24 +0000 | [diff] [blame] | 41 | /* for CD GPIO PH2 */ |
| 42 | pinmux_tristate_disable(PINGRP_ATD); |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 43 | } |
Thierry Reding | b1c0c73 | 2011-11-17 00:10:24 +0000 | [diff] [blame] | 44 | #endif |