cancel
Showing results for 
Search instead for 
Did you mean: 

Boot issues from emmc on STM32MP2

nielsenni101
Associate II

Hello,

I have a custom board with the STM32MP257FAK processor. I am having issues booting into u-boot from emmc. I can boot into u-boot fine using dfu-util over usb. But once I program in fsbl, ssbl, and meta data into the emmc and try to boot from it I get a error with the metadata partition. See log below.

nielsenni101_0-1736954073711.png

Any ideas what could cause this error?

1 ACCEPTED SOLUTION

Accepted Solutions
nielsenni101
Associate II

Resolved the issue.

There was a difference in the .dts file from for the STM32MP25-EV1 board and my custom board with the pin layout for the sdmmc. The evaluation board had this :

&sdmmc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
	non-removable;
	no-sd;
	no-sdio;
	st,neg-edge;
	bus-width = <8>;
	vmmc-supply = <&vdd_emmc>;
	vqmmc-supply = <&vddio2>;
	status = "okay";
};
	/omit-if-no-ref/
	sdmmc2_b4_pins_a: sdmmc2-b4-0 {
		pins1 {
			pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */
				 <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */
				 <STM32_PINMUX('E', 8, AF12)>, /* SDMMC2_D2 */
				 <STM32_PINMUX('E', 12, AF12)>, /* SDMMC2_D3 */
				 <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */
			slew-rate = <1>;
			drive-push-pull;
			bias-pull-up;
		};
		pins2 {
			pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */
			slew-rate = <2>;
			drive-push-pull;
			bias-pull-up;
		};
	};

	/omit-if-no-ref/
	sdmmc2_d47_pins_a: sdmmc2-d47-0 {
		pins {
			pinmux = <STM32_PINMUX('E', 10, AF12)>, /* SDMMC2_D4 */
				 <STM32_PINMUX('E', 9, AF12)>, /* SDMMC2_D5 */
				 <STM32_PINMUX('E', 6, AF12)>, /* SDMMC2_D6 */
				 <STM32_PINMUX('E', 7, AF12)>; /* SDMMC2_D7 */
			slew-rate = <1>;
			drive-push-pull;
			bias-pull-up;
		};
	};

 

and I had this :

&sdmmc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc1_pins_mx>;
	status = "okay";

	/* USER CODE BEGIN sdmmc1 */
    
    non-removable;
    no-sd;
    no-sdio;
    st,neg-edge;
    bus-width = <8>;
    vmmc-supply = <&vdd_emmc>;
    vqmmc-supply = <&vddio2>;
	/* USER CODE END sdmmc1 */
};

	sdmmc1_pins_mx: sdmmc1_mx-0 {
		pins1 {
			pinmux = <STM32_PINMUX('D', 8, AF11)>, /* SDMMC1_D7 */
					 <STM32_PINMUX('D', 9, AF11)>, /* SDMMC1_D6 */
					 <STM32_PINMUX('D', 10, AF11)>, /* SDMMC1_D5 */
					 <STM32_PINMUX('D', 11, AF11)>, /* SDMMC1_D4 */
					 <STM32_PINMUX('E', 0, AF10)>, /* SDMMC1_D2 */
					 <STM32_PINMUX('E', 1, AF10)>, /* SDMMC1_D3 */
					 <STM32_PINMUX('E', 2, AF10)>, /* SDMMC1_CMD */
					 <STM32_PINMUX('E', 4, AF10)>, /* SDMMC1_D0 */
					 <STM32_PINMUX('E', 5, AF10)>; /* SDMMC1_D1 */
			bias-disable;
			drive-push-pull;
			slew-rate = <1>;
		};
		pins2 {
			pinmux = <STM32_PINMUX('E', 3, AF10)>; /* SDMMC1_CK */
			bias-disable;
			drive-push-pull;
			slew-rate = <3>;

 

 We had to split the pins into two banks like the EV board does. Once we did that we booted fine from emmc. Not sure why that made it work though.

View solution in original post

1 REPLY 1
nielsenni101
Associate II

Resolved the issue.

There was a difference in the .dts file from for the STM32MP25-EV1 board and my custom board with the pin layout for the sdmmc. The evaluation board had this :

&sdmmc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
	non-removable;
	no-sd;
	no-sdio;
	st,neg-edge;
	bus-width = <8>;
	vmmc-supply = <&vdd_emmc>;
	vqmmc-supply = <&vddio2>;
	status = "okay";
};
	/omit-if-no-ref/
	sdmmc2_b4_pins_a: sdmmc2-b4-0 {
		pins1 {
			pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */
				 <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */
				 <STM32_PINMUX('E', 8, AF12)>, /* SDMMC2_D2 */
				 <STM32_PINMUX('E', 12, AF12)>, /* SDMMC2_D3 */
				 <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */
			slew-rate = <1>;
			drive-push-pull;
			bias-pull-up;
		};
		pins2 {
			pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */
			slew-rate = <2>;
			drive-push-pull;
			bias-pull-up;
		};
	};

	/omit-if-no-ref/
	sdmmc2_d47_pins_a: sdmmc2-d47-0 {
		pins {
			pinmux = <STM32_PINMUX('E', 10, AF12)>, /* SDMMC2_D4 */
				 <STM32_PINMUX('E', 9, AF12)>, /* SDMMC2_D5 */
				 <STM32_PINMUX('E', 6, AF12)>, /* SDMMC2_D6 */
				 <STM32_PINMUX('E', 7, AF12)>; /* SDMMC2_D7 */
			slew-rate = <1>;
			drive-push-pull;
			bias-pull-up;
		};
	};

 

and I had this :

&sdmmc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc1_pins_mx>;
	status = "okay";

	/* USER CODE BEGIN sdmmc1 */
    
    non-removable;
    no-sd;
    no-sdio;
    st,neg-edge;
    bus-width = <8>;
    vmmc-supply = <&vdd_emmc>;
    vqmmc-supply = <&vddio2>;
	/* USER CODE END sdmmc1 */
};

	sdmmc1_pins_mx: sdmmc1_mx-0 {
		pins1 {
			pinmux = <STM32_PINMUX('D', 8, AF11)>, /* SDMMC1_D7 */
					 <STM32_PINMUX('D', 9, AF11)>, /* SDMMC1_D6 */
					 <STM32_PINMUX('D', 10, AF11)>, /* SDMMC1_D5 */
					 <STM32_PINMUX('D', 11, AF11)>, /* SDMMC1_D4 */
					 <STM32_PINMUX('E', 0, AF10)>, /* SDMMC1_D2 */
					 <STM32_PINMUX('E', 1, AF10)>, /* SDMMC1_D3 */
					 <STM32_PINMUX('E', 2, AF10)>, /* SDMMC1_CMD */
					 <STM32_PINMUX('E', 4, AF10)>, /* SDMMC1_D0 */
					 <STM32_PINMUX('E', 5, AF10)>; /* SDMMC1_D1 */
			bias-disable;
			drive-push-pull;
			slew-rate = <1>;
		};
		pins2 {
			pinmux = <STM32_PINMUX('E', 3, AF10)>; /* SDMMC1_CK */
			bias-disable;
			drive-push-pull;
			slew-rate = <3>;

 

 We had to split the pins into two banks like the EV board does. Once we did that we booted fine from emmc. Not sure why that made it work though.