mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 00:26:30 +00:00
cheza: Lower the I2C speeds on TCPC buses to 400kHz
The initial I2C operating speed of the port-0 TCPC chip is 400kHz. It requires changing a register addr:0x48 to a value 0x03 to increase its speed to 1MHz. The BC1.2 chips on port-0 and port-1 also operate at 400kHz, according to the datasheet. So lower the I2C speeds on two TCPC buses to 400kHz. BRANCH=none BUG=b:78142256 TEST=Use console to enable TPCP power and check I2C communication: > gpioset EN_USB_C0_TCPC_PWR 1 > gpioset USB_C0_PD_RST_R_L 1 > i2cscan 1 Scanning 1 tcpc0...................................... 0x4a... 0x50........................ 0x80............................................................... > i2cxfer r 1 0x50 0x00 0xaa [170] Change-Id: I665136d738de50db8beeed338e3102fb5ca6fc84 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1015763 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
This commit is contained in:
@@ -35,8 +35,8 @@ const struct adc_t adc_channels[] = {};
|
||||
/* I2C port map */
|
||||
const struct i2c_port_t i2c_ports[] = {
|
||||
{"power", I2C_PORT_POWER, 400, GPIO_I2C0_SCL, GPIO_I2C0_SDA},
|
||||
{"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_I2C1_SCL, GPIO_I2C1_SDA},
|
||||
{"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_I2C2_SCL, GPIO_I2C2_SDA},
|
||||
{"tcpc0", I2C_PORT_TCPC0, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA},
|
||||
{"tcpc1", I2C_PORT_TCPC1, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA},
|
||||
{"eeprom", I2C_PORT_EEPROM, 400, GPIO_I2C5_SCL, GPIO_I2C5_SDA},
|
||||
{"sensor", I2C_PORT_SENSOR, 400, GPIO_I2C7_SCL, GPIO_I2C7_SDA},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user