> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SPI 

## **SPI features**

<br />

| **Subsystem** | **Transfer mode** | **Description**                                                                                                                                                                                              |
| ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| RTSS          | FIFO              | <ul><li>Supports transfer rates up to 50 MHz. The host sets the SPI clock frequency nearest to the requested frequency.</li><li>Supports maximum of 4 chip selects (CS) per bus.<br /><br /><br /></li></ul> |

## **SPI interface components**

<br />The devicetree source is at `sail_proc/BSP/scripts/lemansau-sailhyp.dts`.

<br />**SPI APIs**

The SPI APIs for the RTSS are listed at:

* `sail_proc/BSP/spi/public/Spi_Cfg.h`
* `sail_proc/BSP/spi/public/Spi.h`
* `sail_proc/BSP/spi/public/Spi_PBcfg.h`
* `sail_proc/BSP/spi/public/Spi_Task.h`

## **SPI software devicetree configuration**

To enable SPI, configure SPI using the devicetree node. The following is an example of devicetree node:

```powershell theme={null}
s4_spi: qupv3_se4_spi {
                  reg-base = <0xF1910000>;
                  clock-name = "sailss_cc_qupv3_wrap0_s4_clk";
                  clock-frequency = <100000000>;
                  interrupt = <406>;
                  pinctrl = &se4_spi_pinctrl;
                  slave = <0>;
                  no-of-channels = <2>;
                  loopback  = <0>;
                  access-mode= <1>;
                  status = <1>;
};
```

## **Verify SPI interface**

For information about verifying the SPI interface, see the *spi* section in [RTSS test commands](RTSS-test-commands).
