Hello!
We are developing custom board using iMX6ULL (MCIMX6Y2xxx05).
Board has microSD card holder which pins are routed to following pins (eSDHC1)
IOMUXC_SW_PAD_CTL_PAD_SD1_CMD
IOMUXC_SW_PAD_CTL_PAD_SD1_CLK
IOMUXC_SW_PAD_CTL_PAD_SD1_DATA0
IOMUXC_SW_PAD_CTL_PAD_SD1_DATA1
IOMUXC_SW_PAD_CTL_PAD_SD1_DATA2
IOMUXC_SW_PAD_CTL_PAD_SD1_DATA3
and has eMMC (MTFC4GACAJCN-4M IT), its pins route to following pins (eSDHC2)
IOMUXC_SW_PAD_CTL_PAD_NAND_RE_B
IOMUXC_SW_PAD_CTL_PAD_NAND_WE_B
IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00
IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01
IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02
IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03
IOMUXC_SW_PAD_CTL_PAD_NAND_ALE
I built u-boot and ran it via Lauterbach Trace 32. Both eMMC and SD card were detected successfully and i could list partitions on SD and make hw partitioning on eMMC. So there is OK from hardware side. I used DDR3 register programming aid v1.1 for generating imximage.conf, i added initialization of eMMC and SD pins to this file.
Then i program u-boot.imx to eMMC (via Trace 32) and SD card (using dd utility) at address 0x400 in accordance with ref manual.
After this i made a small program that blinks leds. In linker script i set entry point as 0x87800000 and this app works perfect if i run it from RAM using Trace32.
I blew fuses for SD as
&BOOT_CFG1=0x40 ; SD,
; Fast Boot: 0 - Regular
; SD/SDXC speed: 00 - Normal/SDR12
; SD Power Cycle Enable: 0 - No power cycle
; SD Loopback Clock Source Sel(for SDR50 and SDR104 only) 0 - through SD pad
&BOOT_CFG2=0x20 ; SD Calibration Step: 00 - 1 delay cell
; Bus Width: 1 - 4-bit
; Port Select: 00 - eSDHC1
; Boot Frequencies (ARM/DDR): 0 - 500 / 400 MHz
; SD VOLTAGE SELECTION: 0 - 3.3V
&BOOT_CFG3=0x00
&BOOT_CFG4=0x00
&Fuse450=&BOOT_CFG4<<24+&BOOT_CFG3<<16+&BOOT_CFG2<<8+&BOOT_CFG1
&Fuse460=0x10 ; BT_FUSE_SEL
and for eMMC as
&BOOT_CFG1=0x6E ; eMMC,
; Fast Boot: 0 - Regular
; SD/MMC Speed: 1- Normal
; Fast Boot Acknowledge Disable: 1 - Boot Ack Disabled
; SD Power Cycle Enable: 0 - No power cycle
; SD Loopback Clock Source Sel(for SDR50 and SDR104 only) 0 - through SD pad
&BOOT_CFG2=0xA8 ; Bus Width: 101 - 4-bit DDR (MMC 4.4)
; Port Select: 01 - eSDHC2
; Boot Frequencies (ARM/DDR): 0 - 500 / 400 MHz
; SD VOLTAGE SELECTION: 0 - 3.3V
&BOOT_CFG3=0x00
&BOOT_CFG4=0x00
&Fuse450=&BOOT_CFG4<<24+&BOOT_CFG3<<16+&BOOT_CFG2<<8+&BOOT_CFG1
&Fuse460=0x10 ; BT_FUSE_SEL
I used mkimage utility to make binary with DCD section (/tools/mkimage -n u-boot.cfgout -T imximage -e 0x87800000 -d leds.bin leds.imx)
I checked IVT and DCD, it had been generated correctly
georgemakarov_3-1642440309253.png
And app starts at 0xC00 (+0x400=0x1000)
georgemakarov_4-1642440376147.png
I put and verified this binary to eMMC and it didn't start after reboot.
I used to oscilloscope and logic analyzer to check
I can see BootROM sends several commands to eMMC and eMMC responded to them. Then MCU changes freq to 20 Mhz, sends a few more commands and after this stops clocking.
Assigns relative address to the card
georgemakarov_0-1642439881030.png
Addressed card sends its card-specific data
(CSD) on the CMD line
georgemakarov_1-1642439940997.png
Changing speed and CMD0 again
georgemakarov_2-1642440059580.png
Did I miss something? Is there any way to get info from BootROM why it can't boot from eMMC or SD?
Best regards, George Makarov