coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
regulator.c File Reference
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include <soc/mt6359p.h>
#include <soc/mt6360.h>
#include <soc/mt6691.h>
#include <soc/regulator.h>
Include dependency graph for regulator.c:

Go to the source code of this file.

Macros

#define MT6691_I2C_NUM   7
 

Functions

static int get_mt6360_regulator_id (enum mtk_regulator regulator)
 
static int get_mt6359p_regulator_id (enum mtk_regulator regulator)
 
static int get_mt6691_regulator_id (enum mtk_regulator regulator)
 
static int check_regulator_control (enum mtk_regulator regulator)
 
void mainboard_set_regulator_vol (enum mtk_regulator regulator, uint32_t voltage_uv)
 
uint32_t mainboard_get_regulator_vol (enum mtk_regulator regulator)
 
int mainboard_enable_regulator (enum mtk_regulator regulator, uint8_t enable)
 
uint8_t mainboard_regulator_is_enabled (enum mtk_regulator regulator)
 

Macro Definition Documentation

◆ MT6691_I2C_NUM

#define MT6691_I2C_NUM   7

Definition at line 10 of file regulator.c.

Function Documentation

◆ check_regulator_control()

static int check_regulator_control ( enum mtk_regulator  regulator)
static

Definition at line 40 of file regulator.c.

References BIOS_WARNING, MTK_REGULATOR_VDD1, and printk.

Referenced by mainboard_enable_regulator(), mainboard_get_regulator_vol(), mainboard_regulator_is_enabled(), and mainboard_set_regulator_vol().

Here is the caller graph for this function:

◆ get_mt6359p_regulator_id()

static int get_mt6359p_regulator_id ( enum mtk_regulator  regulator)
static

Definition at line 30 of file regulator.c.

References MT6359P_GPU11, and MTK_REGULATOR_VCORE.

Referenced by mainboard_get_regulator_vol(), and mainboard_set_regulator_vol().

Here is the caller graph for this function:

◆ get_mt6360_regulator_id()

static int get_mt6360_regulator_id ( enum mtk_regulator  regulator)
static

◆ get_mt6691_regulator_id()

static int get_mt6691_regulator_id ( enum mtk_regulator  regulator)
static

Definition at line 35 of file regulator.c.

References MT6691_I2C_NUM, and MTK_REGULATOR_VMDDR.

Referenced by mainboard_get_regulator_vol(), and mainboard_set_regulator_vol().

Here is the caller graph for this function:

◆ mainboard_enable_regulator()

int mainboard_enable_regulator ( enum mtk_regulator  regulator,
uint8_t  enable 
)

◆ mainboard_get_regulator_vol()

◆ mainboard_regulator_is_enabled()

uint8_t mainboard_regulator_is_enabled ( enum mtk_regulator  regulator)

Definition at line 158 of file regulator.c.

References BIOS_ERR, BIOS_WARNING, check_regulator_control(), CONFIG, get_mt6360_regulator_id(), google_chromeec_regulator_is_enabled(), mt6360_is_enabled(), and printk.

Here is the call graph for this function:

◆ mainboard_set_regulator_vol()