coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fw_config.c File Reference
#include <bootstate.h>
#include <console/console.h>
#include <fw_config.h>
#include <gpio.h>
Include dependency graph for fw_config.c:

Go to the source code of this file.

Functions

static void enable_i2s (void)
 
static void fw_config_handle (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL)
 

Variables

static const struct pad_config dmic_enable_pads []
 
static const struct pad_config dmic_disable_pads []
 
static const struct pad_config sndw_enable_pads []
 
static const struct pad_config max98360_enable_pads []
 
static const struct pad_config sndw_disable_pads []
 
static const struct pad_config i2s0_enable_pads []
 
static const struct pad_config i2s2_enable_pads []
 
static const struct pad_config i2s0_disable_pads []
 
static const struct pad_config i2s2_disable_pads []
 
static const struct pad_config bt_i2s_enable_pads []
 
static const struct pad_config bt_i2s_disable_pads []
 

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_DEV_ENABLE  ,
BS_ON_ENTRY  ,
fw_config_handle  ,
NULL   
)

◆ enable_i2s()

static void enable_i2s ( void  )
static

Definition at line 99 of file fw_config.c.

References ARRAY_SIZE, dmic_enable_pads, gpio_configure_pads(), i2s0_enable_pads, i2s2_enable_pads, and sndw_disable_pads.

Referenced by fw_config_handle().

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

◆ fw_config_handle()

Variable Documentation

◆ bt_i2s_disable_pads

const struct pad_config bt_i2s_disable_pads[]
static
Initial value:
= {
}
#define GPP_VGPIO_37
#define GPP_VGPIO_32
#define GPP_VGPIO_36
#define GPP_VGPIO_31
#define GPP_VGPIO_34
#define GPP_VGPIO_35
#define GPP_VGPIO_30
#define GPP_VGPIO_33
#define PAD_NC(pin)
Definition: gpio_defs.h:263

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ bt_i2s_enable_pads

const struct pad_config bt_i2s_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_VGPIO_30, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_VGPIO_31, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_VGPIO_32, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_VGPIO_33, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_VGPIO_34, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_VGPIO_35, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_VGPIO_36, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_VGPIO_37, NONE, DEEP, NF1),
}
#define PAD_CFG_NF(pad, pull, rst, func)
Definition: gpio_defs.h:197

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ dmic_disable_pads

const struct pad_config dmic_disable_pads[]
static
Initial value:
= {
}
#define GPP_S7
#define GPP_S3
#define GPP_S6
#define GPP_S2

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ dmic_enable_pads

const struct pad_config dmic_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_S2, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_S3, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_S6, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_S7, NONE, DEEP, NF2),
}

Definition at line 1 of file fw_config.c.

Referenced by enable_i2s(), and fw_config_handle().

◆ i2s0_disable_pads

const struct pad_config i2s0_disable_pads[]
static
Initial value:
= {
}
#define GPP_R3
#define GPP_R0
#define GPP_R2
#define GPP_R1

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ i2s0_enable_pads

const struct pad_config i2s0_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R1, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R2, DN_20K, DEEP, NF2),
PAD_CFG_NF(GPP_R3, NONE, DEEP, NF2),
}

Definition at line 1 of file fw_config.c.

Referenced by enable_i2s(), and fw_config_handle().

◆ i2s2_disable_pads

const struct pad_config i2s2_disable_pads[]
static
Initial value:
= {
}
#define GPP_R4
#define GPP_R7
#define GPP_R6
#define GPP_R5

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ i2s2_enable_pads

const struct pad_config i2s2_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R5, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R6, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R7, NONE, DEEP, NF2),
}

Definition at line 1 of file fw_config.c.

Referenced by enable_i2s().

◆ max98360_enable_pads

const struct pad_config max98360_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_S0, NONE, DEEP, NF4),
PAD_CFG_NF(GPP_S1, NONE, DEEP, NF4),
PAD_CFG_NF(GPP_S2, NONE, DEEP, NF4),
PAD_CFG_NF(GPP_S3, NONE, DEEP, NF4),
PAD_CFG_NF(GPP_S6, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_S7, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_R5, NONE, DEEP, NF3),
}
#define GPP_S0
#define GPP_S1

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().

◆ sndw_disable_pads

const struct pad_config sndw_disable_pads[]
static
Initial value:
= {
}
#define GPP_S4
#define GPP_S5

Definition at line 1 of file fw_config.c.

Referenced by enable_i2s(), and fw_config_handle().

◆ sndw_enable_pads

const struct pad_config sndw_enable_pads[]
static
Initial value:
= {
PAD_CFG_NF(GPP_S0, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_S1, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_S4, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_S5, NONE, DEEP, NF1),
}

Definition at line 1 of file fw_config.c.

Referenced by fw_config_handle().