Skip to content

Commit 7b08389

Browse files
authored
Merge pull request #361 from FrameworkComputer/hx20.force_no_slow_charge
force no slow charger message
2 parents 27aa3a3 + d5182ae commit 7b08389

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

board/hx20/cypress5525.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ void cypd_print_buff(const char *msg, void *buff, int len)
16571657
uint8_t *data = (uint8_t *)buff;
16581658

16591659
CPRINTF("%s 0x", msg);
1660-
for (i = 0; i < len; i++) {
1660+
for (i = len-1; i >=0; i--) {
16611661
CPRINTF("%02x", data[i]);
16621662
}
16631663
CPRINTF("\n");

board/hx20/ucsi.c

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

330+
if (
331+
*host_get_customer_memmap(EC_MEMMAP_UCSI_COMMAND) == UCSI_CMD_GET_CONNECTOR_STATUS &&
332+
(((uint8_t*)message_in)[8] & 0x03) > 1)
333+
{
334+
CPRINTS("Overriding Slow charger status");
335+
/* Override not charging value with nominal charging */
336+
((uint8_t*)message_in)[8] = (((uint8_t*)message_in)[8] & 0xFC) + 1;
337+
}
338+
330339
msleep(2);
331340

332341
memcpy(host_get_customer_memmap(EC_MEMMAP_UCSI_MESSAGE_IN), message_in, 16);

0 commit comments

Comments
 (0)