blob: 137acb4523362fb97bc26075b2cbf7d4e039cc1b [file] [log] [blame]
Matt Porter725f0c52013-03-15 10:07:10 +00001/*
2 * mux.c
3 *
4 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <common.h>
17#include <asm/arch/sys_proto.h>
18#include <asm/arch/hardware.h>
19#include <asm/arch/mux.h>
20#include <asm/io.h>
21#include <i2c.h>
22#include "evm.h"
23
24static struct module_pin_mux uart0_pin_mux[] = {
25 {OFFSET(pincntl70), PULLUP_EN | MODE(0x01)}, /* UART0_RXD */
26 {OFFSET(pincntl71), PULLUP_EN | MODE(0x01)}, /* UART0_TXD */
27 {-1},
28};
29
30static struct module_pin_mux mmc1_pin_mux[] = {
31 {OFFSET(pincntl1), PULLUP_EN | MODE(0x01)}, /* SD1_CLK */
32 {OFFSET(pincntl2), PULLUP_EN | MODE(0x01)}, /* SD1_CMD */
33 {OFFSET(pincntl3), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[0] */
34 {OFFSET(pincntl4), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[1] */
35 {OFFSET(pincntl5), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[2] */
36 {OFFSET(pincntl6), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[3] */
37 {OFFSET(pincntl74), PULLUP_EN | MODE(0x40)}, /* SD1_POW */
38 {OFFSET(pincntl75), MODE(0x40)}, /* SD1_SDWP */
39 {OFFSET(pincntl80), PULLUP_EN | MODE(0x02)}, /* SD1_SDCD */
40 {-1},
41};
42
43void enable_uart0_pin_mux(void)
44{
45 configure_module_pin_mux(uart0_pin_mux);
46}
47
48void enable_mmc1_pin_mux(void)
49{
50 configure_module_pin_mux(mmc1_pin_mux);
51}