Re: [U-Boot] [bug report] sunxi: booting from eMMC

Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" jagannadh.teki@gmail.com написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX aneox.inbox@gmail.com wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.

On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" jagannadh.teki@gmail.com написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX aneox.inbox@gmail.com wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung jh80.chung@samsung.com написал(а):
On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" jagannadh.teki@gmail.com написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX aneox.inbox@gmail.com wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot http://lists.denx.de/mailman/listinfo/u-boot

In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select! spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
7 окт. 2016 г., в 14:44, Alexandr Bochkarev aneox.inbox@gmail.com написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а):
On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com http://www.openedev.com/ U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot http://lists.denx.de/mailman/listinfo/u-boot

On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select!
This log means that there is no card on slot.. In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log. Could you share the environment values?
spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
the below log seems that is nothing to do..arguments/response data..everything are 0.. It's strange.
Best Regards, Jaehoon Chung
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а):
On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com http://www.openedev.com/ U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

This log means that there is no card on slot..
But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
Now i tried, boot marsboard from sd, hit button to stop kernel loading. sun7i# mmc list SUNXI SD/MMC: 0
Looks like its doesnt see emmc on sdc2.
sun7i# printenv Environment size: 1919/131068 bytes autoboot=run loadkernel && run setargs && true && bootm 0x48000000 baudrate=115200 boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot; bootdelay=2 bootenv=uEnv.txt bootm_size=0x10000000 bootscr=boot.scr console=ttyS0,115200 device=mmc ethact=dwmac.1c50000 ethaddr=02:d8:09:82:e3:9b kernel=uImage loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv} loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr} loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi loglevel=8 panicarg=panic=10 partition=0:1 script=script.bin scriptaddr=0x44000000 setargs=if test -z \"$root\"; then if test \"$bootpath\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs} stderr=serial stdin=serial stdout=serial
12 окт. 2016 г., в 17:09, Jaehoon Chung jh80.chung@samsung.com написал(а):
On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select!
This log means that there is no card on slot.. In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log. Could you share the environment values?
spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
the below log seems that is nothing to do..arguments/response data..everything are 0.. It's strange.
Best Regards, Jaehoon Chung
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а):
On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote:
Like a sd card. I have emmc to sd adapter, so
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com http://www.openedev.com/ U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Added Hans (sunxi maintainer)
On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
This log means that there is no card on slot..
But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
Now i tried, boot marsboard from sd, hit button to stop kernel loading. sun7i# mmc list SUNXI SD/MMC: 0
Looks like its doesnt see emmc on sdc2.
If i misunderstood something, let me know, plz. :) (Because i don't have targets relevant to sunxi..)
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) -> This is right? 2014?
What did you mean sdc0/sdc1/sdc2...do you mean the hardware line? If it's hardware line..sdc0 is for eMMC?
"Card did not respond to voltage select!" 1. There is no card on slot.. 2. Power doesn't supply..
Did you check everything? Power, clock, gpio pin..
Best Regards, Jaehoon Chung
sun7i# printenv Environment size: 1919/131068 bytes autoboot=run loadkernel && run setargs && true && bootm 0x48000000 baudrate=115200 boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot; bootdelay=2 bootenv=uEnv.txt bootm_size=0x10000000 bootscr=boot.scr console=ttyS0,115200 device=mmc ethact=dwmac.1c50000 ethaddr=02:d8:09:82:e3:9b kernel=uImage loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv} loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr} loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi loglevel=8 panicarg=panic=10 partition=0:1 script=script.bin scriptaddr=0x44000000 setargs=if test -z \"$root\"; then if test \"$bootpath\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs} stderr=serial stdin=serial stdout=serial
12 окт. 2016 г., в 17:09, Jaehoon Chung jh80.chung@samsung.com написал(а):
On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select!
This log means that there is no card on slot.. In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log. Could you share the environment values?
spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
the below log seems that is nothing to do..arguments/response data..everything are 0.. It's strange.
Best Regards, Jaehoon Chung
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а):
On 10/03/2016 02:39 AM, AneoX wrote:
Emmc Card was the new one, so i just burn a dump of working sd. Previously sd have been wired to board for test.
Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb ram. So i using it defconfig and in case of sd card, it works. Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> написал:
On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote: > Like a sd card. I have emmc to sd adapter, so > > dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
I guess you cleaned[1] the card before doing this?
> > and then just solder emmc to my board.
OK, which a20 board?
[1] http://linux-sunxi.org/Bootable_SD_card
thanks!
Jagan Teki Free Software Engineer | www.openedev.com http://www.openedev.com/ U-Boot, Linux | Upstream Maintainer Hyderabad, India. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On marsboard today i used 2014 u-boot, sd card on sdc0 hardware lines and emmc on sdc2 hardware lines. and get error "Card did not respond to voltage select!» , then i tried to boot without sd card, only with emmc on sdc2
On my board i used mainline u-boot, emmc on sdc0 hardware lines. And get block read error, logs below.
Brom on A20 chip firstly tries sdc0, if fail, then sdc2.
I dont checked only gpio pins, maybe in det pin problem, i will try, thx.
12 окт. 2016 г., в 18:05, Jaehoon Chung jh80.chung@samsung.com написал(а):
Added Hans (sunxi maintainer)
On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
This log means that there is no card on slot..
But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
Now i tried, boot marsboard from sd, hit button to stop kernel loading. sun7i# mmc list SUNXI SD/MMC: 0
Looks like its doesnt see emmc on sdc2.
If i misunderstood something, let me know, plz. :) (Because i don't have targets relevant to sunxi..)
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) -> This is right? 2014?
What did you mean sdc0/sdc1/sdc2...do you mean the hardware line? If it's hardware line..sdc0 is for eMMC?
"Card did not respond to voltage select!"
- There is no card on slot..
- Power doesn't supply..
Did you check everything? Power, clock, gpio pin..
Best Regards, Jaehoon Chung
sun7i# printenv Environment size: 1919/131068 bytes autoboot=run loadkernel && run setargs && true && bootm 0x48000000 baudrate=115200 boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot; bootdelay=2 bootenv=uEnv.txt bootm_size=0x10000000 bootscr=boot.scr console=ttyS0,115200 device=mmc ethact=dwmac.1c50000 ethaddr=02:d8:09:82:e3:9b kernel=uImage loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv} loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr} loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi loglevel=8 panicarg=panic=10 partition=0:1 script=script.bin scriptaddr=0x44000000 setargs=if test -z \"$root\"; then if test \"$bootpath\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs} stderr=serial stdin=serial stdout=serial
12 окт. 2016 г., в 17:09, Jaehoon Chung jh80.chung@samsung.com написал(а):
On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select!
This log means that there is no card on slot.. In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log. Could you share the environment values?
spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
the below log seems that is nothing to do..arguments/response data..everything are 0.. It's strange.
Best Regards, Jaehoon Chung
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а):
On 10/03/2016 02:39 AM, AneoX wrote: > Emmc Card was the new one, so i just burn a dump of working sd. Previously > sd have been wired to board for test. > > Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb > ram. So i using it defconfig and in case of sd card, it works. > Emmc lines has external pullups according to the datasheet.
Well, i needs to get more information..If you guess that seems to return 0 from block_read().. then you can find which condition was hit..is it impossible?
If you can share more debug message..then i will help you.
Best Regards, Jaehoon Chung
> > 2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> > написал: > > On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote: >> Like a sd card. I have emmc to sd adapter, so >> >> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 > > I guess you cleaned[1] the card before doing this? > >> >> and then just solder emmc to my board. > > OK, which a20 board? > > [1] http://linux-sunxi.org/Bootable_SD_card > > thanks! > -- > Jagan Teki > Free Software Engineer | www.openedev.com http://www.openedev.com/ > U-Boot, Linux | Upstream Maintainer > Hyderabad, India. > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot

On 10/12/2016 09:11 PM, Alexandr Bochkarev wrote:
On marsboard today i used 2014 u-boot, sd card on sdc0 hardware lines and emmc on sdc2 hardware lines. and get error "Card did not respond to voltage select!» , then i tried to boot without sd card, only with emmc on sdc2
On my board i used mainline u-boot, emmc on sdc0 hardware lines. And get block read error, logs below.
Brom on A20 chip firstly tries sdc0, if fail, then sdc2.
I understood more clearly...Your target for using is sdc0(eMMC), right? - marsboard for just testing is sdc0 (SD-card)..
I dont checked only gpio pins, maybe in det pin problem, i will try, thx.
If det-pin problem, it should be fixed too easy. :) I will try to check codes relevant to sunxi..
Sorry for helping more clearly..
12 окт. 2016 г., в 18:05, Jaehoon Chung jh80.chung@samsung.com написал(а):
Added Hans (sunxi maintainer)
On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
This log means that there is no card on slot..
But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
Now i tried, boot marsboard from sd, hit button to stop kernel loading. sun7i# mmc list SUNXI SD/MMC: 0
Looks like its doesnt see emmc on sdc2.
If i misunderstood something, let me know, plz. :) (Because i don't have targets relevant to sunxi..)
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) -> This is right? 2014?
What did you mean sdc0/sdc1/sdc2...do you mean the hardware line? If it's hardware line..sdc0 is for eMMC?
"Card did not respond to voltage select!"
- There is no card on slot..
- Power doesn't supply..
Did you check everything? Power, clock, gpio pin..
Best Regards, Jaehoon Chung
sun7i# printenv Environment size: 1919/131068 bytes autoboot=run loadkernel && run setargs && true && bootm 0x48000000 baudrate=115200 boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot; bootdelay=2 bootenv=uEnv.txt bootm_size=0x10000000 bootscr=boot.scr console=ttyS0,115200 device=mmc ethact=dwmac.1c50000 ethaddr=02:d8:09:82:e3:9b kernel=uImage loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv} loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr} loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi loglevel=8 panicarg=panic=10 partition=0:1 script=script.bin scriptaddr=0x44000000 setargs=if test -z \"$root\"; then if test \"$bootpath\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs} stderr=serial stdin=serial stdout=serial
12 окт. 2016 г., в 17:09, Jaehoon Chung jh80.chung@samsung.com написал(а):
On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, desolder nand, and put on emmc pads my emmc flash. So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can init emmc, and i got /dev/mmcblkp1, works well. But when i eject sd and try to boot from sdc2 emmc, get the same err 17. In this case i have used some old uboot from marsboard site, because mainline u-boot have not config for a20 marsboard.
U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48) Board: MarsBoard-A20 & MarsPI DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 Card did not respond to voltage select!
This log means that there is no card on slot.. In my case..when i set the wrong mmc boot dev in environment, I had seen the similar log. Could you share the environment values?
spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
So, the problem with eMMC KLM4G1FE3B-B001 is exists( Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
I'm not sure...100% working card...because we don't ensure 100% what problem there are in mainline u-boot.
7 окт. 2016 г., в 14:44, Alexandr Bochkarev <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> написал(а):
Hi! Very appreciate your help! Hope we will fix it, because my board will be garbage without emmc ( So, my steps:
git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot; make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig make CROSS_COMPILE=arm-linux-gnueabihf-
Also turn on CONFIG_MMC_TRACE
the below log seems that is nothing to do..arguments/response data..everything are 0.. It's strange.
Best Regards, Jaehoon Chung
After run, got:
Trying to boot from MMC1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110
hdr read sector 80, count=0 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
So, spl_mmc.c on line 66, blk_dread return 0 count blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) return 0 block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on line 144, bdesc->block_read = mmc_bread; mmc.c, line 285 mmc_read_blocks return Failed to read blocks mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
> 7 окт. 2016 г., в 5:48, Jaehoon Chung <jh80.chung@samsung.com mailto:jh80.chung@samsung.com> написал(а): > > On 10/03/2016 02:39 AM, AneoX wrote: >> Emmc Card was the new one, so i just burn a dump of working sd. Previously >> sd have been wired to board for test. >> >> Board is a custom, like olinuxino lime which with nand and sd slot, 512 mb >> ram. So i using it defconfig and in case of sd card, it works. >> Emmc lines has external pullups according to the datasheet. > > Well, i needs to get more information..If you guess that seems to return 0 from block_read().. > then you can find which condition was hit..is it impossible? > > If you can share more debug message..then i will help you. > > Best Regards, > Jaehoon Chung > >> >> 2 окт. 2016 г. 23:28 пользователь "Jagan Teki" <jagannadh.teki@gmail.com mailto:jagannadh.teki@gmail.com> >> написал: >> >> On Sun, Oct 2, 2016 at 10:45 PM, AneoX <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> wrote: >>> Like a sd card. I have emmc to sd adapter, so >>> >>> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 >> >> I guess you cleaned[1] the card before doing this? >> >>> >>> and then just solder emmc to my board. >> >> OK, which a20 board? >> >> [1] http://linux-sunxi.org/Bootable_SD_card >> >> thanks! >> -- >> Jagan Teki >> Free Software Engineer | www.openedev.com http://www.openedev.com/ >> U-Boot, Linux | Upstream Maintainer >> Hyderabad, India. >> _______________________________________________ >> U-Boot mailing list >> U-Boot@lists.denx.de mailto:U-Boot@lists.denx.de >> http://lists.denx.de/mailman/listinfo/u-boot

I understood more clearly...Your target for using is sdc0(eMMC), right?
Yes
Now i have checked det pin on my board. I use standart A20-OLinuXino-Lime_defconfig with my board. So PH1 is pull-fown. No changes if just remove det pin
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:12:37) DRAM: 512 MiB Failed to set core voltage! Can't set CPU frequency Trying to boot from MMC1 mmc_bread: Failed to read blocks mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Then , i removed det pin from config and build again. Burn it to emmc(sdc2) on marsboard and tried to boot this board with mainline u-boot, not 2014 as before and get this.
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:24:58) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC2 MMC Device 1 not found spl: could not find mmc device. error: -19 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Something new, error code is 19 ) Looks like it see that no card on sdc0 and found emmc on sdc2, but fails. Same code on my board never tries mmc2, so it part works
I will try to check codes relevant to sunxi..
I hope on your help, thank you very much

