Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: arch/arm/mach-tegra/nv/include/nvodm_query_pinmux.h

Issue 3256004: [ARM] tegra: add nvos/nvrm/nvmap drivers (Closed) Base URL: ssh://git@gitrw.chromium.org/kernel.git
Patch Set: remove ap15 headers Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2007-2009 NVIDIA Corporation.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * Neither the name of the NVIDIA Corporation nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 */
32
33 /**
34 * @file
35 * <b>NVIDIA Tegra ODM Kit:
36 * Pin-Mux Query Interface</b>
37 *
38 * @b Description: Defines the ODM query interface for Pin-Mux configurations.
39 */
40
41 #ifndef INCLUDED_NVODM_QUERY_PINMUX_H
42 #define INCLUDED_NVODM_QUERY_PINMUX_H
43
44 /**
45 * @defgroup nvodm_pinmux PinMux Query Interface
46 * This is the ODM query interface for pin mux configurations.
47 *
48 * Pin-mux configurations are logical definitions. Each I/O module defines
49 * their configurations (simply an enum), which may be found in the ODM
50 * adaptation headers.
51 *
52 * Every platform defines a unique set of configuration tables. There exists a
53 * configuration table for each I/O module and each entry in the table
54 * represents the configuration for an I/O module instance.
55 *
56 * This interface is used to query the pin-mux configuration tables defined by
57 * the ODM, because these configurations are platform-specific.
58 * @ingroup nvodm_query
59 * @{
60 */
61
62 #include "nvcommon.h"
63 #include "nvodm_modules.h"
64
65 #define NVODM_QUERY_PINMAP_MULTIPLEXED 0x40000000UL
66
67 #if defined(__cplusplus)
68 extern "C"
69 {
70 #endif
71
72 /* --- Pin-mux Configurations (for each controller) --- */
73
74 /**
75 * Defines the ATA pin-mux configurations.
76 */
77 typedef enum
78 {
79 NvOdmAtaPinMap_Config1 = 1,
80
81 /** Ignore -- Forces compilers to make 32-bit enums. */
82 NvOdmAtaPinMap_Force32 = 0x7FFFFFFF,
83 } NvOdmAtaPinMap;
84
85 /**
86 * Defines the external clock (CDEV, CSUS) pin-mux configurations.
87 */
88 typedef enum
89 {
90 NvOdmExternalClockPinMap_Config1 = 1,
91 NvOdmExternalClockPinMap_Config2,
92 NvOdmExternalClockPinMap_Config3,
93 /** Ignore -- Forces compilers to make 32-bit enums. */
94 NvOdmExternalClockPinMap_Force32 = 0x7FFFFFFF
95 } NvOdmExternalClockPinMap;
96
97 /**
98 * Defines the CRT pin-mux configurations.
99 */
100 typedef enum
101 {
102 NvOdmCrtPinMap_Config1 = 1,
103 NvOdmCrtPinMap_Config2,
104 NvOdmCrtPinMap_Config3,
105 NvOdmCrtPinMap_Config4,
106 /** Ignore -- Forces compilers to make 32-bit enums. */
107 NVOdmCrtPinMap_Force32 = 0x7FFFFFFF,
108 } NvOdmCrtPinMap;
109
110 /**
111 * Defines the DAP pin-mux configurations.
112 */
113 typedef enum
114 {
115 NvOdmDapPinMap_Config1 = 1,
116
117 /** Ignore -- Forces compilers to make 32-bit enums. */
118 NvOdmDapPinMap_Force32 = 0x7FFFFFFF,
119 } NvOdmDapPinMap;
120
121 /**
122 * Defines the display pin-mux configurations.
123 */
124 typedef enum
125 {
126 NvOdmDisplayPinMap_Config1 = 1,
127 NvOdmDisplayPinMap_Config2,
128 NvOdmDisplayPinMap_Config3,
129 NvOdmDisplayPinMap_Config4,
130 NvOdmDisplayPinMap_Config5,
131 NvOdmDisplayPinMap_Config6,
132 /** Ignore -- Forces compilers to make 32-bit enums. */
133 NvOdmDisplayPinMap_Force32 = 0x7FFFFFFFUL,
134 } NvOdmDisplayPinMap;
135
136 /**
137 * Defines the blacklight PWM pin-mux configurations.
138 */
139 typedef enum
140 {
141 NvOdmBacklightPwmPinMap_Config1 = 1,
142 NvOdmBacklightPwmPinMap_Config2,
143 NvOdmBacklightPwmPinMap_Config3,
144 /** Ignore -- Forces compilers to make 32-bit enums. */
145 NvOdmBacklightPwmPinMap_Force32 = 0x7FFFFFFFUL,
146 } NvOdmBacklightPwmPinMap;
147
148 /**
149 * Defines the HDCP pin-mux configurations.
150 */
151 typedef enum
152 {
153 NvOdmHdcpPinMap_Config1 = 1,
154 NvOdmHdcpPinMap_Config2,
155 NvOdmHdcpPinMap_Config3,
156 NvOdmHdcpPinMap_Config4,
157
158 /** Ignore -- Forces compilers to make 32-bit enums. */
159 NvOdmHdcpPinMap_Force32 = 0x7FFFFFFF,
160 } NvOdmHdcpPinMap;
161
162 /**
163 * Defines the HDCMI pin-mux configurations.
164 */
165 typedef enum
166 {
167 NvOdmHdmiPinMap_Config1 = 1,
168
169 /** Ignore -- Forces compilers to make 32-bit enums. */
170 NvOdmHdmiPinMap_Force32 = 0x7FFFFFFF,
171 } NvOdmHdmiPinMap;
172
173 /**
174 * Defines the HSI pin-mux configurations.
175 */
176 typedef enum
177 {
178 NvOdmHsiPinMap_Config1 = 1,
179
180 /** Ignore -- Forces compilers to make 32-bit enums. */
181 NvOdmHsiPinMap_Force32 = 0x7FFFFFFF,
182 } NvOdmHsiPinMap;
183
184 /**
185 * Defines the HSMMC pin-mux configurations.
186 */
187 typedef enum
188 {
189 NvOdmHsmmcPinMap_Config1 = 1,
190 NvOdmHsmmcPinMap_Config2,
191
192 /** Ignore -- Forces compilers to make 32-bit enums. */
193 NvOdmHsmmcPinMap_Force32 = 0x7FFFFFFF,
194 } NvOdmHsmmcPinMap;
195
196 /**
197 * Defines the OWR pin-mux configurations.
198 */
199 typedef enum
200 {
201 NvOdmOwrPinMap_Config1 = 1,
202 NvOdmOwrPinMap_Config2,
203 NvOdmOwrPinMap_Config3,
204
205 /**
206 * This configuration disables (tristates) OWR pins. This option may be
207 * used to change which pins an attached OWR device is using at runtime.
208 * In some cases, one device might set up OWR, communicate across this bus,
209 * and then set the OWR bus configuration to "multiplexed" so that another
210 * device can opt to use OWR with its own configurations at a later time.
211 */
212 NvOdmOwrPinMap_Multiplexed = NVODM_QUERY_PINMAP_MULTIPLEXED,
213 /** Ignore -- Forces compilers to make 32-bit enums. */
214 NvOdmOwrPinMap_Force32 = 0x7FFFFFFF,
215 } NvOdmOwrPinMap;
216
217 /**
218 * Defines I2C pin-mux configurations.
219 */
220 typedef enum
221 {
222 NvOdmI2cPinMap_Config1 = 1,
223 NvOdmI2cPinMap_Config2,
224 NvOdmI2cPinMap_Config3,
225 NvOdmI2cPinMap_Config4,
226
227 /**
228 * This configuration disables (tristates) I2C pins. This option may be
229 * used to change which pins an attached I2C device is using at runtime.
230 *
231 * In some cases, one device might set up I2C, communicate across this bus,
232 * and then set the I2C bus configuration to "multiplexed" so that another
233 * device can opt to use I2C with its own configurations at a later time.
234 *
235 * This option is only supported on the I2C_2 controller (AP15, AP16, AP20).
236 */
237 NvOdmI2cPinMap_Multiplexed = NVODM_QUERY_PINMAP_MULTIPLEXED,
238 /** Ignore -- Forces compilers to make 32-bit enums. */
239 NvOdmI2cPinMap_Force32 = 0x7FFFFFFF,
240 } NvOdmI2cPinMap;
241
242 /**
243 * Defines the I2C PMU pin-mux configurations.
244 */
245 typedef enum
246 {
247 NvOdmI2cPmuPinMap_Config1 = 1,
248
249 /** Ignore -- Forces compilers to make 32-bit enums. */
250 NvOdmI2cPmuPinMap_Force32 = 0x7FFFFFFF,
251 } NvOdmI2cPmuPinMap;
252
253 /**
254 * Defines the PWM pin-mux configurations.
255 */
256 typedef enum
257 {
258 NvOdmPwmPinMap_Config1 = 1,
259 NvOdmPwmPinMap_Config2,
260 NvOdmPwmPinMap_Config3,
261 NvOdmPwmPinMap_Config4,
262 NvOdmPwmPinMap_Config5,
263 NvOdmPwmPinMap_Config6,
264
265 /** Ignore -- Forces compilers to make 32-bit enums. */
266 NvOdmPwmPinMap_Force32 = 0x7FFFFFFF,
267 } NvOdmPwmPinMap;
268
269 /**
270 * Defines KBD pin-mux configurations.
271 */
272 typedef enum
273 {
274 NvOdmKbdPinMap_Config1 = 1,
275 NvOdmKbdPinMap_Config2,
276 NvOdmKbdPinMap_Config3,
277 NvOdmKbdPinMap_Config4,
278
279 /** Ignore -- Forces compilers to make 32-bit enums. */
280 NvOdmKbdPinMap_Forc32 = 0x7FFFFFFF,
281 } NvOdmKbdPinMap;
282
283 /**
284 * Defines MIO pin-mux configurations.
285 */
286 typedef enum
287 {
288 NvOdmMioPinMap_Config1 = 1,
289
290 /** Ignore -- Forces compilers to make 32-bit enums. */
291 NvOdmMioPinMap_Forc32 = 0x7FFFFFFF,
292 } NvOdmMioPinMap;
293
294 /**
295 * Defines NAND pin-mux configurations.
296 */
297 typedef enum
298 {
299 NvOdmNandPinMap_Config1 = 1,
300 NvOdmNandPinMap_Config2,
301 NvOdmNandPinMap_Config3,
302 NvOdmNandPinMap_Config4,
303 NvOdmNandPinMap_Config5,
304 NvOdmNandPinMap_Config6,
305
306 /** Ignore -- Forces compilers to make 32-bit enums. */
307 NvOdmNandPinMap_Force32 = 0x7FFFFFFF,
308 } NvOdmNandPinMap;
309
310 /**
311 * Defines the SDIO pin-mux configurations.
312 */
313 typedef enum
314 {
315 NvOdmSdioPinMap_Config1 = 1,
316 NvOdmSdioPinMap_Config2,
317 NvOdmSdioPinMap_Config3,
318 NvOdmSdioPinMap_Config4,
319 NvOdmSdioPinMap_Config5,
320
321 /** Ignore -- Forces compilers to make 32-bit enums. */
322 NvOdmSdioPinMap_Force32 = 0x7FFFFFFF,
323 } NvOdmSdioPinMap;
324
325 /**
326 * Defines the SFLASH pin-mux configurations.
327 */
328 typedef enum
329 {
330 NvOdmSflashPinMap_Config1 = 1,
331 NvOdmSflashPinMap_Config2,
332 NvOdmSflashPinMap_Config3,
333 NvOdmSflashPinMap_Config4,
334
335 /** Ignore -- Forces compilers to make 32-bit enums. */
336 NvOdmSflashPinMap_Force32 = 0x7FFFFFFF,
337 } NvOdmSflashPinMap;
338
339 /**
340 * Defines the SPDIF pin-mux configurations.
341 */
342 typedef enum
343 {
344 NvOdmSpdifPinMap_Config1 = 1, /**< Default SPDIF configuration. */
345 NvOdmSpdifPinMap_Config2,
346 NvOdmSpdifPinMap_Config3,
347
348 /** Ignore -- Forces compilers to make 32-bit enums. */
349 NvOdmSpdifPinMap_Force32 = 0x7FFFFFFF,
350 } NvOdmSpdifPinMap;
351
352 /**
353 * Defines the SPI pin-mux configurations.
354 */
355 typedef enum
356 {
357 NvOdmSpiPinMap_Config1 = 1,
358 NvOdmSpiPinMap_Config2,
359 NvOdmSpiPinMap_Config3,
360 NvOdmSpiPinMap_Config4,
361 NvOdmSpiPinMap_Config5,
362 NvOdmSpiPinMap_Config6,
363
364 /**
365 * This configuration disables (tristates) SPI pins. This option may be
366 * used to change which pins an attached SPI device is using at runtime.
367 *
368 * In some cases, one device might set up SPI, communicate across this bus,
369 * and then set the SPI bus configuration to "multiplexed" so that another
370 * device can opt to use SPI with its own configurations at a later time.
371 *
372 * This option is only supported on SPI_3 (AP15, AP16).
373 */
374 NvOdmSpiPinMap_Multiplexed = NVODM_QUERY_PINMAP_MULTIPLEXED,
375
376 /** Ignore -- Forces compilers to make 32-bit enums. */
377 NvOdmSpiPinMap_Force32 = 0x7FFFFFFF,
378 } NvOdmSpiPinMap;
379
380 /**
381 * Defines the TV-out pin-mux configurations.
382 */
383 typedef enum
384 {
385 NvOdmTvoPinMap_Config1 = 1,
386
387 /** Ignore -- Forces compilers to make 32-bit enums. */
388 NvOdmTvoPinMap_Force32 = 0x7FFFFFFF,
389 } NvOdmTvoPinMap;
390
391 /**
392 * Defines the USB-ULPI pin-mux configurations.
393 */
394 typedef enum
395 {
396 NvOdmUsbPinMap_Config1 = 1,
397
398 /** Ignore -- Forces compilers to make 32-bit enums. */
399 NvOdmUsbPinMap_Force32 = 0x7FFFFFFF,
400 } NvOdmUsbPinMap;
401
402
403 /**
404 * Defines the TWC pin-mux configurations.
405 */
406 typedef enum
407 {
408 NvOdmTwcPinMap_Config1 = 1,
409 NvOdmTwcPinMap_Config2,
410
411 /** Ignore -- Forces compilers to make 32-bit enums. */
412 NvOdmTwcPinMap_Force32 = 0x7FFFFFFF,
413 } NvOdmTwcPinMap;
414
415 /**
416 * Defines the UART pin-mux configurations.
417 */
418 typedef enum
419 {
420 NvOdmUartPinMap_Config1 = 1,
421 NvOdmUartPinMap_Config2,
422 NvOdmUartPinMap_Config3,
423 NvOdmUartPinMap_Config4,
424 NvOdmUartPinMap_Config5,
425 NvOdmUartPinMap_Config6,
426 NvOdmUartPinMap_Config7,
427
428 /** Ignore -- Forces compilers to make 32-bit enums. */
429 NvOdmUartPinMap_Force32 = 0x7FFFFFFF,
430 } NvOdmUartPinMap;
431
432 /**
433 * Defines the video input pin-mux configurations.
434 */
435 typedef enum
436 {
437 NvOdmVideoInputPinMap_Config1 = 1,
438 NvOdmVideoInputPinMap_Config2,
439 /** Ignore -- Forces compilers to make 32-bit enums. */
440 NvOdmVideoInputPinMap_Force32 = 0x7FFFFFFFUL,
441 } NvOdmVideoInputPinMap;
442
443 /**
444 * Defines the PCI-Express pin-mux configurations.
445 */
446 typedef enum
447 {
448 NvOdmPciExpressPinMap_Config1 = 1,
449 NvOdmPciExpressPinMap_Force32 = 0x7FFFFFFFUL,
450 } NvOdmPciExpressPinMap;
451
452 /**
453 * Defines the SyncNor / OneNAND pin-mux configurations.
454 */
455 typedef enum
456 {
457 NvOdmSyncNorPinMap_Config1 = 1,
458 NvOdmSyncNorPinMap_Config2,
459 NvOdmSyncNorPinMap_Config3,
460 NvOdmSyncNorPinMap_Force32 = 0x7FFFFFFFUL,
461 } NvOdmSyncNorPinMap;
462
463 /**
464 * Defines the PTM pin-mux configurations.
465 */
466 typedef enum
467 {
468 NvOdmPtmPinMap_Config1 = 1,
469 NvOdmPtmPinMap_Force32 = 0x7FFFFFFFUL,
470 } NvOdmPtmPinMap;
471
472 /**
473 * Defines the one-wire pin-mux configurations.
474 */
475 typedef enum
476 {
477 NvOdmOneWirePinMap_Config1 = 1,
478 NvOdmOneWirePinMap_Config2,
479 NvOdmOneWirePinMap_Config3,
480 NvOdmOneWirePinMap_Force32 = 0x7FFFFFFFUL,
481 } NvOdmOneWirePinMap;
482
483
484 /**
485 * Defines the ULPI pin-mux configurations.
486 */
487 typedef enum
488 {
489 NvOdmUlpiPinMap_Config1 = 1,
490 NvOdmUlpiPinMap_Force32 = 0x7FFFFFFFUL,
491 } NvOdmUlpiPinMap;
492
493 /* --- Pin-mux API --- */
494
495 /**
496 * Gets the pinmux configuration table for a given module.
497 *
498 * @param IoModule The I/O module to query.
499 * @param pPinMuxConfigTable A const pointer to the module's configuration
500 * table. Each entry in the table represents the configuration for the I/O
501 * module instance, where the instance indices start from 0.
502 * @param pCount A pointer to a variable that this function sets to the
503 * number of entires in the configuration table.
504 */
505 void
506 NvOdmQueryPinMux(
507 NvOdmIoModule IoModule,
508 const NvU32 **pPinMuxConfigTable,
509 NvU32 *pCount);
510
511 /**
512 * Gets the maximum clock speed for a given module as imposed by a board.
513 *
514 * @param IoModule The I/O module to query.
515 * @param pClockSpeedLimits A const pointer to the module's clock speed limit.
516 * Each entry in the array represents the clock speed limit for the I/O
517 * module instance, where the instance indices start from 0.
518 * @param pCount A pointer to a variable that this function sets to the
519 * number of entries in the \a pClockSpeedLimits array.
520 */
521
522 void
523 NvOdmQueryClockLimits(
524 NvOdmIoModule IoModule,
525 const NvU32 **pClockSpeedLimits,
526 NvU32 *pCount);
527
528 #if defined(__cplusplus)
529 }
530 #endif
531
532 /** @} */
533
534 #endif // INCLUDED_NVODM_QUERY_PINMUX_H
OLDNEW
« no previous file with comments | « arch/arm/mach-tegra/nv/include/nvodm_query_nand.h ('k') | arch/arm/mach-tegra/nv/include/nvodm_query_pins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698