File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - lotus*
77 - azalea*
8+ - fwk*
9+ - framework*
810 paths :
911 - ' zephyr/program/lotus/**'
1012 - ' .github/workflows/**'
Original file line number Diff line number Diff line change @@ -126,8 +126,15 @@ int ucsi_write_tunnel(void)
126126 case UCSI_CMD_GET_ALTERNATE_MODES :
127127 case UCSI_CMD_GET_CURRENT_CAM :
128128
129- if (* command == UCSI_CMD_GET_ALTERNATE_MODES )
129+ if (* command == UCSI_CMD_GET_ALTERNATE_MODES ) {
130+ /**
131+ * Workaround: PD chip cannot process the SOP/SOP'/SOP'' alternate mode
132+ * event, ignore the recipient field.
133+ */
134+ * host_get_memmap (EC_CUSTOMIZED_MEMMAP_UCSI_CTR_SPECIFIC ) =
135+ (* host_get_memmap (EC_CUSTOMIZED_MEMMAP_UCSI_CTR_SPECIFIC ) & 0xFC );
130136 offset = 1 ;
137+ }
131138
132139 /**
133140 * those command will control specific pd port,
@@ -328,8 +335,14 @@ int ucsi_read_tunnel(int controller)
328335 if (!chipset_in_state (CHIPSET_STATE_ON ) && !chipset_in_state (CHIPSET_STATE_ANY_OFF ))
329336 return EC_SUCCESS ;
330337
338+ /**
339+ * 1. Ignore the same CCI indicator without any command
340+ * 2. Ignore the same CCI indicator with busy flags
341+ */
331342 if (!(memcmp (host_get_memmap (EC_CUSTOMIZED_MEMMAP_UCSI_CONN_CHANGE ),
332- & pd_chip_ucsi_info [controller ].cci , 4 )))
343+ & pd_chip_ucsi_info [controller ].cci , 4 )) &&
344+ ((* host_get_memmap (EC_CUSTOMIZED_MEMMAP_UCSI_COMMAND ) == 0 ) ||
345+ * (uint32_t * )host_get_memmap (EC_CUSTOMIZED_MEMMAP_UCSI_CONN_CHANGE )& CCI_BUSY_FLAG ))
333346 return EC_ERROR_UNKNOWN ;
334347
335348 pd_chip_ucsi_info [controller ].read_tunnel_complete = 1 ;
You can’t perform that action at this time.
0 commit comments