Raspberry Pi Compute Module

Martin Sperl martin at sperl.org
Sun Sep 6 07:52:27 PDT 2015

> On 04.09.2015, at 09:17, Martin Sperl <martin at sperl.org> wrote:
> So I have now instrumented (and almost destroyed) one CM so that I can get
> the signals to emmc into my logic-analyzer.
> (removing all the custom settings and switching to bus-width = 1)
> Sampling 3 lines at 500MHz I see the following sequence:
> CMD: 0xE9 @ 1MHz
> CMD: 0xD1 @ 1MHz
> CMD: 0xFE @ 1MHz (with some data getting transferred on D0)
> CMD: 0xFE @ 1MHz (with some data getting transferred on D0)
> then we got a clock switch to about 62.5MHz
> (measuring 16 clocks gives me 0.26us, so 61.5MHz)
> CMD: 0xFA @ 62.5MHz
> So it looks as if the clock is wrong - maybe we are using the wrong clock
> resulting in the wrong divider?
> The mmc-clock is set as 100MHz in the device-tree, which with a divider 
> of 4 would give 25MHz. But if we assume a divider of 4 and 62.5MHz this
> would give us a clock of 250MHz.
> Checking the foundation device-trees, they have also 250MHz configured for
> the mmc clock - even on a model 2...
> Switching the clock to 250MHz in the device-tree changes the behavior,
> and - with some errors due to my incompetent soldering - I can now detect
> the eMMC and mount the partitions on the compute module.
> I can now also confirm that the eMMC clock line shows now 25MHz!
> I have ordered a replacement, but it takes some time to get it delivered,
> so can please someone owning a Compute Module check that this fixes the
> issue?
> Note that I guess that because of this we are really overclocking the
> SD cards on the normal RPIs as well, which results in more errors than
> we see with the foundation kernels.
> Another note: u-boot (at least the version I am using) is leaving the
> eMMC clock running - I wonder if this is intended…

So for completeness I ran a test with an old rpi-model-b
(with the “normal SD cards, which exposes the Signals for easy access)
and found sampling SCK+CMD at 500MHz:
* foundation kernel:
  Linux raspberrypi 4.1.6+ #810 PREEMPT Tue Aug 18 15:19:58 BST 2015 armv6l GNU/Linux
  * initially: 0.400MHz
  * later:    41.667MHz with a SCK-waveform: 14ns high, 10ns low
* upstream:
  Linux raspberrypi 4.2.0-rc8+ #119 Sun Sep 6 09:46:04 UTC 2015 armv6l GNU/Linux
  * initially: 1.000MHz
  * later:    62.500MHz with a SCK-waveform: 12ns high, 4ns low
  * I also saw a few SD-card error messages during boot:
    mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x800b00
* upstream-patched to 250MHZ clock:
  Linux raspberrypi 4.2.0-rc8+ #119 Sun Sep 6 09:46:04 UTC 2015 armv6l GNU/Linux
  * initially: 0.400MHz
  * later:    25.000MHz with a SCK-waveform: 40ns high, 40ns low

So to me it really looks like a wrong configuration of the clock
and hence the patch updating the mmc clock to 250MHz seems reasonable.


P.s: note that the above measurements were taken with a SanDisk 8GB
Class 4 SD-Card.

More information about the linux-rpi-kernel mailing list