IMX53 MMC3 on u-boot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMX53 MMC3 on u-boot

3,356件の閲覧回数
cristiansicilia
Contributor III

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?

ラベル(3)
タグ(3)
0 件の賞賛
返信
8 返答(返信)

2,221件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Cristian

this error may be caused by wrong image, generated for

other board. Had you tried with FSL BSP

L2.6.35_11_09_ER_SOURCE : Linux 2.6.35 Source Code Files and documentation

11.09. Supports MCIMX53-START and MCIMX53-START-R.

L2.6.35_11.05_ER_SOURCE : Linux 2.6.35 Source Code Files and documentation

11.05 for i.MX53 SABRE Tablet.

Best regards

igor

0 件の賞賛
返信

2,221件の閲覧回数
cristiansicilia
Contributor III

Hello,

I'm not sure if I understand your suggestion.

I have a custom board, based on LOCO (one ram bank etc), but there is mounted on an MMC as in the schematic posted.

I tried all u-boot present in MFGTOOL profiles, but only loco start, but the emmc don't work.

The IMX connection to MMC are:

IMX53-MMC-PAD.png

And is really close to quick start board:

quick-start-mmc.png

The Quick start board mount an mmc, and have WP and CD pins.

Regards

0 件の賞賛
返信

2,221件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

I would suggest to check if emmc is working at all with standalone test

IMX53_QSB_OBDS "On-Board Diagnostic Suit for the i.MX53 Quick Start Board"

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB&fpsp=1&tab=Design_Tools_Tab

Best regards

igor

0 件の賞賛
返信

2,221件の閲覧回数
cristiansicilia
Contributor III

Thank you,

I try it now!

But when I start linux kernel (loading it from SD CARD), I can manage the internal emmc normally

// SDCARD

mmcblk0: mmc0:aaaa SU08G 7.40 GiB

mmcblk0:

p1 p2 p3

// internal eMMC

mmc1: new high speed MMC card at address 0001

mmcblk1: mmc1:0001 002G49 1.82 GiB

mmcblk1:

p1

// And do some operation on it

root@nsip ~$ mount /dev/mmcblk1p1 /mnt/cdrom/

root@nsip ~$ ls /mnt/cdrom/

ciao  lost+found

root@nsip ~$ echo vvvv > /mnt/cdrom/test

root@nsip ~$ umount /mnt/cdrom/

root@nsip ~$ mount /dev/mmcblk1p1 /mnt/cdrom/

root@nsip ~$ ls /mnt/cdrom/

ciao  lost+found  test

root@nsip ~$ cat /mnt/cdrom/test

vvvv

root@nsip ~$

I tryed to enable trace in U-BOOT:

U-BOOT> mmc dev 1

CMD_SEND:0

                ARG                      0x00000000

                FLAG                     0

                MMC_RSP_NONE

CMD_SEND:8

                ARG                      0x000001AA

                FLAG                     0

                MMC_RSP_R1,5,6,7         0x00000000

CMD_SEND:55

                ARG                      0x00000000

                FLAG                     0

                MMC_RSP_R1,5,6,7         0xFFFFFFFF

CMD_SEND:0

                ARG                      0x00000000

                FLAG                     0

                MMC_RSP_NONE

CMD_SEND:1

                ARG                      0x00000000

                FLAG                     0

                MMC_RSP_R3,4             0x007F8000

CMD_SEND:1

                ARG                      0x40360000

                FLAG                     0

                MMC_RSP_R3,4             0x007F8000

CMD_SEND:1

                ARG                      0x40360000

                FLAG                     0

                FLAG                     0

                MMC_RSP_R3,4             0x007F8000

CMD_SEND:1

                ARG                      0x40360000

                FLAG                     0

                MMC_RSP_R3,4             0x007F8000

CMD_SEND:1

                ARG                      0x40360000

                FLAG                     0

                MMC_RSP_R3,4             0x807F8000

CMD_SEND:2

                ARG                      0x00000000

                FLAG                     0

                MMC_RSP_R2               0x774FFB4C

                                         0x774FFB70

                                         0x778067BC

                                         0x778219EE

                                        DUMPING DATA

                                        000 - 77 4F FB 4C

                                        004 - 77 4F FB 70

                                        008 - 77 80 67 BC

                                        012 - 77 82 19 EE

mmc1(part 0) is current device

U-BOOT>

0 件の賞賛
返信

2,221件の閲覧回数
cristiansicilia
Contributor III

I tried to do the mmcinfo on eMMC, but I get only 0:

Device: FSL_ESDHC

Manufacturer ID: 0

OEM: 0

Name: Tran Speed: 0

Rd Block Len: 0

MMC version 0.0

High Capacity: No

Capacity: 0 Bytes

Bus Width: 1-bit

Current Partition for boot: Not bootable

And analyzing the SEND_CMD:2 dump:

  1.                                         000 - 77 4F FB 4C  
  2.                                         004 - 77 4F FB 70  
  3.                                         008 - 77 80 67 BC  
  4.                                         012 - 77 82 19 EE 

seems don't match with the eMMC datasheet (attached).

0 件の賞賛
返信

2,221件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

in Uboot SDHC1 corresponds to dev 0

SDHC3 corresponds to dev 2

0 件の賞賛
返信

2,221件の閲覧回数
cristiansicilia
Contributor III

With this command I get an error:

U-BOOT> mmc dev 2

MMC Device 2 not found

no mmc device at slot 2

Consider that this is a IM53 not an IMX6.

And when I reset it show:

...

Boot Device: SD

I2C:  ready

DRAM:  512 MB

MMC:  FSL_ESDHC: 0,FSL_ESDHC: 1

...

And the fsl struct is:

  1. struct fsl_esdhc_cfg esdhc_cfg[2] = { 
  2.   {MMC_SDHC1_BASE_ADDR, 1, 1}, 
  3.   {MMC_SDHC3_BASE_ADDR, 1, 1}, 
  4. }; 
0 件の賞賛
返信

2,221件の閲覧回数
cristiansicilia
Contributor III

I tried to add the SDCH2 due to shift dev to 2, but the result is the same.

Also using the u-boot for loco board in mfgtool the read on internal mmc don't work.

Any other suggestion?

Consider that:

A - The u-boot on eMMC is loaded correctly by the IMX53 ROM loader

B - The eMMC is used successfully with the kernel

Regards

0 件の賞賛
返信