|
196 | 196 | */
|
197 | 197 | #define ESDHC_FLAG_BROKEN_AUTO_CMD23 BIT(16)
|
198 | 198 |
|
| 199 | +/* ERR004536 is not applicable for the IP */ |
| 200 | +#define ESDHC_FLAG_SKIP_ERR004536 BIT(17) |
| 201 | + |
199 | 202 | enum wp_types {
|
200 | 203 | ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
|
201 | 204 | ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
|
@@ -289,6 +292,13 @@ static const struct esdhc_soc_data usdhc_imx7d_data = {
|
289 | 292 | | ESDHC_FLAG_BROKEN_AUTO_CMD23,
|
290 | 293 | };
|
291 | 294 |
|
| 295 | +static struct esdhc_soc_data usdhc_s32g2_data = { |
| 296 | + .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING |
| 297 | + | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200 |
| 298 | + | ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES |
| 299 | + | ESDHC_FLAG_SKIP_ERR004536, |
| 300 | +}; |
| 301 | + |
292 | 302 | static struct esdhc_soc_data usdhc_imx7ulp_data = {
|
293 | 303 | .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
|
294 | 304 | | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
|
@@ -347,6 +357,7 @@ static const struct of_device_id imx_esdhc_dt_ids[] = {
|
347 | 357 | { .compatible = "fsl,imx7ulp-usdhc", .data = &usdhc_imx7ulp_data, },
|
348 | 358 | { .compatible = "fsl,imx8qxp-usdhc", .data = &usdhc_imx8qxp_data, },
|
349 | 359 | { .compatible = "fsl,imx8mm-usdhc", .data = &usdhc_imx8mm_data, },
|
| 360 | + { .compatible = "nxp,s32g2-usdhc", .data = &usdhc_s32g2_data, }, |
350 | 361 | { /* sentinel */ }
|
351 | 362 | };
|
352 | 363 | MODULE_DEVICE_TABLE(of, imx_esdhc_dt_ids);
|
@@ -1375,8 +1386,10 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
|
1375 | 1386 | * erratum ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL
|
1376 | 1387 | * TO1.1, it's harmless for MX6SL
|
1377 | 1388 | */
|
1378 |
| - writel(readl(host->ioaddr + 0x6c) & ~BIT(7), |
1379 |
| - host->ioaddr + 0x6c); |
| 1389 | + if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_ERR004536)) { |
| 1390 | + writel(readl(host->ioaddr + 0x6c) & ~BIT(7), |
| 1391 | + host->ioaddr + 0x6c); |
| 1392 | + } |
1380 | 1393 |
|
1381 | 1394 | /* disable DLL_CTRL delay line settings */
|
1382 | 1395 | writel(0x0, host->ioaddr + ESDHC_DLL_CTRL);
|
|
0 commit comments