From 6141df83e0ab4b55f60345fe9f2aa0985525abdd Mon Sep 17 00:00:00 2001 From: "igor.masar" Date: Fri, 24 Apr 2026 13:39:08 +0200 Subject: [PATCH] feat(soc): add SOC_USB_FSLS_PHY_NUM for USB-OTG targets Introduce SOC_USB_FSLS_PHY_NUM on ESP32-S2 and ESP32-S3 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/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 + 4 files changed, 10 insertions(+) diff --git a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in index 967ede67690..959c824b6b8 100644 --- a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in @@ -839,6 +839,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 cd8cf0fcfd2..e0fa0b4993f 100644 --- a/components/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/esp32s2/include/soc/soc_caps.h @@ -359,6 +359,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 61430a32bfc..9b801602fdc 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1007,6 +1007,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 0e6a5b94b54..c1cc0de6195 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -399,6 +399,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,