cancel
Showing results for 
Search instead for 
Did you mean: 

Migration from Linux 4.19 to 5.4 results in a non-booting system

CErik.1
Associate II

Hello!

I see many having similar issues, but I have have yet to find a solution to the reason my boot is not happening.

ATF: v2.2-stm32mp-r2.1

U-Boot: 2021.01

Linux: v4.19-stm32mp-r3.3

Works just fine

ATF: v2.2-stm32mp-r2.1

U-Boot: 2021.01 (Edit: and v2020.01-stm32mp-r2.1)

Linux: kernel-stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12.tar.xz

Results in the kernel outputting the following (LL debug enabled with highest level)

[   0.398268][   T1] pinctrl core: initialized pinctrl subsystem

...

[   0.628638][   T1] bus: 'platform': add driver stm32mp157-pinctrl

...

[   1.831777][   T1] device: 'soc:pin-controller@50002000': device_add

[   1.838307][   T1] bus: 'platform': add device soc:pin-controller@50002000

[   1.845361][   T1] PM: Adding info for platform:soc:pin-controller@50002000

[   1.852543][   T1] bus: 'platform': driver_probe_device: matched device soc:pin-controller@50002000 with driver stm32mp157-pinctrl

[   1.864472][   T1] bus: 'platform': really_probe: probing driver stm32mp157-pinctrl with device soc:pin-controller@50002000

[   1.875802][   T1] stm32mp157-pinctrl soc:pin-controller@50002000: no pinctrl handle

[   1.883752][   T1] platform soc:pin-controller@50002000: Driver stm32mp157-pinctrl requests probe deferral

Then pretty much everything end up with "no pinctrl handle".

I prepared kernel-stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12.tar.xz by applying all patches and merged the config fragments. My DT is the DK1.

What am I missing?

Edit: I should add that I have tried the ST U-Boot with tag v2020.01-stm32mp-r2.1 with the same result.

5 REPLIES 5
Olivier GALLIEN
ST Employee

Hi @Community member​ ,

Please confirm we can consider you are now using a consistent V2.1.1 OSTL ?

https://wiki.st.com/stm32mpu/wiki/STM32MP15_OpenSTLinux_release_note#v2-1-1

Between 4.19 and 5.4 dts structure has changed ? Did you align your DK1 DT on the 5.4 structure ?

Else can you share complete boot log ?

Olivier

Olivier GALLIEN
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.
CErik.1
Associate II

I have modifications made to fit my board for ATF and U-Boot in the DT so that should be consistent with your release.

ATF: v2.2-stm32mp-r2.1

U-Boot: v2020.01-stm32mp-r2.1

For the kernel I now took version v5.4-stm32mp-r2.1 (e1b933d696) from https://github.com/STMicroelectronics/linux.git. I build with the

config from board/stmicroelectronics/stm32mp157a-dk1/linux.config and stm32mp157a-dk1 with the following modifications

Debug added to the .config and change of i2c-port for the pmic (if that even matters)

diff --git a/configold b/.config
index d4da5fcc96..6721e130d6 100644
--- a/configold
+++ b/.config
@@ -171,6 +171,7 @@ CONFIG_IO_URING=y
 CONFIG_ADVISE_SYSCALLS=y
 CONFIG_MEMBARRIER=y
 CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_BASE_RELATIVE=y
 # CONFIG_BPF_SYSCALL is not set
 # CONFIG_USERFAULTFD is not set
@@ -683,6 +684,7 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 # CONFIG_CLEANCACHE is not set
 # CONFIG_FRONTSWAP is not set
 CONFIG_CMA=y
+# CONFIG_CMA_DEBUG is not set
 CONFIG_CMA_AREAS=7
 # CONFIG_ZPOOL is not set
 # CONFIG_ZBUD is not set
@@ -901,6 +903,9 @@ CONFIG_EXTRA_FIRMWARE=""
 CONFIG_WANT_DEV_COREDUMP=y
 CONFIG_ALLOW_DEV_COREDUMP=y
 CONFIG_DEV_COREDUMP=y
+CONFIG_DEBUG_DRIVER=y
+CONFIG_DEBUG_DEVRES=y
+# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
 # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_REGMAP=y
@@ -1695,6 +1700,7 @@ CONFIG_I2C_SLAVE=y
 
 # CONFIG_I3C is not set
 CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 
@@ -1760,6 +1766,7 @@ CONFIG_PINMUX=y
 CONFIG_GENERIC_PINMUX_FUNCTIONS=y
 CONFIG_PINCONF=y
 CONFIG_GENERIC_PINCONF=y
+CONFIG_DEBUG_PINCTRL=y
 # CONFIG_PINCTRL_AMD is not set
 # CONFIG_PINCTRL_MCP23S08 is not set
 CONFIG_PINCTRL_SINGLE=y
@@ -1773,6 +1780,7 @@ CONFIG_GPIOLIB=y
 CONFIG_GPIOLIB_FASTPATH_LIMIT=512
 CONFIG_OF_GPIO=y
 CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_DEBUG_GPIO=y
 # CONFIG_GPIO_SYSFS is not set
 
 #
@@ -2184,6 +2192,7 @@ CONFIG_DRM=y
 CONFIG_DRM_MIPI_DSI=y
 # CONFIG_DRM_DP_AUX_CHARDEV is not set
 # CONFIG_DRM_DEBUG_MM is not set
+# CONFIG_DRM_DEBUG_SELFTEST is not set
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_KMS_FB_HELPER=y
 CONFIG_DRM_FBDEV_EMULATION=y
@@ -3992,39 +4001,53 @@ CONFIG_SBITMAP=y
 # printk and dmesg options
 #
 CONFIG_PRINTK_TIME=y
-# CONFIG_PRINTK_CALLER is not set
-CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
-CONFIG_CONSOLE_LOGLEVEL_QUIET=4
-CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
+CONFIG_PRINTK_CALLER=y
+CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
+CONFIG_CONSOLE_LOGLEVEL_QUIET=15
+CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
+# CONFIG_BOOT_PRINTK_DELAY is not set
 # end of printk and dmesg options
 
 #
 # Compile-time checks and compiler options
 #
+# CONFIG_DEBUG_INFO is not set
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_FRAME_WARN=1024
 # CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_READABLE_ASM is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_INSTALL is not set
 CONFIG_OPTIMIZE_INLINING=y
 # CONFIG_DEBUG_SECTION_MISMATCH is not set
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
 # end of Compile-time checks and compiler options
 
 # CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_DEBUG_MISC=y
 
 #
 # Memory Debugging
 #
 # CONFIG_PAGE_EXTENSION is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_PAGE_OWNER is not set
 # CONFIG_PAGE_POISONING is not set
 # CONFIG_DEBUG_RODATA_TEST is not set
+# CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_SLUB_STATS is not set
 CONFIG_HAVE_DEBUG_KMEMLEAK=y
+# CONFIG_DEBUG_KMEMLEAK is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_VM is not set
 CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
+# CONFIG_DEBUG_VIRTUAL is not set
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
+# CONFIG_DEBUG_HIGHMEM is not set
 CONFIG_CC_HAS_KASAN_GENERIC=y
 CONFIG_KASAN_STACK=1
 # end of Memory Debugging
@@ -4032,34 +4055,69 @@ CONFIG_KASAN_STACK=1
 CONFIG_ARCH_HAS_KCOV=y
 CONFIG_CC_HAS_SANCOV_TRACE_PC=y
 # CONFIG_KCOV is not set
+# CONFIG_DEBUG_SHIRQ is not set
 
 #
 # Debug Lockups and Hangs
 #
+# CONFIG_SOFTLOCKUP_DETECTOR is not set
+# CONFIG_DETECT_HUNG_TASK is not set
+# CONFIG_WQ_WATCHDOG is not set
 # end of Debug Lockups and Hangs
 
 # CONFIG_PANIC_ON_OOPS is not set
 CONFIG_PANIC_ON_OOPS_VALUE=0
 CONFIG_PANIC_TIMEOUT=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_SCHED_STACK_END_CHECK is not set
 # CONFIG_DEBUG_TIMEKEEPING is not set
