AnsweredAssumed Answered

IMX53 MMC3 on u-boot

Question asked by Cristian Sicilia on Mar 27, 2015
Latest reply on Apr 16, 2015 by Cristian Sicilia

Hello,

 

I have a board with an SD card and an MMC on board. The SD card work good, but with MMC I have some problem. U-Boot list the MMC but can't do anything on it:

 



I2C:   ready
DRAM:  512 MB
MMC:   FSL_ESDHC: 0,FSL_ESDHC: 1
In:    serial
Out:   serial
Err:   serial
i2c: I2C3 SDA is low, start i2c recovery...
I2C3 Recovery success
Serial reinitilized!
Net:   No ethernet found.
Hit any key to stop autoboot:  0
...
U-Boot>
mmc dev 1
mmc1(part 0) is current device
U-Boot> mmc part
## Unknown partition table

mmc read ${loadaddr} 0 1


MMC read: dev # 1, block # 0, count 1 ... MMC: block number 0x1 exceeds max(0x0)
0 blocks read: ERROR





 

I'm sure that the mmc have a partion, I have done it from kernel (where the mmc work good).

 

I have this MMC:

 

MMC-IMX53.png

The config is:

 





#ifdef CONFIG_CMD_MMC
  #define CONFIG_MMC 1
  #define CONFIG_GENERIC_MMC
  #define CONFIG_IMX_MMC
  #define CONFIG_SYS_FSL_ESDHC_NUM        2
  #define CONFIG_SYS_FSL_ESDHC_ADDR       0
  #define CONFIG_SYS_MMC_ENV_DEV  0
  #define CONFIG_DOS_PARTITION 1
  #define CONFIG_CMD_FAT 1
  #define CONFIG_CMD_EXT2 1


  /* detect whether ESDHC1 or ESDHC3 is boot device */
  #define CONFIG_DYNAMIC_MMC_DEVNO


  #define CONFIG_EMMC_DDR_PORT_DETECT
  #define CONFIG_EMMC_DDR_MODE
  /* port 1 (ESDHC3) is 8 bit */
  #define CONFIG_MMC_8BIT_PORTS 0x2
#endif








 

The for esdhc_gpio_init is:

 




struct fsl_esdhc_cfg esdhc_cfg[2] = {
  {MMC_SDHC1_BASE_ADDR, 1, 1},
  {MMC_SDHC3_BASE_ADDR, 1, 1},
};


int esdhc_gpio_init(bd_t *bis)
{
  s32 status = 0;


  mxc_request_iomux(MX53_PIN_SD1_CMD, IOMUX_CONFIG_ALT0);
  mxc_request_iomux(MX53_PIN_SD1_CLK, IOMUX_CONFIG_ALT0);
  mxc_request_iomux(MX53_PIN_SD1_DATA0,
  IOMUX_CONFIG_ALT0);
  mxc_request_iomux(MX53_PIN_SD1_DATA1,
  IOMUX_CONFIG_ALT0);
  mxc_request_iomux(MX53_PIN_SD1_DATA2,
  IOMUX_CONFIG_ALT0);
  mxc_request_iomux(MX53_PIN_SD1_DATA3,
  IOMUX_CONFIG_ALT0);


  mxc_iomux_set_pad(MX53_PIN_SD1_CMD, 0x1E4);
  mxc_iomux_set_pad(MX53_PIN_SD1_CLK, 0xD4);
  mxc_iomux_set_pad(MX53_PIN_SD1_DATA0, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_SD1_DATA1, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_SD1_DATA2, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_SD1_DATA3, 0x1D4);


  status |= fsl_esdhc_initialize(bis, &esdhc_cfg[0]);






  mxc_request_iomux(MX53_PIN_ATA_RESET_B, IOMUX_CONFIG_ALT2);
  mxc_request_iomux(MX53_PIN_ATA_IORDY,   IOMUX_CONFIG_ALT2);
  mxc_request_iomux(MX53_PIN_ATA_DA_0,    IOMUX_CONFIG_ALT2);
  mxc_request_iomux(MX53_PIN_ATA_DATA8,   IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA9,   IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA10,  IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA11,  IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA0,   IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA1,   IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA2,   IOMUX_CONFIG_ALT4);
  mxc_request_iomux(MX53_PIN_ATA_DATA3,   IOMUX_CONFIG_ALT4);


  mxc_iomux_set_pad(MX53_PIN_ATA_DA_0, 0x1E4);
  mxc_iomux_set_pad(MX53_PIN_ATA_RESET_B, 0x1E4);
  mxc_iomux_set_pad(MX53_PIN_ATA_IORDY, 0xD4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA8, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA9, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA10, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA11, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA0, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA1, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA2, 0x1D4);
  mxc_iomux_set_pad(MX53_PIN_ATA_DATA3, 0x1D4);


  status |= fsl_esdhc_initialize(bis, &esdhc_cfg[1]);




  return status;
}





























 

 

 

 

Have any suggestion?

Outcomes