Commit a52b67bd authored by Ciprian Costea's avatar Ciprian Costea Committed by Ulf Hansson

mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms

In case of S32G based platforms, GPIO CD used for card detect
wake mechanism is not available.

For this scenario the newly introduced flag
'ESDHC_FLAG_SKIP_CD_WAKE' is used.
Signed-off-by: default avatarCiprian Costea <ciprianmarian.costea@oss.nxp.com>
Reviewed-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240708121018.246476-2-ciprianmarian.costea@oss.nxp.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent cb1f1c7d
...@@ -201,6 +201,9 @@ ...@@ -201,6 +201,9 @@
/* ERR004536 is not applicable for the IP */ /* ERR004536 is not applicable for the IP */
#define ESDHC_FLAG_SKIP_ERR004536 BIT(17) #define ESDHC_FLAG_SKIP_ERR004536 BIT(17)
/* The IP does not have GPIO CD wake capabilities */
#define ESDHC_FLAG_SKIP_CD_WAKE BIT(18)
enum wp_types { enum wp_types {
ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
...@@ -298,7 +301,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = { ...@@ -298,7 +301,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = {
.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES | ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
| ESDHC_FLAG_SKIP_ERR004536, | ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
}; };
static struct esdhc_soc_data usdhc_imx7ulp_data = { static struct esdhc_soc_data usdhc_imx7ulp_data = {
...@@ -1726,6 +1729,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) ...@@ -1726,6 +1729,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR; host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
/* GPIO CD can be set as a wakeup source */ /* GPIO CD can be set as a wakeup source */
if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_CD_WAKE))
host->mmc->caps |= MMC_CAP_CD_WAKE; host->mmc->caps |= MMC_CAP_CD_WAKE;
if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200)) if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment