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

Go to the source code of this file.

Macros

#define P3H284X_DEFAULT_STATIC_ADDRESS   0x70
 
#define P3H284X_DEVICE_INFO0_REG   0x0
 
#define P3H284X_DEVICE_INFO1_REG   0x1
 
#define P3H284X_PROTECTION_REG   0x10
 
#define P3H284X_CONTROLLER_PORT_CONFIG   0x11
 
#define P3H284X_TARGET_PORT_ENABLE   0x12
 
#define P3H284X_HUB_NETWORK_OPERATION_MODE   0x15
 
#define P3H284X_VOLT_LDO_SETTING   0x16
 
#define P3H284X_TARGET_PORTS_MODE_SETTING   0x17
 
#define P3H284X_TARGET_PORTS_AGENT_ENABLE   0x18
 
#define P3H284X_TARGET_PORTS_PULLUP_SETTING   0x19
 
#define P3H284X_TARGET_PORTS_GPIO_ENABLE   0x1E
 
#define P3H284X_TARGET_PORTSHUB_NETWORK_CONNECTION   0x51
 
#define P3H284X_TARGET_PORTS_PULLUP_ENABLE   0x53
 
#define P3H284X_PROTECTION_LOCK   0x00
 
#define P3H284X_PROTECTION_UNLOCK   0x6A
 
#define P3H284X_HUB_NETWORK_ALWAYS_I3C   5
 
#define TP_VCCIO1_OFFSET   6
 
#define TP_VCCIO0_OFFSET   4
 
#define CP1_OFFSET   2
 
#define CP0_OFFSET   0
 
#define CP_OD_ONLY   4
 
#define TARGET_PORTS_VCCIO0_PULLUP_OFFSET   6
 
#define TARGET_PORTS_VCCIO1_PULLUP_OFFSET   4
 
#define P3H284X_SSPORTS_ALL_DISCONNECT   0x00
 

Enumerations

enum  p3g284x_ldo_volt { p3g284x_ldo_1_0_volt = 0 , p3g284x_ldo_1_1_volt , p3g284x_ldo_1_2_volt , p3g284x_ldo_1_8_volt }
 
enum  p3g284x_pull_up_resistor { p3g284x_pullup_250_ohm = 0 , p3g284x_pullup_500_ohm , p3g284x_pullup_1k_ohm , p3g284x_pullup_2k_ohm }
 

Functions

bool p3h284x_i2c_mode_only_init (uint8_t bus, uint8_t slave_port, uint8_t ldo_volt, uint8_t pullup_resistor)
 
bool p3h284x_select_slave_port_connect (uint8_t bus, uint8_t slave_port)
 
bool p3h284x_i3c_mode_only_init (I3C_MSG *i3c_msg, uint8_t ldo_volt)
 
bool p3h284x_set_slave_port (uint8_t bus, uint8_t addr, uint8_t setting)
 
bool p3h284x_get_device_info (uint8_t bus, uint16_t *i3c_hub_type)
 
bool p3h284x_get_device_info_i3c (uint8_t bus, uint16_t *i3c_hub_type)
 

Macro Definition Documentation

◆ CP0_OFFSET

#define CP0_OFFSET   0

◆ CP1_OFFSET

#define CP1_OFFSET   2

◆ CP_OD_ONLY

#define CP_OD_ONLY   4

◆ P3H284X_CONTROLLER_PORT_CONFIG

#define P3H284X_CONTROLLER_PORT_CONFIG   0x11

◆ P3H284X_DEFAULT_STATIC_ADDRESS

#define P3H284X_DEFAULT_STATIC_ADDRESS   0x70

◆ P3H284X_DEVICE_INFO0_REG

#define P3H284X_DEVICE_INFO0_REG   0x0

◆ P3H284X_DEVICE_INFO1_REG

#define P3H284X_DEVICE_INFO1_REG   0x1

◆ P3H284X_HUB_NETWORK_ALWAYS_I3C

#define P3H284X_HUB_NETWORK_ALWAYS_I3C   5

◆ P3H284X_HUB_NETWORK_OPERATION_MODE

#define P3H284X_HUB_NETWORK_OPERATION_MODE   0x15

◆ P3H284X_PROTECTION_LOCK

#define P3H284X_PROTECTION_LOCK   0x00

◆ P3H284X_PROTECTION_REG

#define P3H284X_PROTECTION_REG   0x10

◆ P3H284X_PROTECTION_UNLOCK

#define P3H284X_PROTECTION_UNLOCK   0x6A

◆ P3H284X_SSPORTS_ALL_DISCONNECT

#define P3H284X_SSPORTS_ALL_DISCONNECT   0x00

◆ P3H284X_TARGET_PORT_ENABLE

#define P3H284X_TARGET_PORT_ENABLE   0x12

◆ P3H284X_TARGET_PORTS_AGENT_ENABLE

#define P3H284X_TARGET_PORTS_AGENT_ENABLE   0x18

◆ P3H284X_TARGET_PORTS_GPIO_ENABLE

#define P3H284X_TARGET_PORTS_GPIO_ENABLE   0x1E

◆ P3H284X_TARGET_PORTS_MODE_SETTING

#define P3H284X_TARGET_PORTS_MODE_SETTING   0x17

◆ P3H284X_TARGET_PORTS_PULLUP_ENABLE

#define P3H284X_TARGET_PORTS_PULLUP_ENABLE   0x53

◆ P3H284X_TARGET_PORTS_PULLUP_SETTING

#define P3H284X_TARGET_PORTS_PULLUP_SETTING   0x19

◆ P3H284X_TARGET_PORTSHUB_NETWORK_CONNECTION

#define P3H284X_TARGET_PORTSHUB_NETWORK_CONNECTION   0x51

◆ P3H284X_VOLT_LDO_SETTING

#define P3H284X_VOLT_LDO_SETTING   0x16

◆ TARGET_PORTS_VCCIO0_PULLUP_OFFSET

#define TARGET_PORTS_VCCIO0_PULLUP_OFFSET   6

◆ TARGET_PORTS_VCCIO1_PULLUP_OFFSET

#define TARGET_PORTS_VCCIO1_PULLUP_OFFSET   4

◆ TP_VCCIO0_OFFSET

#define TP_VCCIO0_OFFSET   4

◆ TP_VCCIO1_OFFSET

#define TP_VCCIO1_OFFSET   6

Enumeration Type Documentation

◆ p3g284x_ldo_volt

Enumerator
p3g284x_ldo_1_0_volt 
p3g284x_ldo_1_1_volt 
p3g284x_ldo_1_2_volt 
p3g284x_ldo_1_8_volt 

◆ p3g284x_pull_up_resistor

Enumerator
p3g284x_pullup_250_ohm 
p3g284x_pullup_500_ohm 
p3g284x_pullup_1k_ohm 
p3g284x_pullup_2k_ohm 

Function Documentation

◆ p3h284x_get_device_info()

bool p3h284x_get_device_info ( uint8_t  bus,
uint16_t *  i3c_hub_type 
)

◆ p3h284x_get_device_info_i3c()

bool p3h284x_get_device_info_i3c ( uint8_t  bus,
uint16_t *  i3c_hub_type 
)

◆ p3h284x_i2c_mode_only_init()

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

◆ p3h284x_i3c_mode_only_init()

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

◆ p3h284x_select_slave_port_connect()

bool p3h284x_select_slave_port_connect ( uint8_t  bus,
uint8_t  slave_port 
)

◆ p3h284x_set_slave_port()

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