+CONFIG_DEBUG_PREEMPT=y
 
 #
 # Lock Debugging (spinlocks, mutexes, etc...)
 #
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
+# CONFIG_DEBUG_RWSEMS is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_LOCK_TORTURE_TEST is not set
 # CONFIG_WW_MUTEX_SELFTEST is not set
 # end of Lock Debugging (spinlocks, mutexes, etc...)
 
 # CONFIG_STACKTRACE is not set
 # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
+# CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_PLIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_DEBUG_CREDENTIALS is not set
 
 #
 # RCU Debugging
 #
+# CONFIG_RCU_PERF_TEST is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=21
+# CONFIG_RCU_TRACE is not set
+# CONFIG_RCU_EQS_DEBUG is not set
 # end of RCU Debugging
 
+# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
+# CONFIG_NOTIFIER_ERROR_INJECTION is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
@@ -4072,7 +4130,11 @@ CONFIG_TRACING_SUPPORT=y
 CONFIG_RUNTIME_TESTING_MENU=y
 # CONFIG_TEST_LIST_SORT is not set
 # CONFIG_TEST_SORT is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_RBTREE_TEST is not set
 # CONFIG_REED_SOLOMON_TEST is not set
+# CONFIG_INTERVAL_TREE_TEST is not set
+# CONFIG_PERCPU_TEST is not set
 # CONFIG_ATOMIC64_SELFTEST is not set
 # CONFIG_TEST_HEXDUMP is not set
 # CONFIG_TEST_STRING_HELPERS is not set
@@ -4105,17 +4167,30 @@ CONFIG_RUNTIME_TESTING_MENU=y
 # CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_UBSAN is not set
 CONFIG_UBSAN_ALIGNMENT=y
 CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
 # CONFIG_STRICT_DEVMEM is not set
+# CONFIG_ARM_PTDUMP_DEBUGFS is not set
 # CONFIG_DEBUG_WX is not set
 # CONFIG_UNWINDER_FRAME_POINTER is not set
 CONFIG_UNWINDER_ARM=y
 CONFIG_ARM_UNWIND=y
-# CONFIG_DEBUG_USER is not set
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_LL=y
+CONFIG_STM32MP1_DEBUG_UART=y
+# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_SEMIHOSTING is not set
+# CONFIG_DEBUG_LL_UART_8250 is not set
+# CONFIG_DEBUG_LL_UART_PL01X is not set
+CONFIG_DEBUG_STM32_UART=y
+CONFIG_DEBUG_LL_INCLUDE="debug/stm32.S"
+CONFIG_DEBUG_UART_PHYS=0x40010000
+CONFIG_DEBUG_UART_VIRT=0xfe010000
+CONFIG_DEBUG_UNCOMPRESS=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_EARLY_PRINTK=y
 # CONFIG_PID_IN_CONTEXTIDR is not set
 # CONFIG_CORESIGHT is not set
 # end of Kernel hacking

Change to the stm32mp15xx-dkx.dtsi

index df96874c1f..685a82161c 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsiold
@@ -260,10 +260,10 @@
 	};
 };
 
-&i2c2 {
+&i2c4 {
 	pinctrl-names = "default", "sleep";
-	pinctrl-0 = <&i2c2_pins_a>;
-	pinctrl-1 = <&i2c2_pins_sleep_a>;
+	pinctrl-0 = <&i2c4_pins_a>;
+	pinctrl-1 = <&i2c4_pins_sleep_a>;
 	i2c-scl-rising-time-ns = <185>;
 	i2c-scl-falling-time-ns = <20>;
 	clock-frequency = <400000>;

Complete bootlog (mmc not configured)

Boot log attached.

I am probably missing something trivial. Thanks for the help!

BR

Sorry, my reply is on the wrong level.

Olivier GALLIEN
ST Employee

Hi @Community member​ 

Can you share your kernel DT ?

I'm also still interesting to get TF-A and Uboot traces ( prior to kernel traces )

Thx,

Olivier

Olivier GALLIEN
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.

Sure, again thank you.

I use https://github.com/STMicroelectronics/linux/blob/v5.4-stm32mp/arch/arm/boot/dts/stm32mp157a-dk1.dts with the modification to the i2c4 -> i2c2 as shown above for the stm32mp15xx-dkx.dtsi.

For the TF-A and Uboot I have my more complete DT (Ethernet + MMC + PMIC on I2C2), thus dirty.

Here is the traces

NOTICE:  CPU: STM32MP157CAC Rev.B
NOTICE:  Model: STMicroelectronics STM32MP157A-DK1 Discovery Board
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    PMIC version = 0x20
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.2-r2.1(debug):v2.2-stm32mp-r2.1-1-g048a4dbf-dirty
NOTICE:  BL2: Built : 01:15:32, Jan  8 2021
INFO:    Using crypto library 'stm32_crypto_lib'
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000Khz
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    BL2 runs SP_MIN setup
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x2ffeb000
INFO:    Image id=4 loaded: 0x2ffeb000 - 0x2ffff000
INFO:    BL2: Loading image id 5
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:    		Phase ID : 0
INFO:    		address 0x2ffe76b0
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:    		Phase ID : 0
INFO:    		address 0x2ffe76b0
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    Start Download partition 0 to address 0xc0000000 length 0
INFO:    USB : DFU : end of download partition : 0
INFO:    Loading image id=5 at address 0xc0100000
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:    		Phase ID : 3
INFO:    		address 0x2ffe76b0
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    receive request 6
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:    		Phase ID : 3
INFO:    		address 0x2ffe76b0
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    usb_partition_size: partition size : 0xd3370
INFO:    Start Download partition 3 to address 0xc0100000 length 865136
INFO:    USB : DFU : end of download partition : 3
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    UPLOAD :
INFO:    		Phase ID : 0
INFO:    		address 0xffffffff
INFO:    Send detach request
INFO:    GETSTATUS :
INFO:    		DFU_STATE_IDLE
INFO:    Receive Detach
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01d3370
WARNING: Skip signature check (header option)
NOTICE:  ROTPK is not deployed on platform. Skipping ROTPK verification.
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffeb000
INFO:    SPSR = 0x1d3
NOTICE:  SP_MIN: v2.2-r2.1(debug):v2.2-stm32mp-r2.1-1-g048a4dbf-dirty
NOTICE:  SP_MIN: Built : 01:15:32, Jan  8 2021
INFO:    ARM GICv2 driver initialized
INFO:    Set calibration timer to 60 sec
INFO:    stm32mp IWDG1 (12): Secure
INFO:    ETZPC: CRYP1 (9) could be non secure
INFO:    SP_MIN: Initializing runtime services
INFO:    SP_MIN: Preparing exit to normal world
 
 
U-Boot 2020.01-stm32mp-r2.1-00004-g94171b1205-dirty (Jan 08 2021 - 18:15:58 +0100)
 
CPU: STM32MP157CAC Rev.B
Model: ***
Board: stm32mp1 in trusted mode (st,stm32mp157a-dk1)
DRAM:  512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Fastboot key pressed, STM32Programmer key pressed, entering download mode...
WDT:   Started with servicing (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 2
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@5800a000
STM32MP> 
STM32MP> run get_kernel_dt_from_tftp
ethernet@5800a000 Waiting for PHY auto negotiation to complete... done
Using ethernet@5800a000 device
TFTP from server server_ip; our IP address is client_ip
Filename 'zImage'.
Load address: 0xc2000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###############
	 640.6 KiB/s
done
Bytes transferred = 4068776 (3e15a8 hex)
Using ethernet@5800a000 device
TFTP from server server_ip; our IP address is client_ip
Filename 'stm32mp157a-dk1.dtb'.
Load address: 0xc4000000
Loading: *#####################
	 3.1 MiB/s
done
Bytes transferred = 103087 (192af hex)
Kernel image @ 0xc2000000 [ 0x000000 - 0x3e15a8 ]
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   Loading Device Tree to cffe3000, end cffff2ae ... OK