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 5
5
branches :
6
6
- lotus*
7
7
- azalea*
8
+ - fwk*
9
+ - framework*
8
10
paths :
9
11
- ' zephyr/program/lotus/**'
10
12
- ' .github/workflows/**'
Original file line number Diff line number Diff line change @@ -126,8 +126,15 @@ int ucsi_write_tunnel(void)
126
126
case UCSI_CMD_GET_ALTERNATE_MODES :
127
127
case UCSI_CMD_GET_CURRENT_CAM :
128
128
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 );
130
136
offset = 1 ;
137
+ }
131
138
132
139
/**
133
140
* those command will control specific pd port,
@@ -328,8 +335,14 @@ int ucsi_read_tunnel(int controller)
328
335
if (!chipset_in_state (CHIPSET_STATE_ON ) && !chipset_in_state (CHIPSET_STATE_ANY_OFF ))
329
336
return EC_SUCCESS ;
330
337
338
+ /**
339
+ * 1. Ignore the same CCI indicator without any command
340
+ * 2. Ignore the same CCI indicator with busy flags
341
+ */
331
342
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 ))
333
346
return EC_ERROR_UNKNOWN ;
334
347
335
348
pd_chip_ucsi_info [controller ].read_tunnel_complete = 1 ;
You can’t perform that action at this time.
0 commit comments