2 * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 /* Tegra30 high-level function multiplexing */
20 #include <asm/arch/clock.h>
21 #include <asm/arch/funcmux.h>
22 #include <asm/arch/pinmux.h>
24 int funcmux_select(enum periph_id id, int config)
26 int bad_config = config != FUNCMUX_DEFAULT;
31 case FUNCMUX_UART1_ULPI:
32 pinmux_set_func(PMUX_PINGRP_ULPI_DATA0_PO1,
34 pinmux_set_func(PMUX_PINGRP_ULPI_DATA1_PO2,
36 pinmux_set_func(PMUX_PINGRP_ULPI_DATA2_PO3,
38 pinmux_set_func(PMUX_PINGRP_ULPI_DATA3_PO4,
40 pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA0_PO1);
41 pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA1_PO2);
42 pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA2_PO3);
43 pinmux_tristate_disable(PMUX_PINGRP_ULPI_DATA3_PO4);
48 /* Add other periph IDs here as needed */
51 debug("%s: invalid periph_id %d", __func__, id);
56 debug("%s: invalid config %d for periph_id %d", __func__,