devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zach Brown <zach.brown@ni.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 1/2] sdhci: Add device tree property sd-broken-highspeed
Date: Mon, 17 Oct 2016 16:49:05 -0500	[thread overview]
Message-ID: <20161017214904.GA3445@zach-desktop> (raw)
In-Reply-To: <CAPDyKFqw7mcvW=HTnZ9AoDFEk4TTBsecphaYxMGrEneDoKOevw@mail.gmail.com>

On Thu, Oct 06, 2016 at 10:03:56AM +0200, Ulf Hansson wrote:
> On 5 October 2016 at 22:03, Rob Herring <robh+dt@kernel.org> wrote:
> > On Wed, Oct 5, 2016 at 1:33 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >> On 23 September 2016 at 22:01, Zach Brown <zach.brown@ni.com> wrote:
> >>> Certain board configurations can make highspeed malfunction due to
> >>> timing issues. In these cases a way is needed to force the controller
> >>> and card into standard speed even if they otherwise appear to be capable
> >>> of highspeed.
> >>>
> >>> The sd-broken-highspeed property will let the sdhci driver know that
> >>> highspeed will not work.
> >>>
> >>> Signed-off-by: Zach Brown <zach.brown@ni.com>
> >>> ---
> >>>  Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++
> >>>  1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
> >>> index 8a37782..59332ea 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> >>> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
> >>> @@ -52,6 +52,8 @@ Optional properties:
> >>>  - no-sdio: controller is limited to send sdio cmd during initialization
> >>>  - no-sd: controller is limited to send sd cmd during initialization
> >>>  - no-mmc: controller is limited to send mmc cmd during initialization
> >>> +- sd-broken-highspeed: Highspeed is broken, even if the controller and card
> >>> +  themselves claim they support highspeed.
> >>
> >> Regarding a broken card, that is managed via the card quirks and not in DT.
> >>
> >> If this is about a controller limitation, we already have the option
> >> to describe what it supports, so we don't need an option to tell what
> >> it *not* supports.
> >>
> >> For example "cap-sd-highspeed" tells whether the controller supports
> >> SD high-speed, please use that instead.
> >
> > If a controller has a capability register and it lies (perhaps the
> > board has limitations that the SoC does not), then you may need to
> > disable a feature.
>
> I understand, although the SDHCI capabilities register is broken for
> most SDHCI variants. In principle, we would more or less have to add a
> *-broken binding for each bit in that register. I don't like that!
>
> Maybe a better option is to add a "sdhci-cap-broken" or perhaps
> "sdhci-cap-speed-modes-broken", which tells the driver to not rely on
> the capabilities register and instead find out what *is* supported by
> looking at the other mmc generic DT bindings.
>
> What do you think of that?
>
> Kind regards
> Uffe

"sdhci-cap-broken" seems too aggressive. There might only be one capability
that the register incorrectly advertises.

"sdhci-cap-speed-modes-broken" makes more sense and I will re-create this patch
set using that idea.

  reply	other threads:[~2016-10-17 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23 20:01 [RFC 0/2] Add device tree property and quirk for supporting sdhci Zach Brown
2016-09-23 20:01 ` [RFC 1/2] sdhci: Add device tree property sd-broken-highspeed Zach Brown
     [not found]   ` <1474660869-15532-2-git-send-email-zach.brown-acOepvfBmUk@public.gmane.org>
2016-10-03 17:37     ` Rob Herring
2016-10-05 18:33   ` Ulf Hansson
2016-10-05 20:03     ` Rob Herring
     [not found]       ` <CAL_JsqLjtn2-FaO_h9JWOsZqttQ35yV6KOnQz2Z-cMr=0GHJCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-05 21:22         ` Julia Cartwright
2016-10-06  1:34           ` Shawn Lin
     [not found]             ` <5972c8f4-23b5-7dbb-b87c-7be7ec5b1a17-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-06  6:13               ` Adrian Hunter
2016-10-07 18:56                 ` Zach Brown
2016-10-06  8:03         ` Ulf Hansson
2016-10-17 21:49           ` Zach Brown [this message]
2016-09-23 20:01 ` [RFC 2/2] sdhci: Prevent SD from doing highspeed timing when sd-broken-highspeed property is set Zach Brown
     [not found]   ` <1474660869-15532-3-git-send-email-zach.brown-acOepvfBmUk@public.gmane.org>
2016-10-06  6:39     ` Adrian Hunter

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=20161017214904.GA3445@zach-desktop \
    --to=zach.brown@ni.com \
    --cc=adrian.hunter@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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).