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

Go to the source code of this file.

Data Structures

struct  mt6315_setting
 

Enumerations

enum  { MT6315_CPU = SPMI_SLAVE_6 , MT6315_GPU = SPMI_SLAVE_7 , MT6315_MAX }
 
enum  {
  MT6315_BUCK_1 = 0 , MT6315_BUCK_2 , MT6315_BUCK_3 , MT6315_BUCK_4 ,
  MT6315_BUCK_max
}
 
enum  { MT6315_BUCK_TOP_ELR0 = 0x1449 , MT6315_BUCK_TOP_ELR3 = 0x144d , MT6315_BUCK_VBUCK1_DBG0 = 0x1499 , MT6315_BUCK_VBUCK1_DBG3 = 0x1599 }
 

Functions

void mt6315_init (void)
 
void mt6315_buck_set_voltage (u32 slvid, u32 buck_id, u32 buck_uv)
 
u32 mt6315_buck_get_voltage (u32 slvid, u32 buck_id)
 
void mt6315_init_setting (void)
 
void mt6315_write_field (u32 slvid, u32 reg, u32 val, u32 mask, u32 shift)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MT6315_CPU 
MT6315_GPU 
MT6315_MAX 

Definition at line 16 of file mt6315.h.

◆ anonymous enum

anonymous enum
Enumerator
MT6315_BUCK_1 
MT6315_BUCK_2 
MT6315_BUCK_3 
MT6315_BUCK_4 
MT6315_BUCK_max 

Definition at line 22 of file mt6315.h.

◆ anonymous enum

anonymous enum
Enumerator
MT6315_BUCK_TOP_ELR0 
MT6315_BUCK_TOP_ELR3 
MT6315_BUCK_VBUCK1_DBG0 
MT6315_BUCK_VBUCK1_DBG3 

Definition at line 30 of file mt6315.h.

Function Documentation

◆ mt6315_buck_get_voltage()

u32 mt6315_buck_get_voltage ( u32  slvid,
u32  buck_id 
)

Definition at line 61 of file mt6315.c.

References die(), MT6315_BUCK_1, MT6315_BUCK_3, MT6315_BUCK_VBUCK1_DBG0, MT6315_BUCK_VBUCK1_DBG3, mt6315_read(), and pmif_arb.

Here is the call graph for this function:

◆ mt6315_buck_set_voltage()

void mt6315_buck_set_voltage ( u32  slvid,
u32  buck_id,
u32  buck_uv 
)

Definition at line 38 of file mt6315.c.

References die(), MT6315_BUCK_1, MT6315_BUCK_3, MT6315_BUCK_TOP_ELR0, MT6315_BUCK_TOP_ELR3, mt6315_write(), and pmif_arb.

Referenced by raise_little_cpu_freq().

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

◆ mt6315_init()

void mt6315_init ( void  )

Definition at line 96 of file mt6315.c.

References init_pmif_arb(), MT6315_CPU, MT6315_GPU, mt6315_init_setting(), and mt6315_wdt_enable().

Referenced by platform_romstage_main().

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

◆ mt6315_init_setting()

void mt6315_init_setting ( void  )

Definition at line 191 of file mt6315.c.

References addr, ARRAY_SIZE, init_setting_cpu, init_setting_gpu, mask, MT6315_CPU, MT6315_GPU, mt6315_write_field(), mt6315_setting::shift, and val.

Referenced by mt6315_init().

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

◆ mt6315_write_field()

void mt6315_write_field ( u32  slvid,
u32  reg,
u32  val,
u32  mask,
u32  shift 
)

Definition at line 20 of file mt6315.c.

References mask, pmif_arb, val, and pmif::write_field.

Referenced by mt6315_init_setting().

Here is the caller graph for this function: