Skip to content

issues with Samsung EVO card on Mar 7th firmware #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nullr0ute opened this issue Mar 16, 2018 · 11 comments
Closed

issues with Samsung EVO card on Mar 7th firmware #953

nullr0ute opened this issue Mar 16, 2018 · 11 comments

Comments

@nullr0ute
Copy link

In Fedora we've had a few reports of rainbow screens and not booting and it took a little to track down the issue. We usually see the rainbow colours with PSU problems.

The details took a little to work out but it seems with the March 7th (7fdcd00) and later firmwares when used on a Samsung EVO (not sure if there's a particular subset, or if it affects other cards) micro SD give us the rainbow output and doesn't boot further. Other cards such as Sandisk Ultra work fine.

@popcornmix
Copy link
Contributor

Can you confirm that March 7th firmware has this issue, and previous March 5th firmware does not have this problem?

@pcdubs
Copy link

pcdubs commented Mar 16, 2018

The March 5th firmware worked as expected.

Using serial console it hangs here:

U-Boot 2018.03-rc4 (Mar 08 2018 - 20:42:49 +0000)

DRAM: 998 MiB
RPI 3 Model B (0xa22082)
MMC: mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

@popcornmix
Copy link
Contributor

To help narrow down the issue can you confirm if this test firmware is good?
https://drive.google.com/uc?id=1pwZSRw4BuoWYixZHKuhE42lypraa-eG6&export=download

@nullr0ute
Copy link
Author

Correct, March 7th has the issue, March 5th does not.

@pelwell
Copy link
Contributor

pelwell commented Mar 16, 2018

A recent change set the EMMC clock to 200MHz in order to allow the SDIO interface to run at 50MHz (rather than 41.6MHz with a source clock of 250MHz - the EMMC divisor must be even), and I think this is the cause of the problem.

@agraf There's a bug in the bcm2835_sdhost port to U-boot, specifically this line:

host->max_clk = bcm2835_get_mmc_clock();

Although that looks reasonable, the SDHost interface actually shares the core/VPU clock, so you'll need another getter function (or a parameterised version if bcm2835_get_mmc_clock, or a generic bcm2835_get_clock that takes a clock number, etc.) that queries the core clock instead.

@pcdubs
Copy link

pcdubs commented Mar 16, 2018

@popcornmix
Copy link
Contributor

Okay, that confirms your problem is related to the EMMC clock change (that was the only part reverted), but I think the fix for this will have to come from uboot.

@pelwell
Copy link
Contributor

pelwell commented Mar 16, 2018

Is it also worth trying this afternoon's regular firmware release, just to be sure it wasn't related to the CLOCK_GET_RATE issue?

@jonathangray
Copy link

This also occurs with a lexar uSD card with rpi3 here. Any version of start.elf after aa75533 hangs at 'Loading Environment from FAT...' when using U-Boot. This includes
25cf637 which mentioned the CLOCK_GET_RATE change in the commit message.

U-Boot> mmc info
Device: mmc@7e202000
Manufacturer ID: 28
OEM: 4245
Name:
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

@jonathangray
Copy link

Changing U-Boot to fetch the frequency for SDhost using the core clock id as suggested by @pelwell allows me to use U-Boot with the 25cf637 firmware.

https://patchwork.ozlabs.org/patch/887255/

jens-maus added a commit to jens-maus/RaspberryMatic that referenced this issue Mar 21, 2018
agraf pushed a commit to agraf/u-boot that referenced this issue Apr 5, 2018
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.

According to Phil Elwell in
raspberrypi/firmware#953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.

Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:

U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

Signed-off-by: Jonathan Gray <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
agraf pushed a commit to agraf/u-boot that referenced this issue Apr 5, 2018
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.

According to Phil Elwell in
raspberrypi/firmware#953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.

Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:

U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

Signed-off-by: Jonathan Gray <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
agraf pushed a commit to agraf/u-boot that referenced this issue Apr 5, 2018
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.

According to Phil Elwell in
raspberrypi/firmware#953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.

Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:

U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

Signed-off-by: Jonathan Gray <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
ggardet pushed a commit to openSUSE/u-boot that referenced this issue Apr 9, 2018
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.

According to Phil Elwell in
raspberrypi/firmware#953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.

Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:

U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

Signed-off-by: Jonathan Gray <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
ggardet pushed a commit to openSUSE/u-boot that referenced this issue Apr 9, 2018
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.

According to Phil Elwell in
raspberrypi/firmware#953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.

Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:

U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...

Signed-off-by: Jonathan Gray <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
@jonathangray
Copy link

U-Boot 2018.05 includes the patch (8ae1f8298820a19380bafc07ad554bd629cc27be). This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants