]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/toradex/colibri_t20/colibri_t20.c
ARM: tegra: get rid of colibri_t20-common
[karo-tx-uboot.git] / board / toradex / colibri_t20 / colibri_t20.c
1 /*
2  *  Copyright (C) 2012 Lucas Stach
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <asm/arch/clock.h>
9 #include <asm/arch/funcmux.h>
10 #include <asm/arch/pinmux.h>
11 #include <asm/arch-tegra/board.h>
12 #include <asm/gpio.h>
13
14 #ifdef CONFIG_TEGRA_MMC
15 /*
16  * Routine: pin_mux_mmc
17  * Description: setup the pin muxes/tristate values for the SDMMC(s)
18  */
19 void pin_mux_mmc(void)
20 {
21         funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
22         pinmux_tristate_disable(PMUX_PINGRP_GMB);
23 }
24 #endif
25
26 #ifdef CONFIG_TEGRA_NAND
27 void pin_mux_nand(void)
28 {
29         funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_NDFLASH_KBC_8_BIT);
30 }
31 #endif
32
33 #ifdef CONFIG_USB_EHCI_TEGRA
34 void pin_mux_usb(void)
35 {
36         /* module internal USB bus to connect ethernet chipset */
37         funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
38
39         /* ULPI reference clock output */
40         pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
41         pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
42
43         /* PHY reset GPIO */
44         pinmux_tristate_disable(PMUX_PINGRP_UAC);
45
46         /* VBus GPIO */
47         pinmux_tristate_disable(PMUX_PINGRP_DTE);
48
49         /* USB 1 aka Tegra USB port 3 VBus */
50         pinmux_tristate_disable(PMUX_PINGRP_SPIG);
51 }
52 #endif