Re: Rock64 configuration fails to boot for main 22c4ab6cb015 but worked for main 06bd74e1e39c (Nov 21): e.MMC mishandled?

From: Mark Millard via freebsd-arm <freebsd-arm_at_freebsd.org>
Date: Fri, 10 Dec 2021 11:46:39 UTC

On 2021-Dec-10, at 02:35, Andriy Gapon <avg@FreeBSD.org> wrote:

> On 10/12/2021 11:51, Kornel Dulęba wrote:
> > On Thu, Dec 9, 2021 at 11:54 PM Mark Millard <marklmi@yahoo.com> wrote:
>>> Note the "tuned phase to 245" as part of that.
>> Yep, it looks like in Linux they're doing some custom tuning logic
>> specific to this controller.
>> FreeBSD only executes generic tuning code, which apparently is not enough.
> 
> 
> AFAICS, we do not have any support for setting clock phases at all.
> 

Interesting, if true: From what I've read MMC 4.5 added CMD21
(SEND_TUNING_BLOCK) for this tuning operation when it added HS200.
CMD21 is also used in MMC 5.0 for its HS400 addition, from what
I've read. As I understand it, tuning via CMD21 is expected to be
required for HS200 mode read operations (and HS400?) to be well
behaved: the clock vs. data directions of travel are opposite
(instead of synchronous) and the specific timing is not
mandated but must instead be measured/observed. HS200 does not
have a data strobe traveling in the direction of the data.
HS400 needs CMD21 use for synchronizing the command responses on
the CMD line to the CLK (a temporary use of HS200 mode to do the
tuning).

(There is also a Drive Strength setting involved for HS200
--and HS400 has possibly one more Drive Strength alternative by
count.)

In other words, if you are correct, then it seems that FreeBSD
simply does not support HS200 or HS400 (in a reliable manor,
anyway).

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)