drivers: mmc: sdhci-of-dwcmshc: add RP1 dt ID and quirks
authorJonathan Bell <jonathan@raspberrypi.com>
Wed, 8 Nov 2023 16:12:59 +0000 (16:12 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:12 +0000 (11:35 +0000)
Differentiate the RP1 variant of the Designware MSHC controller(s).

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/mmc/host/sdhci-of-dwcmshc.c

index 944569d..e9a3b29 100644 (file)
@@ -386,6 +386,15 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_bf3_pdata = {
 };
 #endif
 
+static const struct sdhci_pltfm_data sdhci_dwcmshc_rp1_pdata = {
+       .ops = &sdhci_dwcmshc_ops,
+       .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
+                 SDHCI_QUIRK_BROKEN_CARD_DETECTION,
+       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+                  SDHCI_QUIRK2_BROKEN_HS200 |
+                  SDHCI_QUIRK2_SPURIOUS_INT_RESP,
+};
+
 static const struct sdhci_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {
        .ops = &sdhci_dwcmshc_rk35xx_ops,
        .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
@@ -454,6 +463,10 @@ static void dwcmshc_rk35xx_postinit(struct sdhci_host *host, struct dwcmshc_priv
 
 static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
        {
+               .compatible = "raspberrypi,rp1-dwcmshc",
+               .data = &sdhci_dwcmshc_rp1_pdata,
+       },
+       {
                .compatible = "rockchip,rk3588-dwcmshc",
                .data = &sdhci_dwcmshc_rk35xx_pdata,
        },