cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP151aac custom board kernel not starting

I'm trying to get to know stm32mp1 while making a board for this thing.

While using the default image provided by manufacturer seems to work. The kernel used is old compared to the current ST BSP and support from them isn't exactly great so I'm trying to migrate to the latest BSP. This isn't going so well.

Following instructions found in the wiki. I've managed to compile it but when trying to run, it just stops at 'starting kernel'. Recompiling with LL_DEBUG and EARLY_PRINTK, resulted in some more info.

The lines that seems to show an issue are:

[    1.599531] i2c_dev: i2c /dev entries driver                                                                                                                                     [    1.606005] syscon-reboot: probe of reboot failed with error -22                                                                                                                                                                                                                              [    1.733737] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         [    2.031116] irq: no irq domain found for gpio@54004000 !                                                                                                                         [    2.036565] gpio-keys joystick: Found button without gpio or irq                                                                                                                 [    2.057386] gpio-keys: probe of joystick failed with error -22                                                                                                                   [    3.458283] Warning: unable to open an initial console.                                                                                                                          [    3.465913] Freeing unused kernel image (initmem) memory: 1024K                                                                                                                  [    3.487792] Run /init as init process 
[    3.866045] udevd[133]: Starting version 244
[    3.893045] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:18 Unknown group 'tty', ignoring
[    3.917955] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:19 Unknown group 'tty', ignoring
[    3.926963] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:20 Unknown group 'tty', ignoring
[    3.947840] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:21 Unknown group 'tty', ignoring
[    3.956848] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:22 Unknown group 'tty', ignoring
[    3.988188] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:23 Unknown group 'tty', ignoring
[    3.997197] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:24 Unknown group 'tty', ignoring
[    4.028175] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:25 Unknown group 'dialout', ignoring
[    4.047834] udevd[134]: /lib/udev/rules.d/50-udev-default.rules:27 Unknown group 'kmem', ignoring
[   13.991414] arm-scmi firmware:scmi-0: Invalid channel descriptor for 'scmi-0'
[   13.998713] arm-scmi: probe of firmware:scmi-0 failed with error -22
[   14.011959] platform wifi-pwrseq: deferred probe pending
[   14.017331] amba 48004000.sdmmc: deferred probe pending
[   14.022685] amba 58005000.sdmmc: deferred probe pending
[   14.027978] amba 58007000.sdmmc: deferred probe pending
[   14.033239] platform led: deferred probe pending
[   14.037911] platform 4c001000.mailbox: deferred probe pending
[   14.043695] platform mlahb:m4@10000000: deferred probe pending
[   14.049587] platform 48002000.dma-router: deferred probe pending
[   14.055633] platform 4c000000.hwspinlock: deferred probe pending
[   14.061701] platform 50000000.rcc: deferred probe pending
[   14.067138] platform 50001020.pwr: deferred probe pending
[   14.072595] platform 5000d000.interrupt-controller: deferred probe pending
[   14.079536] platform soc:pin-controller@50002000: deferred probe pending
[   14.086282] platform soc:pin-controller-z@54004000: deferred probe pending
[   14.093221] platform 48000000.dma: deferred probe pending
[   14.098692] platform 48001000.dma: deferred probe pending
[   14.104128] platform 58000000.dma: deferred probe pending
[   14.109585] platform 5a006000.usbphyc: deferred probe pending
[   14.115368] platform 50001000.pwr: deferred probe pending
[   14.120822] platform 4000f000.serial: deferred probe pending
[   14.126520] platform 40010000.serial: deferred probe pending
[   14.132237] platform 40018000.serial: deferred probe pending
[   14.137954] platform 5c000000.serial: deferred probe pending
[   14.143652] platform 54003000.rng: deferred probe pending
[   14.149122] platform 58002000.nand-controller: deferred probe pending
[   14.155606] platform 5800a000.ethernet: deferred probe pending
[   14.161559] platform 49000000.usb-otg: deferred probe pending
[   14.167348] platform 5800d000.usbh-ehci: deferred probe pending
[   14.173332] platform 5c004000.rtc: deferred probe pending
[   14.178788] platform 40013000.i2c: deferred probe pending
[   14.184223] platform 5c002000.i2c: deferred probe pending
[   14.189677] platform 50028000.thermal: deferred probe pending
[   14.195463] platform 5a002000.watchdog: deferred probe pending
[   14.201356] platform cpufreq-dt: deferred probe pending

Based on that I found another post that might be related, so I checked the dts files. No mention of mco1.

Next step was compiling the original device tree files with the same BSP mentioned earlier...

The complains raised by the compiler were that it couldn't find the sram and optee group. Have those been removed from stm32mp151.dtsi? According to another post the sram was renamed to sram1 but can't find that either. If so, is there a changelog somewhere that helps with migrating from an old bsp version?

23 REPLIES 23
debugging
Senior III

Greadt find. My board uses legacy, regulator power. No PMIC. I had to remove all PMIC related power from the DTs and create new DTs for  regulator power.  The PMIC (likely STPMIC1) uses I2C and perhaps it also uses and interrupt to the MP .and perhaps the kernel did not enable the power to EMMC ?. Just a guess..

debugging_0-1696867129548.png

BTW when I use mmc dev 0 ; mmc info in U-boot prompt it shows 4 bit for EMMC while the DT specifies 8 bit.. An older ECO that boots fine from EMMC also shows 4 bit for EMMC.

I am still stuck at kernel boot prompt...

 

The pmic is enabled by tf-a because u-boot is loaded from emmc. All buck's are set to always on, so doubt they go out without reason. But I gues that depends on the implementation.

Hm, mmc info here properly shows 8bit for mmc 1. So in you case mmc 0= emmc and mmc1 = sd? Because sd only goes up to 4bit.

debugging
Senior III

Perhaps the reason is I am booting from an SD card and you boot EMMC ?

Do you use stCubeprogrammer via usb to flash the EMMC ?

Seen the capacities, MMC0=SD  (16GB) and MMC1=EMMC. (4GB).

mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
STM32MP> mmc info
mmc info
Device: STM32 SD/MMC
Manufacturer ID: 11
OEM: 0
Name: 004GA0
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.7 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 512 KiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected

Yes, tsv file and usb dfu via CubeProgrammer.

Device: STM32 SD/MMC
Manufacturer ID: 1
OEM: 0
Name: S40004
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 3.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected

Main difference seems to be the 8-bit and double the boot capacity.