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

Go to the source code of this file.

Enumerations

enum  {
  PMIC6391_E1_CID_CODE = 0x1091 , PMIC6391_E2_CID_CODE = 0x2091 , PMIC6397_E1_CID_CODE = 0x1097 , PMIC6397_E2_CID_CODE = 0x2097 ,
  PMIC6397_E3_CID_CODE = 0x3097 , PMIC6397_E4_CID_CODE = 0x4097
}
 
enum  {
  PMIC_RG_CHR_CON1 = 0x0002 , PMIC_RG_CHR_CON6 = 0x000C , PMIC_RG_CHR_CON13 = 0x001A , PMIC_RG_CHR_CON18 = 0x0024 ,
  PMIC_RG_CHR_CON21 = 0x002A , PMIC_RG_CHR_CON23 = 0x002E
}
 
enum  {
  PMIC_RG_CID = 0x0100 , PMIC_RG_TOP_CKPDN = 0x0102 , PMIC_RG_TOP_CKPDN2 = 0x0108 , PMIC_RG_TOP_RST_CON = 0x0114 ,
  PMIC_RG_WRP_CKPDN = 0x011A , PMIC_RG_TOP_RST_MISC = 0x0126 , PMIC_RG_TOP_CKCON1 = 0x0128 , PMIC_RG_TOP_CKCON2 = 0x012A ,
  PMIC_RG_TOP_CKTST1 = 0x012C , PMIC_RG_TOP_CKTST2 = 0x012E , PMIC_RG_OC_DEG_EN = 0x0130 , PMIC_RG_OC_CTL1 = 0x0134 ,
  PMIC_RG_CHRSTATUS = 0x0144 , PMIC_RG_OCSTATUS0 = 0x0146 , PMIC_RG_OCSTATUS1 = 0x0148 , PMIC_RG_OCSTATUS2 = 0x014A ,
  PMIC_RG_TOP_CKPDN3 = 0x01CE , PMIC_RG_TOP_CKCON3 = 0x01D4
}
 
enum  { PMIC_RG_INT_CON0 = 0x0178 , PMIC_RG_INT_CON1 = 0x017E }
 
enum  { PMIC_RG_FQMTR_CON0 = 0x0188 , PMIC_RG_FQMTR_CON1 = 0x018A , PMIC_RG_FQMTR_CON2 = 0x018C }
 
enum  { PMIC_RG_EFUSE_DOUT_256_271 = 0x01EE , PMIC_RG_EFUSE_DOUT_272_287 = 0x01F0 , PMIC_RG_EFUSE_DOUT_288_303 = 0x01F2 , PMIC_RG_EFUSE_DOUT_304_319 = 0x01F4 }
 
