diff --git a/components/esp_hw_support/include/esp_private/sleep_usb.h b/components/esp_hw_support/include/esp_private/sleep_usb.h index 40a12d59c5..5e49a0d4a1 100644 --- a/components/esp_hw_support/include/esp_private/sleep_usb.h +++ b/components/esp_hw_support/include/esp_private/sleep_usb.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,8 +13,7 @@ extern "C" { #endif -#if SOC_USB_OTG_SUPPORTED -#if SOC_PM_SUPPORT_CNNT_PD +#if SOC_USB_OTG_SUPPORTED && SOC_PM_SUPPORT_CNNT_PD /** * @brief Backup usb OTG phy bus_clock / stoppclk configuration and * before light sleep to avoid current leakage @@ -27,16 +26,6 @@ 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 diff --git a/components/esp_hw_support/sleep_usb.c b/components/esp_hw_support/sleep_usb.c index a1de41e013..d672fa2343 100644 --- a/components/esp_hw_support/sleep_usb.c +++ b/components/esp_hw_support/sleep_usb.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -7,15 +7,11 @@ #include #include "soc/soc_caps.h" #include "esp_private/sleep_usb.h" -#include "esp_attr.h" -#if SOC_USB_OTG_SUPPORTED && (SOC_PM_SUPPORT_CNNT_PD || SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO) +#if SOC_USB_OTG_SUPPORTED && SOC_PM_SUPPORT_CNNT_PD #include "hal/usb_utmi_ll.h" #include "hal/usb_dwc_ll.h" -#endif -#if SOC_USB_OTG_SUPPORTED -#if SOC_PM_SUPPORT_CNNT_PD static bool s_usb_utmi_bus_clock_state, s_usb_utmi_stoppclk_state, s_usb_dwc_bvalid_override; void sleep_usb_otg_phy_backup_and_disable(void) @@ -41,13 +37,3 @@ void sleep_usb_otg_phy_restore(void) } } #endif - -#if SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO -void sleep_usb_suppress_deepsleep_leakage(void) -{ - if (_usb_utmi_ll_bus_clock_is_enabled()) { - usb_dwc_ll_gusbcfg_en_hnp_cap(&USB_DWC_HS); - } -} -#endif -#endif diff --git a/components/esp_hw_support/usb_phy/usb_phy.c b/components/esp_hw_support/usb_phy/usb_phy.c index c95e764d04..c7e40a6805 100644 --- a/components/esp_hw_support/usb_phy/usb_phy.c +++ b/components/esp_hw_support/usb_phy/usb_phy.c @@ -20,11 +20,6 @@ #include "hal/gpio_ll.h" #include "soc/soc_caps.h" -#if SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO -#include "esp_private/sleep_usb.h" -#include "esp_sleep.h" -#endif - #if (SOC_USB_FSLS_PHY_NUM > 0) #define USB_PHY_FSLS_EXT_PHY_SUPPORTED USB_WRAP_LL_EXT_PHY_SUPPORTED #else @@ -246,12 +241,6 @@ esp_err_t usb_new_phy(const usb_phy_config_t *config, usb_phy_handle_t *handle_r } #endif -#if SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO - if (phy_target == USB_PHY_TARGET_UTMI) { - esp_deep_sleep_register_hook(&sleep_usb_suppress_deepsleep_leakage); - } -#endif - ESP_RETURN_ON_FALSE(config, ESP_ERR_INVALID_ARG, USBPHY_TAG, "config argument is invalid"); ESP_RETURN_ON_FALSE(phy_target < USB_PHY_TARGET_MAX, ESP_ERR_INVALID_ARG, USBPHY_TAG, "specified PHY argument is invalid"); ESP_RETURN_ON_FALSE(config->controller < USB_PHY_CTRL_MAX, ESP_ERR_INVALID_ARG, USBPHY_TAG, "specified source argument is invalid"); diff --git a/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in b/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in index 346fb42b51..d128ae121e 100644 --- a/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in @@ -1171,10 +1171,6 @@ config SOC_USB_UTMI_PHY_NUM int default 1 -config SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO - bool - default y - config SOC_PARLIO_TX_UNIT_MAX_DATA_WIDTH int default 16 diff --git a/components/soc/esp32p4/include/soc/soc_caps.h b/components/soc/esp32p4/include/soc/soc_caps.h index d2eb31aad4..be6ff60a34 100644 --- a/components/soc/esp32p4/include/soc/soc_caps.h +++ b/components/soc/esp32p4/include/soc/soc_caps.h @@ -434,7 +434,6 @@ // USB PHY Caps #define SOC_USB_UTMI_PHY_NUM (1U) -#define SOC_USB_UTMI_PHY_NO_POWER_OFF_ISO 1 /*-------------------------- PARLIO CAPS --------------------------------------*/ #define SOC_PARLIO_TX_UNIT_MAX_DATA_WIDTH 16 /*!< Number of data lines of the TX unit */