From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: David Lechner <dlechner@baylibre.com>,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, nuno.sa@analog.com,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/6] spi: Enable controllers to extend the SPI protocol with MOSI idle configuration
Date: Thu, 20 Jun 2024 12:14:57 -0300 [thread overview]
Message-ID: <ZnRHcXaCIVH4zDMo@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <0cf9576d-c50e-4730-834a-3a4ceac6a4f8@sirena.org.uk>
On 06/19, Mark Brown wrote:
> On Wed, Jun 19, 2024 at 03:58:00PM -0300, Marcelo Schmitt wrote:
> > On 06/19, David Lechner wrote:
> > > On 6/18/24 6:10 PM, Marcelo Schmitt wrote:
>
> > > > +In this extension to the usual SPI protocol, the MOSI line state is specified to
> > > > +be kept high when CS is active but the controller is not clocking out data to
>
> > > I think it would be less ambiguous to say "asserted" instead of "active".
ack, replaced "active" by "asserted" when describing CS state for v5.
>
> > I'm not sure. IMHO, it looks less ambiguous to say a CS is active.
> > I think the most common for CS lines is to have a CS that is active low (i.e.
> > the line is at a low voltage level when the controller is selecting the device).
> > To me, "assert" sounds closer to the idea o setting something (like a bit to 1),
> > which is the opposite of active low CS.
> > Though, no strong opinion about it.
> > I go with what the maintainers prefer.
>
> I think they're synonyms but asserted is the more common term for chip
> selects.
>
>
> > > > +#define SPI_CONTROLLER_MOSI_IDLE_LOW BIT(8) /* Can idle MOSI low */
> > > > +#define SPI_CONTROLLER_MOSI_IDLE_HIGH BIT(9) /* Can idle MOSI high */
>
> > > I don't see where these are used anywhere else in the series. They
> > > seem redundant with SPI_MOSI_IDLE_LOW and SPI_MOSI_IDLE_HIGH.
>
> > Good point.
> > They are currently not being used.
> > Comparing with what we have for SPI_CONTROLLER_MULTI_CS, I'm thinking it may be
> > handy to have dt properties to indicate controller MOSI idle capabilities.
> > Does that sound reasonable?
>
> We shouldn't need DT properties, we should just know if the controller
> supports this based on knowing what controller is, and I'd not expect it
> to depend on board wiring.
Okay, though, I fail to see the need for
#define SPI_CONTROLLER_MOSI_IDLE_LOW BIT(8) /* Can idle MOSI low */
#define SPI_CONTROLLER_MOSI_IDLE_HIGH BIT(9) /* Can idle MOSI high */
It looks like SPI_CONTROLLER bits are used to tweak controller operation in
various ways.
Right now, I'm not aware of any additional tweak needed to support the MOSI idle
feature. I have tested that on Raspberry Pi with bitbang/gpio controller and on
CoraZ7 with spi-engine and it did work fine in those setups.
Anyway, I'm prone to implement any additional changes to make this set better.
Thanks,
Marcelo
next prev parent reply other threads:[~2024-06-20 15:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 23:10 [PATCH v4 0/6] Add support for AD4000 series of ADCs Marcelo Schmitt
2024-06-18 23:10 ` [PATCH v4 1/6] spi: Enable controllers to extend the SPI protocol with MOSI idle configuration Marcelo Schmitt
2024-06-19 12:07 ` Mark Brown
2024-06-19 12:42 ` Marcelo Schmitt
2024-06-19 12:42 ` Mark Brown
2024-06-19 13:53 ` David Lechner
2024-06-19 18:58 ` Marcelo Schmitt
2024-06-19 20:36 ` David Lechner
2024-06-20 15:12 ` Marcelo Schmitt
2024-06-20 15:52 ` David Lechner
2024-06-20 18:21 ` Marcelo Schmitt
2024-06-20 18:55 ` David Lechner
2024-06-19 21:29 ` Mark Brown
2024-06-20 15:14 ` Marcelo Schmitt [this message]
2024-06-19 17:24 ` David Lechner
2024-06-20 14:29 ` Marcelo Schmitt
2024-06-18 23:11 ` [PATCH v4 2/6] spi: bitbang: Implement support for MOSI idle state configuration Marcelo Schmitt
2024-06-18 23:11 ` [PATCH v4 3/6] spi: spi-gpio: Add " Marcelo Schmitt
2024-06-18 23:11 ` [PATCH v4 4/6] spi: spi-axi-spi-engine: Add support for MOSI idle configuration Marcelo Schmitt
2024-06-19 13:56 ` David Lechner
2024-06-19 17:27 ` Marcelo Schmitt
2024-06-19 18:20 ` David Lechner
2024-06-18 23:12 ` [PATCH v4 5/6] dt-bindings: iio: adc: Add AD4000 Marcelo Schmitt
2024-06-19 13:13 ` David Lechner
2024-06-19 17:04 ` Marcelo Schmitt
2024-06-19 19:57 ` David Lechner
2024-06-18 23:12 ` [PATCH v4 6/6] iio: adc: Add support for AD4000 Marcelo Schmitt
2024-06-19 17:02 ` David Lechner
2024-06-20 20:08 ` Jonathan Cameron
2024-06-20 20:02 ` Jonathan Cameron
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=ZnRHcXaCIVH4zDMo@debian-BULLSEYE-live-builder-AMD64 \
--to=marcelo.schmitt1@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).