* [PATCH v3 0/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp @ 2021-09-08 18:56 Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 1/2] " Oleksandr Suvorov 0 siblings, 1 reply; 6+ messages in thread From: Oleksandr Suvorov @ 2021-09-08 18:56 UTC (permalink / raw) To: u-boot Cc: Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Fabio Estevam, Haibo Chen, Jaehoon Chung, Peng Fan Import individual settings for soc imx7ulp and add support of HS400. Changes in v3: - added a cover letter. Changes in v2: - fixed Series-notes record. Jorge Ramirez-Ortiz (1): mmc: fsl_esdhc_imx: initialize data for imx7ulp Oleksandr Suvorov (1): mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP drivers/mmc/fsl_esdhc_imx.c | 15 ++++++++++++--- include/fsl_esdhc_imx.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp 2021-09-08 18:56 [PATCH v3 0/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp Oleksandr Suvorov @ 2021-09-08 18:56 ` Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Oleksandr Suvorov ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Oleksandr Suvorov @ 2021-09-08 18:56 UTC (permalink / raw) To: u-boot Cc: Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Fabio Estevam, Jaehoon Chung, Peng Fan From: Jorge Ramirez-Ortiz <jorge@foundries.io> Import data for eSDHC driver for SoC iMX7ULP from the Linux kernel. Set supported by u-boot flags only. Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> --- Changes in v3: - add a Reviewed-by record Changes in v2: - add a Reviewed-by record drivers/mmc/fsl_esdhc_imx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index aabf39535f..6c8f77f9ee 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1706,6 +1706,11 @@ static struct esdhc_soc_data usdhc_imx7d_data = { | ESDHC_FLAG_HS400, }; +static struct esdhc_soc_data usdhc_imx7ulp_data = { + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200, +}; + static struct esdhc_soc_data usdhc_imx8qm_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 | @@ -1720,7 +1725,7 @@ static const struct udevice_id fsl_esdhc_ids[] = { { .compatible = "fsl,imx6sl-usdhc", }, { .compatible = "fsl,imx6q-usdhc", }, { .compatible = "fsl,imx7d-usdhc", .data = (ulong)&usdhc_imx7d_data,}, - { .compatible = "fsl,imx7ulp-usdhc", }, + { .compatible = "fsl,imx7ulp-usdhc", .data = (ulong)&usdhc_imx7ulp_data,}, { .compatible = "fsl,imx8qm-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, { .compatible = "fsl,imx8mm-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, { .compatible = "fsl,imx8mn-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP 2021-09-08 18:56 ` [PATCH v3 1/2] " Oleksandr Suvorov @ 2021-09-08 18:56 ` Oleksandr Suvorov 2021-10-20 12:20 ` sbabic 2021-09-15 16:10 ` [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp Igor Opaniuk 2021-10-20 12:21 ` sbabic 2 siblings, 1 reply; 6+ messages in thread From: Oleksandr Suvorov @ 2021-09-08 18:56 UTC (permalink / raw) To: u-boot Cc: Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Fabio Estevam, Jaehoon Chung, Haibo Chen, Peng Fan Import HS400 support for iMX7ULP B0 from the Linux kernel: 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET before any setting of STROBE_DLL_CTRL register. USDHC has register bits(bit[27~20] of register STROBE_DLL_CTRL) for slave sel value. If this register bits value is 0, it needs 256 ref_clk cycles to update slave sel value. IC suggest to set bit[27~20] to 0x4, it only need 4 ref_clk cycle to update slave sel value. This will short the lock time of slave. i.MX7ULP B0 will need more time to lock the REF and SLV, so change to add 5us delay. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> --- Changes in v3: - added a cover letter. - removed an extra blank line. - added Reviewed-by records. Changes in v2: - fixed Series-notes record. - added Reviewed-by records. drivers/mmc/fsl_esdhc_imx.c | 10 +++++++--- include/fsl_esdhc_imx.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 6c8f77f9ee..9b991a6026 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -727,17 +727,20 @@ static void esdhc_set_strobe_dll(struct mmc *mmc) if (priv->clock > ESDHC_STROBE_DLL_CLK_FREQ) { esdhc_write32(®s->strobe_dllctrl, ESDHC_STROBE_DLL_CTRL_RESET); + /* clear the reset bit on strobe dll before any setting */ + esdhc_write32(®s->strobe_dllctrl, 0); /* * enable strobe dll ctrl and adjust the delay target * for the uSDHC loopback read clock */ val = ESDHC_STROBE_DLL_CTRL_ENABLE | + ESDHC_STROBE_DLL_CTRL_SLV_UPDATE_INT_DEFAULT | (priv->strobe_dll_delay_target << ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_SHIFT); esdhc_write32(®s->strobe_dllctrl, val); - /* wait 1us to make sure strobe dll status register stable */ - mdelay(1); + /* wait 5us to make sure strobe dll status register stable */ + mdelay(5); val = esdhc_read32(®s->strobe_dllstat); if (!(val & ESDHC_STROBE_DLL_STS_REF_LOCK)) pr_warn("HS400 strobe DLL status REF not lock!\n"); @@ -1708,7 +1711,8 @@ static struct esdhc_soc_data usdhc_imx7d_data = { static struct esdhc_soc_data usdhc_imx7ulp_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING - | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200, + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 + | ESDHC_FLAG_HS400, }; static struct esdhc_soc_data usdhc_imx8qm_data = { diff --git a/include/fsl_esdhc_imx.h b/include/fsl_esdhc_imx.h index 45ed635a77..12e9163382 100644 --- a/include/fsl_esdhc_imx.h +++ b/include/fsl_esdhc_imx.h @@ -194,6 +194,7 @@ #define ESDHC_STROBE_DLL_CTRL_RESET BIT(1) #define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT 0x7 #define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_SHIFT 3 +#define ESDHC_STROBE_DLL_CTRL_SLV_UPDATE_INT_DEFAULT (4 << 20) #define ESDHC_STROBE_DLL_STATUS 0x74 #define ESDHC_STROBE_DLL_STS_REF_LOCK BIT(1) -- 2.31.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP 2021-09-08 18:56 ` [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Oleksandr Suvorov @ 2021-10-20 12:20 ` sbabic 0 siblings, 0 replies; 6+ messages in thread From: sbabic @ 2021-10-20 12:20 UTC (permalink / raw) To: Oleksandr Suvorov, u-boot > Import HS400 support for iMX7ULP B0 from the Linux kernel: > 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") > According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET > before any setting of STROBE_DLL_CTRL register. > USDHC has register bits(bit[27~20] of register STROBE_DLL_CTRL) > for slave sel value. If this register bits value is 0, it needs > 256 ref_clk cycles to update slave sel value. IC suggest to set > bit[27~20] to 0x4, it only need 4 ref_clk cycle to update slave > sel value. This will short the lock time of slave. > i.MX7ULP B0 will need more time to lock the REF and SLV, so change > to add 5us delay. > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Reviewed-by: Fabio Estevam <festevam@gmail.com> > Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> > Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp 2021-09-08 18:56 ` [PATCH v3 1/2] " Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Oleksandr Suvorov @ 2021-09-15 16:10 ` Igor Opaniuk 2021-10-20 12:21 ` sbabic 2 siblings, 0 replies; 6+ messages in thread From: Igor Opaniuk @ 2021-09-15 16:10 UTC (permalink / raw) To: Oleksandr Suvorov Cc: U-Boot Mailing List, Ricardo Salveti, Jorge Ramirez-Ortiz, Fabio Estevam, Jaehoon Chung, Peng Fan Hi, On Wed, Sep 8, 2021 at 9:56 PM Oleksandr Suvorov <oleksandr.suvorov@foundries.io> wrote: > > From: Jorge Ramirez-Ortiz <jorge@foundries.io> > > Import data for eSDHC driver for SoC iMX7ULP from the Linux kernel. > Set supported by u-boot flags only. > > Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> > Signed-off-by: Ricardo Salveti <ricardo@foundries.io> > Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Reviewed-by: Fabio Estevam <festevam@gmail.com> > Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > > Changes in v3: > - add a Reviewed-by record > > Changes in v2: > - add a Reviewed-by record > > drivers/mmc/fsl_esdhc_imx.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c > index aabf39535f..6c8f77f9ee 100644 > --- a/drivers/mmc/fsl_esdhc_imx.c > +++ b/drivers/mmc/fsl_esdhc_imx.c > @@ -1706,6 +1706,11 @@ static struct esdhc_soc_data usdhc_imx7d_data = { > | ESDHC_FLAG_HS400, > }; > > +static struct esdhc_soc_data usdhc_imx7ulp_data = { > + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING > + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200, > +}; > + > static struct esdhc_soc_data usdhc_imx8qm_data = { > .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | > ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 | > @@ -1720,7 +1725,7 @@ static const struct udevice_id fsl_esdhc_ids[] = { > { .compatible = "fsl,imx6sl-usdhc", }, > { .compatible = "fsl,imx6q-usdhc", }, > { .compatible = "fsl,imx7d-usdhc", .data = (ulong)&usdhc_imx7d_data,}, > - { .compatible = "fsl,imx7ulp-usdhc", }, > + { .compatible = "fsl,imx7ulp-usdhc", .data = (ulong)&usdhc_imx7ulp_data,}, > { .compatible = "fsl,imx8qm-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, > { .compatible = "fsl,imx8mm-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, > { .compatible = "fsl,imx8mn-usdhc", .data = (ulong)&usdhc_imx8qm_data,}, > -- > 2.31.1 > Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> -- Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk Embedded Software Engineer T: +380 938364067 E: igor.opaniuk@foundries.io W: www.foundries.io ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp 2021-09-08 18:56 ` [PATCH v3 1/2] " Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Oleksandr Suvorov 2021-09-15 16:10 ` [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp Igor Opaniuk @ 2021-10-20 12:21 ` sbabic 2 siblings, 0 replies; 6+ messages in thread From: sbabic @ 2021-10-20 12:21 UTC (permalink / raw) To: Oleksandr Suvorov, u-boot > From: Jorge Ramirez-Ortiz <jorge@foundries.io> > Import data for eSDHC driver for SoC iMX7ULP from the Linux kernel. > Set supported by u-boot flags only. > Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> > Signed-off-by: Ricardo Salveti <ricardo@foundries.io> > Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Reviewed-by: Fabio Estevam <festevam@gmail.com> > Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> > Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de ===================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-20 12:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-08 18:56 [PATCH v3 0/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 1/2] " Oleksandr Suvorov 2021-09-08 18:56 ` [PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP Oleksandr Suvorov 2021-10-20 12:20 ` sbabic 2021-09-15 16:10 ` [PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp Igor Opaniuk 2021-10-20 12:21 ` sbabic
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.