fix(esp_hw_support): Fix deepsleep leakage after initializing USB HS phy

This commit is contained in:
wuzhenghui
2025-05-14 17:57:40 +08:00
committed by BOT
parent 1adbeceb27
commit 9cf4ddf797
6 changed files with 49 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -13,7 +13,8 @@
extern "C" {
#endif
#if SOC_USB_OTG_SUPPORTED && SOC_PM_SUPPORT_CNNT_PD
#if SOC_USB_OTG_SUPPORTED
#if SOC_PM_SUPPORT_CNNT_PD
/**
* @brief Backup usb OTG phy bus_clock / stoppclk configuration and
* before light sleep to avoid current leakage
@@ -26,6 +27,16 @@ void sleep_usb_otg_phy_backup_and_disable(void);
void sleep_usb_otg_phy_restore(void);
#endif
#if SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO
/**
* @brief The DP/DM part of the UTMI PHY circuit of esp32p4 that converts logic level to digital
* has no power off isolation, which will cause leakage when entering deepsleep.
* This problem can be workarounded by enabling USB-OTG's HNP (Host negotiation protocol)
* to enable DM pull-down to suppress leakage.
*/
void sleep_usb_suppress_deepsleep_leakage(void);
#endif
#endif
#ifdef __cplusplus
}
#endif