USB: ice40-hcd: Simplify the bridge chip SPI mode selection
The bridge chip samples the chip select line during power up
and enters slave mode if it is driven low. The chip select is
part of the SPI protocol and accessing it from a protocol
driver is not a good design.
The SPI controller puts the chip select line in in-active
state when the slave is idle. Call spi_setup() with inverted
active chip select setting before powering up the bridge. The
SPI controller drives the chip select low now. Call spi_setup()
with correct active chip select settings after the power up
sequence and before starting the data transfers. This approach
allows to meet our bridge requirement without accessing chip
select line directly.
CRs-Fixed: 650148
Change-Id: Ib3ea056fc12b7f78ea4646b9cca9625ea30fa0dd
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment