From e7b8677fa21907bb182667ff43ff50a58c7417e5 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 3 Jun 2026 10:52:43 +0800 Subject: [PATCH 1/2] fix(coex): remove unsupported external coex soc caps --- components/soc/esp32c2/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32c2/include/soc/soc_caps.h | 1 - components/soc/esp32c3/include/soc/Kconfig.soc_caps.in | 8 -------- components/soc/esp32c3/include/soc/soc_caps.h | 2 -- components/soc/esp32c5/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32c5/include/soc/soc_caps.h | 1 - components/soc/esp32c6/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32c6/include/soc/soc_caps.h | 1 - components/soc/esp32c61/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32c61/include/soc/soc_caps.h | 1 - components/soc/esp32h2/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32h2/include/soc/soc_caps.h | 1 - components/soc/esp32h21/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32h21/include/soc/soc_caps.h | 1 - components/soc/esp32h4/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32h4/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 - 20 files changed, 55 deletions(-) diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index c5ab3d8e538..749f921222d 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -571,10 +571,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index 0c3ca4b57a9..d4cc4c3c40c 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -263,7 +263,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in index 734c0b75196..96da4df08f0 100644 --- a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in @@ -783,14 +783,6 @@ config SOC_COEX_HW_PTI bool default y -config SOC_EXTERNAL_COEX_ADVANCE - bool - default n - -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index 759d388474d..26194432be5 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -349,8 +349,6 @@ #define SOC_COEX_HW_PTI (1) /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ -#define SOC_EXTERNAL_COEX_ADVANCE (0) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index 9d1b4caab5b..b2d316bfdbf 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -1303,10 +1303,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH int default 12 diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 72cd86c4a8b..1484d0fa823 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -527,7 +527,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ // #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in index 976f556501f..42a5b4491a5 100644 --- a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in @@ -1043,10 +1043,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32c6/include/soc/soc_caps.h b/components/soc/esp32c6/include/soc/soc_caps.h index 09bec1f163f..484d1a18956 100644 --- a/components/soc/esp32c6/include/soc/soc_caps.h +++ b/components/soc/esp32c6/include/soc/soc_caps.h @@ -430,7 +430,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in index 1d019f003a5..a4e8c7cfd63 100644 --- a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in @@ -959,10 +959,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32c61/include/soc/soc_caps.h b/components/soc/esp32c61/include/soc/soc_caps.h index 970558e1947..887d4b65c6b 100644 --- a/components/soc/esp32c61/include/soc/soc_caps.h +++ b/components/soc/esp32c61/include/soc/soc_caps.h @@ -401,7 +401,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in index 9559aa8d413..d98ecf0ac46 100644 --- a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in @@ -1051,10 +1051,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32h2/include/soc/soc_caps.h b/components/soc/esp32h2/include/soc/soc_caps.h index 0dda2ed90b4..36d670649d7 100644 --- a/components/soc/esp32h2/include/soc/soc_caps.h +++ b/components/soc/esp32h2/include/soc/soc_caps.h @@ -458,7 +458,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in index 03f40e014b3..8e8dce4b523 100644 --- a/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h21/include/soc/Kconfig.soc_caps.in @@ -963,10 +963,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32h21/include/soc/soc_caps.h b/components/soc/esp32h21/include/soc/soc_caps.h index ba6beae2985..5ed34d361de 100644 --- a/components/soc/esp32h21/include/soc/soc_caps.h +++ b/components/soc/esp32h21/include/soc/soc_caps.h @@ -433,7 +433,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in index 3b9d3843c15..13697e9bfb7 100644 --- a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in @@ -1103,10 +1103,6 @@ config SOC_EXTERNAL_COEX_ADVANCE bool default y -config SOC_EXTERNAL_COEX_LEADER_TX_LINE - bool - default n - config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 diff --git a/components/soc/esp32h4/include/soc/soc_caps.h b/components/soc/esp32h4/include/soc/soc_caps.h index 2675e16b5b0..96cca8455ee 100644 --- a/components/soc/esp32h4/include/soc/soc_caps.h +++ b/components/soc/esp32h4/include/soc/soc_caps.h @@ -467,7 +467,6 @@ /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ -#define SOC_EXTERNAL_COEX_LEADER_TX_LINE (0) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) diff --git a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in index 1a58e36b630..be5ca42c12d 100644 --- a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in @@ -959,10 +959,6 @@ config SOC_COEX_HW_PTI bool default y -config SOC_EXTERNAL_COEX_ADVANCE - bool - default n - config SOC_EXTERNAL_COEX_LEADER_TX_LINE bool default y diff --git a/components/soc/esp32s2/include/soc/soc_caps.h b/components/soc/esp32s2/include/soc/soc_caps.h index 545b29fc574..0de0b7bb449 100644 --- a/components/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/esp32s2/include/soc/soc_caps.h @@ -430,7 +430,6 @@ // No contents /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ -#define SOC_EXTERNAL_COEX_ADVANCE (0) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ #define SOC_EXTERNAL_COEX_LEADER_TX_LINE (1) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*-------------------------- Temperature Sensor CAPS -------------------------------------*/ diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index 02cdf927c8f..38044dfe746 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1119,10 +1119,6 @@ config SOC_COEX_HW_PTI bool default y -config SOC_EXTERNAL_COEX_ADVANCE - bool - default n - config SOC_EXTERNAL_COEX_LEADER_TX_LINE bool default y diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index 250bf7879ac..00321c9cf39 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -461,7 +461,6 @@ #define SOC_COEX_HW_PTI (1) /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ -#define SOC_EXTERNAL_COEX_ADVANCE (0) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ #define SOC_EXTERNAL_COEX_LEADER_TX_LINE (1) /*!< EXTERNAL COEXISTENCE TX LINE CAPS */ /*-------------------------- SDMMC CAPS -----------------------------------------*/ From 4d33bcb4daca5870dd13ffe2491cbc8763f75173 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 3 Jun 2026 11:05:24 +0800 Subject: [PATCH 2/2] feat(coex): add external coex unit test for esp32h4 and esp32h21 --- components/esp_coex/test_apps/.build-test-rules.yml | 4 ++-- .../esp_coex/test_apps/external_coex_function/README.md | 4 ++-- .../external_coex_function/main/test_enable_extern_coex.c | 7 +++++-- .../pytest_external_coex_function.py | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/components/esp_coex/test_apps/.build-test-rules.yml b/components/esp_coex/test_apps/.build-test-rules.yml index 21737a4ab0c..8aa670ac94b 100644 --- a/components/esp_coex/test_apps/.build-test-rules.yml +++ b/components/esp_coex/test_apps/.build-test-rules.yml @@ -2,5 +2,5 @@ components/esp_coex/test_apps/: disable: - - if: IDF_TARGET not in ["esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32h2", "esp32c5", "esp32c61", "esp32s31"] - reason: only supported with s2, s3, c3, c2, c6, h2, c5, c61 and s31 + - if: IDF_TARGET not in ["esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32h2", "esp32c5", "esp32c61", "esp32s31", "esp32h4", "esp32h21"] + reason: only supported with s2, s3, c3, c2, c6, h2, c5, c61, s31, esp32h4 and esp32h21 diff --git a/components/esp_coex/test_apps/external_coex_function/README.md b/components/esp_coex/test_apps/external_coex_function/README.md index a0d10bf872d..0f69904fb59 100644 --- a/components/esp_coex/test_apps/external_coex_function/README.md +++ b/components/esp_coex/test_apps/external_coex_function/README.md @@ -1,3 +1,3 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-S2 | ESP32-S3 | ESP32-S31 | -| ----------------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | --------- | +| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | --------- | diff --git a/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c b/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c index 84706ad490d..6a59384de6c 100644 --- a/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c +++ b/components/esp_coex/test_apps/external_coex_function/main/test_enable_extern_coex.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -36,12 +36,15 @@ TEST_CASE("enable external coex", "[external_coex]") #elif CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32C61 #define EXTERNAL_COEX_CONF 0x600AF4A0 #define WDEV_RW_BT_COEX_EN (BIT(9)) -#elif CONFIG_IDF_TARGET_ESP32H2 +#elif CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32H21 #define EXTERNAL_COEX_CONF 0x600AD4A0 #define WDEV_RW_BT_COEX_EN (BIT(9)) #elif CONFIG_IDF_TARGET_ESP32S31 #define EXTERNAL_COEX_CONF 0x2010F4A0 #define WDEV_RW_BT_COEX_EN (BIT(9)) +#elif CONFIG_IDF_TARGET_ESP32H4 +#define EXTERNAL_COEX_CONF 0x600CF4A0 +#define WDEV_RW_BT_COEX_EN (BIT(9)) #endif esp_extern_coex_work_mode_t mode = EXTERNAL_COEX_LEADER_ROLE; diff --git a/components/esp_coex/test_apps/external_coex_function/pytest_external_coex_function.py b/components/esp_coex/test_apps/external_coex_function/pytest_external_coex_function.py index 0a527748231..17e46d77cfe 100644 --- a/components/esp_coex/test_apps/external_coex_function/pytest_external_coex_function.py +++ b/components/esp_coex/test_apps/external_coex_function/pytest_external_coex_function.py @@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( 'target', - ['esp32h2', 'esp32c3', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32s31'], + ['esp32h2', 'esp32c3', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32s31', 'esp32h4', 'esp32h21'], indirect=['target'], ) def test_external_coex_unit_test(dut: Dut) -> None: