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

Go to the source code of this file.

Data Structures

struct  mt8173_calib_params
 
struct  mt8173_timing_params
 
struct  mt8173_emi_params
 
struct  mt8173_mrs_params
 
struct  mt8173_sdram_params
 

Enumerations

enum  ram_type {
  TYPE_INVALID , TYPE_DDR1 , TYPE_LPDDR2 , TYPE_LPDDR3 ,
  TYPE_PCDDR3
}
 
enum  { Vmem_HV_LPDDR3 = 0x50 , Vmem_NV_LPDDR3 = 0x44 , Vmem_LV_LPDDR3 = 0x36 }
 
enum  {
  Vcore_HHV_LPPDR3 = 0x60 , Vcore_HV_LPPDR3 = 0x48 , Vcore_NV_LPPDR3 = 0x44 , Vcore_LV_LPPDR3 = 0x34 ,
  Vcore_LLV_LPPDR3 = 0x25
}
 
enum  {
  CONA_DUAL_CH_EN = BIT(0) , CONA_32BIT_EN = BIT(1) , CONA_DUAL_RANK_EN = BIT(17) , COL_ADDR_BITS_SHIFT = 4 ,
  COL_ADDR_BITS_MASK = 3 << COL_ADDR_BITS_SHIFT , ROW_ADDR_BITS_SHIFT = 12 , ROW_ADDR_BITS_MASK = 3 << ROW_ADDR_BITS_SHIFT
}
 

Functions

int complex_mem_test (u8 *start, unsigned int len)
 
void mt_set_emi (const struct mt8173_sdram_params *sdram_params)
 
void mt_mem_init (const struct mt8173_sdram_params *sdram_params)
 
const struct mt8173_sdram_paramsget_sdram_config (void)
 
size_t sdram_size (void)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Vmem_HV_LPDDR3 
Vmem_NV_LPDDR3 
Vmem_LV_LPDDR3 

Definition at line 19 of file emi.h.

◆ anonymous enum

anonymous enum
Enumerator
Vcore_HHV_LPPDR3 
Vcore_HV_LPPDR3 
Vcore_NV_LPPDR3 
Vcore_LV_LPPDR3 
Vcore_LLV_LPPDR3 

Definition at line 31 of file emi.h.

◆ anonymous enum

anonymous enum
Enumerator
CONA_DUAL_CH_EN 
CONA_32BIT_EN 
CONA_DUAL_RANK_EN 
COL_ADDR_BITS_SHIFT 
COL_ADDR_BITS_MASK 
ROW_ADDR_BITS_SHIFT 
ROW_ADDR_BITS_MASK 

Definition at line 115 of file emi.h.

◆ ram_type

enum ram_type
Enumerator
TYPE_INVALID 
TYPE_DDR1 
TYPE_LPDDR2 
TYPE_LPDDR3 
TYPE_PCDDR3 

Definition at line 11 of file emi.h.

Function Documentation

◆ complex_mem_test()

int complex_mem_test ( u8 start,
unsigned int  len 
)

Definition at line 25 of file memory_test.c.

◆ get_sdram_config()

const struct mt8173_sdram_params* get_sdram_config ( void  )

Definition at line 85 of file sdram_configs.c.

◆ mt_mem_init()

void mt_mem_init ( const struct mt8173_sdram_params sdram_params)

Definition at line 12 of file memory.c.

References _dram, ASSERT, BIOS_DEBUG, complex_mem_test(), CONFIG, mem_pll_init(), mt_set_emi(), and printk.

Here is the call graph for this function:

◆ mt_set_emi()

void mt_set_emi ( const struct mt8173_sdram_params sdram_params)

Definition at line 164 of file emi.c.

References die(), do_calib(), dram_vcore_adjust(), dram_vmem_adjust(), init_4GB_mode(), init_dram(), and TYPE_LPDDR3.

Here is the call graph for this function:

◆ sdram_size()

size_t sdram_size ( void  )

Definition at line 117 of file emi.c.