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  mt8183_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  { ULPOSC_CLK = 0x1 << 23 }
 
enum  { ULPOSC_OFF = 0x1 << 31 , ULPOSC_INV = 0x1 << 28 , ULPOSC_SEL_1 = 0x1 << 24 , ULPOSC_SEL_2 = 0x1 << 25 }
 
enum  { TIMER_CG = 0x1 , AP_CG = 0x1 << 1 , MD_CG = 0x1 << 2 , CONN_CG = 0x1 << 3 }
 
enum  { MODEM_TEMP_SHARE_CG = 0x1 << 8 }
 
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 = 0x1 , ARB_WACS2 = 0x1 << 2 , ARB_WACS_P2P = 0x1 << 4 , ARB_WACS_MD32 = 0x1 << 5 ,
  ARB_MD = 0x1 << 6 , ARB_WACS_POWER_HW = 0x1 << 9 , ARB_DCXO_CONN = 0x1 << 11 , ARB_DCXO_NFC = 0x1 << 12 ,
  ARB_MD_ADC0 = 0x1 << 13 , ARB_MD_ADC1 = 0x1 << 14 , ARB_GPS_0 = 0x1 << 15 , ARB_GPS_1 = 0x1 << 16 ,
  STAUPD_HARB = 0x1 << 17 , 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 (mt8183_pwrap_regs, bwc_options, 0x3CC)
 
 check_member (mt8183_pwrap_regs, wacs3_vldclr, 0xC38)
 

Variables

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WACS2 

Definition at line 247 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 252 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
E_CLK_EDGE 
E_CLK_LAST_SETTING 

Definition at line 285 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
GPS_MAIN 
GPS_SUBSYS 

Definition at line 290 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
ULPOSC_CLK 

Definition at line 295 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
ULPOSC_OFF 
ULPOSC_INV 
ULPOSC_SEL_1 
ULPOSC_SEL_2 

Definition at line 299 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
TIMER_CG 
AP_CG 
MD_CG 
CONN_CG 

Definition at line 306 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
MODEM_TEMP_SHARE_CG 

Definition at line 313 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 317 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
MD 
MD_DVFS 
POWER_HW 
POWER_HW_BACKUP 
ARB_PRIORITY 

Definition at line 326 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
ARB_WACS0 
ARB_WACS2 
ARB_WACS_P2P 
ARB_WACS_MD32 
ARB_MD 
ARB_WACS_POWER_HW 
ARB_DCXO_CONN 
ARB_DCXO_NFC 
ARB_MD_ADC0 
ARB_MD_ADC1 
ARB_GPS_0 
ARB_GPS_1 
STAUPD_HARB 
ARB_USER_EN 

Definition at line 334 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
STA_PD_98_5_US 

Definition at line 353 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
WATCHDOG_TIMER_7_5_MS 

Definition at line 357 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
WDT_MONITOR_ALL 

Definition at line 361 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 365 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 375 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
IO_4_MA 

Definition at line 385 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 389 of file pmic_wrap.h.

◆ anonymous enum

anonymous enum
Enumerator
DUMMY_READ_CYCLES 

Definition at line 398 of file pmic_wrap.h.

Function Documentation

◆ check_member() [1/2]

check_member ( mt8183_pwrap_regs  ,
bwc_options  ,
0x3CC   
)

◆ check_member() [2/2]

check_member ( mt8183_pwrap_regs  ,
wacs3_vldclr  ,
0xC38   
)

Variable Documentation

◆ mtk_pwrap

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

Definition at line 245 of file pmic_wrap.h.