blob: 64baed45d591e9c06d55c0b76eef0d8505f0ba09 [file] [log] [blame]
Stephen Warrene2969952014-03-21 12:28:54 -06001/*
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 Warrendfb42fc2014-03-21 12:28:56 -060013#define pmux_pingrp_isvalid(pin) (((pin) >= 0) && ((pin) < PMUX_PINGRP_COUNT))
Stephen Warrene2969952014-03-21 12:28:54 -060014
15/* return 1 if a pmux_func is in range */
16#define pmux_func_isvalid(func) \
Stephen Warrend3812942014-03-21 15:58:03 -060017 (((func) >= 0) && ((func) < PMUX_FUNC_COUNT))
Stephen Warrene2969952014-03-21 12:28:54 -060018
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
27#ifdef TEGRA_PMX_HAS_PIN_IO_BIT_ETC
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))
31
32/* return 1 if a pin_lock is in range */
33#define pmux_pin_lock_isvalid(lock) \
34 (((lock) >= PMUX_PIN_LOCK_DISABLE) && ((lock) <= PMUX_PIN_LOCK_ENABLE))
35
36/* return 1 if a pin_od is in range */
37#define pmux_pin_od_isvalid(od) \
38 (((od) >= PMUX_PIN_OD_DISABLE) && ((od) <= PMUX_PIN_OD_ENABLE))
39
40/* return 1 if a pin_ioreset_is in range */
41#define pmux_pin_ioreset_isvalid(ioreset) \
42 (((ioreset) >= PMUX_PIN_IO_RESET_DISABLE) && \
43 ((ioreset) <= PMUX_PIN_IO_RESET_ENABLE))
44
45#ifdef TEGRA_PMX_HAS_RCV_SEL
46/* return 1 if a pin_rcv_sel_is in range */
47#define pmux_pin_rcv_sel_isvalid(rcv_sel) \
48 (((rcv_sel) >= PMUX_PIN_RCV_SEL_NORMAL) && \
49 ((rcv_sel) <= PMUX_PIN_RCV_SEL_HIGH))
50#endif /* TEGRA_PMX_HAS_RCV_SEL */
51#endif /* TEGRA_PMX_HAS_PIN_IO_BIT_ETC */
52
53#define _R(offset) (u32 *)(NV_PA_APB_MISC_BASE + (offset))
54
55#if defined(CONFIG_TEGRA20)
56
57#define MUX_REG(grp) _R(0x80 + ((tegra_soc_pingroups[grp].ctl_id / 16) * 4))
58#define MUX_SHIFT(grp) ((tegra_soc_pingroups[grp].ctl_id % 16) * 2)
59
60#define PULL_REG(grp) _R(0xa0 + ((tegra_soc_pingroups[grp].pull_id / 16) * 4))
61#define PULL_SHIFT(grp) ((tegra_soc_pingroups[grp].pull_id % 16) * 2)
62
63#define TRI_REG(grp) _R(0x14 + (((grp) / 32) * 4))
64#define TRI_SHIFT(grp) ((grp) % 32)
65
66#else
67
68#define REG(pin) _R(0x3000 + ((pin) * 4))
69
70#define MUX_REG(pin) REG(pin)
71#define MUX_SHIFT(pin) 0
72
73#define PULL_REG(pin) REG(pin)
74#define PULL_SHIFT(pin) 2
75
76#define TRI_REG(pin) REG(pin)
77#define TRI_SHIFT(pin) 4
78
79#endif /* CONFIG_TEGRA20 */
80
81#define DRV_REG(group) _R(0x868 + ((group) * 4))
82
83#define IO_SHIFT 5
84#define OD_SHIFT 6
85#define LOCK_SHIFT 7
86#define IO_RESET_SHIFT 8
87#define RCV_SEL_SHIFT 9
88
Stephen Warrenbb144692014-04-22 14:37:54 -060089#if !defined(CONFIG_TEGRA20) && !defined(CONFIG_TEGRA30)
90/* This register/field only exists on Tegra114 and later */
91#define APB_MISC_PP_PINMUX_GLOBAL_0 0x40
92#define CLAMP_INPUTS_WHEN_TRISTATED 1
93
94void pinmux_set_tristate_input_clamping(void)
95{
96 u32 *reg = _R(APB_MISC_PP_PINMUX_GLOBAL_0);
Stephen Warrenbb144692014-04-22 14:37:54 -060097
Stephen Warrenf799b032015-02-18 13:27:03 -070098 setbits_le32(reg, CLAMP_INPUTS_WHEN_TRISTATED);
99}
100
101void pinmux_clear_tristate_input_clamping(void)
102{
103 u32 *reg = _R(APB_MISC_PP_PINMUX_GLOBAL_0);
104
105 clrbits_le32(reg, CLAMP_INPUTS_WHEN_TRISTATED);
Stephen Warrenbb144692014-04-22 14:37:54 -0600106}
107#endif
108
Stephen Warrene2969952014-03-21 12:28:54 -0600109void pinmux_set_func(enum pmux_pingrp pin, enum pmux_func func)
110{
111 u32 *reg = MUX_REG(pin);
112 int i, mux = -1;
113 u32 val;
114
Stephen Warren4a68d342014-04-22 14:37:52 -0600115 if (func == PMUX_FUNC_DEFAULT)
116 return;
117
Stephen Warrene2969952014-03-21 12:28:54 -0600118 /* Error check on pin and func */
119 assert(pmux_pingrp_isvalid(pin));
120 assert(pmux_func_isvalid(func));
121
Stephen Warrend3812942014-03-21 15:58:03 -0600122 if (func >= PMUX_FUNC_RSVD1) {
123 mux = (func - PMUX_FUNC_RSVD1) & 3;
Stephen Warrene2969952014-03-21 12:28:54 -0600124 } else {
125 /* Search for the appropriate function */
126 for (i = 0; i < 4; i++) {
127 if (tegra_soc_pingroups[pin].funcs[i] == func) {
128 mux = i;
129 break;
130 }
131 }
132 }
133 assert(mux != -1);
134
135 val = readl(reg);
136 val &= ~(3 << MUX_SHIFT(pin));
137 val |= (mux << MUX_SHIFT(pin));
138 writel(val, reg);
139}
140
141void pinmux_set_pullupdown(enum pmux_pingrp pin, enum pmux_pull pupd)
142{
143 u32 *reg = PULL_REG(pin);
144 u32 val;
145
146 /* Error check on pin and pupd */
147 assert(pmux_pingrp_isvalid(pin));
148 assert(pmux_pin_pupd_isvalid(pupd));
149
150 val = readl(reg);
151 val &= ~(3 << PULL_SHIFT(pin));
152 val |= (pupd << PULL_SHIFT(pin));
153 writel(val, reg);
154}
155
Stephen Warrena45fa432014-03-21 12:28:55 -0600156static void pinmux_set_tristate(enum pmux_pingrp pin, int tri)
Stephen Warrene2969952014-03-21 12:28:54 -0600157{
158 u32 *reg = TRI_REG(pin);
159 u32 val;
160
161 /* Error check on pin */
162 assert(pmux_pingrp_isvalid(pin));
163 assert(pmux_pin_tristate_isvalid(tri));
164
165 val = readl(reg);
166 if (tri == PMUX_TRI_TRISTATE)
167 val |= (1 << TRI_SHIFT(pin));
168 else
169 val &= ~(1 << TRI_SHIFT(pin));
170 writel(val, reg);
171}
172
173void pinmux_tristate_enable(enum pmux_pingrp pin)
174{
175 pinmux_set_tristate(pin, PMUX_TRI_TRISTATE);
176}
177
178void pinmux_tristate_disable(enum pmux_pingrp pin)
179{
180 pinmux_set_tristate(pin, PMUX_TRI_NORMAL);
181}
182
183#ifdef TEGRA_PMX_HAS_PIN_IO_BIT_ETC
184void pinmux_set_io(enum pmux_pingrp pin, enum pmux_pin_io io)
185{
186 u32 *reg = REG(pin);
187 u32 val;
188
189 if (io == PMUX_PIN_NONE)
190 return;
191
192 /* Error check on pin and io */
193 assert(pmux_pingrp_isvalid(pin));
194 assert(pmux_pin_io_isvalid(io));
195
196 val = readl(reg);
197 if (io == PMUX_PIN_INPUT)
198 val |= (io & 1) << IO_SHIFT;
199 else
200 val &= ~(1 << IO_SHIFT);
201 writel(val, reg);
202}
203
204static void pinmux_set_lock(enum pmux_pingrp pin, enum pmux_pin_lock lock)
205{
206 u32 *reg = REG(pin);
207 u32 val;
208
209 if (lock == PMUX_PIN_LOCK_DEFAULT)
210 return;
211
212 /* Error check on pin and lock */
213 assert(pmux_pingrp_isvalid(pin));
214 assert(pmux_pin_lock_isvalid(lock));
215
216 val = readl(reg);
217 if (lock == PMUX_PIN_LOCK_ENABLE) {
218 val |= (1 << LOCK_SHIFT);
219 } else {
220 if (val & (1 << LOCK_SHIFT))
221 printf("%s: Cannot clear LOCK bit!\n", __func__);
222 val &= ~(1 << LOCK_SHIFT);
223 }
224 writel(val, reg);
225
226 return;
227}
228
229static void pinmux_set_od(enum pmux_pingrp pin, enum pmux_pin_od od)
230{
231 u32 *reg = REG(pin);
232 u32 val;
233
234 if (od == PMUX_PIN_OD_DEFAULT)
235 return;
236
237 /* Error check on pin and od */
238 assert(pmux_pingrp_isvalid(pin));
239 assert(pmux_pin_od_isvalid(od));
240
241 val = readl(reg);
242 if (od == PMUX_PIN_OD_ENABLE)
243 val |= (1 << OD_SHIFT);
244 else
245 val &= ~(1 << OD_SHIFT);
246 writel(val, reg);
247
248 return;
249}
250
251static void pinmux_set_ioreset(enum pmux_pingrp pin,
252 enum pmux_pin_ioreset ioreset)
253{
254 u32 *reg = REG(pin);
255 u32 val;
256
257 if (ioreset == PMUX_PIN_IO_RESET_DEFAULT)
258 return;
259
260 /* Error check on pin and ioreset */
261 assert(pmux_pingrp_isvalid(pin));
262 assert(pmux_pin_ioreset_isvalid(ioreset));
263
264 val = readl(reg);
265 if (ioreset == PMUX_PIN_IO_RESET_ENABLE)
266 val |= (1 << IO_RESET_SHIFT);
267 else
268 val &= ~(1 << IO_RESET_SHIFT);
269 writel(val, reg);
270
271 return;
272}
273
274#ifdef TEGRA_PMX_HAS_RCV_SEL
275static void pinmux_set_rcv_sel(enum pmux_pingrp pin,
276 enum pmux_pin_rcv_sel rcv_sel)
277{
278 u32 *reg = REG(pin);
279 u32 val;
280
281 if (rcv_sel == PMUX_PIN_RCV_SEL_DEFAULT)
282 return;
283
284 /* Error check on pin and rcv_sel */
285 assert(pmux_pingrp_isvalid(pin));
286 assert(pmux_pin_rcv_sel_isvalid(rcv_sel));
287
288 val = readl(reg);
289 if (rcv_sel == PMUX_PIN_RCV_SEL_HIGH)
290 val |= (1 << RCV_SEL_SHIFT);
291 else
292 val &= ~(1 << RCV_SEL_SHIFT);
293 writel(val, reg);
294
295 return;
296}
297#endif /* TEGRA_PMX_HAS_RCV_SEL */
298#endif /* TEGRA_PMX_HAS_PIN_IO_BIT_ETC */
299
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600300static void pinmux_config_pingrp(const struct pmux_pingrp_config *config)
Stephen Warrene2969952014-03-21 12:28:54 -0600301{
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600302 enum pmux_pingrp pin = config->pingrp;
Stephen Warrene2969952014-03-21 12:28:54 -0600303
304 pinmux_set_func(pin, config->func);
305 pinmux_set_pullupdown(pin, config->pull);
306 pinmux_set_tristate(pin, config->tristate);
307#ifdef TEGRA_PMX_HAS_PIN_IO_BIT_ETC
308 pinmux_set_io(pin, config->io);
309 pinmux_set_lock(pin, config->lock);
310 pinmux_set_od(pin, config->od);
311 pinmux_set_ioreset(pin, config->ioreset);
312#ifdef TEGRA_PMX_HAS_RCV_SEL
313 pinmux_set_rcv_sel(pin, config->rcv_sel);
314#endif
315#endif
316}
317
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600318void pinmux_config_pingrp_table(const struct pmux_pingrp_config *config,
319 int len)
Stephen Warrene2969952014-03-21 12:28:54 -0600320{
321 int i;
322
323 for (i = 0; i < len; i++)
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600324 pinmux_config_pingrp(&config[i]);
Stephen Warrene2969952014-03-21 12:28:54 -0600325}
326
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600327#ifdef TEGRA_PMX_HAS_DRVGRPS
Stephen Warrene2969952014-03-21 12:28:54 -0600328
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600329#define pmux_drvgrp_isvalid(pd) (((pd) >= 0) && ((pd) < PMUX_DRVGRP_COUNT))
Stephen Warrene2969952014-03-21 12:28:54 -0600330
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600331#define pmux_slw_isvalid(slw) \
332 (((slw) >= PMUX_SLWF_MIN) && ((slw) <= PMUX_SLWF_MAX))
Stephen Warrene2969952014-03-21 12:28:54 -0600333
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600334#define pmux_drv_isvalid(drv) \
335 (((drv) >= PMUX_DRVUP_MIN) && ((drv) <= PMUX_DRVUP_MAX))
Stephen Warrene2969952014-03-21 12:28:54 -0600336
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600337#define pmux_lpmd_isvalid(lpm) \
338 (((lpm) >= PMUX_LPMD_X8) && ((lpm) <= PMUX_LPMD_X))
Stephen Warrene2969952014-03-21 12:28:54 -0600339
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600340#define pmux_schmt_isvalid(schmt) \
341 (((schmt) >= PMUX_SCHMT_DISABLE) && ((schmt) <= PMUX_SCHMT_ENABLE))
Stephen Warrene2969952014-03-21 12:28:54 -0600342
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600343#define pmux_hsm_isvalid(hsm) \
344 (((hsm) >= PMUX_HSM_DISABLE) && ((hsm) <= PMUX_HSM_ENABLE))
Stephen Warrene2969952014-03-21 12:28:54 -0600345
346#define HSM_SHIFT 2
347#define SCHMT_SHIFT 3
348#define LPMD_SHIFT 4
349#define LPMD_MASK (3 << LPMD_SHIFT)
350#define DRVDN_SHIFT 12
351#define DRVDN_MASK (0x7F << DRVDN_SHIFT)
352#define DRVUP_SHIFT 20
353#define DRVUP_MASK (0x7F << DRVUP_SHIFT)
354#define SLWR_SHIFT 28
355#define SLWR_MASK (3 << SLWR_SHIFT)
356#define SLWF_SHIFT 30
357#define SLWF_MASK (3 << SLWF_SHIFT)
358
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600359static void pinmux_set_drvup_slwf(enum pmux_drvgrp grp, int slwf)
Stephen Warrene2969952014-03-21 12:28:54 -0600360{
361 u32 *reg = DRV_REG(grp);
362 u32 val;
363
364 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600365 if (slwf == PMUX_SLWF_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600366 return;
367
368 /* Error check on pad and slwf */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600369 assert(pmux_drvgrp_isvalid(grp));
370 assert(pmux_slw_isvalid(slwf));
Stephen Warrene2969952014-03-21 12:28:54 -0600371
372 val = readl(reg);
373 val &= ~SLWF_MASK;
374 val |= (slwf << SLWF_SHIFT);
375 writel(val, reg);
376
377 return;
378}
379
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600380static void pinmux_set_drvdn_slwr(enum pmux_drvgrp grp, int slwr)
Stephen Warrene2969952014-03-21 12:28:54 -0600381{
382 u32 *reg = DRV_REG(grp);
383 u32 val;
384
385 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600386 if (slwr == PMUX_SLWR_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600387 return;
388
389 /* Error check on pad and slwr */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600390 assert(pmux_drvgrp_isvalid(grp));
391 assert(pmux_slw_isvalid(slwr));
Stephen Warrene2969952014-03-21 12:28:54 -0600392
393 val = readl(reg);
394 val &= ~SLWR_MASK;
395 val |= (slwr << SLWR_SHIFT);
396 writel(val, reg);
397
398 return;
399}
400
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600401static void pinmux_set_drvup(enum pmux_drvgrp grp, int drvup)
Stephen Warrene2969952014-03-21 12:28:54 -0600402{
403 u32 *reg = DRV_REG(grp);
404 u32 val;
405
406 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600407 if (drvup == PMUX_DRVUP_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600408 return;
409
410 /* Error check on pad and drvup */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600411 assert(pmux_drvgrp_isvalid(grp));
412 assert(pmux_drv_isvalid(drvup));
Stephen Warrene2969952014-03-21 12:28:54 -0600413
414 val = readl(reg);
415 val &= ~DRVUP_MASK;
416 val |= (drvup << DRVUP_SHIFT);
417 writel(val, reg);
418
419 return;
420}
421
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600422static void pinmux_set_drvdn(enum pmux_drvgrp grp, int drvdn)
Stephen Warrene2969952014-03-21 12:28:54 -0600423{
424 u32 *reg = DRV_REG(grp);
425 u32 val;
426
427 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600428 if (drvdn == PMUX_DRVDN_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600429 return;
430
431 /* Error check on pad and drvdn */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600432 assert(pmux_drvgrp_isvalid(grp));
433 assert(pmux_drv_isvalid(drvdn));
Stephen Warrene2969952014-03-21 12:28:54 -0600434
435 val = readl(reg);
436 val &= ~DRVDN_MASK;
437 val |= (drvdn << DRVDN_SHIFT);
438 writel(val, reg);
439
440 return;
441}
442
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600443static void pinmux_set_lpmd(enum pmux_drvgrp grp, enum pmux_lpmd lpmd)
Stephen Warrene2969952014-03-21 12:28:54 -0600444{
445 u32 *reg = DRV_REG(grp);
446 u32 val;
447
448 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600449 if (lpmd == PMUX_LPMD_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600450 return;
451
452 /* Error check pad and lpmd value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600453 assert(pmux_drvgrp_isvalid(grp));
454 assert(pmux_lpmd_isvalid(lpmd));
Stephen Warrene2969952014-03-21 12:28:54 -0600455
456 val = readl(reg);
457 val &= ~LPMD_MASK;
458 val |= (lpmd << LPMD_SHIFT);
459 writel(val, reg);
460
461 return;
462}
463
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600464static void pinmux_set_schmt(enum pmux_drvgrp grp, enum pmux_schmt schmt)
Stephen Warrene2969952014-03-21 12:28:54 -0600465{
466 u32 *reg = DRV_REG(grp);
467 u32 val;
468
469 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600470 if (schmt == PMUX_SCHMT_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600471 return;
472
473 /* Error check pad */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600474 assert(pmux_drvgrp_isvalid(grp));
475 assert(pmux_schmt_isvalid(schmt));
Stephen Warrene2969952014-03-21 12:28:54 -0600476
477 val = readl(reg);
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600478 if (schmt == PMUX_SCHMT_ENABLE)
Stephen Warrene2969952014-03-21 12:28:54 -0600479 val |= (1 << SCHMT_SHIFT);
480 else
481 val &= ~(1 << SCHMT_SHIFT);
482 writel(val, reg);
483
484 return;
485}
486
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600487static void pinmux_set_hsm(enum pmux_drvgrp grp, enum pmux_hsm hsm)
Stephen Warrene2969952014-03-21 12:28:54 -0600488{
489 u32 *reg = DRV_REG(grp);
490 u32 val;
491
492 /* NONE means unspecified/do not change/use POR value */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600493 if (hsm == PMUX_HSM_NONE)
Stephen Warrene2969952014-03-21 12:28:54 -0600494 return;
495
496 /* Error check pad */
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600497 assert(pmux_drvgrp_isvalid(grp));
498 assert(pmux_hsm_isvalid(hsm));
Stephen Warrene2969952014-03-21 12:28:54 -0600499
500 val = readl(reg);
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600501 if (hsm == PMUX_HSM_ENABLE)
Stephen Warrene2969952014-03-21 12:28:54 -0600502 val |= (1 << HSM_SHIFT);
503 else
504 val &= ~(1 << HSM_SHIFT);
505 writel(val, reg);
506
507 return;
508}
509
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600510static void pinmux_config_drvgrp(const struct pmux_drvgrp_config *config)
Stephen Warrene2969952014-03-21 12:28:54 -0600511{
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600512 enum pmux_drvgrp grp = config->drvgrp;
Stephen Warrene2969952014-03-21 12:28:54 -0600513
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600514 pinmux_set_drvup_slwf(grp, config->slwf);
515 pinmux_set_drvdn_slwr(grp, config->slwr);
516 pinmux_set_drvup(grp, config->drvup);
517 pinmux_set_drvdn(grp, config->drvdn);
518 pinmux_set_lpmd(grp, config->lpmd);
519 pinmux_set_schmt(grp, config->schmt);
520 pinmux_set_hsm(grp, config->hsm);
Stephen Warrene2969952014-03-21 12:28:54 -0600521}
522
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600523void pinmux_config_drvgrp_table(const struct pmux_drvgrp_config *config,
524 int len)
Stephen Warrene2969952014-03-21 12:28:54 -0600525{
526 int i;
527
528 for (i = 0; i < len; i++)
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600529 pinmux_config_drvgrp(&config[i]);
Stephen Warrene2969952014-03-21 12:28:54 -0600530}
Stephen Warrendfb42fc2014-03-21 12:28:56 -0600531#endif /* TEGRA_PMX_HAS_DRVGRPS */