1. Home
  2. Docs
  3. How to use device tree overlays
  4. Enabling I2C, SPI, UART, ADC, and PWM
  5. Enabling SPI on MISO, MOSI, and SCK pins

Enabling SPI on MISO, MOSI, and SCK pins

Enabling SPI can very a little depending on what you would like to achieve. For most cases enabling SPI with no CS pin set in the overlay will allow you to use it in CircuitPython. In that case you just want to enable SPI in the uEnv.txt using GB-SPI0-SPIDEV-NO-CS.dtbo. In the Adafruit CircuitPython examples some of the pins, like the CS(chip select), will need to be changed depending on the device you’re using.

Make sure to uncomment the line enable_uboot_overlays=1 this allows overlays to load on boot:

# enable u-boot overlays
enable_uboot_overlays=1

There are a few different options for using SPI Dev in Linux. You can enable the same GB-SPI0-SPIDEV-NO-CS.dtbo if you plan to toggle the CS pin using another method or if you want SPI Dev to have a CS pin, you can use GB-SPI0-SPIDEV-CS-PWML1.dtbo.