From 9872825f6f7fbcda1dc4fe6dbaa8a5ef413d5660 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sat, 20 Jun 2026 22:31:02 +0200 Subject: [PATCH] Add cs_gpios to esp32_spi driver --- Platforms/platform-esp32/bindings/espressif,esp32-spi.yaml | 6 +++++- .../platform-esp32/include/tactility/drivers/esp32_spi.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Platforms/platform-esp32/bindings/espressif,esp32-spi.yaml b/Platforms/platform-esp32/bindings/espressif,esp32-spi.yaml index 3c455f583..d2aa437d6 100644 --- a/Platforms/platform-esp32/bindings/espressif,esp32-spi.yaml +++ b/Platforms/platform-esp32/bindings/espressif,esp32-spi.yaml @@ -34,5 +34,9 @@ properties: type: int default: 0 description: | - Data transfer size limit in bytes. + Data transfer size limit in bytes. 0 means the platform decides the limit. + cs-gpios: + type: phandle-array + default: { 0 } + description: Null-terminated array of chip select GPIO pin specs for peripherals on this bus diff --git a/Platforms/platform-esp32/include/tactility/drivers/esp32_spi.h b/Platforms/platform-esp32/include/tactility/drivers/esp32_spi.h index 6a52f4f1c..3de540b99 100644 --- a/Platforms/platform-esp32/include/tactility/drivers/esp32_spi.h +++ b/Platforms/platform-esp32/include/tactility/drivers/esp32_spi.h @@ -23,6 +23,8 @@ struct Esp32SpiConfig { struct GpioPinSpec pin_hd; /** Data transfer size limit in bytes. 0 means the platform decides the limit. */ int max_transfer_size; + /** Null-terminated array of chip select GPIO pin specs */ + struct GpioPinSpec cs_gpios[]; }; #ifdef __cplusplus