All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] ARM: dts: imx8mm-beacon: add UHS and HS400/HS400ES properties
Date: Wed, 30 Dec 2020 10:29:46 -0600	[thread overview]
Message-ID: <CAHCN7xJVbzfMxuHbBJ64--pY3mUFMgxR0Fy5AvcnedYoQgRzNg@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5B=N3CS2nqKz5EPLrj50kcVO_cNdP-OTHeB=navcMXU1A@mail.gmail.com>

On Wed, Dec 30, 2020 at 9:24 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> On Wed, Dec 30, 2020 at 11:45 AM Adam Ford <aford173@gmail.com> wrote:
>
> > Linux doesn't appear to need it, and no 64-bit imx boards in Linux
> > appear to use them.  Some layerscape boards appear to use these flags.
> > If it's not necessary for Linux, but it is necessary for U-Boot, it
> > seems like the -u-boot.dtsi file is the right place to put it.
> > It's consistent with that was done for the imx8mm-evk-u-boot.dtsi and others [1]
>
> IMHO the device trees should be the same for Linux and U-Boot as much as we can.
>
> Of course, it is OK to add custom U-Boot properties, such as
> u-boot,dm-spl inside -u-boot.dtsi file, but adding MMC related
> properties only in U-Boot dtsi does not seem correct.
>
> It would be nice if someone could investigate what is missing in the
> U-Boot sdhc driver to handle these modes by default.

U-Boot has a structure to define the capabilities of the usdhc controller.

static struct esdhc_soc_data usdhc_imx8qm_data = {
  .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING |
  ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 |
  ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES,
};

This is referenced from a variety of compatible flags, including the imx8mm.

It looks like the code is missing the checks for all of them except
ESDHC_FLAG_USDHC and ESDHC_FLAG_STD_TUNING.
The flags get copied from data->flags to priv->flags, but we check the
flags and convert them to host capabilities.  I think these flags need
to somehow get checked and  then converted to cfg->host_caps.
It gets more complicated, because the flags would need to get cleared
if the pinmux doesn't have 100MHz and 200MHz options available to it.

By comparison, the Linux code appears to handle the various flags.

In the meantime, would you be opposed to this patch since other imx8m
kits have the equivalent patch already applied?  They could be removed
if/when the esdhc driver gets updated.

adam

  reply	other threads:[~2020-12-30 16:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 14:14 [PATCH 1/2] imx8mm_beacon: Enable fixed regulator in SPL Adam Ford
2020-12-30 14:14 ` [PATCH 2/2] ARM: dts: imx8mm-beacon: add UHS and HS400/HS400ES properties Adam Ford
2020-12-30 14:22   ` Fabio Estevam
2020-12-30 14:45     ` Adam Ford
2020-12-30 15:24       ` Fabio Estevam
2020-12-30 16:29         ` Adam Ford [this message]
2020-12-30 16:34           ` Fabio Estevam
2020-12-30 17:44             ` Adam Ford
2020-12-30 17:47               ` Fabio Estevam
2021-01-23 15:49 ` [PATCH 1/2] imx8mm_beacon: Enable fixed regulator in SPL sbabic at denx.de

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=CAHCN7xJVbzfMxuHbBJ64--pY3mUFMgxR0Fy5AvcnedYoQgRzNg@mail.gmail.com \
    --to=aford173@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.