Add TCPM I2C bus and initialize it

This commit is contained in:
Jeremy Soller
2020-02-13 10:34:28 -07:00
parent fc7fa1f11c
commit 17cce5687f
9 changed files with 93 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ extern struct Gpio __code CCD_EN;
extern struct Gpio __code DD_ON;
extern struct Gpio __code EC_EN;
extern struct Gpio __code EC_RSMRST_N;
extern struct Gpio __code EC_SMD_EN_N;
extern struct Gpio __code LED_ACIN;
extern struct Gpio __code LED_PWR;
extern struct Gpio __code LID_SW_N;

View File

@@ -0,0 +1,11 @@
#ifndef _BOARD_TCPM_H
#define _BOARD_TCPM_H
#include <ec/smbus.h>
void tcpm_init(void);
int tcpm_read(uint8_t address, uint8_t command, uint16_t * data);
int tcpm_write(uint8_t address, uint8_t command, uint16_t data);
void tcpm_event(void);
#endif // _BOARD_TCPM_H