Kabylake Intel(R) Firmware Support Package (FSP) Integration Guide: GpioConfig.h File Reference

Kabylake Intel Firmware

Kabylake Intel(R) Firmware Support Package (FSP) Integration Guide
GpioConfig.h File Reference

Header file for GpioConfig structure used by GPIO library. More...

Go to the source code of this file.

Classes

struct  GPIO_CONFIG
 GPIO configuration structure used for pin programming. More...
 

Macros

#define B_GPIO_INT_CONFIG_INT_SOURCE_MASK   0x1F
 Mask for GPIO_INT_CONFIG for interrupt source.
 
#define B_GPIO_INT_CONFIG_INT_TYPE_MASK   0xE0
 Mask for GPIO_INT_CONFIG for interrupt type.
 
#define B_GPIO_ELECTRICAL_CONFIG_TERMINATION_MASK   0x1F
 Mask for GPIO_ELECTRICAL_CONFIG for termination value.
 
#define B_GPIO_ELECTRICAL_CONFIG_1V8_TOLERANCE_MASK   0x60
 Mask for GPIO_ELECTRICAL_CONFIG for 1v8 tolerance setting.
 
#define B_GPIO_LOCK_CONFIG_PAD_CONF_LOCK_MASK   0x3
 Mask for GPIO_LOCK_CONFIG for Pad Configuration Lock.
 
#define B_GPIO_LOCK_CONFIG_OUTPUT_LOCK_MASK   0x5
 Mask for GPIO_LOCK_CONFIG for Pad Output Lock.
 
#define B_GPIO_OTHER_CONFIG_RXRAW_MASK   0x3
 Mask for GPIO_OTHER_CONFIG for RxRaw1 setting.
 

Typedefs

typedef UINT32 GPIO_PAD
 For any GpioPad usage in code use GPIO_PAD type.
 
typedef UINT32 GPIO_GROUP
 For any GpioGroup usage in code use GPIO_GROUP type.
 

Enumerations

enum  GPIO_HARDWARE_DEFAULT
 
enum  GPIO_PAD_MODE
 GPIO Pad Mode Refer to GPIO documentation on native functions available for certain pad. More...
 
enum  GPIO_HOSTSW_OWN
 Host Software Pad Ownership modes This setting affects GPIO interrupt status registers. More...
 
enum  GPIO_DIRECTION
 GPIO Direction. More...
 
enum  GPIO_OUTPUT_STATE
 GPIO Output State This field is relevant only if output is enabled. More...
 
enum  GPIO_INT_CONFIG
 GPIO interrupt configuration This setting is applicable only if pad is in GPIO mode and has input enabled. More...
 
enum  GPIO_RESET_CONFIG
 GPIO Power Configuration GPIO_RESET_CONFIG allows to set GPIO Reset type (PADCFG_DW0.PadRstCfg) which will be used to reset certain GPIO settings. More...
 
enum  GPIO_ELECTRICAL_CONFIG
 GPIO Electrical Configuration Set GPIO termination and Pad Tolerance (applicable only for some pads) Field from GpioTermNone to GpioTermNative can be OR'ed with GpioTolerance1v8. More...
 
enum  GPIO_LOCK_CONFIG
 GPIO LockConfiguration Set GPIO configuration lock and output state lock. More...
 
enum  GPIO_OTHER_CONFIG
 Other GPIO Configuration GPIO_OTHER_CONFIG is used for less often settings and for future extensions Supported settings: More...
 

Detailed Description

Header file for GpioConfig structure used by GPIO library.

Copyright
INTEL CONFIDENTIAL Copyright 2014 - 2016 Intel Corporation.

The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material may contain trade secrets and proprietary and confidential information of Intel Corporation and its suppliers and licensors, and is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel's prior express written permission.

No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.

Unless otherwise agreed by Intel in writing, you may not remove or alter this notice or any other notice embedded in Materials by Intel or Intel's suppliers or licensors in any way.

This file contains an 'Intel Peripheral Driver' and is uniquely identified as "Intel Reference Module" and is licensed for Intel CPUs and chipsets under the terms of your license agreement with Intel or your vendor. This file may be modified by the user, subject to additional terms of the license agreement.

Specification Reference:

Definition in file GpioConfig.h.

Enumeration Type Documentation

GPIO Direction.