enum  {
  PMIC_RG_BUCK_CON3 = 0x0206 , PMIC_RG_BUCK_CON8 = 0x0210 , PMIC_RG_VCA15_CON1 = 0x0216 , PMIC_RG_VCA15_CON5 = 0x021E ,
  PMIC_RG_VCA15_CON7 = 0x0222 , PMIC_RG_VCA15_CON8 = 0x0224 , PMIC_RG_VCA15_CON9 = 0x0226 , PMIC_RG_VCA15_CON10 = 0x0228 ,
  PMIC_RG_VCA15_CON11 = 0x022A , PMIC_RG_VCA15_CON12 = 0x022C , PMIC_RG_VCA15_CON18 = 0x0238 , PMIC_RG_VSRMCA15_CON5 = 0x0244 ,
  PMIC_RG_VSRMCA15_CON6 = 0x0246 , PMIC_RG_VSRMCA15_CON7 = 0x0248 , PMIC_RG_VSRMCA15_CON8 = 0x024A , PMIC_RG_VSRMCA15_CON9 = 0x024C ,
  PMIC_RG_VSRMCA15_CON10 = 0x024E , PMIC_RG_VSRMCA15_CON11 = 0x0250 , PMIC_RG_VSRMCA15_CON18 = 0x025E , PMIC_RG_VSRMCA15_CON19 = 0x0260 ,
  PMIC_RG_VSRMCA15_CON20 = 0x0262 , PMIC_RG_VSRMCA15_CON21 = 0x0264 , PMIC_RG_VCORE_CON5 = 0x0270 , PMIC_RG_VCORE_CON6 = 0x0272 ,
  PMIC_RG_VCORE_CON8 = 0x0276 , PMIC_RG_VCORE_CON9 = 0x0278 , PMIC_RG_VCORE_CON10 = 0x027A , PMIC_RG_VCORE_CON11 = 0x027C ,
  PMIC_RG_VCORE_CON18 = 0x028A , PMIC_RG_VGPU_CON1 = 0x028E , PMIC_RG_VGPU_CON8 = 0x029C , PMIC_RG_VGPU_CON18 = 0x02B0 ,
  PMIC_RG_VIO18_CON18 = 0x0324 , PMIC_RG_VPCA7_CON5 = 0x0330 , PMIC_RG_VPCA7_CON6 = 0x0332 , PMIC_RG_VPCA7_CON7 = 0x0334 ,
  PMIC_RG_VPCA7_CON8 = 0x0336 , PMIC_RG_VPCA7_CON9 = 0x0338 , PMIC_RG_VPCA7_CON10 = 0x033A , PMIC_RG_VPCA7_CON11 = 0x033C ,
  PMIC_RG_VPCA7_CON18 = 0x034A , PMIC_RG_VSRMCA7_CON5 = 0x0356 , PMIC_RG_VSRMCA7_CON6 = 0x0358 , PMIC_RG_VSRMCA7_CON8 = 0x035C ,
  PMIC_RG_VSRMCA7_CON9 = 0x035E , PMIC_RG_VSRMCA7_CON10 = 0x0360 , PMIC_RG_VSRMCA7_CON11 = 0x0362 , PMIC_RG_VSRMCA7_CON18 = 0x0370 ,
  PMIC_RG_VSRMCA7_CON19 = 0x0372 , PMIC_RG_VSRMCA7_CON20 = 0x0374 , PMIC_RG_VSRMCA7_CON21 = 0x0376 , PMIC_RG_VDRM_CON9 = 0x038A ,
  PMIC_RG_VDRM_CON10 = 0x038C , PMIC_RG_VDRM_CON18 = 0x039C , PMIC_RG_BUCK_K_CON0 = 0x039E
}
 
enum  { PMIC_RG_ANALDO_CON0 = 0x0400 , PMIC_RG_ANALDO_CON2 = 0x0404 , PMIC_RG_ANALDO_CON6 = 0x040C }
 
enum  {
  PMIC_RG_DIGLDO_CON5 = 0x041A , PMIC_RG_DIGLDO_CON6 = 0x041C , PMIC_RG_DIGLDO_CON8 = 0x0420 , PMIC_RG_DIGLDO_CON10 = 0x0424 ,
  PMIC_RG_DIGLDO_CON19 = 0x0436 , PMIC_RG_DIGLDO_CON20 = 0x0438 , PMIC_RG_DIGLDO_CON22 = 0x043C , PMIC_RG_DIGLDO_CON24 = 0x0440 ,
  PMIC_RG_DIGLDO_CON27 = 0x0446 , PMIC_RG_DIGLDO_CON30 = 0x044C , PMIC_RG_DIGLDO_CON33 = 0x045A
}
 
enum  {
  PMIC_RG_STRUP_CON0 = 0x0500 , PMIC_RG_STRUP_CON2 = 0x0502 , PMIC_RG_STRUP_CON5 = 0x0508 , PMIC_RG_STRUP_CON7 = 0x050C ,
  PMIC_RG_STRUP_CON10 = 0x0512
}
 
enum  { PMIC_RG_AUXADC_CON14 = 0x055E }
 
enum  { PMIC_RG_FLASH_CON0 = 0x0560 , PMIC_RG_KPLED_CON0 = 0x0566 }
 
enum  {
  PMIC_RG_SPK_CON0 = 0x0600 , PMIC_RG_SPK_CON2 = 0x0604 , PMIC_RG_SPK_CON3 = 0x0606 , PMIC_RG_SPK_CON5 = 0x060A ,
  PMIC_RG_SPK_CON9 = 0x0612
}
 
enum  { PMIC_RG_FGADC_CON13 = 0x0632 , PMIC_RG_FGADC_CON16 = 0x0638 , PMIC_RG_FGADC_CON17 = 0x063A , PMIC_RG_FGADC_CON18 = 0x063C }
 
enum  { PMIC_RG_AUDLDO_CFG0 = 0x0714 , PMIC_RG_AUD_NCP0 = 0x071A }
 
enum  {
  PMIC_RG_PMIC_RG_RG_DCXO_CON0 = 0x83a , PMIC_RG_DCXO_CON2 = 0x83e , PMIC_RG_DCXO_MANUAL_CON1 = 0x844 , PMIC_RG_DCXO_ANALOG_CON1 = 0x84a ,
  PMIC_RG_DCXO_FORCE_MODE1 = 0x854 , PMIC_RG_DCXO_POR2_CON3 = 0x85c
}
 
enum  {
  PMIC_RG_FQMTR_PDN_SHIFT = 1 , PMIC_RG_AP_RST_DIS_MASK = 0x1 , PMIC_RG_AP_RST_DIS_SHIFT = 0 , PMIC_RG_RST_PART_SEL_MASK = 0x1 ,
  PMIC_RG_RST_PART_SEL_SHIFT = 4 , PMIC_RG_TOP_RST_MISC_RSV_3_MASK = 0x1 , PMIC_RG_TOP_RST_MISC_RSV_3_SHIFT = 3 , PMIC_RG_STRUP_MAN_RST_EN_MASK = 0x1 ,
  PMIC_RG_STRUP_MAN_RST_EN_SHIFT = 2 , PMIC_RG_SYSRSTB_EN_MASK = 0x1 , PMIC_RG_SYSRSTB_EN_SHIFT = 1 , PMIC_RG_PWRKEY_DEB_MASK = 0x1 ,
  PMIC_RG_PWRKEY_DEB_SHIFT = 3 , PMIC_RG_HOMEKEY_DEB_MASK = 0x1 , PMIC_RG_HOMEKEY_DEB_SHIFT = 4
}
 
enum  { PMIC_RG_VCAMA_VOSEL_MASK = 0x3 , PMIC_RG_VCAMA_VOSEL_SHIFT = 6 , PMIC_RG_VCAMA_EN_MASK = 0x1 , PMIC_RG_VCAMA_EN_SHIFT = 15 }
 
enum  {
  PMIC_RG_DCXO_C2_UNTRIM_MASK = 0x1 , PMIC_RG_DCXO_C2_UNTRIM_SHIFT = 15 , PMIC_RG_DCXO_MANUAL_C1C2_SYNC_EN_MASK = 0x1 , PMIC_RG_DCXO_MANUAL_C1C2_SYNC_EN_SHIFT = 9 ,
  PMIC_RG_DCXO_MANUAL_SYNC_EN_MASK = 0x1 , PMIC_RG_DCXO_MANUAL_SYNC_EN_SHIFT = 8 , PMIC_RG_DCXO_ATTEN_BB_MASK = 0x3 , PMIC_RG_DCXO_ATTEN_BB_SHIFT = 11 ,
  PMIC_RG_DCXO_LDO_BB_V_MASK = 0x3 , PMIC_RG_DCXO_LDO_BB_V_SHIFT = 2
}
 
