cancel
Showing results for 
Search instead for 
Did you mean: 

root '/dev/mmcblk0p6' doesn't exist or does not contain a /dev.

GLaure
Senior

Hi!

Problem: The board boots correctly into the Linux kernel, but the kernel is unable to mount the rootfs.

We designed a custom board using stm32mp157f. It is based on the DK2 with some differences:

  • PLL Base clock 48Mhz (instead of 24MHz)
  • Other power supply than the pmic (with a fixed power regulators)
  • eMMC on board (not used)

Therefore changes to the tf-a and u-boot (dts) had to be made.The changes were applied on copies of the dts files for stm32mp157f-dk2.

u-boot sees mmc0:

STM32MP> mmc info
Device: STM32 SD/MMC
Manufacturer ID: 9f
OEM: 5449
Name: SDCIT 
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 15 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

and is able to load the kernel and initrd:

bootcmd_nexio
boot_syslinux_conf extlinux/nexio_extlinux_6.conf
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /extlinux/nexio_extlinux_6.conf
Retrieving file: /extlinux/nexio_extlinux_6.conf
334 bytes read in 31 ms (9.8 KiB/s)
Retrieving file: /splash_portrait.bmp
89462 bytes read in 35 ms (2.4 MiB/s)
1:      Nexio_Copy_1 
Retrieving file: /st-image-resize-initrd
3635766 bytes read in 185 ms (18.7 MiB/s)
Retrieving file: /uImage
7464312 bytes read in 347 ms (20.5 MiB/s)
append: root=/dev/mmcblk0p6 rootdelay=5 rootwait rw ignore_loglevel  console=ttySTM0,115200
Retrieving file: /stm32mp157f-nexio.dtb
71555 bytes read in 35 ms (1.9 MiB/s)
## Booting kernel from Legacy Image at c2000000 ...
   Image Name:   Linux-5.10.61
   Created:      2021-08-26  12:51:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7464248 Bytes = 7.1 MiB
   Load Address: c2000040
   Entry Point:  c2000040
   Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   XIP Kernel Image
   Loading Ramdisk to cfc88000, end cffffa36 ... OK
   Loading Device Tree to cfc73000, end cfc87782 ... OK
 
Starting kernel ...
 
[    0.000000] Booting Linux on physical CPU 0x0

But the kernel does not detect mmc0

[    3.058512] mmci-pl18x 58005000.sdmmc: Got CD GPIO
[    3.064380] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0
[    3.071848] stm32-rproc 10000000.m4: wdg irq registered
[    3.076460] remoteproc remoteproc0: m4 is available
[    3.082198] mmci-pl18x 58005000.sdmmc: Got CD GPIO
[    3.087322] mmci-pl18x 58005000.sdmmc: Got CD GPIO
[    3.095467] Freeing unused kernel memory: 1024K
[    3.122062] Run /init as init process
[    3.124312]   with arguments:
[    3.127249]     /init
[    3.129479]   with environment:
[    3.132651]     HOME=/
[    3.134983]     TERM=linux
Starting version 244.5+
root '/dev/mmcblk0p6' doesn't exist or does not contain a /dev.
 
[   33.111793] reg11: disabling
[   33.113258] reg18: disabling

This is the configuration for sdmmc1 (u-boot and kernel)

&sdmmc1 {
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc1_b4_pins_a>;
	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
	cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
	disable-wp;
	st,neg-edge;
	bus-width = <4>;
	vmmc-supply = <&v3v3>;
	vqmmc-supply = <&vdd>;
	status = "okay";
};

cd-gpios is different to DK2. Its functionality could be verified in u-boot:

SD card connected:

STM32MP> gpio input 138

gpio: pin 138 (gpio 138) value is 0

SD card ejected:

STM32MP> gpio input 138

gpio: pin 138 (gpio 138) value is 1

This output is different to -DK2

STM32MP> gpio show 138

gpio: pin 138 (gpio 138) value is 1

  Warning: value of pin is still 0

I even tried to use the kernel, initrd and device tree of the -dk2 build and replaced them in the boot partition. But this also did not work.

What error could we made, that the mmc devices are visible and accessible in u-boot, but not by the kernel?

Thank you in advance!

Gunther

1 ACCEPTED SOLUTION

Accepted Solutions
GLaure
Senior

Its working now

The solution was an "error" in the kernels dts file:

	/* Supply Voltages */
	vddcore: vddcore {
		//compatible = "regulator-fixed";
		regulator-name = "vddcore";
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1350000>;
		regulator-always-on;
	};
 
	vdd: vdd {
		//compatible = "regulator-fixed";
		regulator-name = "vdd";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};
 
	v3v3: v3v3 {
		//compatible = "regulator-fixed";
		regulator-name = "v3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};
 
	vdd_usb: vdd_usb {
		//compatible = "regulator-fixed";
		regulator-name = "vdd_usb";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

compatible = "regulator-fixed" was commented out, which lead to

mmci.c: 2070:

exiting early:

	/* Get regulators and the supported OCR mask */
	ret = mmc_regulator_get_supply(mmc);
	if (ret)
		goto clk_disable;

View solution in original post

2 REPLIES 2
GLaure
Senior

We experienced following behavior:

When looking at the sdcard clock pin during boot (oscilloscope), we always see a clock until the kernel tries to mount the rootfs. Here to clock stops.

With the dk2 board there is a small hickup at this stage, but then he clock goes on.

GLaure
Senior

Its working now

The solution was an "error" in the kernels dts file:

	/* Supply Voltages */
	vddcore: vddcore {
		//compatible = "regulator-fixed";
		regulator-name = "vddcore";
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1350000>;
		regulator-always-on;
	};
 
	vdd: vdd {
		//compatible = "regulator-fixed";
		regulator-name = "vdd";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};
 
	v3v3: v3v3 {
		//compatible = "regulator-fixed";
		regulator-name = "v3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};
 
	vdd_usb: vdd_usb {
		//compatible = "regulator-fixed";
		regulator-name = "vdd_usb";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

compatible = "regulator-fixed" was commented out, which lead to

mmci.c: 2070:

exiting early:

	/* Get regulators and the supported OCR mask */
	ret = mmc_regulator_get_supply(mmc);
	if (ret)
		goto clk_disable;