OpenBIC
OpenSource Bridge-IC
plat_ioexp.h File Reference
#include "plat_i2c.h"
Include dependency graph for plat_ioexp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCA6414A_INPUT_PORT_0   0x00
 
#define PCA6414A_INPUT_PORT_1   0x01
 
#define PCA6414A_OUTPUT_PORT_0   0x02
 
#define PCA6414A_OUTPUT_PORT_1   0x03
 
#define PCA6414A_CONFIG_0   0x06
 
#define PCA6414A_CONFIG_1   0x07
 
#define TCA6424A_BUS   I2C_BUS1
 
#define TCA6424A_ADDR   (0x44 >> 1)
 
#define TCA6424A_AI_BIT   BIT(7)
 
#define TCA6424A_INPUT_PORT_0   0x00
 
#define TCA6424A_INPUT_PORT_1   0x01
 
#define TCA6424A_INPUT_PORT_2   0x02
 
#define TCA6424A_OUTPUT_PORT_0   0x04
 
#define TCA6424A_OUTPUT_PORT_1   0x05
 
#define TCA6424A_OUTPUT_PORT_2   0x06
 
#define TCA6424A_CONFIG_0   0x0C
 
#define TCA6424A_CONFIG_1   0x0D
 
#define TCA6424A_CONFIG_2   0x0E
 
#define HAMSA_MFIO19_BIT   1
 
#define HAMSA_MFIO6_BIT   6
 
#define HAMSA_MFIO8_BIT   7
 
#define HAMSA_MFIO10_BIT   0
 
#define PCA6414A_BUS   I2C_BUS1
 
#define PCA6414A_ADDR   (0x40 >> 1)
 
#define U200051_IO_I2C_BUS   I2C_BUS1
 
#define U200052_IO_I2C_BUS   I2C_BUS1
 
#define U200053_IO_I2C_BUS   I2C_BUS1
 
#define U200070_IO_I2C_BUS   I2C_BUS1
 
#define U200051_IO_ADDR   (0x72 >> 1)
 
#define U200052_IO_ADDR   0x3A
 
#define U200053_IO_ADDR   0x3B
 
#define U200070_IO_ADDR   0x3C
 
#define U200052_IO_INIT_VAL   0xC0
 
#define U200053_IO_INIT_VAL   0x40
 
#define U200070_IO_INIT_VAL   0x07
 
#define TCAL6408R_BUS   I2C_BUS1
 
#define TCAL6408R_ADDR   (0x43 >> 1) /* 7-bit addr: 0x21 */
 
#define TCAL6408R_INPUT_PORT_0   0x00
 
#define TCAL6408R_OUTPUT_PORT_0   0x01
 
#define TCAL6408R_CONFIG_0   0x03
 
#define NUWA0_MFIO6_BIT   0
 
#define NUWA0_MFIO8_BIT   1
 
#define NUWA0_MFIO10_BIT   2
 
#define NUWA1_MFIO6_BIT   3
 
#define NUWA1_MFIO8_BIT   4
 
#define NUWA1_MFIO10_BIT   5
 
#define NC_NUWA0_MFIO19_BIT   6
 
#define NC_NUWA1_MFIO19_BIT   7
 

Enumerations

enum  PCA9554APW_REG {
  INPUT_PORT = 0 , OUTPUT_PORT = 1 , POLARITY_INVERSION = 2 , CONFIG = 3 ,
  INPUT_PORT = 0 , OUTPUT_PORT = 1 , POLARITY_INVERSION = 2 , CONFIG = 3
}
 

Functions

bool pca6416a_i2c_read (uint8_t offset, uint8_t *data, uint8_t len)
 
bool pca6416a_i2c_write (uint8_t offset, uint8_t *data, uint8_t len)
 
bool tca6424a_i2c_read (uint8_t offset, uint8_t *data, uint8_t len)
 
bool tca6424a_i2c_write (uint8_t offset, uint8_t *data, uint8_t len)
 
bool tca6424a_i2c_write_bit (uint8_t offset, uint8_t bit, uint8_t val)
 
void set_hamsa_mfio_6_8_10_input ()
 
void set_pca6554apw_ioe_value (uint8_t ioe_bus, uint8_t ioe_addr, uint8_t ioe_reg, uint8_t value)
 
int get_pca6554apw_ioe_value (uint8_t ioe_bus, uint8_t ioe_addr, uint8_t ioe_reg, uint8_t *value)
 
void init_U200051_IO ()
 
void init_U200052_IO ()
 
void init_U200053_IO ()
 
