![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <amdblocks/gpio.h>
#include <device/i2c.h>
#include <drivers/i2c/designware/dw_i2c.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | soc_i2c_ctrlr_info |
Data structure to hold SoC I2C controller information @bar: MMIO base address for the I2C bus. More... | |
struct | soc_i2c_scl_pin |
Data structure to identify GPIO to be toggled to reset peripherals on an I2C bus. More... | |
struct | soc_i2c_peripheral_reset_info |
Information about I2C peripherals that need to be reset. More... | |
struct | i2c_pad_control |
Macros | |
#define | I2C_RESET_SCL_PIN(pin_name, pin_mask_value) |
Enumerations | |
enum | i2c_ctrlr_mode { I2C_MASTER_MODE , I2C_PERIPHERAL_MODE } |
enum | i2c_pad_rx_level { I2C_PAD_RX_NO_CHANGE , I2C_PAD_RX_OFF , I2C_PAD_RX_3_3V , I2C_PAD_RX_1_8V , I2C_PAD_RX_1_1V } |
Functions | |
void | fch_i2c_pad_init (unsigned int bus, enum i2c_speed speed, const struct i2c_pad_control *ctrl) |
void | fch_i23c_pad_init (unsigned int bus, enum i2c_speed speed, const struct i2c_pad_control *ctrl) |
void | soc_i2c_misc_init (unsigned int bus, const struct dw_i2c_bus_config *cfg) |
const struct soc_i2c_ctrlr_info * | soc_get_i2c_ctrlr_info (size_t *num_ctrlrs) |
const struct dw_i2c_bus_config * | soc_get_i2c_bus_config (size_t *num_buses) |
void | i2c_soc_early_init (void) |
void | i2c_soc_init (void) |
void | sb_reset_i2c_peripherals (const struct soc_i2c_peripheral_reset_info *reset_info) |
#define I2C_RESET_SCL_PIN | ( | pin_name, | |
pin_mask_value | |||
) |
enum i2c_ctrlr_mode |
enum i2c_pad_rx_level |
void fch_i23c_pad_init | ( | unsigned int | bus, |
enum i2c_speed | speed, | ||
const struct i2c_pad_control * | ctrl | ||
) |
Definition at line 9 of file i23c_pad_ctrl.c.
References BIOS_WARNING, I23C_PAD_CTRL_MODE_1_1V, I23C_PAD_CTRL_MODE_1_8V, I23C_PAD_CTRL_MODE_1_8V_1_1V_MASK, I23C_PAD_CTRL_MODE_I2C, I23C_PAD_CTRL_MODE_I3C_I2C_MASK, I23C_PAD_CTRL_RX_SEL_MASK, I23C_PAD_CTRL_RX_SEL_OFF, I23C_PAD_CTRL_RX_SEL_ON, I2C_PAD_RX_1_1V, I2C_PAD_RX_1_8V, I2C_PAD_RX_NO_CHANGE, I2C_PAD_RX_OFF, MISC_I23C_PAD_CTRL, misc_read32(), misc_write32(), printk, and i2c_pad_control::rx_level.
Referenced by soc_i2c_misc_init().
void fch_i2c_pad_init | ( | unsigned int | bus, |
enum i2c_speed | speed, | ||
const struct i2c_pad_control * | ctrl | ||
) |
Definition at line 9 of file i2c_pad_ctrl.c.
References BIOS_WARNING, I2C_PAD_CTRL_FALLSLEW_EN, I2C_PAD_CTRL_FALLSLEW_LOW, I2C_PAD_CTRL_FALLSLEW_MASK, I2C_PAD_CTRL_FALLSLEW_STD, I2C_PAD_CTRL_NG_MASK, I2C_PAD_CTRL_NG_NORMAL, I2C_PAD_CTRL_RX_SEL_1_8V, I2C_PAD_CTRL_RX_SEL_3_3V, I2C_PAD_CTRL_RX_SEL_MASK, I2C_PAD_CTRL_RX_SEL_OFF, I2C_PAD_RX_1_8V, I2C_PAD_RX_3_3V, I2C_PAD_RX_NO_CHANGE, I2C_PAD_RX_OFF, I2C_SPEED_STANDARD, MISC_I2C_PAD_CTRL, misc_read32(), misc_write32(), printk, and i2c_pad_control::rx_level.
Referenced by soc_i2c_misc_init().
Definition at line 108 of file i2c.c.
References dw_i2c_soc_init().
Referenced by bootblock_soc_init(), fch_early_init(), and verstage_soc_i2c_init().
Definition at line 113 of file i2c.c.
References dw_i2c_soc_init().
Referenced by fch_init(), and mainboard_init().
void sb_reset_i2c_peripherals | ( | const struct soc_i2c_peripheral_reset_info * | reset_info | ) |
Definition at line 148 of file i2c.c.
References assert, drive_scl(), soc_amd_gpio::gpio, gpio_configure_pads(), gpio_restore_pin_registers(), gpio_save_pin_registers(), soc_i2c_peripheral_reset_info::i2c_scl, soc_i2c_peripheral_reset_info::i2c_scl_reset_mask, MAX_PIN_COUNT, soc_i2c_peripheral_reset_info::num_pins, and soc_i2c_scl_pin::pin.
Referenced by reset_i2c_peripherals().
const struct dw_i2c_bus_config* soc_get_i2c_bus_config | ( | size_t * | num_buses | ) |
Definition at line 51 of file i2c.c.
References ARRAY_SIZE, config, and config_of_soc.
Referenced by dw_i2c_get_soc_cfg(), and dw_i2c_soc_init().
const struct soc_i2c_ctrlr_info* soc_get_i2c_ctrlr_info | ( | size_t * | num_ctrlrs | ) |
Definition at line 45 of file i2c.c.
References ARRAY_SIZE, and i2c_ctrlr.
Referenced by dw_i2c_base_address(), dw_i2c_soc_dev_to_bus(), dw_i2c_soc_init(), and i2c_acpi_name().
void soc_i2c_misc_init | ( | unsigned int | bus, |
const struct dw_i2c_bus_config * | cfg | ||
) |
Definition at line 35 of file i2c.c.
References ARRAY_SIZE, config, config_of_soc, fch_i23c_pad_init(), fch_i2c_pad_init(), I2C_PAD_RX_3_3V, i2c_pad_control::rx_level, and dw_i2c_bus_config::speed.
Referenced by dw_i2c_soc_init().