A20-SOM204 and eMMC booting

Started by Jonathan Fether, February 13, 2019, 05:26:43 AM

Previous topic - Next topic

Jonathan Fether

I'm working on a project that will have an A20-SOM204 module installed. We are using the module that has eMMC on it, the A20-SOM204-1Ge16Gs16M-MC.

We've observed a couple things. On the first unit I use, I was able to use armbian-config's install option to install the system to the eMMC, but the unit does not boot from eMMC (Doesn't load U-Boot) on the first time after applying power. I can insert an SD card into the SD card slot and boot from that, then while the unit is still powered up, rebooting the device with the reboot button works fine, and U-Boot loads from the eMMC. I can also "Assist Start" it by inserting the SD card, waiting for U-Boot to load, then removing the SD card before Linux is loaded and the unit will load Linux from eMMC.

On another unit, we had some odd difficulty. There was a modification present on the board that was not documented. There was a 100pF capacitor added to the PCBA on the secondary eMMC position, U10, which is marked "NA(MTFC4GACAANA-4M_IT(TBGA100))". I looked up the Micron datasheet for this device and found the pinout. The capacitor is connected between ball P6 (EMMC_CLK) and M7 (VSSQ/Ground). With it, we were unable to use the armbian-config install and got command errors. After removing it, we were able to but were still unable to start U-Boot reliably from eMMC.

The questions I have are:


  • Has Olimex or anyone else had experience reliably booting the A20-SOM204-1Ge16Gs16M-MC from eMMC, and if so, what needs to be done to accomplish this?
  • What is the purpose for this modification?

Best Regards,
Jon

LubOlimex

If you experience issues with reliable eMMC boot, it is probably related to the poor support for eMMC version 5.x in A20's boot ROM. While the eMMC seems to work fine after the boot process (as you already observed by removing the card after the boot), it doesn't seem to start reliably. We tried a lot of things but to ensure that customers don't experience such issues added 16MB SPI to all boards with eMMC that can handle the initial boot. The best course of action is to boot from the SPI and store the system on the eMMC.

If you need a script for that, make sure to check our Armbian-based images which have such an install option.

It is always a good idea to first test with our image: ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/latest/bionic/images/Armbian_5.72.1_Olinuxino-a20_Ubuntu_bionic_next_4.19.17_desktop.torrent - again the script inside gets started with nand-sata-install or via the armbian-config menus.

And some initial how-to about the image ca be found here: https://www.olimex.com/wiki/ArmbianHowTo

The capacitor that was over U10's pads was needed at some point, it was soldered on purpose as a hardware fix that improved boot reliability when using 5.0 eMMC. It adds delay to EMMC_CLK that improved. It is 15pF in 0603 package (we used 50V one but the voltage shouldn't matter as long as it is 15pF in 0603). This fix doesn't work for newest 5.1 eMMC memories, however.

If you need more details please contact me over support@olimex.com
Technical support and documentation manager at Olimex

Jonathan Fether

LubOlimex,

   Thank you for your quick reply. I wanted to convey the message we encountered with the capacitor populated to help Olimex understand the issue. This showed up in the kernel message log:

[    5.720466] mmc1: new DDR MMC card at address 0001
[    5.721930] mmcblk1: mmc1:0001 AGND3R 14.6 GiB
[    5.723035] mmcblk1boot0: mmc1:0001 AGND3R partition 1 4.00 MiB
[    5.724149] mmcblk1boot1: mmc1:0001 AGND3R partition 2 4.00 MiB
[    8.198709] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[   10.048410] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro
[  145.586212] sunxi-mmc 1c11000.mmc: data error, sending stop command
[  146.584835] sunxi-mmc 1c11000.mmc: send stop command failed


After this, all access to the eMMC fails. Depopulating that capacitor has managed to get us past this.

We are proceeding with SPI flash as the boot option. I will examine your SD card's SPI flashing procedure. We tried using flashrom and it is quite inefficient as it was aimed at other use cases.

-Jon

att2

I can attest that we have the same problem:

* We have exactly the same error message in the syslog, i.e. "data error, sending stop command" followed by an error "send stop command failed", after which any access to EMMC locks up the "offending" software (for example, "dd", etc.)
* This happens when using the latest, recommended, "a20_Ubuntu_bionic_next_4.19.17_desktop.img"
* On older images with older kernel versions (kernel 3.4.x, Debian 8.3, also on Debian 8.11) you can write to EMMC but it won't boot from there.

Thus, we will also try to remove the capacitor mentioned above.


att2

However, at the moment we are unable to find that offending capacitor on the board.
A photo of the proper place would be a great help, please post a photo where to remove that capacitor.
Thanks...


LubOlimex

#5
The advice for the resistor no longer applies. This was fixed few hardware revisions ago. Do not try to modify resistors.

QuoteThis happens when using the latest, recommended, "a20_Ubuntu_bionic_next_4.19.17_desktop.img"

This is not the latest recommended image. The latest recommended image is here:

ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/1.latest_mainline_images/bionic/images/

Make sure to run and check the nand-sata-install script to see how the eMMC install works (only via the SPI flash). You can boot via the SPI flash, as in our images.
Technical support and documentation manager at Olimex

orianajonathan

For example we have similar error messages in syslog. "Send data and request", then "Add error section". This was done using "new a20_Ubuntu_bionic_next_4.19.17_desktop.img". "For older patches and frozen versions (version 4.4.x, Debian 3.3, Debian 1.1), you can register with EMMC, but don't start here.