Odroid emmc error on PineH64

  • Jernej,

    I have a problem with odroid emmc on the pineH64. It gives this message during boot: sunxi-mmc 4022000.mmc: data error, sending stop command

    I see you fixed it for the Tanix T6 with this patch:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    But I don't find this patch in your LibreElec patches for Allwinner H6, only this one: LibreELEC.tv/13-Tanix-TX6.patch at master · LibreELEC/LibreELEC.tv · GitHub

    The LE patches are only patches for the dts of the Tanix TX6, does this mean if I apply these patches in the pineH64 dts, the board will boot from emmc? Probably it's a better fix that enables the HS DDR mode?

    • Official Post

    I see you fixed it for the Tanix T6 with this patch:

    This is not a fix but workaround. Consequently, it was later removed when I found a proper solution for Tanix TX6.

    The LE patches are only patches for the dts of the Tanix TX6, does this mean if I apply these patches in the pineH64 dts, the board will boot from emmc? Probably it's a better fix that enables the HS DDR mode?

    Yes, same approach should work for PineH64 too, just make sure that you properly specify regulators. This was main issue with Tanix TX6.

  • Can I find somewhere some documentation how to properly specify regulators? Is it related to the type of eemc or the size or the board?

  • genidy.m

    Thanks for the DTS patch. I was invetsigating the pind-H64 regulators, but it seems everything was already implemented in the dts. So the patch of Jernej for the Tanix-tx6 was not necesaary for the pine-h64.

    I implemented your patch in the sun50i-h6.dtsi; but for some reason I get a error message when I try to compile my dtb. It has nothing to do with the patch, probably there are some packages missing in my build environment. This evening I give it another try.

    Edit: Managed to build the dtb and it boots fine now. Thanks a lot for the patch!

    Edited 2 times, last by roel (July 13, 2020 at 6:34 PM).

  • jernej,

    it's orange odroid 64GB emmc for odroid_N2. I just checked the odroid N2 dtb and indeed mmc-hs200-1_8v; should be enough. I can't read what's on the chip, the kids took my magnifier and I don't find it. I will ask them tomorrow because they are already sleeping.

    • Official Post

    ha, on Tanix TX6 I get without mmc-hs400-1_8v

    Code
    /dev/mmcblk1:
     HDIO_DRIVE_CMD(identify) failed: Invalid argument
     Timing buffered disk reads: 244 MB in  3.01 seconds =  81.15 MB/sec

    and with mmc-hs400-1_8v

    Code
    /dev/mmcblk1:
     HDIO_DRIVE_CMD(identify) failed: Invalid argument
     Timing buffered disk reads: 132 MB in  3.01 seconds =  43.92 MB/sec

    so this for some reason halves access read speed...

    • Official Post

    I played a bit with various flags in DT but nothing helps to restore speed. I have a feeling that H6 mmc driver is not optimized but I have no idea about it. Since it works for you I won't spend much time on it for now. Anyway, PR for PineH64 eMMC support would be welcome. If you don't want to do it, I can take a shoot sometime in future.

    EDIT: So I did same speed on Android where I got ~130 MiB/s so definitely driver issue.

  • genidy.m

    Thanks for the DTS patch. I was invetsigating the pind-H64 regulators, but it seems everything was already implemented in the dts. So the patch of Jernej for the Tanix-tx6 was not necesaary for the pine-h64.

    I implemented your patch in the sun50i-h6.dtsi; but for some reason I get a error message when I try to compile my dtb. It has nothing to do with the patch, probably there are some packages missing in my build environment. This evening I give it another try.

    Edit: Managed to build the dtb and it boots fine now. Thanks a lot for the patch!

    roel

    You are welcome, i faced this issue before and found the solution in armbian forum for your board, worked for me too, for my box "mmc-hs200-1_8v" is enough as "sunvell Q+" had slow emmc, also extracted the DTB from original android OS and found that it use same entries for emmc.


    *posted here:

    How helpful will this be to getting LibreELEC on allwinner android boxes?