cancel
Showing results for 
Search instead for 
Did you mean: 

how to boot from emmc on stm32mp157

asadullah4571
Senior

Hi 
i am struggling in how to boot from the EMMC not from the SD card , i used the custom board where my emmc is connected to SDMMC2 port , i did changes into the device tree i enable the sdmmc2, but i do not know how to boot from the emmc ?,
actually my custom board based on the (STM32MP157D -Dk1), there is no EMMC but in custom board i added the emmc with SDMMC2 channel, so please help me out this situation how to boot ,

please Ignor my basic question i am the frasher and doing own self, i need your support for learn.

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @asadullah4571 

did you set the BOOT pins to eMMC (b010)? Boot_device_selection_on_STM32MP1_series

see also Boot_from_e-MMC

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.
NEW ! Sidekick STM32 AI agent, see here

View solution in original post

5 REPLIES 5
PatrickF
ST Employee

Hi @asadullah4571 

did you set the BOOT pins to eMMC (b010)? Boot_device_selection_on_STM32MP1_series

see also Boot_from_e-MMC

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.
NEW ! Sidekick STM32 AI agent, see here

hi @PatrickF ,

Actually, my boot1 pin is connected to the ground, it is always present as 0 as like (stm32mp157f-dk2),
i am attaching the custom board of bootpin, connection

 

 

asadullah4571_0-1726224183515.png

 

Hi,

until you fix your PCB to have correct BOOT pins allowing to select the memory you implemented (there is no eMMC on STM32MP157x-DK board), you might have a solution using OTP3 primary_boot_source field to the value 3.

PatrickF_0-1726230148547.png

 

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.
NEW ! Sidekick STM32 AI agent, see here

l done the changes into my custom board hardware and setup the boot pin( 0 1 0 ).

I removed the wifi configuration from the DTS file. 

####### stm32mp157-discovery DTS##########################################

&sdmmc2 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc2_b4_pins_a>;
pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
non-removable;
st,neg-edge;
bus-width = <4>;
vmmc-supply = <&v3v3>;
mmc-pwrseq = <&wifi_pwrseq>;
#address-cells = <1>;

/* brcmf: bcrmf@1 {#size-cells = <0>;
status = "okay";

reg = <1>;
compatible = "brcm,bcm4329-fmac";
interrupt-parent = <&gpiod>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; /* WL_HOST_WAKE */
interrupt-names = "host-wake";
}; */
};

######################## pin controll ##############################################

sdmmc2_b4_pins_a: sdmmc2-b4-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
<STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
<STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
<STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
<STM32_PINMUX('C', 7, AF10)>, /* SDMMC2_D7 */
<STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
<STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
bias-disable;
drive-push-pull;
slew-rate = <3>;
};
};


sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
<STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
<STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
<STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
<STM32_PINMUX('C', 7, AF10)>, /* SDMMC2_D7 */
<STM32_PINMUX('E', 5, AF9)>; /* SDMMC2_D6 */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
bias-disable;
drive-push-pull;
slew-rate = <3>;
};
pins3 {
pinmux = <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
bias-disable;
drive-open-drain;
slew-rate = <1>;
};
};


sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
<STM32_PINMUX('A', 9, ANALOG)>, /* SDMMC2_D5 */
<STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC2_D3 */
<STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC2_D1 */
<STM32_PINMUX('C', 7, ANALOG)>, /* SDMMC2_D7 */
<STM32_PINMUX('E', 3, ANALOG)>, /* SDMMC2_CK */
<STM32_PINMUX('E', 5, ANALOG)>, /* SDMMC2_D6 */
<STM32_PINMUX('G', 6, ANALOG)>; /* SDMMC2_CMD */
};
};

########################### ##################################################


again i boot the SD card and check the hardware configuration.
Hit any key to stop autoboot: 0
STM32MP> mmc list
STM32 SD/MMC: 0 (SD)
STM32MP>
STM32 SD/MMC: 0 (SD)
STM32MP>
STM32 SD/MMC: 0 (SD)
STM32MP>
STM32 SD/MMC: 0 (SD)
STM32MP>
STM32 SD/MMC: 0 (SD)
STM32MP>
STM32 SD/MMC: 0 (SD)
STM32MP>


hi @PatrickF 
please check my reply i did not understand.