emmc issue

Started by tbultel, March 01, 2020, 11:11:21 PM

Previous topic - Next topic

tbultel

With my A64, I am facing this issue when performing write operations to the
mmcblk2p1 partition:

[  342.101294] sunxi-mmc 1c11000.mmc: data error, sending stop command
[  343.099726] sunxi-mmc 1c11000.mmc: send stop command failed

Looking on the web, this seems to be a known issue with the A20, but
apparently A64 is affected as well.
That makes my 16G mmc unusable.

JohnS

A software issue - yes?

The hardware "just works" - also yes?

John

tbultel

The history of such a message on the other existing boards deal with a hardware issue, related to a capacitor.
When this happens, the console is frozen (CTRL-C does not work), and the mmc cannot
be accessed any longer

LubOlimex

#3
Try to disable HS200 mode of operation for the eMMC. This might be done via overlay I think. Try to remove the following line from the dtb:

mmc-hs200-1_8v;

Edit: Without testing (paths need checking), it can be done with something like

dtc -I dtb -O dts -o 1.tmp /boot/dtb/sun50i-a64-olinuxino-emmc.dtb
sed -i '/mmc-hs200/d' 1.tmp
dtc -I dts -O dtb -o /boot/dtb/sun50i-a64-olinuxino-emmc.dtb 1.tmp
Technical support and documentation manager at Olimex

JohnS

Quote from: tbultel on March 02, 2020, 10:03:42 AMThe history of such a message on the other existing boards deal with a hardware issue, related to a capacitor.
When this happens, the console is frozen (CTRL-C does not work), and the mmc cannot
be accessed any longer
You may need to post URLs as the ones I found were all software issues.

John

tbultel

Quote from: LubOlimex on March 02, 2020, 11:11:41 AMTry to disable HS200 mode of operation for the eMMC. This might be done via overlay I think. Try to remove the following line from the dtb:

mmc-hs200-1_8v;

Edit: Without testing (paths need checking), it can be done with something like

dtc -I dtb -O dts -o 1.tmp /boot/dtb/sun50i-a64-olinuxino-emmc.dtb
sed -i '/mmc-hs200/d' 1.tmp
dtc -I dts -O dtb -o /boot/dtb/sun50i-a64-olinuxino-emmc.dtb 1.tmp

Thanks, this seems to work, in my case I had to modify sun50i-a64-olinuxino-1Ge16GW.dtb

But that workaround has an impact on performances, right ?

LubOlimex

Yes, the data access rate to the eMMC would be slower but not much can be done until the HS200 driver gets improved.
Technical support and documentation manager at Olimex

LubOlimex

What image are you using OP? How do you test the eMMC write?

My tests with A64-OLinuXino-1Ge16GW don't show any problems with the eMMC. I use this image: ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/1.latest_images/bionic/images/Armbian_5.92.1_Olinuxino-a64_Ubuntu_bionic_next_5.2.5_desktop.7z

I ran nand-sata-install script on multiple boards but no such problem appeared. Can you try the same image and script as me?
Technical support and documentation manager at Olimex

tbultel

Hi,
I am using exactly the same version as yours.
The nand-sata-script hangs after 10% complete and the kernel log shows the same error
message as in my test.

My eMMC write was simply done as such:

mkfs.ext4 /dev/mmcblk2p1
mount /dev/mmcblk2p1 /mnt

and then copy a big file to /mnt

Best regards

LubOlimex

There is a problem in the configuration for the 16GB version of the A64 board, the eMMC is set to a high speed mode that causes the instabilities. The fix is to set the eMMC to DDR52 mode (as opposed to HS-200). Do the following

1. Power up the board

2. Log in with root account or use sudo

3. Decompile the .dtb: /boot/dtb/allwinner/sun50i-a64-olinuxino-1Ge16GW.dtb

dtc -I dtb -O dts /boot/dtb/allwinner/sun50i-a64-olinuxino-1Ge16GW.dtb -o 1.dts
4. Now you have created 1.dts file in your current directory

5. Open the file with nano text editor:

nano ./1.dts
6. Go down to the block containing:

mmc@1c11000{


}

HINT: You can press Ctrl+W (search) and type "mmc@1c11000"

7. Go to the line containing:

mmc-hs200-1_8v;
and replace it with:

mmc-ddr-1_8v;
8. Press Ctrl+A Ctrl+Q to exit nano and then press Y to save the changes you made

9. Compile the updated dts file:

dtc -I dts -O dtb ./1.dts -o /boot/dtb/allwinner/sun50i-a64-olinuxino-1Ge16GW.dtb
or if you are not logged as root:

sudo dtc -I dts -O dtb ./1.dts -o /boot/dtb/allwinner/sun50i-a64-olinuxino-1Ge16GW.dtb
10. Reboot
Technical support and documentation manager at Olimex