PINE64
eMMC problem with Tow-Boot/u-boot on SPI - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112)
+--- Thread: eMMC problem with Tow-Boot/u-boot on SPI (/showthread.php?tid=17764)



eMMC problem with Tow-Boot/u-boot on SPI - repa - 12-29-2022

I have a 2022 (July?) Pinebook pro.

I installed the latest Tow-Boot on the SPI, that works, but won't boot the eMMC, SD card booting works, haven't tried NVME.

The current Tow-Boot is based on the 2021.10 u-boot, so I think the problems are common to both.

I also successfully re-built Tow-Boot myself, and was able to add a patch with some debugging statements.

The problem seems to start when Tow-Boot tries to read multiple blocks off the eMMC, and the eMMC returns timeout in response to the stop transmission command that is supposed to close off the read command, in u-boot file drivers/mmc/mmc.c / mmc_read_blocks:

My (patched) version
Code:
    if (blkcnt > 1) {
        cmd.cmdidx = MMC_CMD_STOP_TRANSMISSION;
        cmd.cmdarg = 0;
        cmd.resp_type = MMC_RSP_R1b;
        if (mmc_send_cmd_quirks(mmc, &cmd, NULL,
                    MMC_QUIRK_RETRY_STOP_CMD, 4)) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
            pr_err("mmc fail to send stop cmd\n");
#endif
            return 0;
        }
    }

After this, the emmc is unusable, also from an os successfully booted from the sd card (Debian 11).

If I avoid writing to the emmc with Tow-Boot/u-boot, the emmc is readable and writeable from a Linux booted from the SD card. Both Linux and u-boot seem to access the eMMC with the DW drivers.

Any ideas/suggestions appreciated.


RE: eMMC problem with Tow-Boot/u-boot on SPI - repa - 12-30-2022

Replying to my own message:

Some progress, I enabled debug messages in dw_mmc.c

That resulted in something unexpected;
- when interacting with the sd, the messages from dw_mmc.c show up
- when interacting with the mmc, they don't show up, apparently another driver is being used for the emmc, if the Linux selection is anything to go by, it must be sdhci


RE: eMMC problem with Tow-Boot/u-boot on SPI - tdc - 02-20-2023

I'm curious if you've made any progress with this. I'm seeing the same problem and it's really impacting the usefulness of the laptop for me.


RE: eMMC problem with Tow-Boot/u-boot on SPI - repa - 02-21-2023

No, still stuck on this, I am using an sd card in the meantime, and haven't had too much time to work on this.