linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sdhci_msm issues with cold-plugged SD cards
@ 2020-05-22 15:51 Iskren Chernev
  2020-05-25  9:14 ` Ulf Hansson
  0 siblings, 1 reply; 4+ messages in thread
From: Iskren Chernev @ 2020-05-22 15:51 UTC (permalink / raw)
  To: kernelnewbies; +Cc: linux-mmc


Hello,

I'm trying to add SD Card support to a smartphone (Samsung Galaxy S5). After
configuring the sdhci-msm driver through DT, it all seems to work fine except
the case when the phone boots with the SD card inserted. If the card is
re-inserted, or the driver is polling, or the probe code is forcefully executed
a second time the card is properly detected.

I logged the SD interrupts, commands and responses, and it looks like the
hardware is returning Command Index Error and/or Command End Bit Error via the
Error Interrupt Status Register, which gets converted to -EILSEQ error. On
a second attempt (due to re-insertion, polling or re-execution) these errors
are missing, and the card behaves correctly.

On the downstream kernel, these errors resulting in EILSEQ do not appear, so it
might be related to setup. Also I see that sdhci-msm driver has hardcoded
a SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk, which might imply that polling
should be used (instead Card Detection GPIO), in which case this issue won't
manifest itself. But polling wastes power, and the Card Detect pin works well,
at least for this device, so I feel it can be made better.

Any suggestions on how to track this down are appreciated!

Regards,
Iskren Chernev


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-27 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 15:51 sdhci_msm issues with cold-plugged SD cards Iskren Chernev
2020-05-25  9:14 ` Ulf Hansson
2020-05-26 13:01   ` Veerabhadrarao Badiganti
2020-05-27 14:55     ` Iskren Chernev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).