coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmic_wrap.h File Reference
#include <soc/addressmap.h>
#include <soc/pmic_wrap_common.h>
#include <types.h>
Include dependency graph for pmic_wrap.h:

Go to the source code of this file.

Data Structures

struct  mt8186_pwrap_regs
 

Enumerations

enum  { WACS2 = 1 << 2 }
 
enum  {
  PMIC_BASE = 0x0000 , PMIC_SMT_CON1 = PMIC_BASE + 0x0030 , PMIC_DRV_CON1 = PMIC_BASE + 0x0038 , PMIC_FILTER_CON0 = PMIC_BASE + 0x0040 ,
  PMIC_GPIO_PULLEN0_CLR = PMIC_BASE + 0x0098 , PMIC_RG_SPI_CON0 = PMIC_BASE + 0x0408 , PMIC_RG_SPI_RECORD0 = PMIC_BASE + 0x040A , PMIC_DEW_DIO_EN = PMIC_BASE + 0x040C ,
  PMIC_DEW_READ_TEST = PMIC_BASE + 0x040E , PMIC_DEW_WRITE_TEST = PMIC_BASE + 0x0410 , PMIC_DEW_CRC_EN = PMIC_BASE + 0x0414 , PMIC_DEW_CRC_VAL = PMIC_BASE + 0x0416 ,
  PMIC_DEW_RDDMY_NO = PMIC_BASE + 0x0426 , PMIC_CPU_INT_STA = PMIC_BASE + 0x042E , PMIC_RG_SPI_CON2 = PMIC_BASE + 0x0432 , PMIC_RG_SPI_CON3 = PMIC_BASE + 0x0434 ,
  PMIC_RG_SPI_CON4 = PMIC_BASE + 0x0436 , PMIC_RG_SPI_CON5 = PMIC_BASE + 0x0438 , PMIC_RG_SPI_CON6 = PMIC_BASE + 0x043A , PMIC_RG_SPI_CON7 = PMIC_BASE + 0x043C ,
  PMIC_RG_SPI_CON8 = PMIC_BASE + 0x043E , PMIC_RG_SPI_CON13 = PMIC_BASE + 0x0448 , PMIC_SPISLV_KEY = PMIC_BASE + 0x044A , PMIC_PPCCTL0 = PMIC_BASE + 0x0A08 ,
  PMIC_AUXADC_ADC17 = PMIC_BASE + 0x10AA , PMIC_AUXADC_ADC31 = PMIC_BASE + 0x10C6 , PMIC_AUXADC_ADC32 = PMIC_BASE + 0x10C8 , PMIC_AUXADC_ADC35 = PMIC_BASE + 0x10CE ,
  PMIC_AUXADC_RQST0 = PMIC_BASE + 0x1108 , PMIC_AUXADC_RQST1 = PMIC_BASE + 0x110A
}
 
enum  { E_CLK_EDGE = 1 , E_CLK_LAST_SETTING }
 
enum  { GPS_MAIN = 0x40 , GPS_SUBSYS = 0x80 }
 
enum  {
  SIG_PMIC_0 = 0x1 << 0 , INT_STA_PMIC_0 = 0x1 << 2 , MD_ADC_DATA0 = 0x1 << 4 , MD_ADC_DATA1 = 0x1 << 5 ,
  GPS_ADC_DATA0 = 0x1 << 6 , GPS_ADC_DATA1 = 0x1 << 7
}
 
enum  {
  MD = 1 , MD_DVFS = 2 , POWER_HW = 4 , POWER_HW_BACKUP = 8 ,
  ARB_PRIORITY = MD | MD_DVFS | POWER_HW | POWER_HW_BACKUP
}
 
enum  {
  ARB_WACS0 = BIT(0) , ARB_WACS1 = BIT(1) , ARB_WACS2 = BIT(2) , ARB_WACS3 = BIT(3) ,
  ARB_WACS_P2P = BIT(4) , ARB_WACS_MD32 = BIT(5) , ARB_MDINF = BIT(6) , ARB_C2KINF = BIT(7) ,
  ARB_MD_DVFSINF = BIT(8) , ARB_SPMINF = BIT(9) , ARB_SPMINF_BACKUP = BIT(10) , ARB_SRCLKEN_RCINF = BIT(11) ,
  ARB_DCXO_CONNINF = BIT(12) , ARB_DCXO_NFCINF = BIT(13) , ARB_MCU_PMINF = BIT(14) , ARB_MD_ADCINF_0 = BIT(15) ,
  ARB_MD_ADCINF_1 = BIT(16) , ARB_GPSINF_0 = BIT(17) , ARB_GPSINF_1 = BIT(18) , ARB_STAUPD = BIT(19) ,
  ARB_USER_EN
}
 
enum  { STA_PD_98_5_US = 0x5 }
 
enum  { WATCHDOG_TIMER_7_5_MS = 0xF }
 
enum  { WDT_MONITOR_ALL = 0xFFFF }
 
enum  {
  MONITOR_LATCH_MATCHED_TRANS = 0x1 << 28 , STARV_15 = 0x1 << 24 , DCXO = 0x1 << 19 , MONITOR_ALL_INT = 0xFFFFFFFF ,
  INT0_MONITOR = MONITOR_ALL_INT , INT1_MONITOR
}
 
