cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to boot from EMMC on STM32MP157DAC PANIC at PC : 0x2ffec98b

adnan_pasha
Associate III

Hi,

We have a custom carrier board based on STM32MP157DAC. We have built a custom yocto image.

  • Yocto Version: Mickledore
  • Machine: stm32mp15-disco
  • SoM: STM32MP157DAC
  • Distro: openstlinux-weston
  • Linux Kernel: 6.1.82-stm32mp-r2-r0
  • EMMC : EMMC04G-MT32-FBGA153

I was able to flash emmc image in DFU mode (000) after making uboot device tree changes I have done same changes in tfa device tree too. But when trying to boot from EMMC (010) It says SDMMC2 init fails and stops.

NOTICE: CPU: STM32MP157DAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
INFO: PMIC version = 0x21
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: FCONF: Reading firmware configuration information for: stm32mp_fuse
INFO: Using EMMC
INFO: Instance 2
INFO: Boot used partition fsbl1
ERROR: CMD13 failed after 5 retries
ERROR: SDMMC2 init failed
PANIC at PC : 0x2ffec98b

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
adnan_pasha
Associate III

Hi,

I have reverted the changes I made and changed the max number of retries from 5 to 10 in the driver file. We are able to get emmc boot properly without error or panic message.

Thanks 

View solution in original post

6 REPLIES 6
adnan_pasha
Associate III

Hi,

Below is my device tree configuration Am i missing something or do i need to configure any thing else like clock or something.

&sdmmc2 {
pinctrl-names = "default";
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>;
non-removable;
no-sd;
no-sdio;
st,neg-edge;
bus-width = <8>;
vqmmc-supply = <&vdd>;
mmc-ddr-3_3v;
status = "okay";
};

sdmmc2_b4_pins_a: sdmmc2-b4-0 {
pins1 {
u-boot,dm-pre-reloc;
u-boot,dm-spl;

pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
<STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
<STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
pins2 {
u-boot,dm-pre-reloc;
u-boot,dm-spl;

pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
slew-rate = <2>;
drive-push-pull;
bias-pull-up;
};
};
sdmmc2_d47_pins_c: sdmmc2-d47-2 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
<STM32_PINMUX('A', 15, AF9)>, /* SDMMC2_D5 */
<STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
<STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
};

Do let me know why this is happening and how we can fix this issue? Do we need to check any voltages in hardware?

Thanks.

Hi @adnan_pasha 

maybe check if there is some activities on the SDMMC2_CLK and SDMMC2_CMD. A clock might be missing.

See also this old post https://community.st.com/t5/stm32-mpus-products/stm32mp1-occasionally-emmc-boot-fail-with-quot-cmd13-failed/td-p/108285

 

https://wiki.st.com/stm32mpu/wiki/How_to_create_your_board_device_tree

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
adnan_pasha
Associate III

Hi @PatrickF 

I did check out this post it says after applying the patch the issue got resolved.
But I dont have any regulator_core.c file in /drivers/regulator/regulator_core.c path

But I do have it in the file at /drivers/st/regulator/regulator_core.c.

adnan_pasha
Associate III

TFA version i am using is v2.8.15-stm32mp-r2-r0.

After commenting out the line return -EIO; in driver file /drivers/mmc/mmc.c in mmc_device_state() function
We are able to get emmc boot to work properly.

if (retries == 0) {
ERROR("CMD13 failed after %d retries\n",
MMC_DEFAULT_MAX_RETRIES);
//return -EIO;
}

Could you please let me know what this does and why it's was halting the boot process.


Thanks.

Hi,

maybe your eMMC need more time to answer CMD13

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
adnan_pasha
Associate III

Hi,

I have reverted the changes I made and changed the max number of retries from 5 to 10 in the driver file. We are able to get emmc boot properly without error or panic message.

Thanks