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

Go to the source code of this file.

Data Structures

struct  pmic_setting
 
struct  pmic_efuse
 

Macros

#define VM18_VOL_REG_SHIFT   8
 
#define VM18_VOL_OFFSET   600
 
#define EFUSE_WAIT_US   5000
 
#define EFUSE_BUSY   1
 
#define EFUSE_RG_VPA_OC_FT   78
 

Enumerations

enum  {
  PMIC_HWCID = 0x0008 , PMIC_SWCID = 0x000a , PMIC_TOP_CKPDN_CON0 = 0x010c , PMIC_TOP_CKHWEN_CON0 = 0x012a ,
  PMIC_TOP_RST_MISC_SET = 0x014c , PMIC_TOP_RST_MISC_CLR = 0x014e , PMIC_OTP_CON0 = 0x038a , PMIC_OTP_CON8 = 0x039a ,
  PMIC_OTP_CON11 = 0x03a0 , PMIC_OTP_CON12 = 0x03a2 , PMIC_OTP_CON13 = 0x03a4 , PMIC_PWRHOLD = 0x0a08 ,
  PMIC_VCORE_DBG0 = 0x1526 , PMIC_VCORE_ELR0 = 0x152c , PMIC_VGPU11_DBG0 = 0x15a6 , PMIC_VGPU11_ELR0 = 0x15b4 ,
  PMIC_VS2_VOTER = 0x18aa , PMIC_VS2_VOTER_CFG = 0x18b0 , PMIC_VS2_ELR0 = 0x18b4 , PMIC_BUCK_VPA_DLC_CON0 = 0x1918 ,
  PMIC_BUCK_VPA_DLC_CON1 = 0x191a , PMIC_VSRAM_PROC1_ELR = 0x1b44 , PMIC_VSRAM_PROC2_ELR = 0x1b46 , PMIC_VSRAM_PROC1_VOSEL1 = 0x1e90 ,
  PMIC_VSRAM_PROC2_VOSEL1 = 0x1eb0 , PMIC_VM18_ANA_CON0 = 0x2020
}
 
enum  {
  MT6359P_GPU11 = 0 , MT6359P_SRAM_PROC1 , MT6359P_SRAM_PROC2 , MT6359P_CORE ,
  MT6359P_MAX
}
 

Functions

void mt6359p_init (void)
 
void mt6359p_buck_set_voltage (u32 buck_id, u32 buck_uv)
 
u32 mt6359p_buck_get_voltage (u32 buck_id)
 
void mt6359p_set_vm18_voltage (u32 vm18_uv)
 
u32 mt6359p_get_vm18_voltage (void)
 
void mt6359p_write_field (u32 reg, u32 val, u32 mask, u32 shift)
 
void pmic_init_setting (void)
 
void pmic_lp_setting (void)
 

Macro Definition Documentation

◆ EFUSE_BUSY

#define EFUSE_BUSY   1

Definition at line 63 of file mt6359p.h.

◆ EFUSE_RG_VPA_OC_FT

#define EFUSE_RG_VPA_OC_FT   78

Definition at line 65 of file mt6359p.h.

◆ EFUSE_WAIT_US

#define EFUSE_WAIT_US   5000

Definition at line 62 of file mt6359p.h.

◆ VM18_VOL_OFFSET

#define VM18_VOL_OFFSET   600

Definition at line 60 of file mt6359p.h.

◆ VM18_VOL_REG_SHIFT

#define VM18_VOL_REG_SHIFT   8

Definition at line 59 of file mt6359p.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PMIC_HWCID 
PMIC_SWCID 
PMIC_TOP_CKPDN_CON0 
PMIC_TOP_CKHWEN_CON0 
PMIC_TOP_RST_MISC_SET 
PMIC_TOP_RST_MISC_CLR 
PMIC_OTP_CON0 
PMIC_OTP_CON8 
PMIC_OTP_CON11 
PMIC_OTP_CON12 
PMIC_OTP_CON13 
PMIC_PWRHOLD 
PMIC_VCORE_DBG0 
PMIC_VCORE_ELR0 
PMIC_VGPU11_DBG0 
PMIC_VGPU11_ELR0 
PMIC_VS2_VOTER 
PMIC_VS2_VOTER_CFG 
PMIC_VS2_ELR0 
PMIC_BUCK_VPA_DLC_CON0 
PMIC_BUCK_VPA_DLC_CON1 
PMIC_VSRAM_PROC1_ELR 
PMIC_VSRAM_PROC2_ELR 
PMIC_VSRAM_PROC1_VOSEL1 
PMIC_VSRAM_PROC2_VOSEL1 
PMIC_VM18_ANA_CON0 

