From: Doug Anderson <firstname.lastname@example.org>
To: Stephen Boyd <email@example.com>
Cc: Alexandru M Stan <firstname.lastname@example.org>,
Mark Brown <email@example.com>,
Akash Asthana <firstname.lastname@example.org>,
Bjorn Andersson <email@example.com>,
Benson Leung <firstname.lastname@example.org>,
Enric Balletbo i Serra <email@example.com>
Subject: Re: [PATCH] spi: spi-geni-qcom: Use the new method of gpio CS control
Date: Thu, 3 Dec 2020 12:06:10 -0800 [thread overview]
Message-ID: <CAD=FV=WDYdfURHWf8qGOSwT+7Y5i=9FMgRn5hYZA-oTfR6KoFQ@mail.gmail.com> (raw)
On Wed, Dec 2, 2020 at 4:47 PM Stephen Boyd <firstname.lastname@example.org> wrote:
> Quoting Stephen Boyd (2020-12-02 15:28:45)
> > Quoting Alexandru M Stan (2020-12-02 14:18:20)
> > > Unfortunately this patch makes my cros-ec (the main EC that used to
> > > work even before my debugging) also fail to probe:
> > > [ 0.839533] cros-ec-spi spi6.0: EC failed to respond in time
> > > [ 1.040453] cros-ec-spi spi6.0: EC failed to respond in time
> > > [ 1.040852] cros-ec-spi spi6.0: Cannot identify the EC: error -110
> > > [ 1.040855] cros-ec-spi spi6.0: cannot register EC, fallback to spidev
> > > [ 1.040942] cros-ec-spi: probe of spi6.0 failed with error -110
> > >
> > > I wasn't closely looking at this part closely when I was using my
> > > other spi port with spidev, so this is why I haven't noticed it
> > > before.
> > > Doug suggests this might be a polarity issue. More scoping to be had.
> > >
> > Ah I see. It looks like the cs-gpios polarity is wrong for the DTS on
> > sc7180. That's a patch that Doug has sent in for the qcom tree, commit
> > 37dd4b777942 ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to use
> > GPIO for CS") and it is pending for the next release (v5.11). Doug says
> > he will send in a fix for the DTS side, but this patch is still "good"
> > as far as I can tell. It moves us to use gpio descriptors and also finds
> > bugs like this in the DTS file that we would have missed otherwise
> > because the legacy mode doesn't look at the polarity flags in DT.
> And that is wrong. With even more investigation and Doug's eagle eyes it
> seems that the cros-ec driver is overriding the spi::mode to clear out
> the SPI_CS_HIGH bit that the spi core sets in there when using the gpio
> descriptors. I'll send a patch for cros-ec-spi shortly.
So do we need any coordinating here, are we OK w/ trogdor devices
being broken for a short period of time?
I think the device tree changes switching to use GPIO for chip select
is already queued in linux-next. That means if we land this patch
before the fix to cros_ec  then we'll end up in a broken state.
Would we be able to do some quick landing to get the cros-ec fix into
v5.10 and then target the SPI patch for 5.11?
next prev parent reply other threads:[~2020-12-03 20:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 21:49 [PATCH] spi: spi-geni-qcom: Use the new method of gpio CS control Stephen Boyd
2020-12-02 22:18 ` Alexandru M Stan
2020-12-02 23:28 ` Stephen Boyd
2020-12-03 0:47 ` Stephen Boyd
2020-12-03 20:06 ` Doug Anderson [this message]
2020-12-04 0:10 ` Stephen Boyd
2020-12-04 9:13 ` Enric Balletbo i Serra
2020-12-04 17:00 ` Mark Brown
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).