enum  ldo_power {
  LDO_VCAMD = 0 , LDO_VGP2 = 1 , LDO_VCAMAF = 2 , LDO_VGP4 = 3 ,
  LDO_VGP5 = 4 , LDO_VGP6 = 5 , LDO_VCAMA = 6
}
 
enum  ldo_voltage {
  LDO_1P2 = 0 , LDO_1P3 = 1 , LDO_1P5 = 2 , LDO_1P8 = 3 ,
  LDO_2P5 = 4 , LDO_2P8 = 5 , LDO_3P0 = 6 , LDO_3P3 = 7 ,
  LDO_NUM_VOLTAGES , LDO_1P22 , LDO_1P0 , LDO_2P0
}
 
enum  {
  MT6391_GPIO_DIR_BASE = 0xC000 , MT6391_GPIO_PULLEN_BASE = 0xC020 , MT6391_GPIO_PULLSEL_BASE = 0xC040 , MT6391_GPIO_DOUT_BASE = 0xC080 ,
  MT6391_GPIO_DIN_BASE = 0xC0A0 , MT6391_GPIO_MODE_BASE = 0xC0C0
}
 
enum  mt6391_pull_enable { MT6391_GPIO_PULL_DISABLE = 0 , MT6391_GPIO_PULL_ENABLE = 1 }
 
enum  mt6391_pull_select { MT6391_GPIO_PULL_DOWN = 0 , MT6391_GPIO_PULL_UP = 1 }
 
enum  {
  MT6391_PMU_INT = 0 , MT6391_SRCVOLTEN = 1 , MT6391_SRCLKEN_PERI = 2 , MT6391_RTC32K_1V8 = 3 ,
  MT6391_WRAP_EVENT = 4 , MT6391_SPI_CLK = 5 , MT6391_SPI_CSN = 6 , MT6391_SPI_MOSI = 7 ,
  MT6391_SPI_MISO = 8 , MT6391_AUD_CLK_MOSI = 9 , MT6391_AUD_DAT_MISO = 10 , MT6391_AUD_DAT_MOSI = 11 ,
  MT6391_KP_COL0 = 12 , MT6391_KP_COL1 = 13 , MT6391_KP_COL2 = 14 , MT6391_KP_COL3 = 15 ,
  MT6391_KP_COL4 = 16 , MT6391_KP_COL5 = 17 , MT6391_KP_COL6 = 18 , MT6391_KP_COL7 = 19 ,
  MT6391_KP_ROW0 = 20 , MT6391_KP_ROW1 = 21 , MT6391_KP_ROW2 = 22 , MT6391_KP_ROW3 = 23 ,
  MT6391_KP_ROW4 = 24 , MT6391_KP_ROW5 = 25 , MT6391_KP_ROW6 = 26 , MT6391_KP_ROW7 = 27 ,
  MT6391_VMSEL1 = 28 , MT6391_VMSEL2 = 29 , MT6391_PWM = 30 , MT6391_SCL0 = 31 ,
  MT6391_SDA0 = 32 , MT6391_SCL1 = 33 , MT6391_SDA1 = 34 , MT6391_SCL2 = 35 ,
  MT6391_SDA2 = 36 , MT6391_HDMISD = 37 , MT6391_HDMISCK = 38 , MT6391_HTPLG = 39 ,
  MT6391_CEC = 40
}
 

Functions

int mt6391_configure_ca53_voltage (int uv)
 
void mt6391_configure_ldo (enum ldo_power ldo, enum ldo_voltage vsel)
 
void mt6391_enable_reset_when_ap_resets (void)
 
void mt6391_init (void)
 
int mt6391_gpio_get (u32 gpio)
 
void mt6391_gpio_set (u32 gpio, int value)
 
void mt6391_gpio_input_pulldown (u32 gpio)
 
void mt6391_gpio_input_pullup (u32 gpio)
 
void mt6391_gpio_input (u32 gpio)
 
void mt6391_gpio_output (u32 gpio, int value)
 
