coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmic.c File Reference
#include <console/console.h>
#include <delay.h>
#include <device/i2c_simple.h>
#include <reset.h>
#include <stdint.h>
#include "pmic.h"
Include dependency graph for pmic.c:

Go to the source code of this file.

Data Structures

struct  max77620_init_reg
 

Enumerations

enum  { MAX77620_I2C_ADDR = 0x3c , MAX77621_CPU_I2C_ADDR = 0x1B , MAX77621_GPU_I2C_ADDR = 0x1C }
 

Functions

static void pmic_write_reg (unsigned int bus, uint8_t chip, uint8_t reg, uint8_t val, int delay)
 
void pmic_write_reg_77620 (unsigned int bus, uint8_t reg, uint8_t val, int delay)
 
static void pmic_write_reg_77621 (unsigned int bus, uint8_t reg, uint8_t val, int delay)
 
void pmic_init (unsigned int bus)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX77620_I2C_ADDR 
MAX77621_CPU_I2C_ADDR 
MAX77621_GPU_I2C_ADDR 

Definition at line 11 of file pmic.c.

Function Documentation

◆ pmic_init()

◆ pmic_write_reg()

static void pmic_write_reg ( unsigned int  bus,
uint8_t  chip,
uint8_t  reg,
uint8_t  val,
int  delay 
)
static

Definition at line 23 of file pmic.c.

References BIOS_ERR, board_reset(), chip, delay(), i2c_writeb(), printk, udelay(), and val.

Referenced by pmic_write_reg_77620(), and pmic_write_reg_77621().

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

◆ pmic_write_reg_77620()

void pmic_write_reg_77620 ( unsigned int  bus,
uint8_t  reg,
uint8_t  val,
int  delay 
)

Definition at line 37 of file pmic.c.

References delay(), MAX77620_I2C_ADDR, pmic_write_reg(), and val.

Referenced by enable_lcd_vdd(), and pmic_init().

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

◆ pmic_write_reg_77621()

static void pmic_write_reg_77621 ( unsigned int  bus,
uint8_t  reg,
uint8_t  val,
int  delay 
)
inlinestatic

Definition at line 43 of file pmic.c.

References delay(), MAX77621_CPU_I2C_ADDR, pmic_write_reg(), and val.

Referenced by pmic_init().

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