coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
padconfig.h File Reference
#include <stdint.h>
#include <soc/pinmux.h>
Include dependency graph for padconfig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pad_config
 

Macros

#define PAD_CFG_GPIO_INPUT(ball_, pinmux_flgs_)
 
#define PAD_CFG_GPIO_OUT0(ball_, pinmux_flgs_)
 
#define PAD_CFG_GPIO_OUT1(ball_, pinmux_flgs_)
 
#define PAD_CFG_SFIO(ball_, pinmux_flgs_, sfio_)
 
#define PAD_CFG_UNUSED(ball_)
 

Functions

void soc_configure_pads (const struct pad_config *const entries, size_t num)
 
void soc_configure_i2c6pad (void)
 
void soc_configure_host1x (void)
 
void soc_configure_ape (void)
 

Macro Definition Documentation

◆ PAD_CFG_GPIO_INPUT

#define PAD_CFG_GPIO_INPUT (   ball_,
  pinmux_flgs_ 
)
Value:
{ \
.pinmux_flags = pinmux_flgs_ | PINMUX_INPUT_ENABLE, \
.gpio_index = PAD_TO_GPIO_##ball_, \
.pinmux_index = PINMUX_##ball_##_INDEX, \
.sfio = 0, \
.pad_has_gpio = PAD_HAS_GPIO_##ball_, \
}
@ PINMUX_INPUT_ENABLE
Definition: pinmux.h:17

Definition at line 21 of file padconfig.h.

◆ PAD_CFG_GPIO_OUT0

#define PAD_CFG_GPIO_OUT0 (   ball_,
  pinmux_flgs_ 
)
Value:
{ \
.pinmux_flags = pinmux_flgs_, \
.gpio_index = PAD_TO_GPIO_##ball_, \
.pinmux_index = PINMUX_##ball_##_INDEX, \
.sfio = 0, \
.gpio_out0 = 1, \
.pad_has_gpio = PAD_HAS_GPIO_##ball_, \
}

Definition at line 30 of file padconfig.h.

◆ PAD_CFG_GPIO_OUT1

#define PAD_CFG_GPIO_OUT1 (   ball_,
  pinmux_flgs_ 
)
Value:
{ \
.pinmux_flags = pinmux_flgs_, \
.gpio_index = PAD_TO_GPIO_##ball_, \
.pinmux_index = PINMUX_##ball_##_INDEX, \
.sfio = 0, \
.gpio_out1 = 1, \
.pad_has_gpio = PAD_HAS_GPIO_##ball_, \
}

Definition at line 40 of file padconfig.h.

◆ PAD_CFG_SFIO

#define PAD_CFG_SFIO (   ball_,
  pinmux_flgs_,
  sfio_ 
)
Value:
{ \
.pinmux_flags = pinmux_flgs_ | \
PINMUX_##ball_##_FUNC_##sfio_, \
.gpio_index = PAD_TO_GPIO_##ball_, \
.pinmux_index = PINMUX_##ball_##_INDEX, \
.sfio = 1, \
.pad_has_gpio = PAD_HAS_GPIO_##ball_, \
}

Definition at line 50 of file padconfig.h.

◆ PAD_CFG_UNUSED

#define PAD_CFG_UNUSED (   ball_)
Value:
{ \
.gpio_index = PAD_TO_GPIO_##ball_, \
.pinmux_index = PINMUX_##ball_##_INDEX, \
.unused = 1, \
.pad_has_gpio = PAD_HAS_GPIO_##ball_, \
}

Definition at line 60 of file padconfig.h.

Function Documentation

◆ soc_configure_ape()

void soc_configure_ape ( void  )

Definition at line 31 of file ape.c.

References enable_ape_periph_clocks(), POWER_PARTID_APE, power_ungate_partition(), remove_clamps(), and unreset_ape_periphs().

Referenced by setup_audio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soc_configure_host1x()

void soc_configure_host1x ( void  )

Definition at line 71 of file i2c6.c.

References clock_configure_source, enable_sor_periph_clocks(), PLLP, POWER_PARTID_SOR, power_ungate_partition(), remove_clamps(), and unreset_sor_periphs().

Referenced by soc_configure_i2c6pad().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soc_configure_i2c6pad()

void soc_configure_i2c6pad ( void  )

Definition at line 37 of file i2c6.c.

References CLK_L_HOST1X, CLK_Y_DPAUX1, CLK_Y_SOR_SAFE, clock_enable_y, CLOCK_PLL_STABLE_DELAY_US, clock_set_reset_l, disable_sor_periph_clocks(), DPAUX_HYBRID_PADCTL, DPAUX_HYBRID_SPARE, I2C6_PADCTL, soc_configure_host1x(), udelay(), and write32().

Referenced by mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soc_configure_pads()

void soc_configure_pads ( const struct pad_config *const  entries,
size_t  num 
)

Definition at line 105 of file padconfig.c.

References configure_gpio_pad(), configure_sfio_pad(), configure_unused_pad(), pad_config::sfio, and pad_config::unused.

Referenced by bootblock_mainboard_early_init(), bootblock_mainboard_init(), configure_display_blocks(), mainboard_init(), romstage_mainboard_init(), and soc_configure_funits().

Here is the call graph for this function:
Here is the caller graph for this function: