From ee4f1deb85151c82f10a1b6eb6af13fa5bfcd986 Mon Sep 17 00:00:00 2001 From: "igor.masar" Date: Fri, 24 Apr 2026 12:56:07 +0200 Subject: [PATCH] feat(soc): add SOC_USB_FSLS_PHY_NUM for USB-OTG targets Introduce SOC_USB_FSLS_PHY_NUM on ESP32-S2, ESP32-S3 and ESP32-P4 to expose the number of FSLS USB_WRAP PHYs available on each target. This separates FSLS USB_WRAP support from OTG/UTMI support so that downstream code can gate FSLS PHY handling independently. --- components/soc/esp32p4/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32p4/include/soc/soc_caps.h | 1 + components/soc/esp32s2/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32s2/include/soc/soc_caps.h | 1 + components/soc/esp32s3/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32s3/include/soc/soc_caps.h | 1 + 6 files changed, 15 insertions(+) diff --git a/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in b/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in index ec69bfdfd5e..d84e79e68a2 100644 --- a/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32p4/include/soc/Kconfig.soc_caps.in @@ -1359,6 +1359,10 @@ config SOC_USB_OTG_PERIPH_NUM int default 2 +config SOC_USB_FSLS_PHY_NUM + int + default 1 + config SOC_USB_UTMI_PHY_NUM int default 1 diff --git a/components/soc/esp32p4/include/soc/soc_caps.h b/components/soc/esp32p4/include/soc/soc_caps.h index 3fd51b6eaca..7751e8ba02b 100644 --- a/components/soc/esp32p4/include/soc/soc_caps.h +++ b/components/soc/esp32p4/include/soc/soc_caps.h @@ -483,6 +483,7 @@ // USB OTG Caps #define SOC_USB_OTG_PERIPH_NUM (2U) +#define SOC_USB_FSLS_PHY_NUM (1U) // USB PHY Caps #define SOC_USB_UTMI_PHY_NUM (1U) diff --git a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in index f5983b1e44b..767117992a8 100644 --- a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in @@ -911,6 +911,10 @@ config SOC_USB_OTG_PERIPH_NUM int default 1 +config SOC_USB_FSLS_PHY_NUM + int + default 1 + config SOC_SHA_DMA_MAX_BUFFER_SIZE int default 3968 diff --git a/components/soc/esp32s2/include/soc/soc_caps.h b/components/soc/esp32s2/include/soc/soc_caps.h index 4de93be9385..15d47a8e2ec 100644 --- a/components/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/esp32s2/include/soc/soc_caps.h @@ -380,6 +380,7 @@ /*-------------------------- USB CAPS ----------------------------------------*/ #define SOC_USB_OTG_PERIPH_NUM (1U) +#define SOC_USB_FSLS_PHY_NUM (1U) /*--------------------------- SHA CAPS ---------------------------------------*/ /* Max amount of bytes in a single DMA operation is 4095, diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index 1fb1d929c13..d83d5084b13 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1111,6 +1111,10 @@ config SOC_USB_OTG_PERIPH_NUM int default 1 +config SOC_USB_FSLS_PHY_NUM + int + default 1 + config SOC_SHA_DMA_MAX_BUFFER_SIZE int default 3968 diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index 76d23a8344a..9d0bf270b69 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -428,6 +428,7 @@ /*-------------------------- USB CAPS ----------------------------------------*/ #define SOC_USB_OTG_PERIPH_NUM (1U) +#define SOC_USB_FSLS_PHY_NUM (1U) /*--------------------------- SHA CAPS ---------------------------------------*/ /* Max amount of bytes in a single DMA operation is 4095,