IMX6ULL customized board struck at "Waiting for root device /dev/mmcblk0p2..."

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

IMX6ULL customized board struck at "Waiting for root device /dev/mmcblk0p2..."

Jump to solution
1,333 Views
AccuJie
Contributor III

Hi,

We made a customized IMX6ULL board. It have an issue with boot from SD card. At the beginning, I stuck at “ Waiting for root device /dev/mmcblk0p2... ” with all kinds of tf cards( It was validated that these cards can normally boot on the imx6ullevk board). I also have tried several changes in DTS file related with "cd-gpios" property. Only comment "cd-gpios" or adding broken-cd can boot from low capacity and low speed micro SD card(2g class4), however, it still cannot boot from ALL  other high speed high capacity sd cards and hangs on “ Waiting for root device /dev/mmcblk0p2... ” . I also tried to lower max-frequency<25000000> which is not working either. Following is the dts of my configuration. Any support suggestions and ideas are greatly appreciated.

 

 

 

 

&usdhc1 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc1>;
	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
	//cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
	keep-power-in-suspend;
	enable-sdio-wakeup;
	vmmc-supply = <&reg_sd1_vmmc>;
	status = "okay";
};

pinctrl_usdhc1: usdhc1grp {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x17059
			MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x10071
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
		>;
	};

	pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x170b9
			MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x100b9
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170b9
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170b9
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170b9
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170b9
		>;
	};

	pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x170f9
			MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x100f9
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170f9
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170f9
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170f9
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170f9
		>;
	};

usdhc1: usdhc@02190000 {
	compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";
	reg = <0x02190000 0x4000>;
	interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&clks IMX6UL_CLK_USDHC1>,
	<&clks IMX6UL_CLK_USDHC1>,
	<&clks IMX6UL_CLK_USDHC1>;
clock-names = "ipg", "ahb", "per";
	assigned-clocks = <&clks IMX6UL_CLK_USDHC1_SEL>, <&clks IMX6UL_CLK_USDHC1>;
	assigned-clock-parents = <&clks IMX6UL_CLK_PLL2_PFD2>;
assigned-clock-rates = <0>, <132000000>;
	bus-width = <4>;
	fsl,tuning-step= <2>;
	status = "disabled";
};		

 

 

 

 

 

Following are information of two kinds of sd card:

2G:

=> mmc info
Device: FSL_SDHC
Manufacturer ID: 3
OEM: 5344
Name: SU02G
Tran Speed: 25000000
Rd Block Len: 512
SD version 3.0
High Capacity: No
Capacity: 1.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

 

16G:

=> mmc info
Device: FSL_SDHC
Manufacturer ID: 3
OEM: 5344
Name: SB16G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

 

Also, I think our PIN definition is similar to imx6ullevk.  

sd_pin1.pngsd_pin2.pngsd_pin3.png

 

 

It is really weird that the board can only boot from low capacity and low speed sd cards(2G card). Do you think this problem can be fixed by doing modification of dts or kernel. Really appreciate for any suggestions or ideas. Thanks

0 Kudos
1 Solution
1,268 Views
AccuJie
Contributor III

I think that I found the reason and solution for this problem.

The solution is similar to listplot3d. The reason for "waiting for root device...." is due to power supply. SDR50 or SDR104 standard card, it is configured to match high frequency communication mode first(100MHZ and 200mhz). However, for these two modes, card need use 1.8V power supply according to sd card standard.

There is a regulator on imx6ullevk board which can switch nvcc_sd between 1.8v and 3.3v. However, the power supply of SD card on our board is fixed by 3.3V. 

So just I change the dtb configurations to:

 

&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>;
status = "okay";
};

 

 

View solution in original post

0 Kudos
3 Replies
1,269 Views
AccuJie
Contributor III

I think that I found the reason and solution for this problem.

The solution is similar to listplot3d. The reason for "waiting for root device...." is due to power supply. SDR50 or SDR104 standard card, it is configured to match high frequency communication mode first(100MHZ and 200mhz). However, for these two modes, card need use 1.8V power supply according to sd card standard.

There is a regulator on imx6ullevk board which can switch nvcc_sd between 1.8v and 3.3v. However, the power supply of SD card on our board is fixed by 3.3V. 

So just I change the dtb configurations to:

 

&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>;
status = "okay";
};

 

 

0 Kudos
1,316 Views
igorpadykov
NXP Employee
NXP Employee

Hi AccuJie

 

regarding "It was validated that these cards can normally boot on the imx6ullevk board" -

these cards have image built for EVK board, however for custom board first necessary to run ddr test

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-6-7-DDR-Stress-Test-Tool/ta-p/11082...

and update dcd header (*.cfg file) with new ddr calibration settings obtained from test:

https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ullevk?h=imx_v2020.04_5...

 

regarding "board can only boot from low capacity and low speed sd cards" -

issue may be similar on below link:

https://community.nxp.com/t5/i-MX-Processors/eMMC-8GB-to-4GB-crash-on-linux-yocto-boot/m-p/373231

 

Best regards
igor

0 Kudos
1,307 Views
AccuJie
Contributor III

Hi igor,

Thanks for your suggestion. I think the DRR should be fine. Since I had already calibrated the DDR with your ddr_stress_tester and changed the DCD configuration parameters. Also, the board can fully boot from a 2G SD card. I believe this problem should able to be solved by modifying some PAD configuration in Device Tree, just like "timl" did. I have tried and tested with several different configurations. Unfortunately, none of them succeed. Later I will see if I can find some clue inside kernel codes.

Thanks,   

0 Kudos