From: Trent Piepho <tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
To: "broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org"
<kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"fabio.estevam-3arQi8VN3Tc@public.gmane.org"
<fabio.estevam-3arQi8VN3Tc@public.gmane.org>
Subject: Re: [PATCH v2 1/4] spi: imx: GPIO based chip selects should not be required
Date: Fri, 3 Nov 2017 17:53:59 +0000 [thread overview]
Message-ID: <1509731639.5473.60.camel@impinj.com> (raw)
In-Reply-To: <20171102151439.6dpfud7a5vtc27dy-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2889 bytes --]
On Thu, 2017-11-02 at 15:14 +0000, Mark Brown wrote:
> On Tue, Oct 31, 2017 at 04:57:42PM +0000, Trent Piepho wrote:
> > On Tue, 2017-10-31 at 11:19 +0000, Mark Brown wrote:
> > > Do the native chip selects actually work usefully on this hardware?
> > > There used to be problems with it wanting to do things like bounce the
> > > chip select on every word which made it extremely difficult to use with
> > > Linux.
> > Still are annoying, but on the device we have connected to it, it ends
> > up working as desired.
> > I've not thoroughly investigated this hardware to find the details.
> > IIRC, the designware SPI on Altera SoCFPGA had the same issue, but it
> > was a flaw in the driver and I was able to fix it. I've come to expect
> > it, as every new SPI master I use doesn't work properly in some
> > different way.
>
> It's one of the reasons why I'm suspicous of making the GPIO optional,
> lots of chips use GPIO chipselects because a lot of the breakage is
> confined to chip select handling and I remember the i.MX as being
> especially far from useful.
Just to be clear, one doesn't need to use GPIOs with the driver as is.
But the bindings to do that are non-standard and these patches make the
driver follow the standard. (and don't break anyone).
It's unfortunate that this, and in my experience every, SPI master
doesn't always (or ever) generate the waveforms it should according to
the Linux API. But I don't think not following the specification for
the device tree bindings is a mitigation of this. If anything, it just
creates more problems.
As someone who has done bringup a more than a few devices, I know what
I want the hardware to do, and I know the proper bindings to do that.
But someone comes back and says they don't work and now I need to dig
into the driver source and figure out what its particular flavor of
non-standard behavior is. I don't think that helped me any. It didn't
tell what the hardware/driver's quirks are w.r.t. ability to follow the
Linux SPI API either.
This also happens after the hardware is designed and built, so it's a
little late to choose another pin.
If the goal is to document the hardware quirks, then shouldn't this be
done through documentation? A note or pointer in the kconfig,
something in the source, a better description in Documention/
somewhere, etc. That would have a better chance of being seen before
hardware is designed, and would explain the issue too, instead of just
appearing as another quirk in device tree bindings.
Also consider there is a lot of re-implemented code in each driver
relating to device tree parsing and also GPIO CS. Non-standard
behavior in a driver doesn't help any refactoring effort.N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±²¢Ø^nr¡ö¦zË\x1aëh¨èÚ&¢îý»\x05ËÛÔØï¦v¬Îf\x1dp)¹¹br ê+Ê+zf£¢·h§~Ûiÿûàz¹\x1e®w¥¢¸?¨èÚ&¢)ߢ^[f
next prev parent reply other threads:[~2017-11-03 17:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 1:08 [PATCH v2 0/4] Fix for imx-spi CS GPIOs Trent Piepho
[not found] ` <20171027010841.28624-1-tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-10-27 1:08 ` [PATCH v2 1/4] spi: imx: GPIO based chip selects should not be required Trent Piepho
[not found] ` <20171027010841.28624-2-tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-10-31 11:19 ` Mark Brown
[not found] ` <20171031111919.gocl7wwrhkwnxrya-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-10-31 16:57 ` Trent Piepho
[not found] ` <1509469061.5473.16.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-11-02 15:14 ` Mark Brown
[not found] ` <20171102151439.6dpfud7a5vtc27dy-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-11-03 17:53 ` Trent Piepho [this message]
[not found] ` <1509731639.5473.60.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-11-03 18:37 ` Mark Brown
[not found] ` <20171103183700.spnqbagr4q7fth4k-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-11-03 19:18 ` Trent Piepho
[not found] ` <1509736735.5473.87.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-11-03 19:36 ` Mark Brown
[not found] ` <20171103193649.jcoiy3raefikko2h-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-11-03 20:09 ` Trent Piepho
[not found] ` <1509739759.5473.93.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-11-03 20:11 ` Mark Brown
2017-11-06 7:32 ` Sascha Hauer
[not found] ` <20171106073246.efcz7r2vnymz3me7-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-11-06 19:20 ` Trent Piepho
2017-10-27 1:08 ` [PATCH v2 2/4] spi: imx: Fix failure path leak on GPIO request error Trent Piepho
2017-10-27 1:08 ` [PATCH v2 3/4] spi: imx: Don't require platform data chipselect array Trent Piepho
[not found] ` <20171027010841.28624-4-tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-10-27 11:14 ` Oleksij Rempel
2017-10-27 1:08 ` [PATCH v2 4/4] ARM: imx: Update spi_imx platform data to reflect current state Trent Piepho
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=1509731639.5473.60.camel@impinj.com \
--to=tpiepho-cgc2codaahdqt0dzr+alfa@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).