mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(wifi): esp32c5 esp32c61 support external coex
This commit is contained in:
parent
0fb74b17ab
commit
ba302e45dd
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -174,7 +174,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
case EXTERN_COEX_WIRE_4:
|
||||
{
|
||||
esp_coex_external_set_txline(true);
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.tx_line], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.tx_line, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.tx_line, GPIO_MODE_OUTPUT);
|
||||
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.tx_line));
|
||||
esp_rom_gpio_connect_out_signal(gpio_pin.tx_line, EXTERNAL_COEX_SIGNAL_O1_TXLINE_IDX, false, false);
|
||||
@ -183,7 +183,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
#endif
|
||||
case EXTERN_COEX_WIRE_3:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.priority], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.priority, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.priority, GPIO_MODE_INPUT);
|
||||
esp_rom_gpio_connect_in_signal(gpio_pin.priority, EXTERNAL_COEX_SIGNAL_I1_IDX, false);
|
||||
REG_SET_FIELD(GPIO_PIN_REG(gpio_pin.priority), GPIO_PIN1_SYNC1_BYPASS, 2);
|
||||
@ -192,7 +192,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
__attribute__((fallthrough));
|
||||
case EXTERN_COEX_WIRE_2:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.grant], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.grant, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.grant, GPIO_MODE_OUTPUT);
|
||||
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.grant));
|
||||
esp_rom_gpio_connect_out_signal(gpio_pin.grant, EXTERNAL_COEX_SIGNAL_O0_IDX, false, false);
|
||||
@ -200,7 +200,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
__attribute__((fallthrough));
|
||||
case EXTERN_COEX_WIRE_1:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.request], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.request, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.request, GPIO_MODE_INPUT);
|
||||
esp_rom_gpio_connect_in_signal(gpio_pin.request, EXTERNAL_COEX_SIGNAL_I0_IDX, false);
|
||||
REG_SET_FIELD(GPIO_PIN_REG(gpio_pin.request), GPIO_PIN1_SYNC1_BYPASS, 2);
|
||||
@ -218,7 +218,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
{
|
||||
case EXTERN_COEX_WIRE_4:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.tx_line], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.tx_line, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.tx_line, GPIO_MODE_INPUT);
|
||||
esp_rom_gpio_connect_in_signal(gpio_pin.tx_line, EXTERNAL_COEX_SIGNAL_I1_IDX, false);
|
||||
REG_SET_FIELD(GPIO_PIN_REG(gpio_pin.tx_line), GPIO_PIN1_SYNC1_BYPASS, 2);
|
||||
@ -227,7 +227,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
__attribute__((fallthrough));
|
||||
case EXTERN_COEX_WIRE_3:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.priority], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.priority, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.priority, GPIO_MODE_OUTPUT);
|
||||
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.priority));
|
||||
esp_rom_gpio_connect_out_signal(gpio_pin.priority, EXTERNAL_COEX_SIGNAL_O1_IDX, false, false);
|
||||
@ -235,7 +235,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
__attribute__((fallthrough));
|
||||
case EXTERN_COEX_WIRE_2:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.grant], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.grant, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.grant, GPIO_MODE_INPUT);
|
||||
esp_rom_gpio_connect_in_signal(gpio_pin.grant, EXTERNAL_COEX_SIGNAL_I0_IDX, false);
|
||||
REG_SET_FIELD(GPIO_PIN_REG(gpio_pin.grant), GPIO_PIN1_SYNC1_BYPASS, 2);
|
||||
@ -244,7 +244,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
__attribute__((fallthrough));
|
||||
case EXTERN_COEX_WIRE_1:
|
||||
{
|
||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.request], PIN_FUNC_GPIO);
|
||||
gpio_func_sel(gpio_pin.request, PIN_FUNC_GPIO);
|
||||
gpio_set_direction(gpio_pin.request, GPIO_MODE_OUTPUT);
|
||||
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.request));
|
||||
esp_rom_gpio_connect_out_signal(gpio_pin.request, EXTERNAL_COEX_SIGNAL_O0_IDX, false, false);
|
||||
|
@ -1235,6 +1235,14 @@ config SOC_COEX_HW_PTI
|
||||
bool
|
||||
default y
|
||||
|
||||
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
|
||||
|
@ -529,8 +529,8 @@
|
||||
#define SOC_COEX_HW_PTI (1)
|
||||
|
||||
/*-------------------------- 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 */
|
||||
#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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user