Skip to content

Commit 054bdb6

Browse files
authored
Merge pull request #362 from FrameworkComputer/hx20.fix_ucsi_right_side_no_response
fix ucsi breaking on right side ports
2 parents 7b08389 + 60b98b6 commit 054bdb6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

board/hx20/ucsi.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,25 @@ void check_ucsi_event_from_host(void)
327327
cci = &pd_chip_ucsi_info[1].cci;
328328
}
329329

330+
331+
/* Fix UCSI stopping responding to right side ports
332+
* the standard says the CCI connector change indicator field
333+
* should be 0 for ACK_CC_CI, however our controller responds with
334+
* the port number populated for the port with the valid response
335+
* so choose this response as a priority when we get an ack from
336+
* both controllers
337+
*/
338+
if (pd_chip_ucsi_info[1].read_tunnel_complete &&
339+
pd_chip_ucsi_info[0].read_tunnel_complete) {
340+
if (pd_chip_ucsi_info[0].cci & 0xFE) {
341+
message_in = pd_chip_ucsi_info[0].message_in;
342+
cci = &pd_chip_ucsi_info[0].cci;
343+
} else if (pd_chip_ucsi_info[1].cci & 0xFE) {
344+
message_in = pd_chip_ucsi_info[1].message_in;
345+
cci = &pd_chip_ucsi_info[1].cci;
346+
}
347+
}
348+
330349
if (
331350
*host_get_customer_memmap(EC_MEMMAP_UCSI_COMMAND) == UCSI_CMD_GET_CONNECTOR_STATUS &&
332351
(((uint8_t*)message_in)[8] & 0x03) > 1)

0 commit comments

Comments
 (0)