fix(uart): lp uart rx iomux pin was not working as expected

Introduced in 8818157e42
The workaround in the commit routes the signal to LP GPIO matrix first.
When uses LP IOMUX pin as UART RX, the signal did not bypass the matrix,
which caused the issue.

This commit adds rtc_gpio_iomux_input and rtc_gpio_iomux_output APIs
to align with existing GPIO driver APIs.
This commit is contained in:
Song Ruo Jing
2026-04-09 17:07:01 +08:00
parent 57ad8c89ab
commit 9c2a8281c1
8 changed files with 138 additions and 16 deletions
+5 -6
View File
@@ -732,13 +732,12 @@ static bool uart_try_set_iomux_pin(uart_port_t uart_num, int io_num, uint32_t id
}
#if (SOC_UART_LP_NUM >= 1) && (SOC_RTCIO_PIN_COUNT >= 1)
else {
if (upin->input) {
rtc_gpio_set_direction(io_num, RTC_GPIO_MODE_INPUT_ONLY);
} else {
rtc_gpio_set_direction(io_num, RTC_GPIO_MODE_OUTPUT_ONLY);
}
rtc_gpio_init(io_num);
rtc_gpio_iomux_func_sel(io_num, upin->iomux_func);
if (upin->input) {
rtc_gpio_iomux_input(io_num, upin->iomux_func, upin->signal);
} else {
rtc_gpio_iomux_output(io_num, upin->iomux_func);
}
// undo the workaround done in uart_module_enable for RX pin
#if !SOC_LP_GPIO_MATRIX_SUPPORTED
if (upin->input) {