void mt6391_gpio_set_pull (u32 gpio, enum mt6391_pull_enable enable, enum mt6391_pull_select select)
 
void mt6391_gpio_set_mode (u32 gpio, int mode)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PMIC6391_E1_CID_CODE 
PMIC6391_E2_CID_CODE 
PMIC6397_E1_CID_CODE 
PMIC6397_E2_CID_CODE 
PMIC6397_E3_CID_CODE 
PMIC6397_E4_CID_CODE 

Definition at line 11 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_CHR_CON1 
PMIC_RG_CHR_CON6 
PMIC_RG_CHR_CON13 
PMIC_RG_CHR_CON18 
PMIC_RG_CHR_CON21 
PMIC_RG_CHR_CON23 

Definition at line 25 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_CID 
PMIC_RG_TOP_CKPDN 
PMIC_RG_TOP_CKPDN2 
PMIC_RG_TOP_RST_CON 
PMIC_RG_WRP_CKPDN 
PMIC_RG_TOP_RST_MISC 
PMIC_RG_TOP_CKCON1 
PMIC_RG_TOP_CKCON2 
PMIC_RG_TOP_CKTST1 
PMIC_RG_TOP_CKTST2 
PMIC_RG_OC_DEG_EN 
PMIC_RG_OC_CTL1 
PMIC_RG_CHRSTATUS 
PMIC_RG_OCSTATUS0 
PMIC_RG_OCSTATUS1 
PMIC_RG_OCSTATUS2 
PMIC_RG_TOP_CKPDN3 
PMIC_RG_TOP_CKCON3 

Definition at line 35 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_INT_CON0 
PMIC_RG_INT_CON1 

Definition at line 57 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_FQMTR_CON0 
PMIC_RG_FQMTR_CON1 
PMIC_RG_FQMTR_CON2 

Definition at line 63 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_EFUSE_DOUT_256_271 
PMIC_RG_EFUSE_DOUT_272_287 
PMIC_RG_EFUSE_DOUT_288_303 
PMIC_RG_EFUSE_DOUT_304_319 

Definition at line 70 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_BUCK_CON3 
PMIC_RG_BUCK_CON8 
PMIC_RG_VCA15_CON1 
PMIC_RG_VCA15_CON5 
PMIC_RG_VCA15_CON7 
PMIC_RG_VCA15_CON8 
PMIC_RG_VCA15_CON9 
PMIC_RG_VCA15_CON10 
PMIC_RG_VCA15_CON11 
PMIC_RG_VCA15_CON12 
PMIC_RG_VCA15_CON18 
PMIC_RG_VSRMCA15_CON5 
PMIC_RG_VSRMCA15_CON6 
PMIC_RG_VSRMCA15_CON7 
PMIC_RG_VSRMCA15_CON8 
PMIC_RG_VSRMCA15_CON9 
PMIC_RG_VSRMCA15_CON10 
PMIC_RG_VSRMCA15_CON11 
PMIC_RG_VSRMCA15_CON18 
PMIC_RG_VSRMCA15_CON19 
PMIC_RG_VSRMCA15_CON20 
PMIC_RG_VSRMCA15_CON21 
PMIC_RG_VCORE_CON5 
PMIC_RG_VCORE_CON6 
PMIC_RG_VCORE_CON8 
PMIC_RG_VCORE_CON9 
PMIC_RG_VCORE_CON10 
PMIC_RG_VCORE_CON11 
PMIC_RG_VCORE_CON18 
PMIC_RG_VGPU_CON1 
PMIC_RG_VGPU_CON8 
PMIC_RG_VGPU_CON18 
PMIC_RG_VIO18_CON18 
PMIC_RG_VPCA7_CON5 
PMIC_RG_VPCA7_CON6 
PMIC_RG_VPCA7_CON7 
PMIC_RG_VPCA7_CON8 
PMIC_RG_VPCA7_CON9 
PMIC_RG_VPCA7_CON10 
PMIC_RG_VPCA7_CON11 
PMIC_RG_VPCA7_CON18 
PMIC_RG_VSRMCA7_CON5 
PMIC_RG_VSRMCA7_CON6 
PMIC_RG_VSRMCA7_CON8 
PMIC_RG_VSRMCA7_CON9 
PMIC_RG_VSRMCA7_CON10 
PMIC_RG_VSRMCA7_CON11 
PMIC_RG_VSRMCA7_CON18 
PMIC_RG_VSRMCA7_CON19 
PMIC_RG_VSRMCA7_CON20 
PMIC_RG_VSRMCA7_CON21 
PMIC_RG_VDRM_CON9 
PMIC_RG_VDRM_CON10 
PMIC_RG_VDRM_CON18 
PMIC_RG_BUCK_K_CON0 

