Gabe Black | 08d5a89 | 2013-10-03 04:35:01 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2013 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef __SOC_NVIDIA_TEGRA_PINMUX_H__ |
| 21 | #define __SOC_NVIDIA_TEGRA_PINMUX_H__ |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | |
| 25 | void pinmux_set_config(int pin_index, uint32_t config); |
| 26 | uint32_t pinmux_get_config(int pin_index); |
| 27 | |
| 28 | enum { |
| 29 | PINMUX_FUNC_MASK = 3 << 0, |
| 30 | |
| 31 | PINMUX_PULL_MASK = 3 << 2, |
| 32 | PINMUX_PULL_NONE = 0 << 2, |
| 33 | PINMUX_PULL_DOWN = 1 << 2, |
| 34 | PINMUX_PULL_UP = 2 << 2, |
| 35 | |
| 36 | PINMUX_TRISTATE = 1 << 4, |
| 37 | PINMUX_INPUT_ENABLE = 1 << 5, |
| 38 | PINMUX_OPEN_DRAIN = 1 << 6, |
| 39 | PINMUX_LOCK = 1 << 7, |
| 40 | PINMUX_IO_RESET = 1 << 8, |
| 41 | PINMUX_RCV_SEL = 1 << 9 |
| 42 | }; |
| 43 | |
| 44 | #endif /* __SOC_NVIDIA_TEGRA_PINMUX_H__ */ |