Now i found and add 2 in mmc_extra_slot_number config, compile and burn on marsboard emmc(sdc2) Got absolutely the same output, as from my board, except mmc number
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:48:07) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC2 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00000000 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:3 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:9 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x00000000 .. .. 0x00000000 .. .. 0x00000000 .. .. 0x00000000
.....DUMPING DATA .....000 - 00 00 00 00 .....004 - 00 00 00 00 .....008 - 00 00 00 00 .....012 - 00 00 00 00 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..MMC_RSP_R1b.. 0x00000000 CMD_SEND:13 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:6 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000000 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110 test 1 cmdidx: 17 mmc_bread: Failed to read blocks mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
12 окт. 2016 г., в 18:42, Alexandr Bochkarev aneox.inbox@gmail.com написал(а):
I understood more clearly...Your target for using is sdc0(eMMC), right?
Yes
Now i have checked det pin on my board. I use standart A20-OLinuXino-Lime_defconfig with my board. So PH1 is pull-fown. No changes if just remove det pin
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:12:37) DRAM: 512 MiB Failed to set core voltage! Can't set CPU frequency Trying to boot from MMC1 mmc_bread: Failed to read blocks mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Then , i removed det pin from config and build again. Burn it to emmc(sdc2) on marsboard and tried to boot this board with mainline u-boot, not 2014 as before and get this.
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:24:58) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC2 MMC Device 1 not found spl: could not find mmc device. error: -19 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Something new, error code is 19 ) Looks like it see that no card on sdc0 and found emmc on sdc2, but fails. Same code on my board never tries mmc2, so it part works
I will try to check codes relevant to sunxi..
I hope on your help, thank you very much

Now i boot marsboard from sd card with new config
=> mmc list SUNXI SD/MMC: 0 (SD) SUNXI SD/MMC: 1
=> mmc info Device: SUNXI SD/MMC Manufacturer ID: 2 OEM: 544d Name: SA04G Tran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 4-bit Erase Group Size: 512 Bytes
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part.Start Sector.Num Sectors.UUID..Type 1.2048 .12288 .da1dcf13-01.83 2.14336 .204800 .da1dcf13-02.83 3.219136 .204800 .da1dcf13-03.83 4.423936 .409600 .da1dcf13-04.05 Extd 5.425984 .204800 .da1dcf13-05.83 6.632832 .200704 .da1dcf13-06.83
=> mmc dev 1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x000001AA ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0xC0FF8080 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x1501004D .. .. 0x34473146 .. .. 0x42030B01 .. .. 0x7585C009
.....DUMPING DATA .....000 - 15 01 00 4D .....004 - 34 47 31 46 .....008 - 42 03 0B 01 .....012 - 75 85 C0 09 CMD_SEND:3 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000500 CMD_SEND:9 ..ARG... 0x00010000 ..MMC_RSP_R2.. 0xD0270132 .. .. 0x0F5903FF .. .. 0xF6DBFFE7 .. .. 0x8A404057
.....DUMPING DATA .....000 - D0 27 01 32 .....004 - 0F 59 03 FF .....008 - F6 DB FF E7 .....012 - 8A 40 40 57 CMD_SEND:13 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000700 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000700 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:6 ..ARG... 0x03B90100 ..MMC_RSP_R1b.. 0x00000900 CMD_SEND:13 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:6 ..ARG... 0x03B70100 ..RET... -110 CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110 mmc_bread: Failed to read blocks CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110 mmc_bread: Failed to read blocks CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:18 ..ARG... 0x00000040 ..RET... -110 mmc_bread: Failed to read blocks switch to partitions #0, OK mmc1(part 0) is current device
=> mmc info Device: SUNXI SD/MMC Manufacturer ID: 15 OEM: 100 Name: M4G1F Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.4.1 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 1-bit Erase Group Size: 512 KiB HC WP Group Size: 4 MiB User Capacity: 3.6 GiB WRREL Boot Capacity: 1 MiB ENH RPMB Capacity: 128 KiB ENH
=> mmc part ## Unknown partition table type 0
eMMC burned same image as SD. And seems like it doesnt switched to 4-bit bus width

On 10/12/2016 10:11 PM, Alexandr Bochkarev wrote:
Now i boot marsboard from sd card with new config
Good.
=> mmc list SUNXI SD/MMC: 0 (SD) SUNXI SD/MMC: 1
=> mmc info Device: SUNXI SD/MMC Manufacturer ID: 2 OEM: 544d Name: SA04G Tran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 4-bit Erase Group Size: 512 Bytes
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part.Start Sector.Num Sectors.UUID..Type 1.2048 .12288 .da1dcf13-01.83 2.14336 .204800 .da1dcf13-02.83 3.219136 .204800 .da1dcf13-03.83 4.423936 .409600 .da1dcf13-04.05 Extd 5.425984 .204800 .da1dcf13-05.83 6.632832 .200704 .da1dcf13-06.83
=> mmc dev 1 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:8 ..ARG... 0x000001AA ..RET... -110 CMD_SEND:55 ..ARG... 0x00000000 ..RET... -110 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x00000000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:0 ..ARG... 0x00000000 ..MMC_RSP_NONE CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0x00FF8080 CMD_SEND:1 ..ARG... 0x40300000 ..MMC_RSP_R3,4.. 0xC0FF8080 CMD_SEND:2 ..ARG... 0x00000000 ..MMC_RSP_R2.. 0x1501004D .. .. 0x34473146 .. .. 0x42030B01 .. .. 0x7585C009
.....DUMPING DATA .....000 - 15 01 00 4D .....004 - 34 47 31 46 .....008 - 42 03 0B 01 .....012 - 75 85 C0 09 CMD_SEND:3 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000500 CMD_SEND:9 ..ARG... 0x00010000 ..MMC_RSP_R2.. 0xD0270132 .. .. 0x0F5903FF .. .. 0xF6DBFFE7 .. .. 0x8A404057
.....DUMPING DATA .....000 - D0 27 01 32 .....004 - 0F 59 03 FF .....008 - F6 DB FF E7 .....012 - 8A 40 40 57 CMD_SEND:13 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000700 CURR STATE:3 CMD_SEND:7 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000700 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:6 ..ARG... 0x03B90100 ..MMC_RSP_R1b.. 0x00000900 CMD_SEND:13 ..ARG... 0x00010000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CURR STATE:4 CMD_SEND:8 ..ARG... 0x00000000 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:6 ..ARG... 0x03B70100 ..RET... -110
Maybe at here..switch to buswidth..but failed. define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see all debug message.
CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110 mmc_bread: Failed to read blocks CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:17 ..ARG... 0x00000000 ..RET... -110 mmc_bread: Failed to read blocks CMD_SEND:16 ..ARG... 0x00000200 ..MMC_RSP_R1,5,6,7 . 0x00000900 CMD_SEND:18 ..ARG... 0x00000040 ..RET... -110 mmc_bread: Failed to read blocks switch to partitions #0, OK mmc1(part 0) is current device
=> mmc info Device: SUNXI SD/MMC Manufacturer ID: 15 OEM: 100 Name: M4G1F Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.4.1 High Capacity: Yes Capacity: 3.6 GiB Bus Width: 1-bit Erase Group Size: 512 KiB HC WP Group Size: 4 MiB User Capacity: 3.6 GiB WRREL Boot Capacity: 1 MiB ENH RPMB Capacity: 128 KiB ENH
=> mmc part ## Unknown partition table type 0
eMMC burned same image as SD. And seems like it doesnt switched to 4-bit bus width
If you're setting MMC_MODE_8BIT..try to remove it..

