OLD | NEW |
(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 * ODM Query API</b> |
| 37 * |
| 38 * @b Description: Defines a set of query functions for ODMs that may be |
| 39 * accessed at boot-time, runtime, or anywhere in between. |
| 40 */ |
| 41 |
| 42 #ifndef INCLUDED_NVODM_QUERY_H |
| 43 #define INCLUDED_NVODM_QUERY_H |
| 44 |
| 45 /** |
| 46 * @defgroup groupODMQueryAPI ODM Query API |
| 47 * @ingroup nvodm_query |
| 48 * @{ |
| 49 */ |
| 50 |
| 51 #include "nvcommon.h" |
| 52 #include "nvodm_modules.h" |
| 53 |
| 54 #if defined(__cplusplus) |
| 55 extern "C" |
| 56 { |
| 57 #endif |
| 58 |
| 59 /** |
| 60 * Defines the memory types for which configuration data may be retrieved. |
| 61 */ |
| 62 typedef enum |
| 63 { |
| 64 /// Specifies SDRAM memory; target memory for runtime image and heap. |
| 65 NvOdmMemoryType_Sdram, |
| 66 |
| 67 /// Specifies NAND ROM; storage (may include the bootloader). |
| 68 NvOdmMemoryType_Nand, |
| 69 |
| 70 /// Specifies NOR ROM; storage (may include the bootloader). |
| 71 NvOdmMemoryType_Nor, |
| 72 |
| 73 /// Specifies EEPROM; storage (may include the bootloader). |
| 74 NvOdmMemoryType_I2CEeprom, |
| 75 |
| 76 /// Specifies HSMMC NAND; storage (may include the bootloader). |
| 77 NvOdmMemoryType_Hsmmc, |
| 78 |
| 79 /// Memory mapped I/O device. |
| 80 NvOdmMemoryType_Mio, |
| 81 |
| 82 /// Specifies DPRAM memory |
| 83 NvOdmMemoryType_Dpram, |
| 84 |
| 85 NvOdmMemoryType_Num, |
| 86 /// Ignore -- Forces compilers to make 32-bit enums. |
| 87 NvOdmMemoryType_Force32 = 0x7FFFFFFF |
| 88 } NvOdmMemoryType; |
| 89 |
| 90 /** |
| 91 * Defines the devices that can serve as the debug console. |
| 92 */ |
| 93 typedef enum |
| 94 { |
| 95 /// Specifies that the debug console is undefined. |
| 96 NvOdmDebugConsole_Undefined, |
| 97 |
| 98 /// Specifies that no debug console is to be used. |
| 99 NvOdmDebugConsole_None, |
| 100 |
| 101 /// Specifies that the ARM Debug Communication Channel |
| 102 /// (Dcc) port is the debug console |
| 103 NvOdmDebugConsole_Dcc, |
| 104 |
| 105 /// Specifies that UART-A is the debug console. |
| 106 NvOdmDebugConsole_UartA, |
| 107 |
| 108 /// Specifies that UART-B is the debug console. |
| 109 NvOdmDebugConsole_UartB, |
| 110 |
| 111 /// Specifies that UART-C is the debug console. |
| 112 NvOdmDebugConsole_UartC, |
| 113 |
| 114 /// Specifies that UART-D is the debug console (not available on AP15/AP16). |
| 115 NvOdmDebugConsole_UartD, |
| 116 |
| 117 /// Specifies that UART-E is the debug console (not available on AP15/AP16). |
| 118 NvOdmDebugConsole_UartE, |
| 119 |
| 120 NvOdmDebugConsole_Num, |
| 121 /// Ignore -- Forces compilers to make 32-bit enums. |
| 122 NvOdmDebugConsole_Force32 = 0x7FFFFFFF |
| 123 } NvOdmDebugConsole; |
| 124 |
| 125 |
| 126 /** |
| 127 * Defines the devices that can serve as the download transport. |
| 128 */ |
| 129 typedef enum |
| 130 { |
| 131 /// Specifies that the download transport is undefined. |
| 132 NvOdmDownloadTransport_Undefined = 0, |
| 133 |
| 134 /// Specifies that no download transport device is to be used. |
| 135 NvOdmDownloadTransport_None, |
| 136 |
| 137 /// Specifies that an ODM-specific external Ethernet adapter |
| 138 /// is the download transport device. |
| 139 NvOdmDownloadTransport_MioEthernet, |
| 140 |
| 141 /// Deprecated name -- retained for backward compatibility. |
| 142 NvOdmDownloadTransport_Ethernet = NvOdmDownloadTransport_MioEthernet, |
| 143 |
| 144 /// Specifies that USB is the download transport device. |
| 145 NvOdmDownloadTransport_Usb, |
| 146 |
| 147 /// Specifies that SPI (Ethernet) is the download transport device. |
| 148 NvOdmDownloadTransport_SpiEthernet, |
| 149 |
| 150 /// Deprecated name -- retained for backward compatibility. |
| 151 NvOdmDownloadTransport_Spi = NvOdmDownloadTransport_SpiEthernet, |
| 152 |
| 153 /// Specifies that UART-A is the download transport device. |
| 154 NvOdmDownloadTransport_UartA, |
| 155 |
| 156 /// Specifies that UART-B is the download transport device. |
| 157 NvOdmDownloadTransport_UartB, |
| 158 |
| 159 /// Specifies that UART-C is the download transport device. |
| 160 NvOdmDownloadTransport_UartC, |
| 161 |
| 162 /// Specifies that UART-D is the download transport device (not available on
AP15/AP16). |
| 163 NvOdmDownloadTransport_UartD, |
| 164 |
| 165 /// Specifies that UART-E is the download transport device (not available on
AP15/AP16). |
| 166 NvOdmDownloadTransport_UartE, |
| 167 |
| 168 NvOdmDownloadTransport_Num, |
| 169 /// Ignore -- Forces compilers to make 32-bit enums. |
| 170 NvOdmDownloadTransport_Force32 = 0x7FFFFFFF |
| 171 } NvOdmDownloadTransport; |
| 172 |
| 173 /** |
| 174 * Contains information and settings for the display (such as the default |
| 175 * backlight intensity level). |
| 176 */ |
| 177 typedef struct |
| 178 { |
| 179 /// Default backlight intensity (scaled from 0 to 255). |
| 180 NvU8 BacklightIntensity; |
| 181 } NvOdmQueryDisplayInfo; |
| 182 |
| 183 /** |
| 184 * Defines the SPI signal mode for SPI communications to the device. |
| 185 */ |
| 186 typedef enum |
| 187 { |
| 188 /// Specifies the invalid signal mode. |
| 189 NvOdmQuerySpiSignalMode_Invalid = 0x0, |
| 190 |
| 191 /// Specifies mode 0 (CPOL=0, CPHA=0) of SPI controller. |
| 192 NvOdmQuerySpiSignalMode_0, |
| 193 |
| 194 /// Specifies mode 1 (CPOL=0, CPHA=1) of SPI controller. |
| 195 NvOdmQuerySpiSignalMode_1, |
| 196 |
| 197 /// Specifies mode 2 (CPOL=1, CPHA=0) of SPI controller. |
| 198 NvOdmQuerySpiSignalMode_2, |
| 199 |
| 200 /// Specifies mode 3 (CPOL=1, CPHA=1) of SPI controller. |
| 201 NvOdmQuerySpiSignalMode_3, |
| 202 |
| 203 /// Ignore -- Forces compilers to make 32-bit enums. |
| 204 NvOdmQuerySpiSignalMode_Force32 = 0x7FFFFFFF |
| 205 } NvOdmQuerySpiSignalMode; |
| 206 |
| 207 /** |
| 208 * Holds the SPI device information. |
| 209 */ |
| 210 typedef struct |
| 211 { |
| 212 /// Holds the signal mode for the SPI interfacing. |
| 213 NvOdmQuerySpiSignalMode SignalMode; |
| 214 |
| 215 /// If this is NV_TRUE, then this device's chip select is an active-low sign
al |
| 216 /// (the device is selected by driving its chip select line low). If this |
| 217 /// is NV_FALSE, then this device's chip select is an active-high signal. |
| 218 NvBool ChipSelectActiveLow; |
| 219 |
| 220 /// If this is NV_TRUE, then this device is an SPI slave. |
| 221 NvBool IsSlave; |
| 222 } NvOdmQuerySpiDeviceInfo; |
| 223 |
| 224 /** |
| 225 * Defines the SPI signal state in idle state, i.e., when no transaction is goin
g on. |
| 226 */ |
| 227 typedef struct |
| 228 { |
| 229 /// Specifies the signal idle state, whether it is normal or tristate. |
| 230 NvBool IsTristate; |
| 231 |
| 232 /// Specifies the signal mode for idle state. |
| 233 NvOdmQuerySpiSignalMode SignalMode; |
| 234 |
| 235 /// Specifies the idle state data out level. |
| 236 NvBool IsIdleDataOutHigh; |
| 237 |
| 238 } NvOdmQuerySpiIdleSignalState; |
| 239 |
| 240 /** |
| 241 * Defines the SDIO slot usage. |
| 242 */ |
| 243 typedef enum |
| 244 { |
| 245 /** Unused interface. */ |
| 246 NvOdmQuerySdioSlotUsage_unused = 0x0, |
| 247 |
| 248 /** Specifies a Wireless LAN device. */ |
| 249 NvOdmQuerySdioSlotUsage_wlan = 0x1, |
| 250 |
| 251 /** Specifies the boot slot (contains the operating system code, |
| 252 * typically populated by an eMMC). */ |
| 253 NvOdmQuerySdioSlotUsage_Boot = 0x2, |
| 254 |
| 255 /** Specifies the media slot, used for user data like audio/video/images. */ |
| 256 NvOdmQuerySdioSlotUsage_Media = 0x4, |
| 257 |
| 258 /** Ignore -- Forces compilers to make 32-bit enums. */ |
| 259 NvOdmQuerySdioSlotUsage_Force32 = 0x7FFFFFFF, |
| 260 |
| 261 } NvOdmQuerySdioSlotUsage; |
| 262 |
| 263 /** |
| 264 * Holds the SDIO interface properties. |
| 265 */ |
| 266 typedef struct |
| 267 { |
| 268 /// Holds a flag indicating whether or not the eMMC card connected to the |
| 269 /// SDIO interface is pluggable on the board. |
| 270 /// |
| 271 /// @note If a GPIO is already assigned by NvOdmGpioPinGroup::NvOdmGpioPinGr
oup_Sdio, |
| 272 /// then this value is ignored. |
| 273 /// |
| 274 /// If this is NV_TRUE, the eMMC card is pluggable on the board. |
| 275 /// If this is NV_FALSE, the eMMC card is fixed permanently (or soldered) on
the board. |
| 276 /// For more information, see NvDdkSdioIsCardInserted(). |
| 277 NvBool IsCardRemovable; |
| 278 |
| 279 /// Holds SDIO card HW settling time after reset, i.e., before reading the O
CR. |
| 280 NvU32 SDIOCardSettlingDelayMSec; |
| 281 |
| 282 /// Indicates to the driver whether the card must be re-enumerated after ret
urning |
| 283 /// from suspend or deep sleep modes, because of power loss to the card duri
ng those |
| 284 /// modes. NV_TRUE means that the card is powered even though the device ent
ers |
| 285 /// suspend or deep sleep mode, and there is no need to re-enumerate the car
d after |
| 286 /// returning from suspend/deep sleep. |
| 287 NvBool AlwaysON; |
| 288 |
| 289 /// Indicates the tap delay to adjust the track delay on the PCB/Boards from
SOC to connector. |
| 290 NvU32 TapDelay; |
| 291 |
| 292 /// Defines what the slot is used for. |
| 293 NvOdmQuerySdioSlotUsage usage; |
| 294 |
| 295 } NvOdmQuerySdioInterfaceProperty; |
| 296 |
| 297 /** |
| 298 * Defines the bus width used by the HSMMC controller on the platform. |
| 299 */ |
| 300 typedef enum |
| 301 { |
| 302 /// Specifies the invalid bus width. |
| 303 NvOdmQueryHsmmcBusWidth_Invalid = 0x0, |
| 304 |
| 305 /// Specifies 4-bit wide bus. |
| 306 NvOdmQueryHsmmcBusWidth_FourBitWide, |
| 307 |
| 308 /// Specifies 8-bit wide bus. |
| 309 NvOdmQueryHsmmcBusWidth_EightBitWide, |
| 310 |
| 311 /// Ignore -- Forces compilers to make 32-bit enums. |
| 312 NvOdmQueryHsmmcBusWidth_Force32 = 0x7FFFFFFF |
| 313 } NvOdmQueryHsmmcBusWidth; |
| 314 |
| 315 /** |
| 316 * Holds the HSMMC interface properties. |
| 317 */ |
| 318 typedef struct |
| 319 { |
| 320 /// Holds a flag to indicate whether or not the eMMC card connected to |
| 321 /// the HSMMC interface is pluggable on the board. Set this to NV_TRUE |
| 322 /// if the eMMC card is pluggable on the board. If the eMMC card is fixed |
| 323 /// permanently (or soldered) on the board, then set this variable to NV_FAL
SE. |
| 324 /// |
| 325 /// @note If a GPIO is already assigned by NvOdmGpioPinGroup::NvOdmGpioPinGr
oup_Hsmmc, |
| 326 /// then this value is ignored. |
| 327 /// For more information, see NvDdkHsmmcIsCardInserted(). |
| 328 NvBool IsCardRemovable; |
| 329 |
| 330 /// Holds the bus width supported by the platform for the HSMMC controller. |
| 331 NvOdmQueryHsmmcBusWidth Buswidth; |
| 332 } NvOdmQueryHsmmcInterfaceProperty; |
| 333 |
| 334 /** |
| 335 * Defines the OWR device details. |
| 336 */ |
| 337 typedef struct |
| 338 { |
| 339 /** Flag to indicate if the "Byte transfer mode" is supported for the given |
| 340 * OWR device. If not supported for a given device, the driver uses |
| 341 * "Bit transfer mode" for reading/writing data to the device. |
| 342 */ |
| 343 NvBool IsByteModeSupported; |
| 344 |
| 345 /** Read data setup, Tsu = N owr clks, Range = tsu < 1. */ |
| 346 NvU32 Tsu; |
| 347 /** Release 1-wire time, Trelease = N owr clks, Range = 0 <= trelease < 45.
*/ |
| 348 NvU32 TRelease; |
| 349 /** Read data valid time, Trdv = N+1 owr clks, Range = Exactly 15. */ |
| 350 NvU32 TRdv; |
| 351 /** Write zero time low, Tlow0 = N+1 owr clks, Range = 60 <= tlow0 < tslot <
120. */ |
| 352 NvU32 TLow0; |
| 353 /** Write one time low, or TLOWR both are same Tlow1 = N+1 owr clks, |
| 354 * Range = 1 <= tlow1 < 15 TlowR = N+1 owr clks, Range = 1 <= tlowR < 15. |
| 355 */ |
| 356 NvU32 TLow1; |
| 357 /** Active time slot for write or read data, Tslot = N+1 owr clks, |
| 358 * Range = 60 <= tslot < 120. |
| 359 */ |
| 360 NvU32 TSlot; |
| 361 |
| 362 |
| 363 /** ::PRESENCE_DETECT_LOW Tpdl = N owr clks, Range = 60 <= tpdl < 240. */ |
| 364 NvU32 Tpdl; |
| 365 /** ::PRESENCE_DETECT_HIGH Tpdh = N+1 owr clks, Range = 15 <= tpdh < 60. */ |
| 366 NvU32 Tpdh; |
| 367 /** ::RESET_TIME_LOW Trstl = N+1 owr clks, Range = 480 <= trstl < infinity.
*/ |
| 368 NvU32 TRstl; |
| 369 /** ::RESET_TIME_HIGH, Trsth = N+1 owr clks, Range = 480 <= trsth < infinity
. */ |
| 370 NvU32 TRsth; |
| 371 |
| 372 /** Program pulse width, Tpp = N owr clks Range = 480 to 5000. */ |
| 373 NvU32 Tpp; |
| 374 /** Program voltage fall time, Tfp = N owr clks Range = 0.5 to 5. */ |
| 375 NvU32 Tfp; |
| 376 /** Program voltage rise time, Trp = N owr clks Range = 0.5 to 5. */ |
| 377 NvU32 Trp; |
| 378 /** Delay to verify, Tdv = N owr clks, Range = > 5. */ |
| 379 NvU32 Tdv; |
| 380 /** Delay to program, Tpd = N+1 owr clks, Range = > 5. */ |
| 381 NvU32 Tpd; |
| 382 |
| 383 /** Should be less than or equal to (tlow1 - 6) clks, 6 clks are used for De
glitch, |
| 384 * if Deglitch bypassed it is 3 clks. |
| 385 */ |
| 386 NvU32 ReadDataSampleClk; |
| 387 /** Should be less than or equal to (tpdl - 6) clks, 6 clks are used for dgl
itch, |
| 388 * if Deglitch bypassed it is 3 clks. |
| 389 */ |
| 390 NvU32 PresenceSampleClk; |
| 391 |
| 392 /** OWR device memory address size. */ |
| 393 NvU32 AddressSize; |
| 394 /** OWR device Memory size. */ |
| 395 NvU32 MemorySize; |
| 396 } NvOdmQueryOwrDeviceInfo; |
| 397 |
| 398 /** |
| 399 * Defines the functional mode for the I2S channel. |
| 400 */ |
| 401 typedef enum |
| 402 { |
| 403 /// Specifies the I2S controller will generate the clock. |
| 404 NvOdmQueryI2sMode_Master = 1, |
| 405 |
| 406 /// Specifies the I2S controller will not generate the clock; |
| 407 /// the audio codec will generate the clock. |
| 408 NvOdmQueryI2sMode_Slave, |
| 409 |
| 410 /// Specifies the I2S communication is internal to audio codec. |
| 411 NvOdmQueryI2sMode_Internal, |
| 412 |
| 413 /// Ignore -- Forces compilers to make 32-bit enums. |
| 414 NvOdmQueryI2sMode_Force32 = 0x7FFFFFFF |
| 415 } NvOdmQueryI2sMode; |
| 416 |
| 417 /** |
| 418 * Defines the left and right channel data selection control for the audio. |
| 419 */ |
| 420 typedef enum |
| 421 { |
| 422 /// Specifies the left channel when left/right line control signal is low. |
| 423 NvOdmQueryI2sLRLineControl_LeftOnLow = 1, |
| 424 |
| 425 /// Specifies the right channel when left/right line control signal is low. |
| 426 NvOdmQueryI2sLRLineControl_RightOnLow, |
| 427 |
| 428 /// Ignore -- Forces compilers to make 32-bit enums. |
| 429 NvOdmQueryI2sLRLineControl_Force32 = 0x7FFFFFFF |
| 430 } NvOdmQueryI2sLRLineControl; |
| 431 |
| 432 /** |
| 433 * Defines the possible I2S data communication formats with the audio codec. |
| 434 */ |
| 435 typedef enum |
| 436 { |
| 437 /// Specifies the I2S format for data communication. |
| 438 NvOdmQueryI2sDataCommFormat_I2S = 0x1, |
| 439 |
| 440 /// Specifies right-justified format for data communication. |
| 441 NvOdmQueryI2sDataCommFormat_RightJustified, |
| 442 |
| 443 /// Specifies left-justified format for data communication. |
| 444 NvOdmQueryI2sDataCommFormat_LeftJustified, |
| 445 |
| 446 /// Specifies DSP format for data communication. |
| 447 NvOdmQueryI2sDataCommFormat_Dsp, |
| 448 |
| 449 /// Ignore -- Forces compilers to make 32-bit enums. |
| 450 NvOdmQueryI2sDataCommFormat_Force32 = 0x7FFFFFFF |
| 451 } NvOdmQueryI2sDataCommFormat; |
| 452 |
| 453 |
| 454 /** |
| 455 * Combines the one-time configuration property for the I2S interface with |
| 456 * audio codec. |
| 457 */ |
| 458 typedef struct |
| 459 { |
| 460 /// Holds the I2S controller functional mode. |
| 461 NvOdmQueryI2sMode Mode; |
| 462 |
| 463 /// Holds the left and right channel control. |
| 464 NvOdmQueryI2sLRLineControl I2sLRLineControl; |
| 465 |
| 466 /// Holds the information about the I2S data communication format. |
| 467 NvOdmQueryI2sDataCommFormat I2sDataCommunicationFormat; |
| 468 |
| 469 /// Specifies the codec needs a fixed MCLK when I2s acts as Master |
| 470 NvBool IsFixedMCLK; |
| 471 |
| 472 /// Specifies the Fixed MCLK Frequency in Khz. |
| 473 /// Supports only three fixed frequencies: 11289, 12288, and 12000. |
| 474 NvU32 FixedMCLKFrequency; |
| 475 |
| 476 } NvOdmQueryI2sInterfaceProperty; |
| 477 |
| 478 /** |
| 479 * Defines the left and right channel data selection control. |
| 480 */ |
| 481 typedef enum |
| 482 { |
| 483 /// Specifies the left channel when left/right line control signal is low. |
| 484 NvOdmQuerySpdifDataCaptureControl_FromLeft = 1, |
| 485 |
| 486 /// Specifies the right channel when left/right line control signal is low. |
| 487 NvOdmQuerySpdifDataCaptureControl_FromRight, |
| 488 |
| 489 /// Ignore -- Forces compilers to make 32-bit enums. |
| 490 NvOdmQuerySpdifDataCaptureControl_Force32 = 0x7FFFFFFF |
| 491 } NvOdmQuerySpdifDataCaptureControl; |
| 492 |
| 493 /** |
| 494 * Combines the one time configuration property for the SPDIF interface. |
| 495 */ |
| 496 typedef struct NvOdmQuerySpdifInterfacePropertyRec |
| 497 { |
| 498 /// Holds the left and right channel control. |
| 499 NvOdmQuerySpdifDataCaptureControl SpdifDataCaptureControl; |
| 500 } NvOdmQuerySpdifInterfaceProperty; |
| 501 |
| 502 /** |
| 503 * Combines the one-time configuration property for the AC97 interface. |
| 504 */ |
| 505 typedef struct |
| 506 { |
| 507 /// Identifies whether secondary codec is available. |
| 508 NvBool IsSecondoaryCodecAvailable; |
| 509 |
| 510 /// Identifies whether left/right surround sound is enabled. |
| 511 NvBool IsLRSurroundSoundEnable; |
| 512 |
| 513 /// Identifies whether LFE is enabled. |
| 514 NvBool IsLFEEnable; |
| 515 |
| 516 /// Identifies whether center speaker is enabled. |
| 517 NvBool IsCenterSpeakerEnable; |
| 518 |
| 519 /// Identifies whether left right PCM is enabled. |
| 520 NvBool IsLRPcmEnable; |
| 521 } NvOdmQueryAc97InterfaceProperty; |
| 522 |
| 523 /** |
| 524 * Combines the one-time configuration property for the audio codec interfaced |
| 525 * by I2S. |
| 526 */ |
| 527 typedef struct |
| 528 { |
| 529 /// Holds whether the audio codec is in master mode or in slave mode. |
| 530 NvBool IsCodecMasterMode; |
| 531 |
| 532 /// Holds the dap port index used to connect to the codec. |
| 533 NvU32 DapPortIndex; |
| 534 |
| 535 /// Holds the device address if it is an I2C interface, else the chip |
| 536 /// select ID if it is an SPI interface. |
| 537 NvU32 DeviceAddress; |
| 538 |
| 539 /// Tells whether it is the USB mode or normal mode of interfacing for the |
| 540 /// audio codec. |
| 541 NvU32 IsUsbMode; |
| 542 |
| 543 /// Holds the left and right channel control. |
| 544 NvOdmQueryI2sLRLineControl I2sCodecLRLineControl; |
| 545 |
| 546 /// Holds the information about the I2S data communication format. |
| 547 NvOdmQueryI2sDataCommFormat I2sCodecDataCommFormat; |
| 548 } NvOdmQueryI2sACodecInterfaceProp; |
| 549 |
| 550 /** |
| 551 * Defines the oscillator source. |
| 552 */ |
| 553 typedef enum |
| 554 { |
| 555 /// Specifies the cyrstal oscillator as the clock source. |
| 556 NvOdmQueryOscillator_Xtal = 1, |
| 557 |
| 558 /// Specifies an external clock source (bypass mode). |
| 559 NvOdmQueryOscillator_External, |
| 560 |
| 561 /// Ignore -- Forces compilers to make 32-bit enums. |
| 562 NvOdmQueryOscillator_Force32 = 0x7FFFFFFF |
| 563 } NvOdmQueryOscillator; |
| 564 |
| 565 /** |
| 566 * Defines the wakeup polarity. |
| 567 */ |
| 568 typedef enum |
| 569 { |
| 570 NvOdmWakeupPadPolarity_Low = 0, |
| 571 NvOdmWakeupPadPolarity_High, |
| 572 NvOdmWakeupPadPolarity_AnyEdge, |
| 573 NvOdmWakeupPadPolarity_Force32 = 0x7FFFFFFF |
| 574 } NvOdmWakeupPadPolarity; |
| 575 |
| 576 /** Defines the wakeup pad attributes. */ |
| 577 typedef struct |
| 578 { |
| 579 /// Specifies to enable this pad as wakeup or not. |
| 580 NvBool enable; |
| 581 |
| 582 /// Specifies the wake up pad number. Valid values for AP15 are 0 to 15. |
| 583 NvU32 WakeupPadNumber; |
| 584 |
| 585 /// Specifies wake up polarity. |
| 586 NvOdmWakeupPadPolarity Polarity; |
| 587 |
| 588 } NvOdmWakeupPadInfo; |
| 589 |
| 590 /** |
| 591 * Defines the index for possible connection based on the use case. |
| 592 */ |
| 593 typedef enum |
| 594 { |
| 595 /// Specifies the default music path. |
| 596 NvOdmDapConnectionIndex_Music_Path = 0, |
| 597 |
| 598 /// Specifies the voice call without Bluetooth. |
| 599 NvOdmDapConnectionIndex_VoiceCall_NoBlueTooth = 1, |
| 600 |
| 601 /// Specifies the HD radio. |
| 602 NvOdmDapConnectionIndex_HD_Radio, |
| 603 |
| 604 /// Specifies the voice call with Bluetooth. |
| 605 NvOdmDapConnectionIndex_VoiceCall_WithBlueTooth, |
| 606 |
| 607 /// Specifies the Bluetooth to codec. |
| 608 NvOdmDapConnectionIndex_BlueTooth_Codec, |
| 609 |
| 610 /// Specifies DAC1-to-DAP2 bypass, used for h/w verification. |
| 611 NvOdmDapConnectionIndex_DAC1_DAP2, |
| 612 |
| 613 /// Specifies DAC1-to-DAP3 bypass, used for h/w verification. |
| 614 NvOdmDapConnectionIndex_DAC1_DAP3, |
| 615 |
| 616 /// Specifies DAC1-to-DAP4 bypass, used for h/w verification. |
| 617 NvOdmDapConnectionIndex_DAC1_DAP4, |
| 618 |
| 619 /// Specifies DAC2-to-DAP2 bypass, used for hardware verification. |
| 620 NvOdmDapConnectionIndex_DAC2_DAP2, |
| 621 |
| 622 /// Specifies DAC2-to-DAP3 bypass, used for hardware verification. |
| 623 NvOdmDapConnectionIndex_DAC2_DAP3, |
| 624 |
| 625 /// Specifies DAC2-to-DAP4 bypass, used for hardware verification. |
| 626 NvOdmDapConnectionIndex_DAC2_DAP4, |
| 627 |
| 628 /// Specifies a custom type connection. |
| 629 NvOdmDapConnectionIndex_Custom, |
| 630 |
| 631 /// Specifies unknown. |
| 632 NvOdmDapConnectionIndex_Unknown, |
| 633 /// Ignore -- Forces compilers to make 32-bit enums. |
| 634 NvOdmDapConnectionIndex_Force32 = 0x7FFFFFFF |
| 635 |
| 636 }NvOdmDapConnectionIndex; |
| 637 |
| 638 /** |
| 639 * Defines the DAP port source and destination enumerations. |
| 640 */ |
| 641 typedef enum |
| 642 { |
| 643 /// NONE DAP port - no connection. |
| 644 NvOdmDapPort_None = 0, |
| 645 |
| 646 /// Specifies DAP port 1. |
| 647 NvOdmDapPort_Dap1, |
| 648 |
| 649 /// Specifies DAP port 2. |
| 650 NvOdmDapPort_Dap2, |
| 651 |
| 652 /// Specifies DAP port 3. |
| 653 NvOdmDapPort_Dap3, |
| 654 |
| 655 /// Specifies DAP port 4. |
| 656 NvOdmDapPort_Dap4, |
| 657 |
| 658 /// Specifies DAP port 5. |
| 659 NvOdmDapPort_Dap5, |
| 660 |
| 661 /// Specifies I2S DAP port 1. |
| 662 NvOdmDapPort_I2s1, |
| 663 |
| 664 /// Specifies I2S DAP port 2. |
| 665 NvOdmDapPort_I2s2, |
| 666 |
| 667 /// Specifies AC97 DAP port. |
| 668 NvOdmDapPort_Ac97, |
| 669 |
| 670 /// Specifies baseband DAP port. |
| 671 NvOdmDapPort_BaseBand, |
| 672 |
| 673 /// Specifies Bluetooth DAP port. |
| 674 NvOdmDapPort_BlueTooth, |
| 675 |
| 676 /// Specifies media type DAP port. |
| 677 NvOdmDapPort_MediaType, |
| 678 |
| 679 /// Specifies voice type DAP port. |
| 680 NvOdmDapPort_VoiceType, |
| 681 |
| 682 /// Specifies high fidelity codec DAP port. |
| 683 NvOdmDapPort_HifiCodecType, |
| 684 |
| 685 /// Specifies voice codec DAP port. |
| 686 NvOdmDapPort_VoiceCodecType, |
| 687 |
| 688 /// Ignore -- Forces compilers to make 32-bit enums. |
| 689 NvOdmDapPort_Force32 = 0x7FFFFFFF |
| 690 } NvOdmDapPort; |
| 691 |
| 692 #define NvOdmDapPort_Max NvOdmDapPort_Dap5+1 |
| 693 /** |
| 694 * Combines the one-time configuration property for DAP device wired to the DAP
port. |
| 695 * Currently define only for best suited values. If the device can support more
ranges, |
| 696 * you have to consider it accordingly. |
| 697 */ |
| 698 typedef struct NvOdmDapDevicePropertyRec |
| 699 { |
| 700 /// Specifies the number of channels, such as 2 for stereo. |
| 701 NvU32 NumberOfChannels; |
| 702 |
| 703 /// Specifies the number of bits per sample, such as 8 or 16 bits. |
| 704 NvU32 NumberOfBitsPerSample; |
| 705 |
| 706 /// Specifies the sampling rate in Hz, such as 8000 for 8 kHz, 44100 |
| 707 /// for 44.1 kHz. |
| 708 NvU32 SamplingRateInHz; |
| 709 |
| 710 /// Holds the information DAP port data communication format. |
| 711 NvOdmQueryI2sDataCommFormat DapPortCommunicationFormat; |
| 712 |
| 713 }NvOdmDapDeviceProperty; |
| 714 |
| 715 /** |
| 716 * Defines the connection line and connection table. |
| 717 */ |
| 718 typedef struct NvOdmQueryDapPortConnectionLinesRec |
| 719 { |
| 720 /// Specifies the source for the connection line. |
| 721 NvOdmDapPort Source; |
| 722 |
| 723 /// Specifies the destination for the connection line. |
| 724 NvOdmDapPort Destination; |
| 725 |
| 726 /// Specifies the source to act as master or slave. |
| 727 NvBool IsSourceMaster; |
| 728 |
| 729 }NvOdmQueryDapPortConnectionLines; |
| 730 |
| 731 /** |
| 732 * Increases the maximum connection line based on use case connection needed. |
| 733 */ |
| 734 #define NVODM_MAX_CONNECTIONLINES 8 |
| 735 |
| 736 /** |
| 737 * Defines the DAP port connection. |
| 738 */ |
| 739 typedef struct NvOdmQueryDapPortConnectionRec |
| 740 { |
| 741 /// Specifie the connection use case from the enum provided. |
| 742 NvU32 UseIndex; |
| 743 |
| 744 /// Specifies the number of connection line for the table. |
| 745 NvU32 NumofEntires; |
| 746 |
| 747 /// Specifies the connection lines for the table. |
| 748 NvOdmQueryDapPortConnectionLines DapPortConnectionLines[NVODM_MAX_CONNECTION
LINES]; |
| 749 |
| 750 }NvOdmQueryDapPortConnection; |
| 751 /** |
| 752 * Combines the one-time configuration property for DAP port setting. |
| 753 */ |
| 754 typedef struct NvOdmQueryDapPortPropertyRec |
| 755 { |
| 756 /// Specifies the source for the DAP port. |
| 757 NvOdmDapPort DapSource; |
| 758 |
| 759 /// Specifies the destination for the DAP port. |
| 760 NvOdmDapPort DapDestination; |
| 761 |
| 762 /// Specified the property of device wired to DAP port. |
| 763 NvOdmDapDeviceProperty DapDeviceProperty; |
| 764 |
| 765 } NvOdmQueryDapPortProperty; |
| 766 |
| 767 /** |
| 768 * Defines ODM interrupt polarity. |
| 769 */ |
| 770 typedef enum |
| 771 { |
| 772 NvOdmInterruptPolarity_Low = 1, |
| 773 NvOdmInterruptPolarity_High, |
| 774 NvOdmInterruptPolarity_Force32 = 0x7FFFFFFF |
| 775 } NvOdmInterruptPolarity; |
| 776 |
| 777 /** |
| 778 * Defines core power request polarity, as required by a PMU. |
| 779 */ |
| 780 typedef enum |
| 781 { |
| 782 NvOdmCorePowerReqPolarity_Low, |
| 783 NvOdmCorePowerReqPolarity_High, |
| 784 NvOdmCorePowerReqPolarity_Force32 = 0x7FFFFFFF |
| 785 }NvOdmCorePowerReqPolarity; |
| 786 |
| 787 /** |
| 788 * Defines system clock request polarity, as required by the clock source. |
| 789 */ |
| 790 typedef enum |
| 791 { |
| 792 NvOdmSysClockReqPolarity_Low, |
| 793 NvOdmSysClockReqPolarity_High, |
| 794 NvOdmSysClockReqPolarity_Force32 = 0x7FFFFFFF |
| 795 }NvOdmSysClockReqPolarity; |
| 796 |
| 797 |
| 798 /** |
| 799 * Combines PMU configuration properties. |
| 800 */ |
| 801 typedef struct NvOdmPmuPropertyRec |
| 802 { |
| 803 /// Specifies if PMU interrupt is connected to SoC. |
| 804 NvBool IrqConnected; |
| 805 |
| 806 /// Specifies the time required for power to be stable (in 32 kHz counts). |
| 807 NvU32 PowerGoodCount; |
| 808 |
| 809 /// Specifies the PMU interrupt polarity. |
| 810 NvOdmInterruptPolarity IrqPolarity; |
| 811 |
| 812 /// Specifies the core power request signal polarity. |
| 813 NvOdmCorePowerReqPolarity CorePowerReqPolarity; |
| 814 |
| 815 /// Specifies the system clock request signal polarity. |
| 816 NvOdmSysClockReqPolarity SysClockReqPolarity; |
| 817 |
| 818 /// Specifies whether or not only one power request input on PMU is availabl
e. |
| 819 /// Relevant for SoCs with separate CPU and core power request outputs: |
| 820 /// - NV_TRUE specifies PMU has single power request input, in this case SoC
|
| 821 /// CPU and core power requests must be combined by external logic with |
| 822 /// proper pull-up/pull-down. |
| 823 /// - NV_FALSE specifies PMU has at least two power request inputs, in this |
| 824 /// case SoC CPU and core power requests are connected separately to |
| 825 /// the respective PMU inputs. |
| 826 NvBool CombinedPowerReq; |
| 827 |
| 828 /// Specifies the time required for CPU power to be stable (in US). |
| 829 /// Relevant for SoC with separate CPU and core power request outputs. |
| 830 NvU32 CpuPowerGoodUs; |
| 831 |
| 832 /// Specifies whether or not CPU voltage will switch back to OTP (default) |
| 833 /// value after CPU request on-off-on transition (typically this transition |
| 834 /// happens on entry/exit to/from low power states). Relevant for SoCs with |
| 835 /// separate CPU and core power request outputs: |
| 836 /// - NV_TRUE specifies PMU will switch CPU voltage to default level after |
| 837 /// CPU request on-off-on transition. This PMU mode is not compatible with |
| 838 /// DVFS core voltage scaling, which will be disabled in this case. |
| 839 /// - NV_FALSE specifies PMU will restore CPU voltage after CPU request |
| 840 /// on-off-on transition to the level it has just before the transition |
| 841 /// happens. In this case DVFS core voltage scaling can be enabled. |
| 842 NvBool VCpuOTPOnWakeup; |
| 843 |
| 844 /// Specifies PMU Core and CPU voltage regulation accuracy in percent |
| 845 NvU32 AccuracyPercent; |
| 846 |
| 847 } NvOdmPmuProperty; |
| 848 |
| 849 /** |
| 850 * Defines SOC power states. |
| 851 */ |
| 852 typedef enum |
| 853 { |
| 854 /// State where power to non-always-on (non-AO) partitions are |
| 855 /// removed, and double-data rate (DDR) SDRAM is in self-refresh |
| 856 /// mode. Wake up by any enabled \a external event/interrupt. |
| 857 NvOdmSocPowerState_DeepSleep, |
| 858 |
| 859 /// State where the CPU is halted by the flow controller and power |
| 860 /// is gated, plus DDR is in self-refresh. Wake up by any enabled interrupt. |
| 861 NvOdmSocPowerState_Suspend, |
| 862 |
| 863 /// Specifies to disable the SOC power state. |
| 864 NvOdmSocPowerState_Active, |
| 865 |
| 866 /// Ignore -- Forces compilers to make 32-bit enums. |
| 867 NvOdmSocPowerState_Force32 = 0x7FFFFFFFUL |
| 868 |
| 869 } NvOdmSocPowerState; |
| 870 |
| 871 /** |
| 872 * SOC power state information. |
| 873 */ |
| 874 typedef struct NvOdmSocPowerStateInfoRec |
| 875 { |
| 876 // Specifies the lowest supported power state. |
| 877 NvOdmSocPowerState LowestPowerState; |
| 878 |
| 879 // Specifies the idle time (in Msecs) threshold to enter the power state. |
| 880 NvU32 IdleThreshold; |
| 881 |
| 882 } NvOdmSocPowerStateInfo; |
| 883 |
| 884 /** External interface type for USB controllers */ |
| 885 typedef enum |
| 886 { |
| 887 /// Specifies the USB controller is connected to a standard UTMI interface |
| 888 /// (only valid for ::NvOdmIoModule_Usb). |
| 889 NvOdmUsbInterfaceType_Utmi = 1, |
| 890 |
| 891 /// Specifies the USB controller is connected to a phy-less ULPI interface |
| 892 /// (only valid for ::NvOdmIoModule_Ulpi). |
| 893 NvOdmUsbInterfaceType_UlpiNullPhy, |
| 894 |
| 895 /// Specifies the USB controller is connected to a ULPI interface that has a
n |
| 896 /// external phy (only valid for \c NvOdmIoModule_Ulpi). |
| 897 NvOdmUsbInterfaceType_UlpiExternalPhy, |
| 898 |
| 899 /// Ignore -- Forces compilers to make 32-bit enums. |
| 900 NvOdmUsbInterfaceType_Force32 = 0x7FFFFFFFUL |
| 901 |
| 902 } NvOdmUsbInterfaceType; |
| 903 |
| 904 |
| 905 /** Defines the USB line states. */ |
| 906 typedef enum |
| 907 { |
| 908 /// Specifies USB host based charging type. |
| 909 NvOdmUsbChargerType_UsbHost = 0, |
| 910 |
| 911 /// Specifies charger type 0, USB compliant charger, when D+ and D- are at l
ow voltage. |
| 912 NvOdmUsbChargerType_SE0 = 1, |
| 913 |
| 914 /// Specifies charger type 1, when D+ is high and D- is low. |
| 915 NvOdmUsbChargerType_SJ = 2, |
| 916 |
| 917 /// Specifies charger type 2, when D+ is low and D- is high. |
| 918 NvOdmUsbChargerType_SK = 4, |
| 919 |
| 920 /// Specifies charger type 3, when D+ and D- are at high voltage. |
| 921 NvOdmUsbChargerType_SE1 = 8, |
| 922 |
| 923 /// Specifies charger type 4, D+ and D- are undefined. |
| 924 /// @note If dummy charger is selected, then charger type will be always |
| 925 /// dummy and other type chargers are detected but treated as dummy. |
| 926 NvOdmUsbChargerType_Dummy = 0x10, |
| 927 |
| 928 /// Ignore -- Forces compilers to make 32-bit enums. |
| 929 NvOdmUsbChargerType_Force32 = 0x7FFFFFFF, |
| 930 } NvOdmUsbChargerType; |
| 931 |
| 932 /** Defines the USB mode for the instance. */ |
| 933 typedef enum |
| 934 { |
| 935 /// Specifies the instance is not present or cannot be used for USB. |
| 936 NvOdmUsbModeType_None = 0, |
| 937 |
| 938 /// Specifies the instance as USB host. |
| 939 NvOdmUsbModeType_Host = 1, |
| 940 |
| 941 /// Specifies the instance as USB Device. |
| 942 NvOdmUsbModeType_Device = 2, |
| 943 |
| 944 /// Specifies the instance as USB OTG. |
| 945 NvOdmUsbModeType_OTG= 4, |
| 946 |
| 947 /// Ignore -- Forces compilers to make 32-bit enums. |
| 948 NvOdmUsbModeType_Force32 = 0x7FFFFFFF, |
| 949 } NvOdmUsbModeType; |
| 950 |
| 951 /** Defines the USB ID pin detection type. */ |
| 952 typedef enum |
| 953 { |
| 954 /// Specifies there is no ID pin detection mechanism. |
| 955 NvOdmUsbIdPinType_None = 0, |
| 956 |
| 957 /// Specifies ID pin detection is done with GPIO. |
| 958 NvOdmUsbIdPinType_Gpio= 1, |
| 959 |
| 960 /// Specifies ID pin detection is done with cable ID. |
| 961 NvOdmUsbIdPinType_CableId= 2, |
| 962 |
| 963 /// Ignore -- Forces compilers to make 32-bit enums. |
| 964 NvOdmUsbIdPinType_Force32 = 0x7FFFFFFF, |
| 965 } NvOdmUsbIdPinType; |
| 966 |
| 967 /** Defines the USB connectors multiplex type. */ |
| 968 typedef enum |
| 969 { |
| 970 /// Specifies there is no connectors mux mechanism |
| 971 NvOdmUsbConnectorsMuxType_None = 0, |
| 972 |
| 973 /// Specifies microAB/TypeA mux is available. |
| 974 NvOdmUsbConnectorsMuxType_MicroAB_TypeA= 1, |
| 975 |
| 976 /// Ignore -- Forces compilers to make 32-bit enums. |
| 977 NvOdmUsbConnectorsMuxType_Force32 = 0x7FFFFFFF, |
| 978 } NvOdmUsbConnectorsMuxType; |
| 979 |
| 980 /** |
| 981 * Defines the USB trimmer control values. Keep all values zero unless the |
| 982 * default trimmer values programmed in DDK do not work on the customer board. |
| 983 */ |
| 984 typedef struct NvOdmUsbTrimmerCtrlRec |
| 985 { |
| 986 /// Programmable delay on the Shadow ULPI Clock (0 ~ 31) |
| 987 NvU8 UlpiShadowClkDelay; |
| 988 |
| 989 /// Programmable delay on the ULPI Clock out (0 ~ 31) |
| 990 NvU8 UlpiClockOutDelay; |
| 991 |
| 992 /// ULPI Data Trimmer Value (0 ~ 7) |
| 993 NvU8 UlpiDataTrimmerSel; |
| 994 |
| 995 /// ULPI STP/DIR/NXT Trimmer Value (0 ~ 7) |
| 996 NvU8 UlpiStpDirNxtTrimmerSel; |
| 997 } NvOdmUsbTrimmerCtrl; |
| 998 |
| 999 /** Defines USB interface properties. */ |
| 1000 typedef struct NvOdmUsbPropertyRec |
| 1001 { |
| 1002 /// Specifies the USB controller's external interface type. |
| 1003 /// @see NvOdmUsbInterfaceType |
| 1004 NvOdmUsbInterfaceType UsbInterfaceType; |
| 1005 |
| 1006 /// Specifies the charger types supported on this interface. |
| 1007 /// If dummy charger is selected then other type chargers are detected as du
mmy. |
| 1008 /// @see NvOdmUsbChargerType |
| 1009 NvU32 SupportedChargers; |
| 1010 |
| 1011 /// Specifies the time required to wait before checking for the line status. |
| 1012 /// @see NvOdmUsbChargerType |
| 1013 NvU32 ChargerDetectTimeMs; |
| 1014 |
| 1015 /// Specifies internal PHY to use as source for VBUS detection in the low po
wer mode. |
| 1016 /// Set to NV_TRUE to use internal PHY for VBUS detection. |
| 1017 /// Set to NV_FALSE to use PMU interrupt for VBUS detection. |
| 1018 NvBool UseInternalPhyWakeup; |
| 1019 |
| 1020 /// Specifies the USB mode for the instance. |
| 1021 /// @see NvOdmUsbModeType |
| 1022 NvU32 UsbMode; |
| 1023 |
| 1024 /// Specifies the USB ID pin detection type. |
| 1025 /// @see NvOdmUsbIdPinType |
| 1026 NvU32 IdPinDetectionType; |
| 1027 |
| 1028 /// Specifies the USB connectors multiplex type. |
| 1029 /// @see NvOdmUsbConnectorsMuxType |
| 1030 NvOdmUsbConnectorsMuxType ConMuxType; |
| 1031 |
| 1032 /// Specifies Usb rail to power off or not in the deep sleep mode. |
| 1033 /// Set to NV_TRUE to specify usb rail power off in the deep sleep |
| 1034 /// Set to NV_FALSE to specify usb rail can not be power off in the deep sle
ep |
| 1035 NvBool UsbRailPoweOffInDeepSleep; |
| 1036 |
| 1037 /// Specifies the USB trimmer values. The default value will be used if all
values are zeros. |
| 1038 /// @see NvOdmUsbTrimmerCtrl |
| 1039 NvOdmUsbTrimmerCtrl TrimmerCtrl; |
| 1040 } NvOdmUsbProperty; |
| 1041 |
| 1042 /** Defines wakeup sources. */ |
| 1043 typedef enum |
| 1044 { |
| 1045 NvOdmGpioWakeupSource_Invalid = 0, |
| 1046 NvOdmGpioWakeupSource_RIL, |
| 1047 NvOdmGpioWakeupSource_UART, |
| 1048 NvOdmGpioWakeupSource_BluetoothIrq, |
| 1049 NvOdmGpioWakeupSource_HDMIDetection, |
| 1050 NvOdmGpioWakeupSource_USB, |
| 1051 NvOdmGpioWakeupSource_Lid, |
| 1052 NvOdmGpioWakeupSource_AudioIrq, |
| 1053 NvOdmGpioWakeupSource_ACCIrq, |
| 1054 NvOdmGpioWakeupSource_HSMMCCardDetect, |
| 1055 NvOdmGpioWakeupSource_SdioDat1, |
| 1056 NvOdmGpioWakeupSource_SdioCardDetect, |
| 1057 NvOdmGpioWakeupSource_KBC, |
| 1058 NvOdmGpioWakeupSource_PWR, |
| 1059 NvOdmGpioWakeupSource_BasebandModem, |
| 1060 NvOdmGpioWakeupSource_DVI, |
| 1061 NvOdmGpioWakeupSource_GpsOnOff, |
| 1062 NvOdmGpioWakeupSource_GpsInterrupt, |
| 1063 NvOdmGpioWakeupSource_Accelerometer, |
| 1064 NvOdmGpioWakeupSource_HeadsetDetect, |
| 1065 NvOdmGpioWakeupSource_PenInterrupt, |
| 1066 NvOdmGpioWakeupSource_WlanInterrupt, |
| 1067 NvOdmGpioWakeupSource_UsbVbus, |
| 1068 NvOdmGpioWakeupSource_Force32 = 0x7FFFFFFF, |
| 1069 } NvOdmGpioWakeupSource; |
| 1070 |
| 1071 /** |
| 1072 * Gets the total memory size for the specified memory type. |
| 1073 * |
| 1074 * @note The implementation of this function must not make reference to |
| 1075 * any global or static variables of any kind whatsoever. |
| 1076 * |
| 1077 * @param MemType Specifies the memory type. |
| 1078 * |
| 1079 * @return The memory size (in bytes), or 0 if no memory of that type exists. |
| 1080 */ |
| 1081 NvU32 NvOdmQueryMemSize(NvOdmMemoryType MemType); |
| 1082 |
| 1083 /** |
| 1084 * Gets the memory occupied by the secure region. Must be 1 MB aligned. |
| 1085 * |
| 1086 * @returns The memory occupied (in bytes). |
| 1087 */ |
| 1088 NvU32 NvOdmQuerySecureRegionSize(void); |
| 1089 |
| 1090 /** |
| 1091 * Gets the size of the carveout region. |
| 1092 * |
| 1093 * The carveout memory region is contiguous physical memory used by some |
| 1094 * software modules instead of allocating memory from the OS heap. This memory |
| 1095 * is separate from the operating system's heap. |
| 1096 * |
| 1097 * The carveout memory region is useful because the OS heap often becomes |
| 1098 * fragmented after boot time, making it difficult to obtain physically |
| 1099 * contiguous memory. |
| 1100 */ |
| 1101 NvU32 NvOdmQueryCarveoutSize(void); |
| 1102 |
| 1103 /** |
| 1104 * Gets the port to use as the debug console. |
| 1105 * |
| 1106 * @return The debug console ID. |
| 1107 */ |
| 1108 NvOdmDebugConsole NvOdmQueryDebugConsole(void); |
| 1109 |
| 1110 /** |
| 1111 * Gets the device to use as the download transport. |
| 1112 * |
| 1113 * @return The download transport device ID. |
| 1114 */ |
| 1115 NvOdmDownloadTransport NvOdmQueryDownloadTransport(void); |
| 1116 |
| 1117 /** |
| 1118 * Gets the null-terminated device name prefix string (i.e., that |
| 1119 * part of a device name that is common to all devices of this type). |
| 1120 * |
| 1121 * @return The device name prefix string. |
| 1122 */ |
| 1123 const NvU8* NvOdmQueryDeviceNamePrefix(void); |
| 1124 |
| 1125 /** |
| 1126 * Gets the configuration info for the display. |
| 1127 * |
| 1128 * @param Instance The instance number of the display controller. |
| 1129 * @return A pointer to the structure containing the display information. |
| 1130 */ |
| 1131 const NvOdmQueryDisplayInfo * |
| 1132 NvOdmQueryGetDisplayInfo( |
| 1133 NvU32 Instance); |
| 1134 |
| 1135 /** |
| 1136 * Gets the interfacing properties of the device connected to a given chip |
| 1137 * select on a given SPI controller. |
| 1138 * |
| 1139 * @param OdmIoModule The ODM I/O module name, such as SPI, S-LINK, or S-Flash. |
| 1140 * @param ControllerId The SPI instance ID. |
| 1141 * @param ChipSelect The chip select ID from the connected device. |
| 1142 * |
| 1143 * @return A pointer to a structure describing the device's properties. |
| 1144 */ |
| 1145 const NvOdmQuerySpiDeviceInfo * |
| 1146 NvOdmQuerySpiGetDeviceInfo( |
| 1147 NvOdmIoModule OdmIoModule, |
| 1148 NvU32 ControllerId, |
| 1149 NvU32 ChipSelect); |
| 1150 |
| 1151 |
| 1152 /** |
| 1153 * Gets the default signal level of the SPI interfacing lines. |
| 1154 * This indicates whether signal lines are in the tristate or not, and if not, |
| 1155 * then indicates what is the normal state of the SCLK and data out line. |
| 1156 * This state is set once the transaction is completed. |
| 1157 * During the transaction, the chip-specific setting is done. |
| 1158 * |
| 1159 * @param OdmIoModule The ODM I/O module name, such as SPI, S-LINK, or S-Flash. |
| 1160 * @param ControllerId The SPI instance ID. |
| 1161 * |
| 1162 * @return A pointer to a structure describing the idle signal state. |
| 1163 */ |
| 1164 const NvOdmQuerySpiIdleSignalState * |
| 1165 NvOdmQuerySpiGetIdleSignalState( |
| 1166 NvOdmIoModule OdmIoModule, |
| 1167 NvU32 ControllerId); |
| 1168 |
| 1169 /** |
| 1170 * Gets the S/PDIF interfacing property parameters with the audio codec that |
| 1171 * are set for the data transfer. |
| 1172 * |
| 1173 * @param SpdifInstanceId The S/PDIF controller instance ID. |
| 1174 * |
| 1175 * @return A pointer to a structure describing the I2S interface properties. |
| 1176 */ |
| 1177 const NvOdmQuerySpdifInterfaceProperty * |
| 1178 NvOdmQuerySpdifGetInterfaceProperty( |
| 1179 NvU32 SpdifInstanceId); |
| 1180 |
| 1181 /** |
| 1182 * Gets the I2S interfacing property parameter, which is set for |
| 1183 * the data transfer. |
| 1184 * |
| 1185 * @param I2sInstanceId The I2S controller instance ID. |
| 1186 * |
| 1187 * @return A pointer to a structure describing the I2S interface properties. |
| 1188 * |
| 1189 */ |
| 1190 const NvOdmQueryI2sInterfaceProperty * |
| 1191 NvOdmQueryI2sGetInterfaceProperty( |
| 1192 NvU32 I2sInstanceId); |
| 1193 |
| 1194 /** |
| 1195 * Gets the AC97 interfacing property with AC97 codec parameters that are set |
| 1196 * for the data transfer. |
| 1197 * |
| 1198 * @param Ac97InstanceId The instance ID for the AC97 cotroller. |
| 1199 * |
| 1200 * @return A pointer to a structure describing the AC97 interface properties. |
| 1201 * |
| 1202 */ |
| 1203 const NvOdmQueryAc97InterfaceProperty * |
| 1204 NvOdmQueryAc97GetInterfaceProperty( |
| 1205 NvU32 Ac97InstanceId); |
| 1206 |
| 1207 /** |
| 1208 * Gets the DAP port property. |
| 1209 * |
| 1210 * This shows how the DAP connection is made along with |
| 1211 * the format and mode it supports. |
| 1212 * |
| 1213 * @param DapPortId The DAP port. |
| 1214 * |
| 1215 * @return A pointer to a structure holding the DAP port connection properties. |
| 1216 */ |
| 1217 const NvOdmQueryDapPortProperty * |
| 1218 NvOdmQueryDapPortGetProperty( |
| 1219 NvU32 DapPortId); |
| 1220 |
| 1221 /** |
| 1222 * Gets the DAP port connection table. |
| 1223 * |
| 1224 * This shows how the connections are made along with |
| 1225 * the use case. |
| 1226 * |
| 1227 * @param ConnectionIndex The index to ConnectionTable based on the use case. |
| 1228 * |
| 1229 * @return A pointer to a structure holding the connection lines. |
| 1230 */ |
| 1231 const NvOdmQueryDapPortConnection* |
| 1232 NvOdmQueryDapPortGetConnectionTable( |
| 1233 NvU32 ConnectionIndex); |
| 1234 |
| 1235 /** |
| 1236 * Gets the I2S audio codec interfacing property. |
| 1237 * |
| 1238 * @param AudioCodecId The instance ID or the audio codec cotroller. |
| 1239 * |
| 1240 * @return A pointer to a structure describing the audio codec interface |
| 1241 * properties. |
| 1242 */ |
| 1243 const NvOdmQueryI2sACodecInterfaceProp * |
| 1244 NvOdmQueryGetI2sACodecInterfaceProperty( |
| 1245 NvU32 AudioCodecId); |
| 1246 |
| 1247 /** |
| 1248 * Gets the oscillator source. |
| 1249 * |
| 1250 * @see NvOdmQueryOscillator |
| 1251 * |
| 1252 * @return The oscillator source. |
| 1253 */ |
| 1254 NvOdmQueryOscillator NvOdmQueryGetOscillatorSource(void); |
| 1255 |
| 1256 /** |
| 1257 * Gets the oscillator drive strength setting. |
| 1258 * |
| 1259 * @return The oscillator drive strength setting. |
| 1260 */ |
| 1261 NvU32 NvOdmQueryGetOscillatorDriveStrength(void); |
| 1262 |
| 1263 /** |
| 1264 * Gets the null-terminated device manufacturer string. |
| 1265 * |
| 1266 * @return A pointer to the device manufacturer string. |
| 1267 */ |
| 1268 const NvU8* NvOdmQueryManufacturer(void); |
| 1269 |
| 1270 /** |
| 1271 * Gets the null-terminated device model string. |
| 1272 * |
| 1273 * @return A pointer to the device model string. |
| 1274 */ |
| 1275 const NvU8* NvOdmQueryModel(void); |
| 1276 |
| 1277 /** |
| 1278 * Gets the null-terminated device platform string. |
| 1279 * |
| 1280 * @return A pointer to the device platform string. |
| 1281 */ |
| 1282 const NvU8* NvOdmQueryPlatform(void); |
| 1283 |
| 1284 /** |
| 1285 * Gets the null-terminated device project name string. |
| 1286 * |
| 1287 * @return A pointer to the device project name string. |
| 1288 */ |
| 1289 const NvU8* NvOdmQueryProjectName(void); |
| 1290 |
| 1291 /** |
| 1292 * Gets the wake pads configuration table. |
| 1293 * |
| 1294 * @param entries A pointer to a variable that this function sets to the |
| 1295 * number of entries in the configuration table. |
| 1296 * |
| 1297 * @return A pointer to the configuration table. |
| 1298 */ |
| 1299 const NvOdmWakeupPadInfo *NvOdmQueryGetWakeupPadTable(NvU32 *entries); |
| 1300 |
| 1301 /** |
| 1302 * Gets the external PMU property. |
| 1303 * |
| 1304 * @param pPmuProperty A pointer to the returned PMU property structure. |
| 1305 * |
| 1306 * @return NV_TRUE if successful, or NV_FALSE otherwise. |
| 1307 */ |
| 1308 NvBool NvOdmQueryGetPmuProperty(NvOdmPmuProperty* pPmuProperty); |
| 1309 |
| 1310 /** |
| 1311 * Gets the lowest SOC power state info supported by the ODM. |
| 1312 * |
| 1313 * @return A pointer to the NvOdmSocPowerStateInfo structure |
| 1314 */ |
| 1315 const NvOdmSocPowerStateInfo* NvOdmQueryLowestSocPowerState(void); |
| 1316 |
| 1317 /** |
| 1318 * Returns the type of the USB interface based on module ID and |
| 1319 * instance. The \a Module and \a Instance parameter are identical to the |
| 1320 * \a IoModule parameter and array index, respectively, used in the |
| 1321 * NvOdmQueryPinMux() and NvOdmQueryClockLimits() APIs. |
| 1322 * |
| 1323 * @return The properties structure for the USB interface. |
| 1324 */ |
| 1325 const NvOdmUsbProperty* |
| 1326 NvOdmQueryGetUsbProperty(NvOdmIoModule Module, NvU32 Instance); |
| 1327 |
| 1328 /** |
| 1329 * Gets the interface properties of the SDIO controller. |
| 1330 * |
| 1331 * @param Instance The instance number of the SDIO controller. |
| 1332 * @return A pointer to the structure containing the SDIO interface property. |
| 1333 */ |
| 1334 |
| 1335 const NvOdmQuerySdioInterfaceProperty* |
| 1336 NvOdmQueryGetSdioInterfaceProperty( |
| 1337 NvU32 Instance); |
| 1338 |
| 1339 /** |
| 1340 * Gets the interface properties of the HSMMC controller. |
| 1341 * |
| 1342 * @param Instance The instance number of the HSMMC controller. |
| 1343 * @return A pointer to the structure containing the HSMMC interface property. |
| 1344 */ |
| 1345 |
| 1346 const NvOdmQueryHsmmcInterfaceProperty* |
| 1347 NvOdmQueryGetHsmmcInterfaceProperty( |
| 1348 NvU32 Instance); |
| 1349 |
| 1350 /** |
| 1351 * Gets the ODM-specific sector size for block devices. |
| 1352 * |
| 1353 * @param OdmIoModule The ODM I/O module type. |
| 1354 * @return An integer indicating the sector size if non-zero, or |
| 1355 * zero if the sector size equals the actual device-reported sector size. |
| 1356 */ |
| 1357 NvU32 |
| 1358 NvOdmQueryGetBlockDeviceSectorSize(NvOdmIoModule OdmIoModule); |
| 1359 |
| 1360 /** |
| 1361 * Gets the OWR device information. |
| 1362 * |
| 1363 * @param Instance The instance number of the OWR controller. |
| 1364 * @return A pointer to the structure containing the OWR device info. |
| 1365 */ |
| 1366 const NvOdmQueryOwrDeviceInfo* NvOdmQueryGetOwrDeviceInfo(NvU32 Instance); |
| 1367 |
| 1368 /** |
| 1369 * Gets the list of supported wakeup sources. |
| 1370 * |
| 1371 * @param pCount The number of wakeup sources. |
| 1372 * @return A pointer to the array containing the wakeup sources. |
| 1373 */ |
| 1374 const NvOdmGpioWakeupSource *NvOdmQueryGetWakeupSources(NvU32 *pCount); |
| 1375 |
| 1376 #if defined(__cplusplus) |
| 1377 } |
| 1378 #endif |
| 1379 |
| 1380 /** @} */ |
| 1381 |
| 1382 #endif // INCLUDED_NVODM_QUERY_H |
OLD | NEW |