[PATCH 2/2] ARM: dts: imx8mm-beacon: add UHS and HS400/HS400ES properties
Adam Ford
aford173 at gmail.com
Wed Dec 30 17:29:46 CET 2020
On Wed, Dec 30, 2020 at 9:24 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> On Wed, Dec 30, 2020 at 11:45 AM Adam Ford <aford173 at 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
More information about the U-Boot
mailing list