Enumerator
GpioDirDefault 

Leave pad direction setting unmodified.

GpioDirInOut 

Set pad for both output and input.

GpioDirInInvOut 

Set pad for both output and input with inversion.

GpioDirIn 

Set pad for input only.

GpioDirInInv 

Set pad for input with inversion.

GpioDirOut 

Set pad for output only.

GpioDirNone 

Disable both output and input.

Definition at line 167 of file GpioConfig.h.

GPIO Electrical Configuration Set GPIO termination and Pad Tolerance (applicable only for some pads) Field from GpioTermNone to GpioTermNative can be OR'ed with GpioTolerance1v8.

Enumerator
GpioTermDefault 

Leave termination setting unmodified.

GpioTermNone 

none

GpioTermWpd5K 

5kOhm weak pull-down

GpioTermWpd20K 

20kOhm weak pull-down

GpioTermWpu1K 

1kOhm weak pull-up

GpioTermWpu2K 

2kOhm weak pull-up

GpioTermWpu5K 

5kOhm weak pull-up

GpioTermWpu20K 

20kOhm weak pull-up

GpioTermWpu1K2K 

1kOhm & 2kOhm weak pull-up

GpioTermNative 

Native function controls pads termination This setting is applicable only to some native modes.

Please check EDS to determine which native functionality can control pads termination

GpioNoTolerance1v8 

Disable 1.8V pad tolerance.

GpioTolerance1v8 

Enable 1.8V pad tolerance.

Definition at line 296 of file GpioConfig.h.

Enumerator
GpioHardwareDefault 

Leave setting unmodified.

Definition at line 118 of file GpioConfig.h.

Host Software Pad Ownership modes This setting affects GPIO interrupt status registers.

Depending on chosen ownership some GPIO Interrupt status register get updated and other masked. Please refer to EDS for HOSTSW_OWN register description.

Enumerator
GpioHostOwnDefault 

Leave ownership value unmodified.

GpioHostOwnAcpi 

Set HOST ownership to ACPI.

Use this setting if pad is not going to be used by GPIO OS driver. If GPIO is configured to generate SCI/SMI/NMI then this setting must be used for interrupts to work

GpioHostOwnGpio 

Set HOST ownership to GPIO Driver mode.

Use this setting only if GPIO pad should be controlled by GPIO OS Driver. GPIO OS Driver will be able to control the pad if appropriate entry in ACPI exists (refer to ACPI specification for GpioIo and GpioInt descriptors)

Definition at line 146 of file GpioConfig.h.

GPIO interrupt configuration This setting is applicable only if pad is in GPIO mode and has input enabled.

GPIO_INT_CONFIG allows to choose which interrupt is generated (IOxAPIC/SCI/SMI/NMI) and how it is triggered (edge or level). Refer to PADCFG_DW0 register description in EDS for details on this settings. Field from GpioIntNmi to GpioIntApic can be OR'ed with GpioIntLevel to GpioIntBothEdge to describe an interrupt e.g. GpioIntApic | GpioIntLevel If GPIO is set to cause an SCI then also GPI_GPE_EN is enabled for this pad. If GPIO is set to cause an NMI then also GPI_NMI_EN is enabled for this pad. Not all GPIO are capable of generating an SMI or NMI interrupt. When routing GPIO to cause an IOxAPIC interrupt care must be taken, as this interrupt cannot be shared and its IRQn number is not configurable. Refer to EDS for GPIO pads IRQ numbers (PADCFG_DW1.IntSel) If GPIO is under GPIO OS driver control and appropriate ACPI GpioInt descriptor exist then use only trigger type setting (from GpioIntLevel to GpioIntBothEdge). This type of GPIO Driver interrupt doesn't have any additional routing setting required to be set by BIOS. Interrupt is handled by GPIO OS Driver.

Enumerator
GpioIntDefault 

Leave value of interrupt routing unmodified.

GpioIntDis 

Disable IOxAPIC/SCI/SMI/NMI interrupt generation.

GpioIntNmi 

Enable NMI interrupt only.

GpioIntSmi 

Enable SMI interrupt only.

GpioIntSci 

Enable SCI interrupt only.

GpioIntApic 

Enable IOxAPIC interrupt only.

GpioIntLevel 

Set interrupt as level triggered.

GpioIntEdge 

Set interrupt as edge triggered (type of edge depends on input inversion)

GpioIntLvlEdgDis 

Disable interrupt trigger.

GpioIntBothEdge 

Set interrupt as both edge triggered.

Definition at line 207 of file GpioConfig.h.

GPIO LockConfiguration Set GPIO configuration lock and output state lock.

GpioLockPadConfig and GpioLockOutputState can be OR'ed. Lock settings reset is in Powergood domain. Care must be taken when using this setting as fields it locks may be reset by a different signal and can be controllable by what is in GPIO_RESET_CONFIG (PADCFG_DW0.PadRstCfg). GPIO library provides functions which allow to unlock a GPIO pad.

Enumerator
GpioLockDefault 

Leave lock setting unmodified.

GpioPadConfigLock 

Lock Pad Configuration.

GpioOutputStateLock 

Lock GPIO pad output value.

Definition at line 329 of file GpioConfig.h.

Other GPIO Configuration GPIO_OTHER_CONFIG is used for less often settings and for future extensions Supported settings:

  • RX raw override to '1' - allows to override input value to '1' This setting is applicable only if in input mode (both in GPIO and native usage). The override takes place at the internal pad state directly from buffer and before the RXINV.
Enumerator
GpioRxRaw1Default 

Use default input override value.

GpioRxRaw1Dis 

Don't override input.

GpioRxRaw1En 

Override input to '1'.

Definition at line 346 of file GpioConfig.h.

GPIO Output State This field is relevant only if output is enabled.

Enumerator
GpioOutDefault 

Leave output value unmodified.

GpioOutLow 

Set output to low.

GpioOutHigh 

Set output to high.

Definition at line 181 of file GpioConfig.h.

GPIO Pad Mode Refer to GPIO documentation on native functions available for certain pad.

If GPIO is set to one of NativeX modes then following settings are not applicable and can be skipped:

  • Interrupt related settings
  • Host Software Ownership
  • Output/Input enabling/disabling
  • Output lock

Definition at line 132 of file GpioConfig.h.

GPIO Power Configuration GPIO_RESET_CONFIG allows to set GPIO Reset type (PADCFG_DW0.PadRstCfg) which will be used to reset certain GPIO settings.

Refer to EDS for settings that are controllable by PadRstCfg.

Enumerator
GpioResetDefault 

Leave value of pad reset unmodified.

GpioResetPwrGood 

Deprecated settings.

Maintained only for compatibility.GPP: RSMRST; GPD: DSW_PWROK; (PadRstCfg = 00b = "Powergood")

GpioResetDeep 

Deep GPIO Reset (PadRstCfg = 01b = "Deep GPIO Reset")

GpioResetNormal 

GPIO Reset (PadRstCfg = 10b = "GPIO Reset" )

GpioResetResume 

GPP: Reserved; GPD: RSMRST; (PadRstCfg = 11b = "Resume Reset" )

GpioResumeReset 

New GPIO reset configuration options.

Resume Reset (RSMRST) GPP: PadRstCfg = 00b = "Powergood" GPD: PadRstCfg = 11b = "Resume Reset" Pad setting will reset on:

  • DeepSx transition
  • G3 Pad settings will not reset on:
  • S3/S4/S5 transition
  • Warm/Cold/Global reset
GpioHostDeepReset 

Host Deep Reset PadRstCfg = 01b = "Deep GPIO Reset" Pad settings will reset on:

  • Warm/Cold/Global reset
  • DeepSx transition
  • G3 Pad settings will not reset on:
  • S3/S4/S5 transition
GpioPlatformReset 

Platform Reset (PLTRST) PadRstCfg = 10b = "GPIO Reset" Pad settings will reset on:

  • S3/S4/S5 transition
  • Warm/Cold/Global reset
  • DeepSx transition
  • G3
GpioDswReset 

Deep Sleep Well Reset (DSW_PWROK) GPP: not applicable GPD: PadRstCfg = 00b = "Powergood" Pad settings will reset on:

  • G3 Pad settings will not reset on:
  • S3/S4/S5 transition
  • Warm/Cold/Global reset
  • DeepSx transition

Definition at line 229 of file GpioConfig.h.

Generated on Thu Jun 28 2018 21:44:49 for Kabylake Intel(R) Firmware Support Package (FSP) Integration Guide by   doxygen 1.8.10