U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
	Tom Rini <trini@konsulko.com>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Jonas Karlman <jonas@kwiboo.se>, Simon Glass <sjg@chromium.org>,
	Tim Harvey <tharvey@gateworks.com>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	u-boot@lists.denx.de, regis.ray@landisgyr.com,
	pascal.dupuis@landisgyr.com, Mathieu Othacehe <othacehe@gnu.org>
Subject: [PATCH 0/2] mmc: omap_hsmmc: Restore the init_stream sequence
Date: Thu, 10 Apr 2025 11:00:19 +0200	[thread overview]
Message-ID: <20250410090021.14446-1-othacehe@gnu.org> (raw)

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


             reply	other threads:[~2025-04-10  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  9:00 Mathieu Othacehe [this message]
2025-04-10  9:00 ` [PATCH 1/2] mmc: Add a new callback function to perform the 74 clocks cycle sequence Mathieu Othacehe
2025-04-10  9:00 ` [PATCH 2/2] mmc: omap_hsmmc: implement send_init_stream callback Mathieu Othacehe
2025-04-18  2:43 ` [PATCH 0/2] mmc: omap_hsmmc: Restore the init_stream sequence Peng Fan
2025-04-23 16:05 ` Peng Fan (OSS)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250410090021.14446-1-othacehe@gnu.org \
    --to=othacehe@gnu.org \
    --cc=jh80.chung@samsung.com \
    --cc=jjhiblot@ti.com \
    --cc=jonas@kwiboo.se \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=pascal.dupuis@landisgyr.com \
    --cc=peng.fan@nxp.com \
    --cc=regis.ray@landisgyr.com \
    --cc=sjg@chromium.org \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox