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

Go to the source code of this file.

Macros

#define V_LDO_SETTING(vios1, vios0, viom1, viom0)
 
#define RG3MXXB12_DEFAULT_STATIC_ADDRESS   0x70
 
#define RG3M87B12_DEVICE_INFO   0x1287
 
#define RG3M88B12_DEVICE_INFO   0x1288
 
#define RG3M47B12_DEVICE_INFO   0x1247
 
#define RG3M4812_DEVICE_INFO   0x1248
 
#define RG3MXXB12_DEVICE_INFO0_REG   0x0
 
#define RG3MXXB12_DEVICE_INFO1_REG   0x1
 
#define RG3MXXB12_PROTECTION_REG   0x10
 
#define RG3MXXB12_MASTER_PORT_CONFIG   0x11
 
#define RG3MXXB12_SLAVE_PORT_ENABLE   0x12
 
#define RG3MXXB12_HUB_NETWORK_OPERATION_MODE   0x15
 
#define RG3MXXB12_VOLT_LDO_SETTING   0x16
 
#define RG3MXXB12_SSPORTS_OD_ONLY   0x17
 
#define RG3MXXB12_SSPORTS_AGENT_ENABLE   0x18
 
#define RG3MXXB12_SSPORTS_PULLUP_SETTING   0x19
 
#define RG3MXXB12_SSPORTS_GPIO_ENABLE   0x1E
 
#define RG3MXXB12_SSPORTS_HUB_NETWORK_CONNECTION   0x51
 
#define RG3MXXB12_SSPORTS_PULLUP_ENABLE   0x53
 
#define RG3MXXB12_PROTECTION_LOCK   0x00
 
#define RG3MXXB12_PROTECTION_UNLOCK   0x69
 
#define RG3MXXB12_HUB_NETWORK_ALWAYS_I3C   5
 
#define VIOS1_OFFSET   6
 
#define VIOS0_OFFSET   4
 
#define VIOM1_OFFSET   2
 
#define VIOM0_OFFSET   0
 
#define MPORT_OD_ONLY   4
 
#define SSPORTS_RESISTOR0_OFFSET   6
 
#define SSPORTS_RESISTOR1_OFFSET   4
 
#define RG3MXXB12_SSPORTS_ALL_DISCONNECT   0x00
 

Enumerations

enum  rg3mxxb12_ldo_volt { rg3mxxb12_ldo_1_0_volt = 0 , rg3mxxb12_ldo_1_1_volt , rg3mxxb12_ldo_1_2_volt , rg3mxxb12_ldo_1_8_volt }
 
enum  rg3mxxb12_pull_up_resistor { rg3mxxb12_pullup_250_ohm = 0 , rg3mxxb12_pullup_500_ohm , rg3mxxb12_pullup_1k_ohm , rg3mxxb12_pullup_2k_ohm }
 

Functions

bool rg3mxxb12_i2c_mode_only_init (uint8_t bus, uint8_t slave_port, uint8_t ldo_volt, uint8_t pullup_resistor)
 
bool rg3mxxb12_select_slave_port_connect (uint8_t bus, uint8_t slave_port)
 
bool rg3mxxb12_i3c_mode_only_init (I3C_MSG *i3c_msg, uint8_t ldo_volt)
 
bool rg3mxxb12_set_slave_port (uint8_t bus, uint8_t addr, uint8_t setting)
 
bool rg3mxxb12_get_device_info (uint8_t bus, uint16_t *i3c_hub_type)
 
bool rg3mxxb12_get_device_info_i3c (uint8_t bus, uint16_t *i3c_hub_type)
 

Macro Definition Documentation

◆ MPORT_OD_ONLY

#define MPORT_OD_ONLY   4

◆ RG3M47B12_DEVICE_INFO

#define RG3M47B12_DEVICE_INFO   0x1247

◆ RG3M4812_DEVICE_INFO

#define RG3M4812_DEVICE_INFO   0x1248

◆ RG3M87B12_DEVICE_INFO

#define RG3M87B12_DEVICE_INFO   0x1287

◆ RG3M88B12_DEVICE_INFO

#define RG3M88B12_DEVICE_INFO   0x1288

◆ RG3MXXB12_DEFAULT_STATIC_ADDRESS

#define RG3MXXB12_DEFAULT_STATIC_ADDRESS   0x70

◆ RG3MXXB12_DEVICE_INFO0_REG

#define RG3MXXB12_DEVICE_INFO0_REG   0x0

◆ RG3MXXB12_DEVICE_INFO1_REG

#define RG3MXXB12_DEVICE_INFO1_REG   0x1

◆ RG3MXXB12_HUB_NETWORK_ALWAYS_I3C

#define RG3MXXB12_HUB_NETWORK_ALWAYS_I3C   5

◆ RG3MXXB12_HUB_NETWORK_OPERATION_MODE

#define RG3MXXB12_HUB_NETWORK_OPERATION_MODE   0x15

◆ RG3MXXB12_MASTER_PORT_CONFIG

#define RG3MXXB12_MASTER_PORT_CONFIG   0x11

◆ RG3MXXB12_PROTECTION_LOCK

#define RG3MXXB12_PROTECTION_LOCK   0x00

◆ RG3MXXB12_PROTECTION_REG

#define RG3MXXB12_PROTECTION_REG   0x10

◆ RG3MXXB12_PROTECTION_UNLOCK

#define RG3MXXB12_PROTECTION_UNLOCK   0x69

◆ RG3MXXB12_SLAVE_PORT_ENABLE

#define RG3MXXB12_SLAVE_PORT_ENABLE   0x12

◆ RG3MXXB12_SSPORTS_AGENT_ENABLE

#define RG3MXXB12_SSPORTS_AGENT_ENABLE   0x18

◆ RG3MXXB12_SSPORTS_ALL_DISCONNECT

#define RG3MXXB12_SSPORTS_ALL_DISCONNECT   0x00

◆ RG3MXXB12_SSPORTS_GPIO_ENABLE

#define RG3MXXB12_SSPORTS_GPIO_ENABLE   0x1E

◆ RG3MXXB12_SSPORTS_HUB_NETWORK_CONNECTION

#define RG3MXXB12_SSPORTS_HUB_NETWORK_CONNECTION   0x51

◆ RG3MXXB12_SSPORTS_OD_ONLY

#define RG3MXXB12_SSPORTS_OD_ONLY   0x17

◆ RG3MXXB12_SSPORTS_PULLUP_ENABLE

#define RG3MXXB12_SSPORTS_PULLUP_ENABLE   0x53

◆ RG3MXXB12_SSPORTS_PULLUP_SETTING

#define RG3MXXB12_SSPORTS_PULLUP_SETTING   0x19

◆ RG3MXXB12_VOLT_LDO_SETTING

#define RG3MXXB12_VOLT_LDO_SETTING   0x16

◆ SSPORTS_RESISTOR0_OFFSET

#define SSPORTS_RESISTOR0_OFFSET   6

◆ SSPORTS_RESISTOR1_OFFSET

#define SSPORTS_RESISTOR1_OFFSET   4

◆ V_LDO_SETTING

#define V_LDO_SETTING (   vios1,
  vios0,
  viom1,
  viom0 
)
Value:
((vios1 << VIOS1_OFFSET) | (vios0 << VIOS0_OFFSET) | (viom1 << VIOM1_OFFSET) | \
(viom0 << VIOM0_OFFSET))
#define VIOS1_OFFSET
Definition: rg3mxxb12.h:55
#define VIOS0_OFFSET
Definition: rg3mxxb12.h:56
#define VIOM1_OFFSET
Definition: rg3mxxb12.h:57
#define VIOM0_OFFSET
Definition: rg3mxxb12.h:58

◆ VIOM0_OFFSET

#define VIOM0_OFFSET   0

◆ VIOM1_OFFSET

#define VIOM1_OFFSET   2

◆ VIOS0_OFFSET

#define VIOS0_OFFSET   4

◆ VIOS1_OFFSET

#define VIOS1_OFFSET   6

Enumeration Type Documentation

◆ rg3mxxb12_ldo_volt

Enumerator
rg3mxxb12_ldo_1_0_volt 
rg3mxxb12_ldo_1_1_volt 
rg3mxxb12_ldo_1_2_volt 
rg3mxxb12_ldo_1_8_volt 

◆ rg3mxxb12_pull_up_resistor

Enumerator
rg3mxxb12_pullup_250_ohm 
rg3mxxb12_pullup_500_ohm 
rg3mxxb12_pullup_1k_ohm 
rg3mxxb12_pullup_2k_ohm 

Function Documentation

◆ rg3mxxb12_get_device_info()

bool rg3mxxb12_get_device_info ( uint8_t  bus,
uint16_t *  i3c_hub_type 
)

◆ rg3mxxb12_get_device_info_i3c()

bool rg3mxxb12_get_device_info_i3c ( uint8_t  bus,
uint16_t *  i3c_hub_type 
)

◆ rg3mxxb12_i2c_mode_only_init()

bool rg3mxxb12_i2c_mode_only_init ( uint8_t  bus,
uint8_t  slave_port,
uint8_t  ldo_volt,
uint8_t  pullup_resistor 
)

◆ rg3mxxb12_i3c_mode_only_init()

bool rg3mxxb12_i3c_mode_only_init ( I3C_MSG i3c_msg,
uint8_t  ldo_volt 
)
Here is the call graph for this function:

◆ rg3mxxb12_select_slave_port_connect()

bool rg3mxxb12_select_slave_port_connect ( uint8_t  bus,
uint8_t  slave_port 
)

◆ rg3mxxb12_set_slave_port()

bool rg3mxxb12_set_slave_port ( uint8_t  bus,
uint8_t  addr,
uint8_t  setting 
)
Here is the call graph for this function: