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

Go to the source code of this file.

Macros

#define REGULATOR_NOT_SUPPORT   -1
 

Functions

 _Static_assert (ARRAY_SIZE(regulator_id)==MTK_REGULATOR_NUM, "regulator_id size error")
 
void mainboard_set_regulator_vol (enum mtk_regulator regulator, uint32_t voltage_uv)
 
uint32_t mainboard_get_regulator_vol (enum mtk_regulator regulator)
 

Variables

static const int regulator_id []
 

Macro Definition Documentation

◆ REGULATOR_NOT_SUPPORT

#define REGULATOR_NOT_SUPPORT   -1

Definition at line 8 of file regulator.c.

Function Documentation

◆ _Static_assert()

_Static_assert ( ARRAY_SIZE(regulator_id = =MTK_REGULATOR_NUM,
"regulator_id size error"   
)

◆ mainboard_get_regulator_vol()

uint32_t mainboard_get_regulator_vol ( enum mtk_regulator  regulator)

Definition at line 41 of file regulator.c.

References assert, BIOS_ERR, mt6366_get_voltage(), MTK_REGULATOR_NUM, printk, and regulator_id.

Here is the call graph for this function:

◆ mainboard_set_regulator_vol()

void mainboard_set_regulator_vol ( enum mtk_regulator  regulator,
uint32_t  voltage_uv 
)

Definition at line 29 of file regulator.c.

References assert, BIOS_ERR, mt6366_set_voltage(), MTK_REGULATOR_NUM, printk, and regulator_id.

Here is the call graph for this function:

Variable Documentation

◆ regulator_id

const int regulator_id[]
static
Initial value:
= {
}
#define REGULATOR_NOT_SUPPORT
Definition: regulator.c:8
@ MT6366_VPROC12
Definition: mt6366.h:66
@ MT6366_VCORE
Definition: mt6366.h:61
@ MT6366_VDDQ
Definition: mt6366.h:63
@ MT6366_VMCH
Definition: mt6366.h:64
@ MT6366_VRF12
Definition: mt6366.h:68
@ MT6366_VMC
Definition: mt6366.h:65
@ MT6366_VSRAM_PROC12
Definition: mt6366.h:67
@ MT6366_VDRAM1
Definition: mt6366.h:62
@ MT6366_VCN33
Definition: mt6366.h:69
@ MTK_REGULATOR_VDDQ
Definition: regulator.h:11
@ MTK_REGULATOR_VRF12
Definition: regulator.h:21
@ MTK_REGULATOR_VCCQ
Definition: regulator.h:15
@ MTK_REGULATOR_VCC
Definition: regulator.h:14
@ MTK_REGULATOR_VMC
Definition: regulator.h:18
@ MTK_REGULATOR_VDD1
Definition: regulator.h:9
@ MTK_REGULATOR_VCN33
Definition: regulator.h:22
@ MTK_REGULATOR_VCORE
Definition: regulator.h:13
@ MTK_REGULATOR_VDD2
Definition: regulator.h:10
@ MTK_REGULATOR_VPROC12
Definition: regulator.h:19
@ MTK_REGULATOR_VMCH
Definition: regulator.h:17
@ MTK_REGULATOR_VDRAM1
Definition: regulator.h:16
@ MTK_REGULATOR_VSRAM_PROC12
Definition: regulator.h:20
@ MTK_REGULATOR_VMDDR
Definition: regulator.h:12

Definition at line 10 of file regulator.c.

Referenced by mainboard_get_regulator_vol(), and mainboard_set_regulator_vol().