lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support
Hi Maxim,

On Thu, Dec 03, 2020 at 08:12:19PM +0300, Максим Киселёв wrote:
> From: Maxim Kiselev <bigunclemax@gmail.com>
> Date: Thu, 3 Dec 2020 18:56:12 +0300
> Subject: [PATCH] spi: spi-fsl-dspi: Add GPIO chip select support
>
> This patch allows use of GPIO for the chip select.
> Because dSPI controller can't send transactions without hardware chip
> selects, so first unused native CS will be set in SPI_PUSHR_CMD_PCS

Are you sure?

From the reference manual:

SPIx_PUSHR bits 10–15 PCS:
Select which PCS signals are to be asserted for the transfer. Refer to
the chip-specific SPI information for the number of PCS signals used in
this chip.
0 Negate the PCS[x] signal.
1 Assert the PCS[x] signal.

And the definition is:

#define SPI_PUSHR_CMD_PCS(x) (BIT(x) & GENMASK(5, 0))

Notice the BIT(x).

I expect that you can set the PCS to 0 and no hard chip select will
assert.

\
 
 \ /
  Last update: 2020-12-03 18:52    [W:0.209 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site