Skip to content

Commit 6670db7

Browse files
Josh-Tsaikiram9
authored andcommitted
fwk: cypd: add the Kconfig to enable the error recovery
If the retimer power rail is different with PD chip, EC should send the error recovery to PD chip to let PD chips re-update the retimer. This change create a new Kconfig to enable/disable the error recovery. BRANCH=fwk-main BUG=https://app.clickup.com/t/86ere7vjd TEST=Set Kconfig=n, the EC does not send the error recovery command to PD chips. Does not see the ERROR_REOCERY event in the ec log. TEST=Set Kconfig=y, the EC sends the error recovery command to PD chips. Can see the ERROR_RECOVERY event in the ec log. Signed-off-by: Josh Tsai <Josh_Tsai@compal.com> (cherry picked from commit 8aed1e0)
1 parent c147be2 commit 6670db7

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

zephyr/program/framework/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ config SELECT_3A_TYPEC_OUTPUT_CURRENT
209209
Default set all type-c port to output 1.5A current. And select
210210
the first PD device to provide 3A current.
211211

212+
config PD_ERROR_RECOVERY
213+
bool "enable to send the error recovery command to PD"
214+
default y
215+
help
216+
If the retimer power rail is differernt with PD chip, EC may need
217+
to send the error recovery command to PD during powering up the
218+
system.
219+
212220
# Driver configuration
213221
config PLATFORM_EC_WAKE_ON_LAN
214222
bool "system can be waked on lan"

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ void perform_error_recovery(int controller)
21152115

21162116
__ASSERT(controller < PD_CHIP_COUNT, "Invalid PD chip controller id in %s.", __func__);
21172117

2118-
if (!cypd_contoller_is_powered(controller))
2118+
if (!cypd_contoller_is_powered(controller) || !IS_ENABLED(CONFIG_PD_ERROR_RECOVERY))
21192119
return;
21202120

21212121
/**

0 commit comments

Comments
 (0)