define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see all debug message.
When i define CONFIG_DEGUB, u-boot binary size is to large for a20 sram I have tried to disable unused features in config, but its not enough
If you're setting MMC_MODE_8BIT..try to remove it..
I am not never set 8 bit mode And now found it defines
#define MMC_MODE_4BIT (1 << 2) #define MMC_MODE_8BIT (1 << 3)
and replace with
#define MMC_MODE_4BIT (1 << 2) #define MMC_MODE_8BIT (1 << 2) //(1 << 3)
The same result.

I decided to check how linux kernel init emmc on marsboard, which i boot from SD card And i found, that it inited only in 1-bit mode, is it normal? it works, i can edit files on it
linux set eMMC(sdc2) to mmc0 SD(sdc0) to mmc1
# cat /sys/kernel/debug/mmc0/ios eMMC clock: 52000000 Hz vdd: 7 (1.65 - 1.95 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 0 (1 bits) timing spec: 1 (mmc high-speed)
# cat /sys/kernel/debug/mmc1/ios SD card clock: 50000000 Hz vdd: 16 (2.8 ~ 2.9 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed)
# dmesg | grep 'mmc-msg|mmc-err’
[ 0.167917] [mmc-msg] sw_mci_init [ 0.168039] [mmc-msg] MMC host used card: 0x5, boot card: 0x4, io_card 0 [ 0.168310] [mmc-msg] sdc2 set round clock 400000, src 24000000 [ 0.168520] [mmc-msg] sdc2 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.169639] [mmc-msg] sdc2 Probe: base:0xf005e000 irq:66 sg_cpu:f0060000(4fc00000) ret 0. [ 0.169683] [mmc-msg] sdc2 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.169695] [mmc-msg] sdc2 power on [ 0.170832] [mmc-msg] sdc0 set round clock 400000, src 24000000 [ 0.171037] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.172069] [mmc-msg] sdc0 Probe: base:0xf0062000 irq:64 sg_cpu:f0064000(4fc01000) ret 0. [ 0.182158] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.182189] [mmc-msg] sdc2 set round clock 400000, src 24000000 [ 0.254447] [mmc-err] smc 2 err, cmd 52, RTO [ 0.259631] [mmc-err] smc 2 err, cmd 52, RTO [ 0.264001] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.266386] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.268208] [mmc-err] smc 2 err, cmd 8, RTO [ 0.273296] [mmc-err] smc 2 err, cmd 5, RTO [ 0.278383] [mmc-err] smc 2 err, cmd 5, RTO [ 0.283461] [mmc-err] smc 2 err, cmd 5, RTO [ 0.288546] [mmc-err] smc 2 err, cmd 5, RTO [ 0.293641] [mmc-err] smc 2 err, cmd 55, RTO [ 0.298813] [mmc-err] smc 2 err, cmd 55, RTO [ 0.303988] [mmc-err] smc 2 err, cmd 55, RTO [ 0.309158] [mmc-err] smc 2 err, cmd 55, RTO [ 0.313529] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313857] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313874] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313889] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.316273] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.333276] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.346076] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 0.346092] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 0.346123] [mmc-msg] sdc2 set round clock 42857143, src 600000000 [ 0.401211] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 8 timing MMC-HS(SDR20) dt B [ 0.401276] [mmc-err] smc 2 err, cmd 8, DCE EBE [ 0.405889] [mmc-err] In data read operation [ 0.410155] [mmc-msg] found data error, need to send stop command [ 0.410172] [mmc-err] sdc 2 send stop command failed [ 0.415209] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 4 timing MMC-HS(SDR20) dt B [ 0.415284] [mmc-err] smc 2 err, cmd 8, DCE [ 0.419553] [mmc-err] In data read operation [ 0.423818] [mmc-msg] found data error, need to send stop command [ 0.423834] [mmc-err] sdc 2 send stop command failed [ 0.428862] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 1.167097] [mmc-msg] mmc 0 detect change, present 1 [ 1.662131] [mmc-msg] sdc0 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.662143] [mmc-msg] sdc0 power on [ 1.682156] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.682200] [mmc-msg] sdc0 set round clock 400000, src 24000000 [ 1.754452] [mmc-err] smc 0 err, cmd 52, RTO [ 1.759631] [mmc-err] smc 0 err, cmd 52, RTO [ 1.764010] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.770004] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.772136] [mmc-err] smc 0 err, cmd 5, RTO [ 1.777223] [mmc-err] smc 0 err, cmd 5, RTO [ 1.782306] [mmc-err] smc 0 err, cmd 5, RTO [ 1.787390] [mmc-err] smc 0 err, cmd 5, RTO [ 1.792296] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.792315] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.794700] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.824841] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 1.824859] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 1.824901] [mmc-msg] sdc0 set round clock 42857143, src 600000000 [ 1.879993] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

On 10/13/2016 02:49 AM, Alexandr Bochkarev wrote:
I decided to check how linux kernel init emmc on marsboard, which i boot from SD card And i found, that it inited only in 1-bit mode, is it normal? it works, i can edit files on it
Well, it's not normal. It's possible to use only 1bit buswidth...but i didn't see the case about using only 1bit buswidth.
linux set eMMC(sdc2) to mmc0 SD(sdc0) to mmc1
# cat /sys/kernel/debug/mmc0/ios eMMC clock: 52000000 Hz vdd: 7 (1.65 - 1.95 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 0 (1 bits) timing spec: 1 (mmc high-speed)
# cat /sys/kernel/debug/mmc1/ios SD card clock: 50000000 Hz vdd: 16 (2.8 ~ 2.9 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed)
# dmesg | grep 'mmc-msg|mmc-err’
[ 0.167917] [mmc-msg] sw_mci_init [ 0.168039] [mmc-msg] MMC host used card: 0x5, boot card: 0x4, io_card 0 [ 0.168310] [mmc-msg] sdc2 set round clock 400000, src 24000000 [ 0.168520] [mmc-msg] sdc2 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.169639] [mmc-msg] sdc2 Probe: base:0xf005e000 irq:66 sg_cpu:f0060000(4fc00000) ret 0. [ 0.169683] [mmc-msg] sdc2 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.169695] [mmc-msg] sdc2 power on [ 0.170832] [mmc-msg] sdc0 set round clock 400000, src 24000000 [ 0.171037] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.172069] [mmc-msg] sdc0 Probe: base:0xf0062000 irq:64 sg_cpu:f0064000(4fc01000) ret 0. [ 0.182158] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.182189] [mmc-msg] sdc2 set round clock 400000, src 24000000 [ 0.254447] [mmc-err] smc 2 err, cmd 52, RTO [ 0.259631] [mmc-err] smc 2 err, cmd 52, RTO [ 0.264001] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.266386] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.268208] [mmc-err] smc 2 err, cmd 8, RTO [ 0.273296] [mmc-err] smc 2 err, cmd 5, RTO [ 0.278383] [mmc-err] smc 2 err, cmd 5, RTO [ 0.283461] [mmc-err] smc 2 err, cmd 5, RTO [ 0.288546] [mmc-err] smc 2 err, cmd 5, RTO [ 0.293641] [mmc-err] smc 2 err, cmd 55, RTO [ 0.298813] [mmc-err] smc 2 err, cmd 55, RTO [ 0.303988] [mmc-err] smc 2 err, cmd 55, RTO [ 0.309158] [mmc-err] smc 2 err, cmd 55, RTO [ 0.313529] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313857] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313874] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.313889] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.316273] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.333276] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 0.346076] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 0.346092] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 0.346123] [mmc-msg] sdc2 set round clock 42857143, src 600000000 [ 0.401211] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 8 timing MMC-HS(SDR20) dt B [ 0.401276] [mmc-err] smc 2 err, cmd 8, DCE EBE [ 0.405889] [mmc-err] In data read operation [ 0.410155] [mmc-msg] found data error, need to send stop command [ 0.410172] [mmc-err] sdc 2 send stop command failed [ 0.415209] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 4 timing MMC-HS(SDR20) dt B [ 0.415284] [mmc-err] smc 2 err, cmd 8, DCE [ 0.419553] [mmc-err] In data read operation [ 0.423818] [mmc-msg] found data error, need to send stop command [ 0.423834] [mmc-err] sdc 2 send stop command failed
buswidth test are all failed..so it's set to 1bit buswidth..Dose it support 4bit buswidth on hardware? If my understanding is right, it's used SDR20(?)..how about controlling clk value..? clock value is set to high value..
When i bring up the eMMC/SD/SDIO..I did to check the below sequence.
1. Power is supplied correctly. 2. Clock is enabled correctly 3. GPIO pin is set to correct value. (Function, GPIO value..) 4. Which buswidth/busmode is supported..and it's correctly changed.
Above checking lists nave to ensure...after that..can be checked mmc core or host controller.
Beset Regards, Jaehoon Chung
[ 0.428862] [mmc-msg] sdc2 set ios: clk 52000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 1.167097] [mmc-msg] mmc 0 detect change, present 1 [ 1.662131] [mmc-msg] sdc0 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.662143] [mmc-msg] sdc0 power on [ 1.682156] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.682200] [mmc-msg] sdc0 set round clock 400000, src 24000000 [ 1.754452] [mmc-err] smc 0 err, cmd 52, RTO [ 1.759631] [mmc-err] smc 0 err, cmd 52, RTO [ 1.764010] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.770004] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.772136] [mmc-err] smc 0 err, cmd 5, RTO [ 1.777223] [mmc-err] smc 0 err, cmd 5, RTO [ 1.782306] [mmc-err] smc 0 err, cmd 5, RTO [ 1.787390] [mmc-err] smc 0 err, cmd 5, RTO [ 1.792296] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.792315] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.794700] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 1.824841] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 1.824859] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 1.824901] [mmc-msg] sdc0 set round clock 42857143, src 600000000 [ 1.879993] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B

To exclude board factor, i get another board, Cubieboard2, desolder nand chip and put emmc on sdc2 lines. Boot kernel from sd on sdc0 lines, kernel init emmc well, in 4 bit mode
So, some trouble in u-boot is exist, PLEASE HELP! U-Boot SPL 2016.11-rc1-g4dc34be
My board - A20:
U-Boot with my config EMMC on sdc0 lines U-Boot output:
Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
MarsBoard - A20:
U-Boot with my config and mmc extra slot config set to 2 EMMC on sdc2 lines EMMC works from linux with 4-bit bus width, if boot from SD card on sdc0 lines
U-Boot output:
Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Cubieboard2 - A20:
U-Boot with Cubieboard_defconfig and mmc extra slot config set to 2 EMMC on sdc2 lines EMMC works from linux with 4-bit bus width, if boot from SD card on sdc0 lines
U-Boot output:
Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###

Replace emmc to sd card, on sdc2 lines. Remove sd on sdc0, works like a charm, but with emmc not success((((
U-Boot SPL 2016.11-rc1-g4dc34be (Nov 04 2016 - 03:06:54) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC2
U-Boot 2016.11-rc1-g4dc34be (Nov 04 2016 - 03:06:54 +0600) Allwinner Technology
CPU: Allwinner A20 (SUN7I) Model: Cubietech Cubieboard2 …………...
Cubieboard2 - A20:
U-Boot with Cubieboard_defconfig and mmc extra slot config set to 2 EMMC on sdc2 lines EMMC works from linux with 4-bit bus width, if boot from SD card on sdc0 lines
U-Boot output:
Trying to boot from MMC2 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###

I have found problem place, this patch with hotfix allows to boot Allwinner A20 from eMMC. Dont know how to full fix it.
commit 9fa5bf30e95ead17eb0c50375b305fb8615427a9 Author: root aneox.inbox@gmail.com Date: Sat Nov 5 04:41:30 2016 +0600
allow to boot A20 from eMMC, fix
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 6953acc..87cf964 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -293,11 +293,17 @@ static int mmc_trans_data_by_cpu(struct mmc *mmc, struct mmc_data *data) }
static int mmc_rint_wait(struct mmc *mmc, unsigned int timeout_msecs, - unsigned int done_bit, const char *what) + unsigned int done_bit, const char *what, struct mmc_cmd *cmd) { struct sunxi_mmc_host *mmchost = mmc->priv; unsigned int status;
+ if (cmd->cmdidx == MMC_CMD_SWITCH) + { + printf("mmc_rint_wait: fix me\n"); + return 0; + } + do { status = readl(&mmchost->reg->rint); if (!timeout_msecs-- || @@ -380,7 +386,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, } }
- error = mmc_rint_wait(mmc, 1000, SUNXI_MMC_RINT_COMMAND_DONE, "cmd"); + error = mmc_rint_wait(mmc, 1000, SUNXI_MMC_RINT_COMMAND_DONE, "cmd", cmd); if (error) goto out;
@@ -391,7 +397,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, data->blocks > 1 ? SUNXI_MMC_RINT_AUTO_COMMAND_DONE : SUNXI_MMC_RINT_DATA_OVER, - "data"); + "data", cmd); if (error) goto out; }

Hi,
On 04-11-16 23:57, Alexandr Bochkarev wrote:
I have found problem place, this patch with hotfix allows to boot Allwinner A20 from eMMC. Dont know how to full fix it.
Maxime posted a proper fix for this issue yesterday:
https://patchwork.ozlabs.org/patch/691284/
Can you give that one a try and see if it fixes things for you as well ?
Regards,
Hans
commit 9fa5bf30e95ead17eb0c50375b305fb8615427a9 Author: root <aneox.inbox@gmail.com mailto:aneox.inbox@gmail.com> Date: Sat Nov 5 04:41:30 2016 +0600
allow to boot A20 from eMMC, fix
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 6953acc..87cf964 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -293,11 +293,17 @@ static int mmc_trans_data_by_cpu(struct mmc *mmc, struct mmc_data *data) }
static int mmc_rint_wait(struct mmc *mmc, unsigned int timeout_msecs,
unsigned int done_bit, const char *what)
unsigned int done_bit, const char *what, struct mmc_cmd *cmd)
{ struct sunxi_mmc_host *mmchost = mmc->priv; unsigned int status;
- if (cmd->cmdidx == MMC_CMD_SWITCH)
- {
printf("mmc_rint_wait: fix me\n");
return 0;
- }
- do { status = readl(&mmchost->reg->rint); if (!timeout_msecs-- ||
@@ -380,7 +386,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, } }
- error = mmc_rint_wait(mmc, 1000, SUNXI_MMC_RINT_COMMAND_DONE, "cmd");
- error = mmc_rint_wait(mmc, 1000, SUNXI_MMC_RINT_COMMAND_DONE, "cmd", cmd); if (error) goto out;
@@ -391,7 +397,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, data->blocks > 1 ? SUNXI_MMC_RINT_AUTO_COMMAND_DONE : SUNXI_MMC_RINT_DATA_OVER,
"data");
if (error) goto out; }"data", cmd);

Hi,
I have tried it, no success
U-Boot SPL 2016.11-rc3-00001-g9fa5bf3-dirty (Nov 05 2016 - 16:18:14) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
In my case, i am sure, that problem not in emmc card. First MMC_CMD_SWITCH in mmc_change_func works well without patches, but get stuck in second, when change bus width.
I have two almost similar socs, Allwinner A13(sun5i) and A20(sun7i). They uses same sunxi_mmc.c driver. A13 boots well with master branch, but A20 only with my patch.
Below link shows diff in boot logs, A20 CONFIG_MACH_SUN7I on left, and A13 CONFIG_MACH_SUN5I on right side. A13 works well https://www.diffchecker.com/XrmlaZfH https://www.diffchecker.com/XrmlaZfH
Using logic analyzer, i analyzed all command and all responses. Diagrams absolutely the same, from u-boot spl start, on both socs, until mmc_rint_wait return error.
https://dl.dropboxusercontent.com/u/10252748/A20vsA13.png https://dl.dropboxusercontent.com/u/10252748/A20vsA13.png https://dl.dropboxusercontent.com/u/10252748/A20vsA13_ZOMMED.png https://dl.dropboxusercontent.com/u/10252748/A20vsA13_ZOMMED.png
at first look, looks like emmc not respond to A20, but if zoom more, https://www.dropbox.com/s/80u232i7wod93gf/A20.png?dl=0 https://www.dropbox.com/s/80u232i7wod93gf/A20.png?dl=0 we see, that no clocks in some time. If take A13 diagram, no empty clocks! I have no jtag to debug more. I am not sure, but i think, for some reason, this empty clocks cause card fail.
So, only with this patch, Allwinner A20 soc can boot from emmc https://www.dropbox.com/s/0lfe2xifzbdbokb/emmcFix.patch?dl=0 https://www.dropbox.com/s/0lfe2xifzbdbokb/emmcFix.patch?dl=0
5 нояб. 2016 г., в 14:18, Hans de Goede hdegoede@redhat.com написал(а):
Hi,
Maxime posted a proper fix for this issue yesterday:
https://patchwork.ozlabs.org/patch/691284/
Can you give that one a try and see if it fixes things for you as well ?
Regards,
Hans