Definition at line 78 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_ANALDO_CON0 
PMIC_RG_ANALDO_CON2 
PMIC_RG_ANALDO_CON6 

Definition at line 137 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_DIGLDO_CON5 
PMIC_RG_DIGLDO_CON6 
PMIC_RG_DIGLDO_CON8 
PMIC_RG_DIGLDO_CON10 
PMIC_RG_DIGLDO_CON19 
PMIC_RG_DIGLDO_CON20 
PMIC_RG_DIGLDO_CON22 
PMIC_RG_DIGLDO_CON24 
PMIC_RG_DIGLDO_CON27 
PMIC_RG_DIGLDO_CON30 
PMIC_RG_DIGLDO_CON33 

Definition at line 144 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_STRUP_CON0 
PMIC_RG_STRUP_CON2 
PMIC_RG_STRUP_CON5 
PMIC_RG_STRUP_CON7 
PMIC_RG_STRUP_CON10 

Definition at line 159 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_AUXADC_CON14 

Definition at line 168 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_FLASH_CON0 
PMIC_RG_KPLED_CON0 

Definition at line 173 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_SPK_CON0 
PMIC_RG_SPK_CON2 
PMIC_RG_SPK_CON3 
PMIC_RG_SPK_CON5 
PMIC_RG_SPK_CON9 

Definition at line 179 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_FGADC_CON13 
PMIC_RG_FGADC_CON16 
PMIC_RG_FGADC_CON17 
PMIC_RG_FGADC_CON18 

Definition at line 188 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_AUDLDO_CFG0 
PMIC_RG_AUD_NCP0 

Definition at line 196 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_PMIC_RG_RG_DCXO_CON0 
PMIC_RG_DCXO_CON2 
PMIC_RG_DCXO_MANUAL_CON1 
PMIC_RG_DCXO_ANALOG_CON1 
PMIC_RG_DCXO_FORCE_MODE1 
PMIC_RG_DCXO_POR2_CON3 

Definition at line 202 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_FQMTR_PDN_SHIFT 
PMIC_RG_AP_RST_DIS_MASK 
PMIC_RG_AP_RST_DIS_SHIFT 
PMIC_RG_RST_PART_SEL_MASK 
PMIC_RG_RST_PART_SEL_SHIFT 
PMIC_RG_TOP_RST_MISC_RSV_3_MASK 
PMIC_RG_TOP_RST_MISC_RSV_3_SHIFT 
PMIC_RG_STRUP_MAN_RST_EN_MASK 
PMIC_RG_STRUP_MAN_RST_EN_SHIFT 
PMIC_RG_SYSRSTB_EN_MASK 
PMIC_RG_SYSRSTB_EN_SHIFT 
PMIC_RG_PWRKEY_DEB_MASK 
PMIC_RG_PWRKEY_DEB_SHIFT 
PMIC_RG_HOMEKEY_DEB_MASK 
PMIC_RG_HOMEKEY_DEB_SHIFT 

Definition at line 212 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_VCAMA_VOSEL_MASK 
PMIC_RG_VCAMA_VOSEL_SHIFT 
PMIC_RG_VCAMA_EN_MASK 
PMIC_RG_VCAMA_EN_SHIFT 

