OpenBIC
OpenSource Bridge-IC
pex89000.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <zephyr.h>
#include <sys/util.h>
#include <sys/byteorder.h>
#include <logging/log.h>
#include "libutil.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "pex89000.h"
Include dependency graph for pex89000.c:

Classes

struct  __packed
 

Macros

#define BRCM_I2C5_CMD_READ   0b100
 
#define BRCM_I2C5_CMD_WRITE   0b011
 
#define BRCM_CHIME_AXI_CSR_ADDR   0x001F0100
 
#define BRCM_CHIME_AXI_CSR_DATA   0x001F0104
 
#define BRCM_CHIME_AXI_CSR_CTL   0x001F0108
 
#define BRCM_REG_SMB_WR_CMD   0xFFE00004
 
#define BRCM_REG_SMB_WR_DATA   0xFFE00008
 
#define BRCM_REG_SMB_RD_CMD   0xFFE0000C
 
#define BRCM_REG_SMB_RD_DATA   0xFFE00010
 
#define BRCM_REG_TEMP_SNR0_CTL   0xFFE78504
 
#define BRCM_REG_TEMP_SNR0_STAT   0xFFE78538
 
#define BRCM_REG_CHIP_ID   0xFFF00000
 
#define BRCM_REG_CHIP_REVID   0xFFF00004
 
#define BRCM_REG_SBR_ID   0xFFF00008
 
#define BRCM_REG_FLASH_VER   0x100005f8
 
#define BRCM_REG_CCR_SYSTEM_ERR   0xFFF000A8
 
#define BRCM_VAL_TEMP_SNR0_CTL_RESET   0x000653E8
 

Functions

 LOG_MODULE_REGISTER (dev_pex89000)
 
pex89000_unitfind_pex89000_from_idx (uint8_t idx)
 
uint8_t pex_access_engine (uint8_t bus, uint8_t addr, uint8_t idx, pex_access_t key, uint32_t *resp)
 
uint8_t pex89000_read (sensor_cfg *cfg, int *reading)
 
uint8_t pex89000_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ BRCM_CHIME_AXI_CSR_ADDR

#define BRCM_CHIME_AXI_CSR_ADDR   0x001F0100

◆ BRCM_CHIME_AXI_CSR_CTL

#define BRCM_CHIME_AXI_CSR_CTL   0x001F0108

◆ BRCM_CHIME_AXI_CSR_DATA

#define BRCM_CHIME_AXI_CSR_DATA   0x001F0104

◆ BRCM_I2C5_CMD_READ

#define BRCM_I2C5_CMD_READ   0b100

◆ BRCM_I2C5_CMD_WRITE

#define BRCM_I2C5_CMD_WRITE   0b011

◆ BRCM_REG_CCR_SYSTEM_ERR

#define BRCM_REG_CCR_SYSTEM_ERR   0xFFF000A8

◆ BRCM_REG_CHIP_ID

#define BRCM_REG_CHIP_ID   0xFFF00000

◆ BRCM_REG_CHIP_REVID

#define BRCM_REG_CHIP_REVID   0xFFF00004

◆ BRCM_REG_FLASH_VER

#define BRCM_REG_FLASH_VER   0x100005f8

◆ BRCM_REG_SBR_ID

#define BRCM_REG_SBR_ID   0xFFF00008

◆ BRCM_REG_SMB_RD_CMD

#define BRCM_REG_SMB_RD_CMD   0xFFE0000C

◆ BRCM_REG_SMB_RD_DATA

#define BRCM_REG_SMB_RD_DATA   0xFFE00010

◆ BRCM_REG_SMB_WR_CMD

#define BRCM_REG_SMB_WR_CMD   0xFFE00004

◆ BRCM_REG_SMB_WR_DATA

#define BRCM_REG_SMB_WR_DATA   0xFFE00008

◆ BRCM_REG_TEMP_SNR0_CTL

#define BRCM_REG_TEMP_SNR0_CTL   0xFFE78504

◆ BRCM_REG_TEMP_SNR0_STAT

#define BRCM_REG_TEMP_SNR0_STAT   0xFFE78538

◆ BRCM_VAL_TEMP_SNR0_CTL_RESET

#define BRCM_VAL_TEMP_SNR0_CTL_RESET   0x000653E8

Function Documentation

◆ find_pex89000_from_idx()

pex89000_unit * find_pex89000_from_idx ( uint8_t  idx)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( dev_pex89000  )

◆ pex89000_init()

uint8_t pex89000_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ pex89000_read()

uint8_t pex89000_read ( sensor_cfg cfg,
int *  reading 
)
Here is the call graph for this function:

◆ pex_access_engine()

uint8_t pex_access_engine ( uint8_t  bus,
uint8_t  addr,
uint8_t  idx,
pex_access_t  key,
uint32_t *  resp 
)
Here is the call graph for this function: