Skip to content

Use spi-gpio for L band LO #48

Description

@ThirteenFish

The LO (a Si4133) for the L band down conversion on the C3 is configured via SPI. On the C3 these SPI lines (LBAND_SO_SCLK, LBAND_SO_SDATA, LBAND_SO_nSEN) are hooked up to GPIO and then bitbanged in Python. This is a bit slow and clunky but it turns out the Linux kernel already knows how to do bitbanged SPI. Using the kernel driver means we can drop some of our code and would present the LO as a standard SPI device.

This is a project in two parts:

  • Configuring the C3 devicetree to use spi-gpio. Documentation is a bit sparse on exactly how to do this but there's plenty of examples in the device trees contained in the kernel source (search compatible = "spi-gpio";) and you can try to make sense of the driver itself (at drivers/spi/spi-gpio.c) This will expose a /dev/spidev* device which can then be used by userspace. One concern is how to ensure it doesn't conflict with existing SPI devices? Currently the radios are fixed at spidev0.0 and spidev1.1.
  • Replacing the oresat-c3-software bitbanged implementation with spidev.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions