2020-04-21 07:24 AM
Here the output of some commands issued on our target at u-boot stage:
> STM32MP> mmc list
> STM32 SDMMC2: 0 (SD)
> STM32 SDMMC2: 1
>
> STM32MP> ls mmc 0:4
> <DIR> 1024 .
> <DIR> 1024 ..
> <DIR> 12288 lost+found
> 8192 uboot.env
> 6677056 uImage
> 71859 stm32mp151a-<myimage>-mx.dtb
> 583 boot.scr.uimg
>
> STM32MP> mmc list
> STM32 SDMMC2: 0 (SD)
> STM32 SDMMC2: 1 (eMMC)
Two questions:
Solved! Go to Solution.
2020-04-30 12:08 AM
Answer for 2.
mmc is a U-Boot « class », with index starting at 0 (same logic than in Linux kernel).
And normally mmc “index�? are allocated in driver UCLASS_MMC, following the probe order.
“STM32 SDMMC2�? is a driver of UCLASS_MMC (SDMMCv2 in fact, the 2nd version of the ST IP SDMMC)
u-boot/drivers/mmc/sdmmc2 => .cf->name= “STM32 SDMMC2�?
But this name is not really clear.
In device tree you have
aliases {
mmc0 = &sdmmc1;
mmc1 = &sdmmc2;
}
With
sdmm1: sdmmc@0x58005000 {
}
Sdmm2: sdmmc@0x58007000 {
}
So in U-Boot, we have 2 instance of "STM32 SDMMC2" driver:
And at the end "ls mmc 0:4 “ => ls on the 4th partition of mmc instance 0 = 4th partition of SDMMC1: SD card
2020-04-29 01:01 AM
Answer for 1.
In u-boot, all the driver are probed only when requested.
And eMMC is detected on mmc1 only if this mmc driver is probed
but is can be forced by "mmc dev [dev]" command
STM32MP> mmc dev 0
STM32MP> mmc dev 1
STM32MP> mmc list
But yes it is strange that mmc1 is probed just by "ls mmc" command,
I don't check the command (./fs/fs.c:739:int do_ls) to explain it
but it is a genric U-Boot behavior.
Regards
Patrick
2020-04-30 12:08 AM
Answer for 2.
mmc is a U-Boot « class », with index starting at 0 (same logic than in Linux kernel).
And normally mmc “index�? are allocated in driver UCLASS_MMC, following the probe order.
“STM32 SDMMC2�? is a driver of UCLASS_MMC (SDMMCv2 in fact, the 2nd version of the ST IP SDMMC)
u-boot/drivers/mmc/sdmmc2 => .cf->name= “STM32 SDMMC2�?
But this name is not really clear.
In device tree you have
aliases {
mmc0 = &sdmmc1;
mmc1 = &sdmmc2;
}
With
sdmm1: sdmmc@0x58005000 {
}
Sdmm2: sdmmc@0x58007000 {
}
So in U-Boot, we have 2 instance of "STM32 SDMMC2" driver:
And at the end "ls mmc 0:4 “ => ls on the 4th partition of mmc instance 0 = 4th partition of SDMMC1: SD card
2020-04-30 12:20 AM
Thanks, now it's clear why it appears as SDMMC(v)2! I thought it was the MPU bus SDMMC2....
2020-04-30 05:57 AM
You are welcome,
For information, I will update this name....