diff options
Diffstat (limited to 'driver/usb_mux/it5205.h')
-rw-r--r-- | driver/usb_mux/it5205.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/driver/usb_mux/it5205.h b/driver/usb_mux/it5205.h index 9e9c4ccfcc..c4fdc6ce49 100644 --- a/driver/usb_mux/it5205.h +++ b/driver/usb_mux/it5205.h @@ -8,6 +8,9 @@ #ifndef __CROS_EC_IT5205_H #define __CROS_EC_IT5205_H +#include "stdbool.h" +#include "usb_mux.h" + /* I2C interface */ #define IT5205_I2C_ADDR1_FLAGS 0x48 #define IT5205_I2C_ADDR2_FLAGS 0x58 @@ -31,4 +34,36 @@ #define IT5205_DP_USB 0x03 #define IT5205_USB 0x07 + +/* IT5205-H SBU module */ + +/* I2C address for SBU switch control */ +#define IT5205H_SBU_I2C_ADDR_FLAGS 0x6a + +/* Vref Select Register */ +#define IT5205H_REG_VSR 0x10 +#define IT5205H_VREF_SELECT_MASK 0x30 +#define IT5205H_VREF_SELECT_3_3V 0x00 +#define IT5205H_VREF_SELECT_OFF 0x20 + +/* CSBU OVP Select Register */ +#define IT5205H_REG_CSBUOVPSR 0x1e +#define IT5205H_OVP_SELECT_MASK 0x30 +#define IT5205H_OVP_3_90V 0x00 +#define IT5205H_OVP_3_68V 0x10 +#define IT5205H_OVP_3_62V 0x20 +#define IT5205H_OVP_3_57V 0x30 + +/* CSBU Switch Register */ +#define IT5205H_REG_CSBUSR 0x22 +#define IT5205H_CSBUSR_SWITCH BIT(0) + +/* Interrupt Switch Register */ +#define IT5205H_REG_ISR 0x25 +#define IT5205H_ISR_CSBU_MASK BIT(4) +#define IT5205H_ISR_CSBU_OVP BIT(0) + +enum ec_error_list it5205h_enable_csbu_switch(const struct usb_mux *me, + bool en); + #endif /* __CROS_EC_IT5205_H */ |