Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510932

Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps and sdhci-caps-mask

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps and sdhci-caps-mask
Date 2016-10-28 10:20 +0200
Message-ID <sxayl-5Mi-5@gated-at.bofh.it> (permalink)
References <swg37-1zz-13@gated-at.bofh.it> <swg37-1zz-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 25 October 2016 at 21:58, Zach Brown <zach.brown@ni.com> wrote:
> On some systems the sdhci capabilty registers are incorrect for one
> reason or another.
>
> The sdhci-caps-mask property specifies which bits in the registers
> are incorrect and should be turned off before using sdhci-caps to turn
> on bits.
>
> The sdhci-caps property specifies which bits should be turned on.
>
> Signed-off-by: Zach Brown <zach.brown@ni.com>
> ---
>  Documentation/devicetree/bindings/mmc/mmc.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
> index 8a37782..1415aa0 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt

The bindings in this document are common mmc DT bindings, not bindings
specific to a mmc controller.

So unless these bindings are applicable for another controller than
sdhci, I suggest we create a new file to document these.
How about Documentation/devicetree/bindings/mmc/sdhci.txt?

> @@ -52,6 +52,13 @@ 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
> +- sdhci-caps-mask: The sdhci capabilities registers are incorrect. This 64bit

/s/registers/register

This applies to some more places below as well.

> +  property corresponds to the bits in the sdhci capabilty registers. If the bit
> +  is on in the mask then the bit is incorrect in the registers and should be
> +  turned off.
> +- sdhci-caps: The sdhci capabilities registers are incorrect. This 64bit
> +  property corresponds to the bits in the sdhci capability registers. If the
> +  bit is on in the property then the bit should be on in the reigsters.

/s/reigsters/register

>
>  *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line
>  polarity properties, we have to fix the meaning of the "normal" and "inverted"
> --
> 2.7.4
>

Overall, I like this idea as it gives us good flexibility. Thus it
should avoid us to having to add any further new similar "sdhci broken
cap" DT binding. We could also decide to start deprecate some of the
existing sdhci bindings, if we think that makes sense.

The downside is that we get a "magic" hex value in the dts. Although,
people could address this issue by providing some comments about what
the bits it means in the dts files themselves.

Let's see what Rob thinks about this.

Kind regards
Uffe

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps  and sdhci-caps-mask Ulf Hansson <ulf.hansson@linaro.org> - 2016-10-28 10:20 +0200
  Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps  and sdhci-caps-mask Jaehoon Chung <jh80.chung@samsung.com> - 2016-10-31 13:00 +0100
    Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps  and sdhci-caps-mask Adrian Hunter <adrian.hunter@intel.com> - 2016-10-31 13:40 +0100
      Re: [RFC 1/2] mmc: sdhci: dt: Add device tree properties sdhci-caps  and sdhci-caps-mask Jaehoon Chung <jh80.chung@samsung.com> - 2016-10-31 23:20 +0100

csiph-web