lowRISC / lowRISC/opentitan

[spi_host] Request software/firmware controller chip select

Open
#23,260 9 comments 0 reactions 1 assignee Claimed by @moidx View on GitHub
IP:spi_host Triage Priority
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

The chip select pin for the current spi host implementation does not support an easy way to independently assert or deassert the chip select pin in firmware. Right now, the spi host controls the chips select pin in hardware relative to transaction it is sending out.

It is common for the hardware interface layer for a spi host to expose controlling chip select behavior independently of transactions being sent. Here is an example from [pigweed][0] and another example from [linux][1]. Our own hil also assumes that chip select can be controlled independently. We may have a few workarounds, but we haven't fully confirmed their viability yet.

It would be beneficial if firmware could control the chip select output via register access, e.g. one bit for (hardware vs software control) and another bit for (software override high vs software override low).

@moidx @kupiakos @cfrantz fyi

[0]:https://pigweed.dev/pw_spi/#classpw_1_1spi_1_1_chip_selector_1acf6666d439572734c30f918554dba59a
[1]:https://docs.kernel.org/driver-api/spi.html#c.spi_controller

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.