MMC in U-Boot 2015.04 at imx6qSabreSD-based board.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMC in U-Boot 2015.04 at imx6qSabreSD-based board.

Jump to solution
2,572 Views
petertseng
Contributor IV


Hi i.MX Community,

I reference imx6qSabreSD trying to porting my custom board.

I need to support eMMC(SD3) and SD card slot(SD4).

In MCC device add and boot  support  i have added this following one,

#ifdef CONFIG_CMD_BMODE

static const struct boot_mode board_boot_modes[] = {

  /* 4 bit bus width */

  {"mmc0", MAKE_CFGVAL(0x40, 0x30, 0x00, 0x00)},

  /* 8 bit bus width */

  {"emmc", MAKE_CFGVAL(0x60, 0x58, 0x00, 0x00)},

  {NULL, 0},

};

#endif /* CONFIG_CMD_BMODE */

static struct fsl_esdhc_cfg usdhc_cfg[2] = {

  {USDHC3_BASE_ADDR}, /* eMMC */

  {USDHC4_BASE_ADDR}, /* SD Card Slot */

};

But it can not find the MMC device.

the error message follows:

U-Boot 2015.04 (Mar 31 2016 - 15:37:08)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz

CPU:   Temperature 28 C

Reset cause: POR

I2C:   ready

DRAM:  2 GiB

MMC:   MMC/SD: Reset never completed.

voltage not supported by controller

MMC Device 2 not found

No MMC card found

Using default environment

Display: (1024x600)

In:    serial

Out:   serial

Err:   serial

unsupported boot devices

check_and_clean: reg 0, flag_set 0

Recovery key pressed

Fastboot: Recovery command file found!

Unsupported bootup device for recovery: dev: 9

SATA isn't buildin

Net:   FEC [PRIME]

Normal Boot

Hope for your help!

Regards,

Labels (5)
Tags (1)
0 Kudos
1 Solution
1,227 Views
alejandrolozan1
NXP Employee
NXP Employee

              Hi,

You may try to change the below macros:

#define CONFIG_SYS_FSL_USDHC_NUM  3

              #define CONFIG_SYS_MMC_ENV_DEV      0 

              with the corresponding value. As far as I know the first one determines the module to be used to save the environment variables. The second one defines the element of the fsl_esdhc_cfg usdhc_cfg array.

I hope that helps.

Best Regards,

Alejandro

View solution in original post

0 Kudos
6 Replies
1,227 Views
aravinthkumarja
Senior Contributor II

Hi petertseng​,

You should change the uboot source code.

Can you please let me know which BSP source code you are using.??

Regards,

Aravinth

0 Kudos
1,227 Views
fulinux
Contributor IV

Hi,

in common/env_mmc.c file this function:

void env_relocate_spec(void){

    ....

    int dev = mmc_get_env_devno();

    printf ("fulinux dev=%d\n", dev);

    ....

}

i have added "printf ("fulinux dev=%d\n", dev);", then it show log:

U-Boot 2015.04-14468-g19b5506-dirty (Apr 17 2016 - 22:49:57)

CPU:  Freescale i.MX6Q rev1.5 at 792 MHz

CPU:  Temperature 26 C

Reset cause: POR

Board: MX6-SabreSD

I2C:  ready

DRAM:  3.8 GiB

fulinux 1 MMC:  FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3

fulinux initr_env()

fulinux env_relocate()

fulinux dev=-1

fulinux env_relocate_spec

fuliux MMC Device -1 not found

fulinux No MMC card found

Using default environment

what should i do

0 Kudos
1,228 Views
alejandrolozan1
NXP Employee
NXP Employee

              Hi,

You may try to change the below macros:

#define CONFIG_SYS_FSL_USDHC_NUM  3

              #define CONFIG_SYS_MMC_ENV_DEV      0 

              with the corresponding value. As far as I know the first one determines the module to be used to save the environment variables. The second one defines the element of the fsl_esdhc_cfg usdhc_cfg array.

I hope that helps.

Best Regards,

Alejandro

0 Kudos
1,227 Views
fulinux
Contributor IV

hi,

my question is "No MMC card found",What is the reason for this problem,Do you need any information。

The problem has been bothering me for a week, i need help.

thanks.

0 Kudos
1,227 Views
fulinux
Contributor IV

and my board runs ok with u-boot-2009.08.

u-boot-2015.04 log:

U-Boot 2015.04-14468-g19b5506-dirty (Apr 20 2016 - 02:23:42)

initcall: 17805f44

U-Boot code: 17800000 -> 17864494  BSS: -> 178B20B4

initcall: 17801928

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

uclass_find_device_by_seq: 0 -1

uclass_find_device_by_seq: 0 0

   - -1 -1

   - not found

CPU:   Temperature 36 C

Reset cause: POR

initcall: 178063f4

Board: MX6-SabreSD

initcall: 17805f88

I2C:   ready

initcall: 17805f70

DRAM:  initcall: 17803168

initcall: 17806160

Monitor len: 000B20B4

Ram size: F0000000

Ram top: 00000000

initcall: 17805d00

initcall: 17805eec

TLB table from ffff0000 to ffff4000

initcall: 17805d18

initcall: 17805ea0

Reserving 712k for U-Boot at: fff3d000

initcall: 17805e70

Reserving 16392k for malloc() at: fef3b000

initcall: 17806040

Reserving 80 Bytes for Board Info at: fef3afb0

initcall: 17805d20

initcall: 17805e3c

Reserving 248 Bytes for Global Data at: fef3aeb8

initcall: 17805dd8

initcall: 17805d34

initcall: 178061d0

initcall: 1780613c

initcall: 17806098

RAM Configuration:

Bank #0: 10000000 3.8 GiB

DRAM:  3.8 GiB

initcall: 17805dbc

New Stack Pointer is: fef3ae90

initcall: 17805d3c

initcall: 17805d6c

Relocation Offset is: e873d000

Relocating to fff3d000, new gd at fef3aeb8, sp at fef3ae90

initcall: fff4321c

initcall: fff433a8

initcall: 17806398 (relocated to fff43398)

dram_bank_mmu_setup: bank: 0

mmu_set_region_dcache_behaviour: start=0x00000000, size=1048575, option=30

mmu_set_region_dcache_behaviour: start=0x00000009, size=262144, option=30

initcall: 17806224 (relocated to fff43224)

initcall: 1780624c (relocated to fff4324c)

initcall: 1780635c (relocated to fff4335c)

Pre-reloc malloc() used 0xd4 bytes (0 KB)

using memory 0xfef3b000-0xfff3d000 for malloc()

initcall: 17806214 (relocated to fff43214)

initcall: 17806348 (relocated to fff43348)

uclass_find_device_by_seq: 0 -1

uclass_find_device_by_seq: 0 0

   - -1 -1

   - not found

Bound device imx_thermal to root_driver

initcall: 178035d4 (relocated to fff405d4)

initcall: 17819388 (relocated to fff56388)

initcall: 17806338 (relocated to fff43338)

initcall: 178062c0 (relocated to fff432c0)

Now running in RAM - U-Boot at: fff3d000

initcall: 17803650 (relocated to fff40650)

initcall: 17806318 (relocated to fff43318)

fulinux 1 MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3

initcall: 178062dc (relocated to fff432dc)

fulinux initr_env()

fulinux env_relocate()

fulinux dev=-1

fulinux env_relocate_spec

fuliux MMC Device -1 not found

fulinux No MMC card found

Using default environment

0 Kudos
1,227 Views
petertseng
Contributor IV

Hi Alejandro,

Many thanks for your reply.

Thanks.

0 Kudos