Definition at line 231 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_RG_DCXO_C2_UNTRIM_MASK 
PMIC_RG_DCXO_C2_UNTRIM_SHIFT 
PMIC_RG_DCXO_MANUAL_C1C2_SYNC_EN_MASK 
PMIC_RG_DCXO_MANUAL_C1C2_SYNC_EN_SHIFT 
PMIC_RG_DCXO_MANUAL_SYNC_EN_MASK 
PMIC_RG_DCXO_MANUAL_SYNC_EN_SHIFT 
PMIC_RG_DCXO_ATTEN_BB_MASK 
PMIC_RG_DCXO_ATTEN_BB_SHIFT 
PMIC_RG_DCXO_LDO_BB_V_MASK 
PMIC_RG_DCXO_LDO_BB_V_SHIFT 

Definition at line 239 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
MT6391_GPIO_DIR_BASE 
MT6391_GPIO_PULLEN_BASE 
MT6391_GPIO_PULLSEL_BASE 
MT6391_GPIO_DOUT_BASE 
MT6391_GPIO_DIN_BASE 
MT6391_GPIO_MODE_BASE 

Definition at line 290 of file mt6391.h.

◆ anonymous enum

anonymous enum
Enumerator
MT6391_PMU_INT 
MT6391_SRCVOLTEN 
MT6391_SRCLKEN_PERI 
MT6391_RTC32K_1V8 
MT6391_WRAP_EVENT 
MT6391_SPI_CLK 
MT6391_SPI_CSN 
MT6391_SPI_MOSI 
MT6391_SPI_MISO 
MT6391_AUD_CLK_MOSI 
MT6391_AUD_DAT_MISO 
MT6391_AUD_DAT_MOSI 
MT6391_KP_COL0 
MT6391_KP_COL1 
MT6391_KP_COL2 
MT6391_KP_COL3 
MT6391_KP_COL4 
MT6391_KP_COL5 
MT6391_KP_COL6 
MT6391_KP_COL7 
MT6391_KP_ROW0 
MT6391_KP_ROW1 
MT6391_KP_ROW2 
MT6391_KP_ROW3 
MT6391_KP_ROW4 
MT6391_KP_ROW5 
MT6391_KP_ROW6 
MT6391_KP_ROW7 
MT6391_VMSEL1 
MT6391_VMSEL2 
MT6391_PWM 
MT6391_SCL0 
MT6391_SDA0 
MT6391_SCL1 
MT6391_SDA1 
MT6391_SCL2 
MT6391_SDA2 
MT6391_HDMISD 
MT6391_HDMISCK 
MT6391_HTPLG 
MT6391_CEC 

Definition at line 309 of file mt6391.h.

◆ ldo_power

enum ldo_power
Enumerator
LDO_VCAMD 
LDO_VGP2 
LDO_VCAMAF 
LDO_VGP4 
LDO_VGP5 
LDO_VGP6 
LDO_VCAMA 

Definition at line 252 of file mt6391.h.

◆ ldo_voltage

Enumerator
LDO_1P2 
LDO_1P3 
LDO_1P5 
LDO_1P8 
LDO_2P5 
LDO_2P8 
LDO_3P0 
LDO_3P3 
LDO_NUM_VOLTAGES 
LDO_1P22 
LDO_1P0 
LDO_2P0 

Definition at line 263 of file mt6391.h.

◆ mt6391_pull_enable

Enumerator
MT6391_GPIO_PULL_DISABLE 
MT6391_GPIO_PULL_ENABLE 

Definition at line 299 of file mt6391.h.

◆ mt6391_pull_select

Enumerator
MT6391_GPIO_PULL_DOWN 
MT6391_GPIO_PULL_UP 

Definition at line 304 of file mt6391.h.

Function Documentation

◆ mt6391_configure_ca53_voltage()

int mt6391_configure_ca53_voltage ( int  uv)