Definition at line 8 of file mt6359p.h.

◆ anonymous enum

anonymous enum
Enumerator
MT6359P_GPU11 
MT6359P_SRAM_PROC1 
MT6359P_SRAM_PROC2 
MT6359P_CORE 
MT6359P_MAX 

Definition at line 51 of file mt6359p.h.

Function Documentation

◆ mt6359p_buck_get_voltage()

u32 mt6359p_buck_get_voltage ( u32  buck_id)

Definition at line 193 of file mt6359p.c.

References die(), MT6359P_CORE, MT6359P_GPU11, mt6359p_read_field(), MT6359P_SRAM_PROC1, MT6359P_SRAM_PROC2, PMIC_VCORE_DBG0, PMIC_VGPU11_DBG0, PMIC_VSRAM_PROC1_VOSEL1, PMIC_VSRAM_PROC2_VOSEL1, and pmif_arb.

Referenced by mainboard_get_regulator_vol().

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

◆ mt6359p_buck_set_voltage()

void mt6359p_buck_set_voltage ( u32  buck_id,
u32  buck_uv 
)

Definition at line 160 of file mt6359p.c.

References die(), MT6359P_CORE, MT6359P_GPU11, MT6359P_SRAM_PROC1, MT6359P_SRAM_PROC2, mt6359p_write_field(), PMIC_VCORE_ELR0, PMIC_VGPU11_ELR0, PMIC_VSRAM_PROC1_ELR, PMIC_VSRAM_PROC2_ELR, and pmif_arb.

Referenced by mainboard_set_regulator_vol(), and raise_little_cpu_freq().

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

◆ mt6359p_get_vm18_voltage()

u32 mt6359p_get_vm18_voltage ( void  )

Definition at line 245 of file mt6359p.c.

References die(), mt6359p_read_field(), PMIC_VM18_ANA_CON0, pmif_arb, VM18_VOL_OFFSET, and VM18_VOL_REG_SHIFT.

Referenced by mainboard_get_regulator_vol().

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

◆ mt6359p_init()

void mt6359p_init ( void  )

Definition at line 269 of file mt6359p.c.

References init_pmif_arb(), pmic_efuse_setting(), pmic_init_setting(), pmic_lp_setting(), pmic_protect_key_setting(), pmic_set_power_hold(), pmic_wdt_set(), and pmic_wk_vs2_voter_setting().

Referenced by platform_romstage_main().

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

◆ mt6359p_set_vm18_voltage()

void mt6359p_set_vm18_voltage ( u32  vm18_uv)

Definition at line 230 of file mt6359p.c.

References assert, die(), mt6359p_write(), PMIC_VM18_ANA_CON0, pmif_arb, VM18_VOL_OFFSET, and VM18_VOL_REG_SHIFT.

Referenced by mainboard_set_regulator_vol().

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

◆ mt6359p_write_field()

void mt6359p_write_field ( u32  reg,
u32  val,
u32  mask,
u32  shift 
)

◆ pmic_init_setting()

void pmic_init_setting ( void  )

Definition at line 286 of file mt6359p.c.

References addr, ARRAY_SIZE, init_setting, mask, mt6359p_write_field(), pmic_setting::shift, and val.

Referenced by mt6359p_init().

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

◆ pmic_lp_setting()

void pmic_lp_setting ( void  )

Definition at line 293 of file mt6359p.c.

References addr, ARRAY_SIZE, lp_setting, mask, mt6359p_write_field(), pmic_setting::shift, and val.

Referenced by mt6359p_init().

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