Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/platforms/risc-v/esp32p4/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ LP GPIO No
LP Timers No
LP ADC Yes
Temperature Yes Internal temperature sensor
Touch Sensor No
Touch Sensor Yes
eFuse Yes Virtual eFuses supported
================= ======= ==================================

Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ if(DEFINED ENV{ESP_HAL_3RDPARTY_VERSION})
CACHE STRING "ESP HAL 3rdparty version")
else()
set(ESP_HAL_3RDPARTY_VERSION
627f38f94c1084b6b2d90ce09c0ce5517e8eaed7
9e9626fe059689a24e8d12f4b72d5ab2791de194
CACHE STRING "ESP HAL 3rdparty version")
endif()

Expand Down
145 changes: 145 additions & 0 deletions arch/risc-v/src/common/espressif/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,14 @@ config PM_UART_WAKEUP_CHAR_SEQ

endmenu # PM UART Wakeup Sources

config PM_TOUCH_WAKEUP
bool "PM Touch Wakeup"
depends on ESPRESSIF_TOUCH
default n
---help---
Enable touch sensor wakeup functionality.
This allows the system to wake up from PM_STANDBY or PM_SLEEP

config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15
Expand Down Expand Up @@ -1685,6 +1693,13 @@ config ESPRESSIF_AES_ACCELERATOR
---help---
Enable AES accelerator support.

config ESPRESSIF_TOUCH
bool "Touch sensor"
default n
depends on ARCH_CHIP_ESP32P4
---help---
Enable touch sensor support.

config ESPRESSIF_ADC
bool "Analog-to-digital converter (ADC)"
default n
Expand Down Expand Up @@ -3795,6 +3810,136 @@ endif # PWM_MULTICHAN && PWM_NCHANNELS > 1

endmenu # LEDC configuration

menu "Touch Sensor Configuration"
depends on ESPRESSIF_TOUCH

config ESP_TOUCH_CHANNEL1
bool "Touch Sensor Channel 1(IO2)"
default n
---help---
Enable touch sensor channel 1 (IO2).

config ESP_TOUCH_CHANNEL2
bool "Touch Sensor Channel 2(IO3)"
default n
---help---
Enable touch sensor channel 2 (IO3).

config ESP_TOUCH_CHANNEL3
bool "Touch Sensor Channel 3(IO4)"
default n
---help---
Enable touch sensor channel 3 (IO4).

config ESP_TOUCH_CHANNEL4
bool "Touch Sensor Channel 4(IO5)"
default n
---help---
Enable touch sensor channel 4 (IO5).

config ESP_TOUCH_CHANNEL5
bool "Touch Sensor Channel 5(IO6)"
default n
---help---
Enable touch sensor channel 5 (IO6).

config ESP_TOUCH_CHANNEL6
bool "Touch Sensor Channel 6(IO7)"
default n
---help---
Enable touch sensor channel 6 (IO7).

config ESP_TOUCH_CHANNEL7
bool "Touch Sensor Channel 7(IO8)"
default n
---help---
Enable touch sensor channel 7 (IO8).

config ESP_TOUCH_CHANNEL8
bool "Touch Sensor Channel 8(IO9)"
default n
---help---
Enable touch sensor channel 8 (IO9).

config ESP_TOUCH_CHANNEL9
bool "Touch Sensor Channel 9(IO10)"
default n
---help---
Enable touch sensor channel 9 (IO10).

config ESP_TOUCH_CHANNEL10
bool "Touch Sensor Channel 10(IO11)"
default n
---help---
Enable touch sensor channel 10 (IO11).

config ESP_TOUCH_CHANNEL11
bool "Touch Sensor Channel 11(IO12)"
default n
---help---
Enable touch sensor channel 11 (IO12).

config ESP_TOUCH_CHANNEL12
bool "Touch Sensor Channel 12(IO13)"
default n
---help---
Enable touch sensor channel 12 (IO13).

config ESP_TOUCH_CHANNEL13
bool "Touch Sensor Channel 13(IO14)"
default n
---help---
Enable touch sensor channel 13 (IO14).

config ESP_TOUCH_CHANNEL14
bool "Touch Sensor Channel 14(IO15)"
default n
---help---
Enable touch sensor channel 14 (IO15).

choice ESP_TOUCH_MODE
prompt "Touch Sensor Mode"
default ESP_TOUCH_MODE_CONTINUOUS
---help---
Select operating mode for touch sensor.

config ESP_TOUCH_MODE_ONE_SHOT
bool "One-Shot Mode"

config ESP_TOUCH_MODE_CONTINUOUS
bool "Continuous Mode"

endchoice # ESP_TOUCH_MODE

config ESP_TOUCH_IRQ
bool "Enable touch pad interrupts"
depends on ARCH_IRQBUTTONS
default n
---help---
Enable interrupt support for the touch pads.

config ESP_TOUCH_INVERTED
bool "Touch pad inverted threshold detection"
default n
---help---
Detect touch activity when read value is lower than threshold.

config ESP_TOUCH_FILTER
bool "Touch pad filter"
default y
---help---
Enable internal filter for the touch pads.

config ESP_TOUCH_DENOISE_LVL
int "Touch pad denoise level"
depends on ESP_TOUCH_FILTER
default 1
range 0 4
---help---
Internal denoise level for the touch pads.

endmenu # Touch Sensor Configuration

menu "I2S Configuration"
depends on ESPRESSIF_I2S

Expand Down
6 changes: 5 additions & 1 deletion arch/risc-v/src/common/espressif/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ ifeq ($(CONFIG_CRYPTO_CRYPTODEV_HARDWARE),y)
CHIP_CSRCS += esp_crypto.c
endif

ifeq ($(CONFIG_ESPRESSIF_TOUCH),y)
CHIP_CSRCS += esp_touch.c
endif

ifeq ($(CONFIG_ESPRESSIF_USE_LP_CORE),y)
CHIP_CSRCS += esp_ulp.c
endif
Expand Down Expand Up @@ -221,7 +225,7 @@ endif

ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
ifndef ESP_HAL_3RDPARTY_VERSION
ESP_HAL_3RDPARTY_VERSION = 627f38f94c1084b6b2d90ce09c0ce5517e8eaed7
ESP_HAL_3RDPARTY_VERSION = 9e9626fe059689a24e8d12f4b72d5ab2791de194
endif

ifndef ESP_HAL_3RDPARTY_URL
Expand Down
Loading
Loading