On 10/12/2016 11:03 PM, Alexandr Bochkarev wrote:
define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see all debug message.
When i define CONFIG_DEGUB, u-boot binary size is to large for a20 sram I have tried to disable unused features in config, but its not enough
Just add the debug() into your driver..then it's only displayed your driver debug message.
#define debug() ...
If you're setting MMC_MODE_8BIT..try to remove it..
I am not never set 8 bit mode And now found it defines
#define MMC_MODE_4BIT (1 << 2) #define MMC_MODE_8BIT (1 << 3)
and replace with
#define MMC_MODE_4BIT (1 << 2) #define MMC_MODE_8BIT (1 << 2) //(1 << 3)
The same result.

So, this debug output.
U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 13 2016 - 14:04:10) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC2 init mmc 0 resource init mmc 0 clock and io mmc 0 set mod-clk req 24000000 parent 24000000 n 1 m 1 rate 24000000 init mmc 2 resource init mmc 2 clock and io mmc 2 set mod-clk req 24000000 parent 24000000 n 1 m 1 rate 24000000 set ios: bus_width: 1, clock: 0 set ios: bus_width: 1, clock: 400000 mmc 2 set mod-clk req 400000 parent 24000000 n 4 m 15 rate 400000 mmc 2, cmd 0(0x80008000), arg 0x00000000 mmc resp 0x00000000 mmc 2, cmd 8(0x80000148), arg 0x000001aa cmd timeout 100 mmc 2, cmd 55(0x80000177), arg 0x00000000 cmd timeout 100 mmc 2, cmd 0(0x80008000), arg 0x00000000 mmc resp 0x00000000 mmc 2, cmd 1(0x80000041), arg 0x00000000 mmc resp 0x40ff8080 mmc 2, cmd 1(0x80000041), arg 0x40300000 mmc resp 0x40ff8080 mmc 2, cmd 0(0x80008000), arg 0x00000000 mmc resp 0x40ff8080 mmc 2, cmd 1(0x80000041), arg 0x40300000 mmc resp 0x40ff8080 mmc 2, cmd 1(0x80000041), arg 0x40300000 mmc resp 0xc0ff8080 mmc 2, cmd 2(0x800001c2), arg 0x00000000 mmc resp 0x7585c009 0x42030b01 0x34473146 0x1501004d mmc 2, cmd 3(0x80000143), arg 0x00010000 mmc resp 0x00000500 mmc 2, cmd 9(0x800001c9), arg 0x00010000 mmc resp 0x8a404057 0xf6dbffe7 0x0f5903ff 0xd0270132 mmc 2, cmd 13(0x8000014d), arg 0x00010000 mmc resp 0x00000700 mmc 2, cmd 7(0x80000147), arg 0x00010000 mmc resp 0x00000700 mmc 2, cmd 8(0x80002348), arg 0x00000000 trans data 512 bytes cacl timeout 78 msec mmc resp 0x00000900 mmc 2, cmd 8(0x80002348), arg 0x00000000 trans data 512 bytes cacl timeout 78 msec mmc resp 0x00000900 mmc cmd 6 check rsp busy mmc 2, cmd 6(0x80000146), arg 0x03b90100 mmc resp 0x00000900 mmc 2, cmd 13(0x8000014d), arg 0x00010000 mmc resp 0x00000900 mmc 2, cmd 8(0x80002348), arg 0x00000000 trans data 512 bytes cacl timeout 78 msec mmc resp 0x00000900 mmc cmd 6 check rsp busy mmc 2, cmd 6(0x80000146), arg 0x03b70200 cmd timeout 42 mmc cmd 6 check rsp busy mmc 2, cmd 6(0x80000146), arg 0x03b70100 cmd timeout 42 set ios: bus_width: 1, clock: 52000000 mmc 2 set mod-clk req 52000000 parent 600000000 n 1 m 12 rate 50000000 mmc 2, cmd 16(0x80000150), arg 0x00000200 mmc resp 0x00000900 mmc 2, cmd 17(0x80002351), arg 0x00000050 trans data 512 bytes cmd timeout 80 mmc_bread: Failed to read blocks mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ###
Seems u-boot tries bus_width: 1, clock: 52000000, like linux kernel, but fails.
When i bring up the eMMC/SD/SDIO..I did to check the below sequence.
- Power is supplied correctly.
- Clock is enabled correctly
- GPIO pin is set to correct value. (Function, GPIO value..)
- Which buswidth/busmode is supported..and it's correctly changed.
1. power supply is 3.3v on vcc and vccio 2 & 4. datasheet on eemc says
Data bus width : 1bit (Default) , 4bit and 8bit MMC I/F Clock Frequency : 0 ~ 52MHz MMC I/F Boot Frequency : 0 ~ 52MHz
3. GPIO seems are correct, because then i solder sd card via wires on emmc pads, its boots correct
participants (4)
-
Alexandr Bochkarev
-
AneoX
-
Hans de Goede
-
Jaehoon Chung