Skip to content

[SPI] Add support for multiple SPI buses#5377

Merged
TD-er merged 40 commits intoletscontrolit:megafrom
tonhuisman:feature/SPI-add-support-for-multiple-buses
Feb 10, 2026
Merged

[SPI] Add support for multiple SPI buses#5377
TD-er merged 40 commits intoletscontrolit:megafrom
tonhuisman:feature/SPI-add-support-for-multiple-buses

Conversation

@tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Aug 12, 2025

Resolves #4968
Resolves #5273

Features:

  • [SPI] Add support for multiple SPI buses, on supported ESP32 units: ESP32 Classic, ESP32-S2, ESP32-S3 and ESP32-P4 (once available)
  • SD-Card configurable SPI Bus
  • [P095] ILI9xxx TFT displays configurable SPI Bus
  • [P104] MAX7219 matrix displays configurable SPI Bus
  • [P116] ST77xx TFT displays configurable SPI Bus
  • [P141] PCD8544 Nokia 5110 LCD displays configurable SPI Bus
  • [P172] BMP3xx (SPI) configurable SPI Bus

This enables support for the secondary SPI bus on chips that have support for that, ESP32 Classic, S-series and P-series, No software multiplexing like we implemented for multiple I2C buses 😉. The current max. available is 2 SPI buses, even though there are up to 5 SPI buses integrated (ESP32-P4), the other buses are used for Flash and PSRAM, so not available for other uses, or are LP_SPI (low-power), that requires the use of specific LP enabled GPIO pins to be configured (ESP32-P4).

TODO: Plugins to enable configurable SPI Bus: (most need more extensive changes to the plugin code and/or libraries)

  • [P039] Thermosensors
  • [P096] ePaper displays
  • [P099] XPT2046 touchscreen
  • [P111] RC522 RFID reader
  • [P118] Itho ventilation
  • [P125] ADXL345 (SPI)
  • [P162] MCP42xxx Digipot
  • Ethernet configuration (with setting per Network Plugin)

TODO Generic:

  • Testing ✅, testing ✅ and testing 😛 Help is welcome!
  • Update documentation

…feature/SPI-add-support-for-multiple-buses
…feature/SPI-add-support-for-multiple-buses
…feature/SPI-add-support-for-multiple-buses
@TD-er TD-er merged commit 2d4ac41 into letscontrolit:mega Feb 10, 2026
171 checks passed
@tonhuisman tonhuisman deleted the feature/SPI-add-support-for-multiple-buses branch February 10, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] HSPI and VSPI at the same time [SPI] Add SPI support for all available SPI busses on all ESP32-xx platforms

2 participants