Definition at line 16 of file mt6391.c.

References assert, PMIC_RG_VCA15_CON10, PMIC_RG_VCA15_CON12, PMIC_RG_VCA15_CON9, pwrap_read_field(), and pwrap_write_field().

Referenced by platform_romstage_main().

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

◆ mt6391_configure_ldo()

void mt6391_configure_ldo ( enum ldo_power  ldo,
enum ldo_voltage  vsel 
)

Definition at line 46 of file mt6391.c.

References addr, assert, LDO_1P0, LDO_1P22, LDO_1P3, LDO_2P0, LDO_3P0, LDO_NUM_VOLTAGES, LDO_VCAMA, LDO_VCAMD, LDO_VGP2, LDO_VGP5, LDO_VGP6, mt6391_configure_vcama(), PMIC_RG_DIGLDO_CON19, PMIC_RG_DIGLDO_CON33, PMIC_RG_DIGLDO_CON5, and pwrap_write_field().

Referenced by configure_audio(), and configure_display().

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

◆ mt6391_enable_reset_when_ap_resets()

void mt6391_enable_reset_when_ap_resets ( void  )

Definition at line 84 of file mt6391.c.

References PMIC_RG_TOP_RST_MISC, and pwrap_write_field().

Referenced by bootblock_mainboard_init().

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

◆ mt6391_gpio_get()

int mt6391_gpio_get ( u32  gpio)

Definition at line 503 of file mt6391.c.

References assert, MAX_MT6391_GPIO, MT6391_GPIO_DIN_BASE, pos_bit_calc(), and pwrap_read().

Here is the call graph for this function:

◆ mt6391_gpio_input()

void mt6391_gpio_input ( u32  gpio)

◆ mt6391_gpio_input_pulldown()

void mt6391_gpio_input_pulldown ( u32  gpio)

◆ mt6391_gpio_input_pullup()

void mt6391_gpio_input_pullup ( u32  gpio)

◆ mt6391_gpio_output()

void mt6391_gpio_output ( u32  gpio,
int  value 
)

Definition at line 574 of file mt6391.c.

References MT6391_GPIO_DIRECTION_OUT, MT6391_GPIO_MODE, MT6391_GPIO_PULL_DISABLE, MT6391_GPIO_PULL_DOWN, mt6391_gpio_set(), mt6391_gpio_set_dir(), mt6391_gpio_set_mode(), mt6391_gpio_set_pull(), and value.

Referenced by configure_audio(), configure_ext_buck(), and mainboard_init().

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

◆ mt6391_gpio_set()

void mt6391_gpio_set ( u32  gpio,
int  value 
)

Definition at line 520 of file mt6391.c.

References assert, GPIO_RST_OFFSET, GPIO_SET_OFFSET, MAX_MT6391_GPIO, MT6391_GPIO_DOUT_BASE, pos_bit_calc(), and pwrap_write().

Referenced by mt6391_gpio_output().

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

◆ mt6391_gpio_set_mode()

void mt6391_gpio_set_mode ( u32  gpio,
int  mode 
)

Definition at line 538 of file mt6391.c.

References assert, GPIO_MODE_BITS, mask, MAX_MT6391_GPIO, MT6391_GPIO_MODE_BASE, pos_bit_calc_mode(), and pwrap_write_field().

Referenced by mt6391_gpio_input(), mt6391_gpio_input_pulldown(), mt6391_gpio_input_pullup(), and mt6391_gpio_output().

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

◆ mt6391_gpio_set_pull()

void mt6391_gpio_set_pull ( u32  gpio,
enum mt6391_pull_enable  enable,
enum mt6391_pull_select  select 
)

◆ mt6391_init()

void mt6391_init ( void  )

Definition at line 416 of file mt6391.c.

References die(), mt6391_default_buck_voltage(), mt6391_init_setting(), and pwrap_init().

Referenced by bootblock_soc_init().

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