8.4 DTS Settings for SPI Interface

The WILCS02 supports the SDIO-SPI mode to communicate with host platforms using the MMC over SPI interface. To work with SDIO-SPI mode, the cs-gpios and intr-gpios of SPI in the DTS file need to be set accordingly.
  • cs-gpios is the SPI Chip Select GPIO pin configuration
  • intr-gpios is the SPI IRQN pin configuration
Interrupt-parent and interrupts can be set to any GPIO pin for the card detect(cd) IRQ of MMC-SPI because WILCS02 does not support the MMC-SPI card detect. The definition of this pin is just for the normal working of the MMC-SPI.
The following is an example of the MMC-SPI DTS setting on the SAMA7D27-SOM1-EK platform.
&spi6 {
	#address-cells = <1>;
	#size-cells = <0>;
	cs-gpios = <&pioA PIN_PD0 GPIO_ACTIVE_LOW>;
	cap-sd-highspeed;
	status = "okay";

	wilc_spi@1 {
		compatible = "microchip,wilc1000", "microchip,wilc3000", "mmc-spi-slot";
		spi-max-frequency = <40000000>;
		reg = <0>;
		interrupt-parent = <&pioA>;
		interrupts = <PIN_PA25 0>;
		intr-gpios = <&pioA PIN_PB0 0>;
		status = "okay";
	};
};