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:


    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?

  • 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?

  • Documentation for device tree files is in Documentation/devicetree/bindings/regulator/ in Linux source. You should also consult PneH64 schematic.

  • 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?

    Dear Roel,


    Could you apply below in your DTS file then convert it to DTB


    [email protected] {

    .......

    mmc-hs200-1_8v;

    mmc-hs400-1_8v;

    mmc-hs400-enhanced-strobe;

    }


    * Ready DTS and DTB in attachments.

  • 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 ().

  • roel Are you using actual Odroid emmc module or that from Pine64. If it is that from Pine64 (ncembsf9-16g) then mmc-hs200-1_8v; should be enough. Can you test that? If it has some other eMMC chip, can you please post markings here?

  • 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.

  • roel No need to read markings, I got info that I need from Odroid page. In your case mmc-hs400-1_8v; would be more correct.


    Can you make read speed test with hdparm? I forgot exact command but I know you should make non-buffered test, otherwise read speed will be much too high.

  • 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...

  • 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.

  • 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?