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

CoffeeLake Intel Firmware

CoffeeLake 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_LOCK_CONFIG_PAD_CONF_LOCK_MASK   0x3
 Mask for GPIO_LOCK_CONFIG for Pad Configuration Lock.
 
#define B_GPIO_LOCK_CONFIG_OUTPUT_LOCK_MASK   0xC
 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 Configuration options for GPIO termination setting. 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
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

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 149 of file GpioConfig.h.

GPIO Electrical Configuration Configuration options for GPIO termination setting.

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

Definition at line 264 of file GpioConfig.h.

Enumerator
GpioHardwareDefault 

Leave setting unmodified.

Definition at line 99 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 128 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 189 of file GpioConfig.h.

GPIO LockConfiguration Set GPIO configuration lock and output state lock.

GpioPadConfigUnlock/Lock and GpioOutputStateUnlock can be OR'ed. By default GPIO pads will be locked unless GPIO lib is explicitly informed that certain pad is to be left unlocked. 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 controlled by what is in GPIO_RESET_CONFIG (PADCFG_DW0.PadRstCfg). GPIO library provides functions which allow to unlock a GPIO pad. If possible each GPIO lib function will try to unlock an already locked pad upon request for reconfiguration

Enumerator
GpioLockDefault 

Perform default action.

  • if pad is an GPO, lock configuration but leave output unlocked
  • if pad is an GPI, lock everything
  • if pad is in native, lock everything
GpioPadConfigUnlock 

Leave Pad configuration unlocked.

GpioPadConfigLock 

Lock Pad configuration.

GpioOutputStateUnlock 

Leave Pad output control unlocked.

GpioPadUnlock 

Leave both Pad configuration and output control unlocked.

GpioPadLock 

Lock both Pad configuration and output control.

Definition at line 297 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 323 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 163 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 113 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.

GpioResumeReset 

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 211 of file GpioConfig.h.

Generated on Wed Aug 22 2018 17:48:55 for CoffeeLake Intel(R) Firmware Support Package (FSP) Integration Guide by   doxygen 1.8.10