[PATCH 0/2] mmc: omap_hsmmc: Restore the init_stream sequence
Mathieu Othacehe
othacehe at gnu.org
Thu Apr 10 11:00:19 CEST 2025
Hello,
Back in 2019, the init_stream sequence was disabled with db52e19ced because:
This is not required. The MMC core sends CMD0 right after the
initialization and it serves the same purpose.
That is wrong. It does not serve the same purpose at all. The init_stream
function role is to keep the CMD line high for 74 clock cycles which is
required by the SD specification[1]:
A device shall be ready to accept the first command within 1ms from detecting VDD min.
Device may use up to 74 clocks for preparation before receiving the first command.
It turns out that one of the devices I am speaking to is requiring those 74
clocks sequence before the send of the CMD0 as described in the specification.
It was then broken since 2019.
I guess that most of the other devices out there are able to cope with those
74 clocks sequence missing and can respond directly to CMD0, which is why that
went unnoticed with the omap_hsmmc driver users.
I am proposing to restore that sequence, which is also used on the Linux side.
Thanks,
Mathieu
[1]: https://academy.cba.mit.edu/classes/networking_communications/SD/SD.pdf
Jean-Jacques Hiblot (1):
mmc: Add a new callback function to perform the 74 clocks cycle
sequence
Mathieu Othacehe (1):
mmc: omap_hsmmc: implement send_init_stream callback
drivers/mmc/mmc-uclass.c | 13 +++++++++++++
drivers/mmc/mmc.c | 6 ++++++
drivers/mmc/omap_hsmmc.c | 13 +++++++++++--
include/mmc.h | 9 +++++++++
4 files changed, 39 insertions(+), 2 deletions(-)
--
2.47.1
More information about the U-Boot
mailing list