From: Mark Brown <broonie@kernel.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Marc Kleine-Budde <mkl@pengutronix.de>,
Kevin Groeneveld <kgroeneveld@lenbrook.com>
Subject: Re: [PATCH 0/3] spi: spi-imx: fix use of more than four chip selects
Date: Wed, 26 Apr 2023 14:10:57 +0100 [thread overview]
Message-ID: <38eef5df-ca8d-41f1-93e7-e13c1d7b6232@sirena.org.uk> (raw)
In-Reply-To: <9f403dd7-1ac8-bebe-1b24-bede61087bba@rasmusvillemoes.dk>
[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]
On Wed, Apr 26, 2023 at 02:47:44PM +0200, Rasmus Villemoes wrote:
> On 26/04/2023 14.25, Mark Brown wrote:
> > I'm not sure this is sensible, it'll be a fairly rare situation and we
> > don't want to preclude using the built in chip select functionality for
> > some of the chip selects. In a situation like this we only need to have
> > a single chip select to be managed as a GPIO rather than all of them,
> > which I'd expect to end up handled in the DT by not allocating that chip
> > select number.
> Sorry, I don't understand what you're saying. What exactly is not
> sensible? And what is "a situation like this"?
Building hardware which uses all the native chip selects and also GPIO
ones and then describing it in DT as using native chip selects.
> I described a problem with what is now 87c614175bbf in linux-next: If
> one has five spi devices, the first four of which use the four native
> chip selects, there is no way to use a gpio for the fifth, because
> whichever "channel" you choose in the CHANNEL_SELECT field will cause
> the ecspi IP block to drive some SSx pin low, while the spi core is also
> driving the gpio low, so two different devices would be selected.
Sure, and therefore I'd not expect anyone to actually describe the
hardware like that but to instead describe the hardware as using three
or fewer of the native chip selects with the remaining chip selects
described as GPIOs. If the device requires that a native chip select be
controlled the hardware simply won't work without at least one native
chip select being unallocated.
> It's not exactly a regression, because any chip_select >= 4 never
> actually worked, but what I'm saying is that 87c614175bbf also isn't a
> complete fix if one wants to support mixing native and gpio chip
> selects. For that, one really needs the unused_native_cs to be used for
> all gpio chip selects; in particular, one needs some unused native cs to
> exist. IOW, what my series tries to do.
No, we only need one unused chip select to be available.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-04-26 13:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 13:45 Rasmus Villemoes
2023-04-25 13:45 ` [PATCH 1/3] spi: spi-imx: use "controller" variable consistently in spi_imx_probe() Rasmus Villemoes
2023-04-25 13:45 ` [PATCH 2/3] spi: spi-imx: set max_native_cs for imx51/imx53/imx6 variants Rasmus Villemoes
2023-04-25 13:45 ` [PATCH 3/3] spi: spi-imx: fix use of more than four chipselects Rasmus Villemoes
2023-05-16 12:07 ` Mahapatra, Amit Kumar
2023-04-26 7:19 ` [PATCH 0/3] spi: spi-imx: fix use of more than four chip selects Rasmus Villemoes
2023-04-26 12:25 ` Mark Brown
2023-04-26 12:47 ` Rasmus Villemoes
2023-04-26 13:10 ` Mark Brown [this message]
2023-04-26 13:23 ` Rasmus Villemoes
2023-05-16 11:43 ` Rasmus Villemoes
2023-05-16 15:22 ` Mark Brown
2023-05-23 21:22 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38eef5df-ca8d-41f1-93e7-e13c1d7b6232@sirena.org.uk \
--to=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kgroeneveld@lenbrook.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mkl@pengutronix.de \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®