ramips: mtk-mmc: use "cd-inverted" to set CD line polarity

"cd-inverted" is an upstream documented property used to indicate
the CD line is actived high. We will introduce a new upstream SDHC
driver, and this change will make them compatible with each other.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This commit is contained in:
Shiji Yang 2024-07-10 00:16:36 +08:00 committed by Nick Hainke
parent c640f7b937
commit a22bdf7c09
8 changed files with 5 additions and 8 deletions

View File

@ -171,5 +171,5 @@
&sdhci {
status = "okay";
mediatek,cd-high;
cd-inverted;
};

View File

@ -132,7 +132,6 @@
&sdhci {
status = "okay";
mediatek,cd-low;
};
&wmac {

View File

@ -167,7 +167,7 @@
&sdhci {
status = "okay";
mediatek,cd-high;
cd-inverted;
};
&wmac {

View File

@ -151,5 +151,5 @@
&sdhci {
status = "okay";
mediatek,cd-high;
cd-inverted;
};

View File

@ -172,7 +172,6 @@
&sdhci {
status = "okay";
mediatek,cd-low;
};
&wmac {

View File

@ -175,7 +175,6 @@
&sdhci {
status = "okay";
mediatek,cd-low;
};
&wmac {

View File

@ -168,7 +168,7 @@
&sdhci {
status = "okay";
mediatek,cd-high;
cd-inverted;
};
&wmac {

View File

@ -2245,7 +2245,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
//TODO: read this as bus-width from dt (via mmc_of_parse)
mmc->caps |= MMC_CAP_4_BIT_DATA;
cd_active_low = !of_property_read_bool(pdev->dev.of_node, "mediatek,cd-high");
cd_active_low = !of_property_read_bool(pdev->dev.of_node, "cd-inverted");
if (of_property_read_bool(pdev->dev.of_node, "mediatek,cd-poll"))
mmc->caps |= MMC_CAP_NEEDS_POLL;