Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. |
| 3 | * Copyright (c) 2011 The Chromium OS Authors. |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <asm/io.h> |
| 10 | #include <asm/arch/pinmux.h> |
| 11 | |
| 12 | /* return 1 if a pingrp is in range */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 13 | #define pmux_pingrp_isvalid(pin) (((pin) >= 0) && ((pin) < PMUX_PINGRP_COUNT)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 14 | |
| 15 | /* return 1 if a pmux_func is in range */ |
| 16 | #define pmux_func_isvalid(func) \ |
Stephen Warren | d381294 | 2014-03-21 15:58:03 -0600 | [diff] [blame] | 17 | (((func) >= 0) && ((func) < PMUX_FUNC_COUNT)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 18 | |
| 19 | /* return 1 if a pin_pupd_is in range */ |
| 20 | #define pmux_pin_pupd_isvalid(pupd) \ |
| 21 | (((pupd) >= PMUX_PULL_NORMAL) && ((pupd) <= PMUX_PULL_UP)) |
| 22 | |
| 23 | /* return 1 if a pin_tristate_is in range */ |
| 24 | #define pmux_pin_tristate_isvalid(tristate) \ |
| 25 | (((tristate) >= PMUX_TRI_NORMAL) && ((tristate) <= PMUX_TRI_TRISTATE)) |
| 26 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 27 | #ifdef TEGRA_PMX_PINS_HAVE_E_INPUT |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 28 | /* return 1 if a pin_io_is in range */ |
| 29 | #define pmux_pin_io_isvalid(io) \ |
| 30 | (((io) >= PMUX_PIN_OUTPUT) && ((io) <= PMUX_PIN_INPUT)) |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 31 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 32 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 33 | #ifdef TEGRA_PMX_PINS_HAVE_LOCK |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 34 | /* return 1 if a pin_lock is in range */ |
| 35 | #define pmux_pin_lock_isvalid(lock) \ |
| 36 | (((lock) >= PMUX_PIN_LOCK_DISABLE) && ((lock) <= PMUX_PIN_LOCK_ENABLE)) |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 37 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 38 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 39 | #ifdef TEGRA_PMX_PINS_HAVE_OD |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 40 | /* return 1 if a pin_od is in range */ |
| 41 | #define pmux_pin_od_isvalid(od) \ |
| 42 | (((od) >= PMUX_PIN_OD_DISABLE) && ((od) <= PMUX_PIN_OD_ENABLE)) |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 43 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 44 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 45 | #ifdef TEGRA_PMX_PINS_HAVE_IO_RESET |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 46 | /* return 1 if a pin_ioreset_is in range */ |
| 47 | #define pmux_pin_ioreset_isvalid(ioreset) \ |
| 48 | (((ioreset) >= PMUX_PIN_IO_RESET_DISABLE) && \ |
| 49 | ((ioreset) <= PMUX_PIN_IO_RESET_ENABLE)) |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 50 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 51 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 52 | #ifdef TEGRA_PMX_PINS_HAVE_RCV_SEL |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 53 | /* return 1 if a pin_rcv_sel_is in range */ |
| 54 | #define pmux_pin_rcv_sel_isvalid(rcv_sel) \ |
| 55 | (((rcv_sel) >= PMUX_PIN_RCV_SEL_NORMAL) && \ |
| 56 | ((rcv_sel) <= PMUX_PIN_RCV_SEL_HIGH)) |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 57 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 58 | |
Stephen Warren | bc13472 | 2015-02-24 14:08:26 -0700 | [diff] [blame] | 59 | #ifdef TEGRA_PMX_GRPS_HAVE_LPMD |
| 60 | #define pmux_lpmd_isvalid(lpm) \ |
| 61 | (((lpm) >= PMUX_LPMD_X8) && ((lpm) <= PMUX_LPMD_X)) |
| 62 | #endif |
| 63 | |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 64 | #if defined(TEGRA_PMX_PINS_HAVE_SCHMT) || defined(TEGRA_PMX_GRPS_HAVE_SCHMT) |
Stephen Warren | bc13472 | 2015-02-24 14:08:26 -0700 | [diff] [blame] | 65 | #define pmux_schmt_isvalid(schmt) \ |
| 66 | (((schmt) >= PMUX_SCHMT_DISABLE) && ((schmt) <= PMUX_SCHMT_ENABLE)) |
| 67 | #endif |
| 68 | |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 69 | #if defined(TEGRA_PMX_PINS_HAVE_HSM) || defined(TEGRA_PMX_GRPS_HAVE_HSM) |
Stephen Warren | bc13472 | 2015-02-24 14:08:26 -0700 | [diff] [blame] | 70 | #define pmux_hsm_isvalid(hsm) \ |
| 71 | (((hsm) >= PMUX_HSM_DISABLE) && ((hsm) <= PMUX_HSM_ENABLE)) |
| 72 | #endif |
| 73 | |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 74 | #define _R(offset) (u32 *)(NV_PA_APB_MISC_BASE + (offset)) |
| 75 | |
| 76 | #if defined(CONFIG_TEGRA20) |
| 77 | |
| 78 | #define MUX_REG(grp) _R(0x80 + ((tegra_soc_pingroups[grp].ctl_id / 16) * 4)) |
| 79 | #define MUX_SHIFT(grp) ((tegra_soc_pingroups[grp].ctl_id % 16) * 2) |
| 80 | |
| 81 | #define PULL_REG(grp) _R(0xa0 + ((tegra_soc_pingroups[grp].pull_id / 16) * 4)) |
| 82 | #define PULL_SHIFT(grp) ((tegra_soc_pingroups[grp].pull_id % 16) * 2) |
| 83 | |
| 84 | #define TRI_REG(grp) _R(0x14 + (((grp) / 32) * 4)) |
| 85 | #define TRI_SHIFT(grp) ((grp) % 32) |
| 86 | |
| 87 | #else |
| 88 | |
| 89 | #define REG(pin) _R(0x3000 + ((pin) * 4)) |
| 90 | |
| 91 | #define MUX_REG(pin) REG(pin) |
| 92 | #define MUX_SHIFT(pin) 0 |
| 93 | |
| 94 | #define PULL_REG(pin) REG(pin) |
| 95 | #define PULL_SHIFT(pin) 2 |
| 96 | |
| 97 | #define TRI_REG(pin) REG(pin) |
| 98 | #define TRI_SHIFT(pin) 4 |
| 99 | |
| 100 | #endif /* CONFIG_TEGRA20 */ |
| 101 | |
Stephen Warren | 790f771 | 2015-02-24 14:08:29 -0700 | [diff] [blame^] | 102 | #define DRV_REG(group) _R(TEGRA_PMX_SOC_DRV_GROUP_BASE_REG + ((group) * 4)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 103 | |
Stephen Warren | b2cd3d8 | 2015-02-24 14:08:27 -0700 | [diff] [blame] | 104 | /* |
| 105 | * We could force arch-tegraNN/pinmux.h to define all of these. However, |
| 106 | * that's a lot of defines, and for now it's manageable to just put a |
| 107 | * special case here. It's possible this decision will change with future |
| 108 | * SoCs. |
| 109 | */ |
| 110 | #ifdef CONFIG_TEGRA210 |
| 111 | #define IO_SHIFT 6 |
| 112 | #define LOCK_SHIFT 7 |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 113 | #ifdef TEGRA_PMX_PINS_HAVE_HSM |
| 114 | #define HSM_SHIFT 9 |
| 115 | #endif |
Stephen Warren | b2cd3d8 | 2015-02-24 14:08:27 -0700 | [diff] [blame] | 116 | #define OD_SHIFT 11 |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 117 | #ifdef TEGRA_PMX_PINS_HAVE_SCHMT |
| 118 | #define SCHMT_SHIFT 12 |
| 119 | #endif |
Stephen Warren | b2cd3d8 | 2015-02-24 14:08:27 -0700 | [diff] [blame] | 120 | #else |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 121 | #define IO_SHIFT 5 |
| 122 | #define OD_SHIFT 6 |
| 123 | #define LOCK_SHIFT 7 |
| 124 | #define IO_RESET_SHIFT 8 |
| 125 | #define RCV_SEL_SHIFT 9 |
Stephen Warren | b2cd3d8 | 2015-02-24 14:08:27 -0700 | [diff] [blame] | 126 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 127 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 128 | #ifdef TEGRA_PMX_SOC_HAS_IO_CLAMPING |
Stephen Warren | bb14469 | 2014-04-22 14:37:54 -0600 | [diff] [blame] | 129 | /* This register/field only exists on Tegra114 and later */ |
| 130 | #define APB_MISC_PP_PINMUX_GLOBAL_0 0x40 |
| 131 | #define CLAMP_INPUTS_WHEN_TRISTATED 1 |
| 132 | |
| 133 | void pinmux_set_tristate_input_clamping(void) |
| 134 | { |
| 135 | u32 *reg = _R(APB_MISC_PP_PINMUX_GLOBAL_0); |
Stephen Warren | bb14469 | 2014-04-22 14:37:54 -0600 | [diff] [blame] | 136 | |
Stephen Warren | f799b03 | 2015-02-18 13:27:03 -0700 | [diff] [blame] | 137 | setbits_le32(reg, CLAMP_INPUTS_WHEN_TRISTATED); |
| 138 | } |
| 139 | |
| 140 | void pinmux_clear_tristate_input_clamping(void) |
| 141 | { |
| 142 | u32 *reg = _R(APB_MISC_PP_PINMUX_GLOBAL_0); |
| 143 | |
| 144 | clrbits_le32(reg, CLAMP_INPUTS_WHEN_TRISTATED); |
Stephen Warren | bb14469 | 2014-04-22 14:37:54 -0600 | [diff] [blame] | 145 | } |
| 146 | #endif |
| 147 | |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 148 | void pinmux_set_func(enum pmux_pingrp pin, enum pmux_func func) |
| 149 | { |
| 150 | u32 *reg = MUX_REG(pin); |
| 151 | int i, mux = -1; |
| 152 | u32 val; |
| 153 | |
Stephen Warren | 4a68d34 | 2014-04-22 14:37:52 -0600 | [diff] [blame] | 154 | if (func == PMUX_FUNC_DEFAULT) |
| 155 | return; |
| 156 | |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 157 | /* Error check on pin and func */ |
| 158 | assert(pmux_pingrp_isvalid(pin)); |
| 159 | assert(pmux_func_isvalid(func)); |
| 160 | |
Stephen Warren | d381294 | 2014-03-21 15:58:03 -0600 | [diff] [blame] | 161 | if (func >= PMUX_FUNC_RSVD1) { |
| 162 | mux = (func - PMUX_FUNC_RSVD1) & 3; |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 163 | } else { |
| 164 | /* Search for the appropriate function */ |
| 165 | for (i = 0; i < 4; i++) { |
| 166 | if (tegra_soc_pingroups[pin].funcs[i] == func) { |
| 167 | mux = i; |
| 168 | break; |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | assert(mux != -1); |
| 173 | |
| 174 | val = readl(reg); |
| 175 | val &= ~(3 << MUX_SHIFT(pin)); |
| 176 | val |= (mux << MUX_SHIFT(pin)); |
| 177 | writel(val, reg); |
| 178 | } |
| 179 | |
| 180 | void pinmux_set_pullupdown(enum pmux_pingrp pin, enum pmux_pull pupd) |
| 181 | { |
| 182 | u32 *reg = PULL_REG(pin); |
| 183 | u32 val; |
| 184 | |
| 185 | /* Error check on pin and pupd */ |
| 186 | assert(pmux_pingrp_isvalid(pin)); |
| 187 | assert(pmux_pin_pupd_isvalid(pupd)); |
| 188 | |
| 189 | val = readl(reg); |
| 190 | val &= ~(3 << PULL_SHIFT(pin)); |
| 191 | val |= (pupd << PULL_SHIFT(pin)); |
| 192 | writel(val, reg); |
| 193 | } |
| 194 | |
Stephen Warren | a45fa43 | 2014-03-21 12:28:55 -0600 | [diff] [blame] | 195 | static void pinmux_set_tristate(enum pmux_pingrp pin, int tri) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 196 | { |
| 197 | u32 *reg = TRI_REG(pin); |
| 198 | u32 val; |
| 199 | |
| 200 | /* Error check on pin */ |
| 201 | assert(pmux_pingrp_isvalid(pin)); |
| 202 | assert(pmux_pin_tristate_isvalid(tri)); |
| 203 | |
| 204 | val = readl(reg); |
| 205 | if (tri == PMUX_TRI_TRISTATE) |
| 206 | val |= (1 << TRI_SHIFT(pin)); |
| 207 | else |
| 208 | val &= ~(1 << TRI_SHIFT(pin)); |
| 209 | writel(val, reg); |
| 210 | } |
| 211 | |
| 212 | void pinmux_tristate_enable(enum pmux_pingrp pin) |
| 213 | { |
| 214 | pinmux_set_tristate(pin, PMUX_TRI_TRISTATE); |
| 215 | } |
| 216 | |
| 217 | void pinmux_tristate_disable(enum pmux_pingrp pin) |
| 218 | { |
| 219 | pinmux_set_tristate(pin, PMUX_TRI_NORMAL); |
| 220 | } |
| 221 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 222 | #ifdef TEGRA_PMX_PINS_HAVE_E_INPUT |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 223 | void pinmux_set_io(enum pmux_pingrp pin, enum pmux_pin_io io) |
| 224 | { |
| 225 | u32 *reg = REG(pin); |
| 226 | u32 val; |
| 227 | |
| 228 | if (io == PMUX_PIN_NONE) |
| 229 | return; |
| 230 | |
| 231 | /* Error check on pin and io */ |
| 232 | assert(pmux_pingrp_isvalid(pin)); |
| 233 | assert(pmux_pin_io_isvalid(io)); |
| 234 | |
| 235 | val = readl(reg); |
| 236 | if (io == PMUX_PIN_INPUT) |
| 237 | val |= (io & 1) << IO_SHIFT; |
| 238 | else |
| 239 | val &= ~(1 << IO_SHIFT); |
| 240 | writel(val, reg); |
| 241 | } |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 242 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 243 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 244 | #ifdef TEGRA_PMX_PINS_HAVE_LOCK |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 245 | static void pinmux_set_lock(enum pmux_pingrp pin, enum pmux_pin_lock lock) |
| 246 | { |
| 247 | u32 *reg = REG(pin); |
| 248 | u32 val; |
| 249 | |
| 250 | if (lock == PMUX_PIN_LOCK_DEFAULT) |
| 251 | return; |
| 252 | |
| 253 | /* Error check on pin and lock */ |
| 254 | assert(pmux_pingrp_isvalid(pin)); |
| 255 | assert(pmux_pin_lock_isvalid(lock)); |
| 256 | |
| 257 | val = readl(reg); |
| 258 | if (lock == PMUX_PIN_LOCK_ENABLE) { |
| 259 | val |= (1 << LOCK_SHIFT); |
| 260 | } else { |
| 261 | if (val & (1 << LOCK_SHIFT)) |
| 262 | printf("%s: Cannot clear LOCK bit!\n", __func__); |
| 263 | val &= ~(1 << LOCK_SHIFT); |
| 264 | } |
| 265 | writel(val, reg); |
| 266 | |
| 267 | return; |
| 268 | } |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 269 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 270 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 271 | #ifdef TEGRA_PMX_PINS_HAVE_OD |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 272 | static void pinmux_set_od(enum pmux_pingrp pin, enum pmux_pin_od od) |
| 273 | { |
| 274 | u32 *reg = REG(pin); |
| 275 | u32 val; |
| 276 | |
| 277 | if (od == PMUX_PIN_OD_DEFAULT) |
| 278 | return; |
| 279 | |
| 280 | /* Error check on pin and od */ |
| 281 | assert(pmux_pingrp_isvalid(pin)); |
| 282 | assert(pmux_pin_od_isvalid(od)); |
| 283 | |
| 284 | val = readl(reg); |
| 285 | if (od == PMUX_PIN_OD_ENABLE) |
| 286 | val |= (1 << OD_SHIFT); |
| 287 | else |
| 288 | val &= ~(1 << OD_SHIFT); |
| 289 | writel(val, reg); |
| 290 | |
| 291 | return; |
| 292 | } |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 293 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 294 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 295 | #ifdef TEGRA_PMX_PINS_HAVE_IO_RESET |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 296 | static void pinmux_set_ioreset(enum pmux_pingrp pin, |
| 297 | enum pmux_pin_ioreset ioreset) |
| 298 | { |
| 299 | u32 *reg = REG(pin); |
| 300 | u32 val; |
| 301 | |
| 302 | if (ioreset == PMUX_PIN_IO_RESET_DEFAULT) |
| 303 | return; |
| 304 | |
| 305 | /* Error check on pin and ioreset */ |
| 306 | assert(pmux_pingrp_isvalid(pin)); |
| 307 | assert(pmux_pin_ioreset_isvalid(ioreset)); |
| 308 | |
| 309 | val = readl(reg); |
| 310 | if (ioreset == PMUX_PIN_IO_RESET_ENABLE) |
| 311 | val |= (1 << IO_RESET_SHIFT); |
| 312 | else |
| 313 | val &= ~(1 << IO_RESET_SHIFT); |
| 314 | writel(val, reg); |
| 315 | |
| 316 | return; |
| 317 | } |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 318 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 319 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 320 | #ifdef TEGRA_PMX_PINS_HAVE_RCV_SEL |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 321 | static void pinmux_set_rcv_sel(enum pmux_pingrp pin, |
| 322 | enum pmux_pin_rcv_sel rcv_sel) |
| 323 | { |
| 324 | u32 *reg = REG(pin); |
| 325 | u32 val; |
| 326 | |
| 327 | if (rcv_sel == PMUX_PIN_RCV_SEL_DEFAULT) |
| 328 | return; |
| 329 | |
| 330 | /* Error check on pin and rcv_sel */ |
| 331 | assert(pmux_pingrp_isvalid(pin)); |
| 332 | assert(pmux_pin_rcv_sel_isvalid(rcv_sel)); |
| 333 | |
| 334 | val = readl(reg); |
| 335 | if (rcv_sel == PMUX_PIN_RCV_SEL_HIGH) |
| 336 | val |= (1 << RCV_SEL_SHIFT); |
| 337 | else |
| 338 | val &= ~(1 << RCV_SEL_SHIFT); |
| 339 | writel(val, reg); |
| 340 | |
| 341 | return; |
| 342 | } |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 343 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 344 | |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 345 | #ifdef TEGRA_PMX_PINS_HAVE_SCHMT |
| 346 | static void pinmux_set_schmt(enum pmux_pingrp pin, enum pmux_schmt schmt) |
| 347 | { |
| 348 | u32 *reg = REG(grp); |
| 349 | u32 val; |
| 350 | |
| 351 | /* NONE means unspecified/do not change/use POR value */ |
| 352 | if (schmt == PMUX_SCHMT_NONE) |
| 353 | return; |
| 354 | |
| 355 | /* Error check pad */ |
| 356 | assert(pmux_pingrp_isvalid(pin)); |
| 357 | assert(pmux_schmt_isvalid(schmt)); |
| 358 | |
| 359 | val = readl(reg); |
| 360 | if (schmt == PMUX_SCHMT_ENABLE) |
| 361 | val |= (1 << SCHMT_SHIFT); |
| 362 | else |
| 363 | val &= ~(1 << SCHMT_SHIFT); |
| 364 | writel(val, reg); |
| 365 | |
| 366 | return; |
| 367 | } |
| 368 | #endif |
| 369 | |
| 370 | #ifdef TEGRA_PMX_PINS_HAVE_HSM |
| 371 | static void pinmux_set_hsm(enum pmux_pingrp pin, enum pmux_hsm hsm) |
| 372 | { |
| 373 | u32 *reg = REG(grp); |
| 374 | u32 val; |
| 375 | |
| 376 | /* NONE means unspecified/do not change/use POR value */ |
| 377 | if (hsm == PMUX_HSM_NONE) |
| 378 | return; |
| 379 | |
| 380 | /* Error check pad */ |
| 381 | assert(pmux_pingrp_isvalid(pin)); |
| 382 | assert(pmux_hsm_isvalid(hsm)); |
| 383 | |
| 384 | val = readl(reg); |
| 385 | if (hsm == PMUX_HSM_ENABLE) |
| 386 | val |= (1 << HSM_SHIFT); |
| 387 | else |
| 388 | val &= ~(1 << HSM_SHIFT); |
| 389 | writel(val, reg); |
| 390 | |
| 391 | return; |
| 392 | } |
| 393 | #endif |
| 394 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 395 | static void pinmux_config_pingrp(const struct pmux_pingrp_config *config) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 396 | { |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 397 | enum pmux_pingrp pin = config->pingrp; |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 398 | |
| 399 | pinmux_set_func(pin, config->func); |
| 400 | pinmux_set_pullupdown(pin, config->pull); |
| 401 | pinmux_set_tristate(pin, config->tristate); |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 402 | #ifdef TEGRA_PMX_PINS_HAVE_E_INPUT |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 403 | pinmux_set_io(pin, config->io); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 404 | #endif |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 405 | #ifdef TEGRA_PMX_PINS_HAVE_LOCK |
| 406 | pinmux_set_lock(pin, config->lock); |
| 407 | #endif |
| 408 | #ifdef TEGRA_PMX_PINS_HAVE_OD |
| 409 | pinmux_set_od(pin, config->od); |
| 410 | #endif |
| 411 | #ifdef TEGRA_PMX_PINS_HAVE_IO_RESET |
| 412 | pinmux_set_ioreset(pin, config->ioreset); |
| 413 | #endif |
| 414 | #ifdef TEGRA_PMX_PINS_HAVE_RCV_SEL |
| 415 | pinmux_set_rcv_sel(pin, config->rcv_sel); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 416 | #endif |
Stephen Warren | f2c60ee | 2015-02-24 14:08:28 -0700 | [diff] [blame] | 417 | #ifdef TEGRA_PMX_PINS_HAVE_SCHMT |
| 418 | pinmux_set_schmt(pin, config->schmt); |
| 419 | #endif |
| 420 | #ifdef TEGRA_PMX_PINS_HAVE_HSM |
| 421 | pinmux_set_hsm(pin, config->hsm); |
| 422 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 423 | } |
| 424 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 425 | void pinmux_config_pingrp_table(const struct pmux_pingrp_config *config, |
| 426 | int len) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 427 | { |
| 428 | int i; |
| 429 | |
| 430 | for (i = 0; i < len; i++) |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 431 | pinmux_config_pingrp(&config[i]); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 432 | } |
| 433 | |
Stephen Warren | 7a28441 | 2015-02-24 14:08:24 -0700 | [diff] [blame] | 434 | #ifdef TEGRA_PMX_SOC_HAS_DRVGRPS |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 435 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 436 | #define pmux_drvgrp_isvalid(pd) (((pd) >= 0) && ((pd) < PMUX_DRVGRP_COUNT)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 437 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 438 | #define pmux_slw_isvalid(slw) \ |
| 439 | (((slw) >= PMUX_SLWF_MIN) && ((slw) <= PMUX_SLWF_MAX)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 440 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 441 | #define pmux_drv_isvalid(drv) \ |
| 442 | (((drv) >= PMUX_DRVUP_MIN) && ((drv) <= PMUX_DRVUP_MAX)) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 443 | |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 444 | #ifdef TEGRA_PMX_GRPS_HAVE_HSM |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 445 | #define HSM_SHIFT 2 |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 446 | #endif |
| 447 | #ifdef TEGRA_PMX_GRPS_HAVE_SCHMT |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 448 | #define SCHMT_SHIFT 3 |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 449 | #endif |
| 450 | #ifdef TEGRA_PMX_GRPS_HAVE_LPMD |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 451 | #define LPMD_SHIFT 4 |
| 452 | #define LPMD_MASK (3 << LPMD_SHIFT) |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 453 | #endif |
Stephen Warren | 9f21c1a | 2015-02-24 14:08:23 -0700 | [diff] [blame] | 454 | /* |
| 455 | * Note that the following DRV* and SLW* defines are accurate for many drive |
| 456 | * groups on many SoCs. We really need a per-group data structure to solve |
| 457 | * this, since the fields are in different positions/sizes in different |
| 458 | * registers (for different groups). |
| 459 | * |
| 460 | * On Tegra30/114/124, the DRV*_SHIFT values vary. |
| 461 | * On Tegra30, the SLW*_SHIFT values vary. |
| 462 | * On Tegra30/114/124/210, the DRV*_MASK values vary, although the values |
| 463 | * below are wide enough to cover the widest fields, and hopefully don't |
| 464 | * interfere with any other fields. |
| 465 | * On Tegra30, the SLW*_MASK values vary, but we can't use a value that's |
| 466 | * wide enough to cover all cases, since that would cause the field to |
| 467 | * overlap with other fields in the narrower cases. |
| 468 | */ |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 469 | #define DRVDN_SHIFT 12 |
| 470 | #define DRVDN_MASK (0x7F << DRVDN_SHIFT) |
| 471 | #define DRVUP_SHIFT 20 |
| 472 | #define DRVUP_MASK (0x7F << DRVUP_SHIFT) |
| 473 | #define SLWR_SHIFT 28 |
| 474 | #define SLWR_MASK (3 << SLWR_SHIFT) |
| 475 | #define SLWF_SHIFT 30 |
| 476 | #define SLWF_MASK (3 << SLWF_SHIFT) |
| 477 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 478 | static void pinmux_set_drvup_slwf(enum pmux_drvgrp grp, int slwf) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 479 | { |
| 480 | u32 *reg = DRV_REG(grp); |
| 481 | u32 val; |
| 482 | |
| 483 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 484 | if (slwf == PMUX_SLWF_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 485 | return; |
| 486 | |
| 487 | /* Error check on pad and slwf */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 488 | assert(pmux_drvgrp_isvalid(grp)); |
| 489 | assert(pmux_slw_isvalid(slwf)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 490 | |
| 491 | val = readl(reg); |
| 492 | val &= ~SLWF_MASK; |
| 493 | val |= (slwf << SLWF_SHIFT); |
| 494 | writel(val, reg); |
| 495 | |
| 496 | return; |
| 497 | } |
| 498 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 499 | static void pinmux_set_drvdn_slwr(enum pmux_drvgrp grp, int slwr) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 500 | { |
| 501 | u32 *reg = DRV_REG(grp); |
| 502 | u32 val; |
| 503 | |
| 504 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 505 | if (slwr == PMUX_SLWR_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 506 | return; |
| 507 | |
| 508 | /* Error check on pad and slwr */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 509 | assert(pmux_drvgrp_isvalid(grp)); |
| 510 | assert(pmux_slw_isvalid(slwr)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 511 | |
| 512 | val = readl(reg); |
| 513 | val &= ~SLWR_MASK; |
| 514 | val |= (slwr << SLWR_SHIFT); |
| 515 | writel(val, reg); |
| 516 | |
| 517 | return; |
| 518 | } |
| 519 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 520 | static void pinmux_set_drvup(enum pmux_drvgrp grp, int drvup) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 521 | { |
| 522 | u32 *reg = DRV_REG(grp); |
| 523 | u32 val; |
| 524 | |
| 525 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 526 | if (drvup == PMUX_DRVUP_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 527 | return; |
| 528 | |
| 529 | /* Error check on pad and drvup */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 530 | assert(pmux_drvgrp_isvalid(grp)); |
| 531 | assert(pmux_drv_isvalid(drvup)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 532 | |
| 533 | val = readl(reg); |
| 534 | val &= ~DRVUP_MASK; |
| 535 | val |= (drvup << DRVUP_SHIFT); |
| 536 | writel(val, reg); |
| 537 | |
| 538 | return; |
| 539 | } |
| 540 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 541 | static void pinmux_set_drvdn(enum pmux_drvgrp grp, int drvdn) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 542 | { |
| 543 | u32 *reg = DRV_REG(grp); |
| 544 | u32 val; |
| 545 | |
| 546 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 547 | if (drvdn == PMUX_DRVDN_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 548 | return; |
| 549 | |
| 550 | /* Error check on pad and drvdn */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 551 | assert(pmux_drvgrp_isvalid(grp)); |
| 552 | assert(pmux_drv_isvalid(drvdn)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 553 | |
| 554 | val = readl(reg); |
| 555 | val &= ~DRVDN_MASK; |
| 556 | val |= (drvdn << DRVDN_SHIFT); |
| 557 | writel(val, reg); |
| 558 | |
| 559 | return; |
| 560 | } |
| 561 | |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 562 | #ifdef TEGRA_PMX_GRPS_HAVE_LPMD |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 563 | static void pinmux_set_lpmd(enum pmux_drvgrp grp, enum pmux_lpmd lpmd) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 564 | { |
| 565 | u32 *reg = DRV_REG(grp); |
| 566 | u32 val; |
| 567 | |
| 568 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 569 | if (lpmd == PMUX_LPMD_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 570 | return; |
| 571 | |
| 572 | /* Error check pad and lpmd value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 573 | assert(pmux_drvgrp_isvalid(grp)); |
| 574 | assert(pmux_lpmd_isvalid(lpmd)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 575 | |
| 576 | val = readl(reg); |
| 577 | val &= ~LPMD_MASK; |
| 578 | val |= (lpmd << LPMD_SHIFT); |
| 579 | writel(val, reg); |
| 580 | |
| 581 | return; |
| 582 | } |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 583 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 584 | |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 585 | #ifdef TEGRA_PMX_GRPS_HAVE_SCHMT |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 586 | static void pinmux_set_schmt(enum pmux_drvgrp grp, enum pmux_schmt schmt) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 587 | { |
| 588 | u32 *reg = DRV_REG(grp); |
| 589 | u32 val; |
| 590 | |
| 591 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 592 | if (schmt == PMUX_SCHMT_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 593 | return; |
| 594 | |
| 595 | /* Error check pad */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 596 | assert(pmux_drvgrp_isvalid(grp)); |
| 597 | assert(pmux_schmt_isvalid(schmt)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 598 | |
| 599 | val = readl(reg); |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 600 | if (schmt == PMUX_SCHMT_ENABLE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 601 | val |= (1 << SCHMT_SHIFT); |
| 602 | else |
| 603 | val &= ~(1 << SCHMT_SHIFT); |
| 604 | writel(val, reg); |
| 605 | |
| 606 | return; |
| 607 | } |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 608 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 609 | |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 610 | #ifdef TEGRA_PMX_GRPS_HAVE_HSM |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 611 | static void pinmux_set_hsm(enum pmux_drvgrp grp, enum pmux_hsm hsm) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 612 | { |
| 613 | u32 *reg = DRV_REG(grp); |
| 614 | u32 val; |
| 615 | |
| 616 | /* NONE means unspecified/do not change/use POR value */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 617 | if (hsm == PMUX_HSM_NONE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 618 | return; |
| 619 | |
| 620 | /* Error check pad */ |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 621 | assert(pmux_drvgrp_isvalid(grp)); |
| 622 | assert(pmux_hsm_isvalid(hsm)); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 623 | |
| 624 | val = readl(reg); |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 625 | if (hsm == PMUX_HSM_ENABLE) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 626 | val |= (1 << HSM_SHIFT); |
| 627 | else |
| 628 | val &= ~(1 << HSM_SHIFT); |
| 629 | writel(val, reg); |
| 630 | |
| 631 | return; |
| 632 | } |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 633 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 634 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 635 | static void pinmux_config_drvgrp(const struct pmux_drvgrp_config *config) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 636 | { |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 637 | enum pmux_drvgrp grp = config->drvgrp; |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 638 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 639 | pinmux_set_drvup_slwf(grp, config->slwf); |
| 640 | pinmux_set_drvdn_slwr(grp, config->slwr); |
| 641 | pinmux_set_drvup(grp, config->drvup); |
| 642 | pinmux_set_drvdn(grp, config->drvdn); |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 643 | #ifdef TEGRA_PMX_GRPS_HAVE_LPMD |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 644 | pinmux_set_lpmd(grp, config->lpmd); |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 645 | #endif |
| 646 | #ifdef TEGRA_PMX_GRPS_HAVE_SCHMT |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 647 | pinmux_set_schmt(grp, config->schmt); |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 648 | #endif |
| 649 | #ifdef TEGRA_PMX_GRPS_HAVE_HSM |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 650 | pinmux_set_hsm(grp, config->hsm); |
Stephen Warren | 439f576 | 2015-02-24 14:08:25 -0700 | [diff] [blame] | 651 | #endif |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 652 | } |
| 653 | |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 654 | void pinmux_config_drvgrp_table(const struct pmux_drvgrp_config *config, |
| 655 | int len) |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 656 | { |
| 657 | int i; |
| 658 | |
| 659 | for (i = 0; i < len; i++) |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 660 | pinmux_config_drvgrp(&config[i]); |
Stephen Warren | e296995 | 2014-03-21 12:28:54 -0600 | [diff] [blame] | 661 | } |
Stephen Warren | dfb42fc | 2014-03-21 12:28:56 -0600 | [diff] [blame] | 662 | #endif /* TEGRA_PMX_HAS_DRVGRPS */ |