void init_U200070_IO ()
 
bool tcal6408r_i2c_read (uint8_t offset, uint8_t *data, uint8_t len)
 
bool tcal6408r_i2c_write (uint8_t offset, uint8_t *data, uint8_t len)
 
bool tcal6408r_i2c_write_bit (uint8_t offset, uint8_t bit, uint8_t val)
 
void set_nuwa0_mfio_6_8_10_input ()
 
void set_nuwa1_mfio_6_8_10_input ()
 
void set_hamsa_mfio_6_8_10_output ()
 
void set_nuwa0_mfio_6_8_10_output ()
 
void set_nuwa1_mfio_6_8_10_output ()
 
bool tcal6408r_init (void)
 
bool is_evb_ioe_accessible ()
 
void ioexp_init (void)
 

Macro Definition Documentation

◆ HAMSA_MFIO10_BIT

#define HAMSA_MFIO10_BIT   0

◆ HAMSA_MFIO19_BIT

#define HAMSA_MFIO19_BIT   1

◆ HAMSA_MFIO6_BIT

#define HAMSA_MFIO6_BIT   6

◆ HAMSA_MFIO8_BIT

#define HAMSA_MFIO8_BIT   7

◆ NC_NUWA0_MFIO19_BIT

#define NC_NUWA0_MFIO19_BIT   6

◆ NC_NUWA1_MFIO19_BIT

#define NC_NUWA1_MFIO19_BIT   7

◆ NUWA0_MFIO10_BIT

#define NUWA0_MFIO10_BIT   2

◆ NUWA0_MFIO6_BIT

#define NUWA0_MFIO6_BIT   0

◆ NUWA0_MFIO8_BIT

#define NUWA0_MFIO8_BIT   1

◆ NUWA1_MFIO10_BIT

#define NUWA1_MFIO10_BIT   5

◆ NUWA1_MFIO6_BIT

#define NUWA1_MFIO6_BIT   3

◆ NUWA1_MFIO8_BIT

#define NUWA1_MFIO8_BIT   4

◆ PCA6414A_ADDR

#define PCA6414A_ADDR   (0x40 >> 1)

◆ PCA6414A_BUS

#define PCA6414A_BUS   I2C_BUS1

◆ PCA6414A_CONFIG_0

#define PCA6414A_CONFIG_0   0x06

◆ PCA6414A_CONFIG_1

#define PCA6414A_CONFIG_1   0x07

◆ PCA6414A_INPUT_PORT_0

#define PCA6414A_INPUT_PORT_0   0x00

◆ PCA6414A_INPUT_PORT_1

#define PCA6414A_INPUT_PORT_1   0x01

◆ PCA6414A_OUTPUT_PORT_0

#define PCA6414A_OUTPUT_PORT_0   0x02

◆ PCA6414A_OUTPUT_PORT_1

#define PCA6414A_OUTPUT_PORT_1   0x03

◆ TCA6424A_ADDR

#define TCA6424A_ADDR   (0x44 >> 1)

◆ TCA6424A_AI_BIT

#define TCA6424A_AI_BIT   BIT(7)

◆ TCA6424A_BUS

#define TCA6424A_BUS   I2C_BUS1

◆ TCA6424A_CONFIG_0

#define TCA6424A_CONFIG_0   0x0C

◆ TCA6424A_CONFIG_1

#define TCA6424A_CONFIG_1   0x0D

◆ TCA6424A_CONFIG_2

#define TCA6424A_CONFIG_2   0x0E

◆ TCA6424A_INPUT_PORT_0

#define TCA6424A_INPUT_PORT_0   0x00

◆ TCA6424A_INPUT_PORT_1

#define TCA6424A_INPUT_PORT_1   0x01

◆ TCA6424A_INPUT_PORT_2

#define TCA6424A_INPUT_PORT_2   0x02

◆ TCA6424A_OUTPUT_PORT_0

#define TCA6424A_OUTPUT_PORT_0   0x04

◆ TCA6424A_OUTPUT_PORT_1

#define TCA6424A_OUTPUT_PORT_1   0x05

◆ TCA6424A_OUTPUT_PORT_2

#define TCA6424A_OUTPUT_PORT_2   0x06

◆ TCAL6408R_ADDR

#define TCAL6408R_ADDR   (0x43 >> 1) /* 7-bit addr: 0x21 */

◆ TCAL6408R_BUS

#define TCAL6408R_BUS   I2C_BUS1

◆ TCAL6408R_CONFIG_0

#define TCAL6408R_CONFIG_0   0x03

