Multiple TFT

How do I have to change my code for having multiple Touch TFT 2.8 240x320 ILI9xxx display on SPI working on a ESP32-S KitC v2?

As far as I have one display connected, it seemed to work well.

I read some sites where the CS / DC / Reset is connected to the same pin(s), but in ESPHome it says “pin is used …” so I came up with a lot of used pins, but it didn’t work.

Any hints?

substitutions:

  ...

  # Backlight-LED
  pin_display_010203_LED: GPIO15
  # SPI
  pin_spi_clk: GPIO18
  pin_spi_mosi: GPIO23
  pin_spi_miso: GPIO19
  # Display
  disp_size_width: "240"
  disp_size_height: "320"
  disp_rotation: "0"
  disp_show_test: "false"
  disp_invert_colors: "false"
  pin_display_01_dc: GPIO02
  pin_display_01_reset: GPIO00
  pin_display_01_cs: GPIO04
  # Touchscreen
  touch_update_interval: "50ms"
  touch_treshold: "400"
  pin_touch_01_cs: GPIO17
  pin_touch_01_irq: GPIO16

spi:

  id: "${devicename_short_id}_spi_01"
  clk_pin: "${pin_spi_clk}"   # GPIO18
  mosi_pin: "${pin_spi_mosi}" # GPIO23
  miso_pin: "${pin_spi_miso}" # GPIO19

display:

  - platform: ili9xxx
    id: "${devicename_short_id}_display_01"
    model: ILI9341
    dc_pin: "${pin_display_01_dc}" # GPIO02
    cs_pin: "${pin_display_01_cs}" # GPIO04
    reset_pin: "${pin_display_01_reset}" # GPIO00
    dimensions:
      height: "${disp_size_height}"
      width: "${disp_size_width}"
    rotation: "${disp_rotation}"
    invert_colors: "${disp_invert_colors}"
    show_test_card: "${disp_show_test}"

touchscreen:

  - platform: xpt2046
    id: "${devicename_short_id}_touchscreen_01"
    display: "${devicename_short_id}_display_01"
    cs_pin: "${pin_touch_01_cs}" # GPIO17
    interrupt_pin: "${pin_touch_01_irq}" # GPIO16
    update_interval: "${touch_update_interval}" # 50ms
    threshold: "${touch_treshold}" # 400