enum  {
  SPI_CLK = 0x1 , SPI_CSN = 0x1 << 1 , SPI_MOSI = 0x1 << 2 , SPI_MISO = 0x1 << 3 ,
  SPI_FILTER = (SPI_CLK | SPI_CSN | SPI_MOSI | SPI_MISO) << 4 , SPI_SMT = (SPI_CLK | SPI_CSN | SPI_MOSI | SPI_MISO) , SPI_PULL_DISABLE = (SPI_CLK | SPI_CSN | SPI_MOSI | SPI_MISO) << 4
}
 
enum  { IO_4_MA = 0x8 }
 
enum  {
  SPI_CLK_SHIFT = 0 , SPI_CSN_SHIFT = 4 , SPI_MOSI_SHIFT = 8 , SPI_MISO_SHIFT = 12 ,
  SPI_DRIVING
}
 
enum  { DUMMY_READ_CYCLES = 0x8 }
 

Functions

 check_member (mt8186_pwrap_regs, bwc_options, 0x488)
 
 check_member (mt8186_pwrap_regs, wacs3_vldclr, 0xC38)
 

Variables

static struct mt8186_pwrap_regs *const mtk_pwrap = (void *)PWRAP_BASE
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WACS2 

Definition at line 299 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIC_BASE 
PMIC_SMT_CON1 
PMIC_DRV_CON1 
PMIC_FILTER_CON0 
PMIC_GPIO_PULLEN0_CLR 
PMIC_RG_SPI_CON0 
PMIC_RG_SPI_RECORD0 
PMIC_DEW_DIO_EN 
PMIC_DEW_READ_TEST 
PMIC_DEW_WRITE_TEST 
PMIC_DEW_CRC_EN 
PMIC_DEW_CRC_VAL 
PMIC_DEW_RDDMY_NO 
PMIC_CPU_INT_STA 
PMIC_RG_SPI_CON2 
PMIC_RG_SPI_CON3 
PMIC_RG_SPI_CON4 
PMIC_RG_SPI_CON5 
PMIC_RG_SPI_CON6 
PMIC_RG_SPI_CON7 
PMIC_RG_SPI_CON8 
PMIC_RG_SPI_CON13 
PMIC_SPISLV_KEY 
PMIC_PPCCTL0 
PMIC_AUXADC_ADC17 
PMIC_AUXADC_ADC31 
PMIC_AUXADC_ADC32 
PMIC_AUXADC_ADC35 
PMIC_AUXADC_RQST0 
PMIC_AUXADC_RQST1 

Definition at line 304 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
E_CLK_EDGE 
E_CLK_LAST_SETTING 

Definition at line 337 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
GPS_MAIN 
GPS_SUBSYS 

Definition at line 342 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
SIG_PMIC_0 
INT_STA_PMIC_0 
MD_ADC_DATA0 
MD_ADC_DATA1 
GPS_ADC_DATA0 
GPS_ADC_DATA1 

Definition at line 347 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
MD 
MD_DVFS 
POWER_HW 
POWER_HW_BACKUP 
ARB_PRIORITY 

Definition at line 356 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
ARB_WACS0 
ARB_WACS1 
ARB_WACS2 
ARB_WACS3 
ARB_WACS_P2P 
ARB_WACS_MD32 
ARB_MDINF 
ARB_C2KINF 
ARB_MD_DVFSINF 
ARB_SPMINF 
ARB_SPMINF_BACKUP 
ARB_SRCLKEN_RCINF 
ARB_DCXO_CONNINF 
ARB_DCXO_NFCINF 
ARB_MCU_PMINF 
ARB_MD_ADCINF_0 
ARB_MD_ADCINF_1 
ARB_GPSINF_0 
ARB_GPSINF_1 
ARB_STAUPD 
ARB_USER_EN 

Definition at line 364 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
STA_PD_98_5_US 

Definition at line 392 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
WATCHDOG_TIMER_7_5_MS 

Definition at line 396 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
WDT_MONITOR_ALL 

Definition at line 400 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
MONITOR_LATCH_MATCHED_TRANS 
STARV_15 
DCXO 
MONITOR_ALL_INT 
INT0_MONITOR 
INT1_MONITOR 

Definition at line 404 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
SPI_CLK 
SPI_CSN 
SPI_MOSI 
SPI_MISO 
SPI_FILTER 
SPI_SMT 
SPI_PULL_DISABLE 

Definition at line 414 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
IO_4_MA 

Definition at line 424 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
SPI_CLK_SHIFT 
SPI_CSN_SHIFT 
SPI_MOSI_SHIFT 
SPI_MISO_SHIFT 
SPI_DRIVING 

Definition at line 428 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
DUMMY_READ_CYCLES 

Definition at line 437 of file pmic_wrap.h.

Function Documentation

◆ check_member() [1/2]

check_member ( mt8186_pwrap_regs  ,
bwc_options  ,
0x488   
)

◆ check_member() [2/2]

check_member ( mt8186_pwrap_regs  ,
wacs3_vldclr  ,
0xC38   
)

Variable Documentation

◆ mtk_pwrap

struct mt8186_pwrap_regs* const mtk_pwrap = (void *)PWRAP_BASE
static

Definition at line 297 of file pmic_wrap.h.