Skip to content

Commit d8f241b

Browse files
eren-terziogluxiaoxiang781216
authored andcommitted
Documentation/risc-v/esp32[c6]: Add LP_UART support docs
Add LPUART support doc for esp32c6 Signed-off-by: Eren Terzioglu <[email protected]>
1 parent 1c48c0c commit d8f241b

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Documentation/platforms/risc-v/esp32c6/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ SPIFLASH Yes
362362
SPIRAM No
363363
Temp. Sensor No
364364
Timers Yes
365-
UART Yes
365+
UART Yes LPUART supported
366366
USB Serial Yes
367367
Watchdog Yes
368368
Wi-Fi Yes

arch/risc-v/src/common/espressif/Make.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ endif
178178

179179
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
180180
ifndef ESP_HAL_3RDPARTY_VERSION
181-
ESP_HAL_3RDPARTY_VERSION = e9a78c811578545e2bc673862d885a15bd6cbf67
181+
ESP_HAL_3RDPARTY_VERSION = 98dad3d9b4607df319eca4a7baf50545cda0b1a2
182182
endif
183183

184184
ifndef ESP_HAL_3RDPARTY_URL

arch/risc-v/src/common/espressif/esp_lowputc.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
# include "soc/uart_pins.h"
5757
# include "hal/rtc_io_hal.h"
5858
# include "soc/uart_periph.h"
59+
# include "driver/rtc_io.h"
60+
# include "io_mux.h"
5961
#endif
6062

6163
/****************************************************************************
@@ -271,19 +273,15 @@ static void esp_lowputc_lp_uart_config_io(const struct esp_uart_s *priv,
271273
DEBUGASSERT(lp_pin != -1);
272274

273275
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT
274-
RTCIO_RCC_ATOMIC()
275-
{
276-
rtcio_ll_enable_io_clock(true);
277-
}
278-
276+
io_mux_enable_lp_io_clock(lp_pin, true);
279277
#endif
280278
rtcio_hal_function_select(lp_pin, RTCIO_LL_FUNC_RTC);
281279
rtcio_hal_set_direction(pin, direction);
282280

283281
const uart_periph_sig_t *upin =
284282
&uart_periph_signal[LP_UART_NUM_0].pins[idx];
285283
#if !SOC_LP_GPIO_MATRIX_SUPPORTED
286-
rtcio_hal_iomux_func_sel(lp_pin, upin->iomux_func);
284+
rtc_gpio_iomux_func_sel(pin, upin->iomux_func);
287285
#else
288286
/* ToDo: Add LP UART for LP GPIO Matrix supported devices (e.g ESP32-P4) */
289287
#endif /* SOC_LP_GPIO_MATRIX_SUPPORTED */

arch/risc-v/src/esp32c6/hal_esp32c6.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_
131131
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)esp_clk_tree_common.c
132132
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)esp_clk_tree.c
133133
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)cpu_region_protect.c
134+
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)io_mux.c
134135
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)ocode_init.c
135136
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)pmu_init.c
136137
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)port$(DELIM)$(CHIP_SERIES)$(DELIM)pmu_param.c

0 commit comments

Comments
 (0)