◆ TCAL6408R_INPUT_PORT_0

#define TCAL6408R_INPUT_PORT_0   0x00

◆ TCAL6408R_OUTPUT_PORT_0

#define TCAL6408R_OUTPUT_PORT_0   0x01

◆ U200051_IO_ADDR

#define U200051_IO_ADDR   (0x72 >> 1)

◆ U200051_IO_I2C_BUS

#define U200051_IO_I2C_BUS   I2C_BUS1

◆ U200052_IO_ADDR

#define U200052_IO_ADDR   0x3A

◆ U200052_IO_I2C_BUS

#define U200052_IO_I2C_BUS   I2C_BUS1

◆ U200052_IO_INIT_VAL

#define U200052_IO_INIT_VAL   0xC0

◆ U200053_IO_ADDR

#define U200053_IO_ADDR   0x3B

◆ U200053_IO_I2C_BUS

#define U200053_IO_I2C_BUS   I2C_BUS1

◆ U200053_IO_INIT_VAL

#define U200053_IO_INIT_VAL   0x40

◆ U200070_IO_ADDR

#define U200070_IO_ADDR   0x3C

◆ U200070_IO_I2C_BUS

#define U200070_IO_I2C_BUS   I2C_BUS1

◆ U200070_IO_INIT_VAL

#define U200070_IO_INIT_VAL   0x07

Enumeration Type Documentation

◆ PCA9554APW_REG

Enumerator
INPUT_PORT 
OUTPUT_PORT 
POLARITY_INVERSION 
CONFIG 
INPUT_PORT 
OUTPUT_PORT 
POLARITY_INVERSION 
CONFIG 

Function Documentation

◆ get_pca6554apw_ioe_value()

int get_pca6554apw_ioe_value ( uint8_t  ioe_bus,
uint8_t  ioe_addr,
uint8_t  ioe_reg,
uint8_t *  value 
)

◆ init_U200051_IO()

void init_U200051_IO ( )

◆ init_U200052_IO()

void init_U200052_IO ( )

◆ init_U200053_IO()

void init_U200053_IO ( )

◆ init_U200070_IO()

void init_U200070_IO ( )

◆ ioexp_init()

void ioexp_init ( void  )

◆ is_evb_ioe_accessible()

bool is_evb_ioe_accessible ( )
Here is the call graph for this function:

◆ pca6416a_i2c_read()

bool pca6416a_i2c_read ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)

◆ pca6416a_i2c_write()

bool pca6416a_i2c_write ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)

◆ set_hamsa_mfio_6_8_10_input()

void set_hamsa_mfio_6_8_10_input ( )

◆ set_hamsa_mfio_6_8_10_output()

void set_hamsa_mfio_6_8_10_output ( )

◆ set_nuwa0_mfio_6_8_10_input()

void set_nuwa0_mfio_6_8_10_input ( )
Here is the call graph for this function:

◆ set_nuwa0_mfio_6_8_10_output()

void set_nuwa0_mfio_6_8_10_output ( )
Here is the call graph for this function:

◆ set_nuwa1_mfio_6_8_10_input()

void set_nuwa1_mfio_6_8_10_input ( )
Here is the call graph for this function:

◆ set_nuwa1_mfio_6_8_10_output()

void set_nuwa1_mfio_6_8_10_output ( )
Here is the call graph for this function:

◆ set_pca6554apw_ioe_value()

void set_pca6554apw_ioe_value ( uint8_t  ioe_bus,
uint8_t  ioe_addr,
uint8_t  ioe_reg,
uint8_t  value 
)

◆ tca6424a_i2c_read()

bool tca6424a_i2c_read ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)

◆ tca6424a_i2c_write()

bool tca6424a_i2c_write ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)

◆ tca6424a_i2c_write_bit()

bool tca6424a_i2c_write_bit ( uint8_t  offset,
uint8_t  bit,
uint8_t  val 
)

◆ tcal6408r_i2c_read()

bool tcal6408r_i2c_read ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)
Here is the call graph for this function:

◆ tcal6408r_i2c_write()

bool tcal6408r_i2c_write ( uint8_t  offset,
uint8_t *  data,
uint8_t  len 
)
Here is the call graph for this function:

◆ tcal6408r_i2c_write_bit()

bool tcal6408r_i2c_write_bit ( uint8_t  offset,
uint8_t  bit,
uint8_t  val 
)
Here is the call graph for this function:

◆ tcal6408r_init()

bool tcal6408r_init ( void  )
Here is the call graph for this function: