cancel
Showing results for 
Search instead for 
Did you mean: 

When updating from arm-trusted-firmware-v2.4-stm32mp-r1 to arm-trusted-firmware-v2.4-stm32mp-r2 I get PANIC on UART

cfilipescu
Senior

I didn't change anything in the device tree just compiled the arm-trusted-firmware-v2.4-stm32mp-r2 instead of arm-trusted-firmware-v2.4-stm32mp-r1 and I get the following on UART:

PANIC at PC : 0x2ffcfd2b

What is different between the two versions?

51 REPLIES 51

@Community member​ 

I have tried using the Bootlin repo as an example and unfortunately, I still have issues. I even tried booting their image for the DK1 board but I am getting the same result. I feel like there is a fundamental problem somewhere with MCUs that are not stm32mp157x.

With the image I built I get:

NOTICE:  CPU: STM32MP153AAC Rev.B
NOTICE:  Model: STMicroelectronics custom STM32CubeMX board - openstlinux-5.10-dunfell-mp1-21-11-17
ERROR:   CMD13 failed after 5 retries
ERROR:   SDMMC1 init failed
PANIC at PC : 0x2ffe9b21

With the Bootlin image for stm32mp157a-dk1 I get:

NOTICE:  CPU: STM32MP153AAC Rev.B
NOTICE:  Model: STMicroelectronics STM32MP157A-DK1 Discovery Board
ERROR:   CMD13 failed after 5 retries
ERROR:   SDMMC1 init failed
PANIC at PC : 0x2ffe9af7

@Community member​ is it possible there is a problem with STM32MP153xxx MCU and DV3.1?

Hi @cfilipescu​ ,

Not I'm aware of.

Can you please provide the full TF-A DTS file.

I would like to review how you managed DK1 DTS adaptation to your mp153 device and check also the SDMMC1 related node, since the issue looks definitely is this area

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.

@Community member​ 

Here is a link to it:

https://pastebin.com/4krrrbDD

Link not accessible for me

Please attach the file to this thread.

Thanks,

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.
Here is the file content: ``` /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ /* * Copyright (C) STMicroelectronics 2021 - All Rights Reserved * Author: STM32CubeMX code generation for STMicroelectronics. */ /* For more information on Device Tree configuration, please refer to * https://wiki.st.com/stm32mpu/wiki/Category:Device_tree_configuration */ /dts-v1/; #include #include #include #include "stm32mp15-mx.dtsi" #include "stm32mp153.dtsi" #include "stm32mp15xa.dtsi" #include "stm32mp15xxac-pinctrl.dtsi" #include "stm32mp15-ddr.dtsi" /* USER CODE BEGIN includes */ #include /* USER CODE END includes */ / { model = "STMicroelectronics custom STM32CubeMX board - openstlinux-5.10-dunfell-mp1-21-11-17"; compatible = "st,stm32mp153a-epic_miner_fw-mx", "st,stm32mp153"; memory@c0000000 { device_type = "memory"; reg = <0xc0000000 0x20000000>; /* USER CODE BEGIN memory */ /* USER CODE END memory */ }; /* USER CODE BEGIN root */ vin:vin{ compatible = "regulator-fixed"; regulator-name = "vin"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; }; aliases{ serial0 = &uart4; serial1 = &usart3; serial2 = &uart7; }; chosen{ stdout-path = "serial0:115200n8"; }; /* USER CODE END root */ clocks { /* USER CODE BEGIN clocks */ /* USER CODE END clocks */ clk_lse: clk-lse { st,drive = < LSEDRV_MEDIUM_HIGH >; /* USER CODE BEGIN clk_lse */ /* USER CODE END clk_lse */ }; clk_hse: clk-hse { st,digbypass; /* USER CODE BEGIN clk_hse */ /* USER CODE END clk_hse */ }; }; }; /*root*/ &pinctrl { sdmmc1_pins_mx: sdmmc1_mx-0 { pins1 { pinmux = , /* SDMMC1_D0 */ , /* SDMMC1_D1 */ , /* SDMMC1_D2 */ , /* SDMMC1_D3 */ ; /* SDMMC1_CMD */ bias-disable; drive-push-pull; slew-rate = <1>; }; pins2 { pinmux = ; /* SDMMC1_CK */ bias-disable; drive-push-pull; slew-rate = <3>; }; }; uart4_pins_mx: uart4_mx-0 { pins1 { pinmux = ; /* UART4_RX */ bias-disable; }; pins2 { pinmux = ; /* UART4_TX */ bias-disable; drive-push-pull; slew-rate = <0>; }; }; uart7_pins_mx: uart7_mx-0 { pins1 { pinmux = ; /* UART7_RX */ bias-disable; }; pins2 { pinmux = ; /* UART7_TX */ bias-disable; drive-push-pull; slew-rate = <0>; }; }; /* USER CODE BEGIN pinctrl */ /* USER CODE END pinctrl */ }; &pinctrl_z { i2c4_pins_z_mx: i2c4_mx-0 { pins { pinmux = , /* I2C4_SCL */ ; /* I2C4_SDA */ bias-disable; drive-open-drain; slew-rate = <0>; }; }; /* USER CODE BEGIN pinctrl_z */ /* USER CODE END pinctrl_z */ }; &bsec{ status = "okay"; secure-status = "okay"; /* USER CODE BEGIN bsec */ board_id:board_id@ec{ reg = <0xec 0x4>; st,non-secure-otp; }; /* USER CODE END bsec */ }; &etzpc{ secure-status = "okay"; st,decprot = < /*"NS_R S_W" peripherals*/ DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK) DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK) /*"Non Secured" peripherals*/ DECPROT(STM32MP1_ETZPC_DMA1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_DMAMUX_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_ETH_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_I2C1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_I2C2_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_I2C3_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_I2C5_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI2_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI3_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_TIM1_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_TIM6_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_TIM8_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_UART4_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_UART7_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_OTG_ID, DECPROT_NS_RW, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_VREFBUF_ID, DECPROT_NS_RW, DECPROT_UNLOCK) /*"Secured" peripherals*/ DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_UNLOCK) /*"Mcu Isolation" peripherals*/ DECPROT(STM32MP1_ETZPC_DMA2_ID, DECPROT_MCU_ISOLATION, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI1_ID, DECPROT_MCU_ISOLATION, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI4_ID, DECPROT_MCU_ISOLATION, DECPROT_UNLOCK) DECPROT(STM32MP1_ETZPC_SPI5_ID, DECPROT_MCU_ISOLATION, DECPROT_UNLOCK) /*Restriction: following IDs are not managed - please to use User-Section if needed: STM32MP1_ETZPC_SRAMx_ID STM32MP1_ETZPC_RETRAM_ID STM32MP1_ETZPC_BKPSRAM_ID*/ /* USER CODE BEGIN etzpc_decprot */ /*STM32CubeMX generates a basic and standard configuration for ETZPC. Additional device configurations can be added here if needed. "etzpc" node could be also overloaded in "addons" User-Section.*/ DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_UNLOCK) /* USER CODE END etzpc_decprot */ /* USER CODE BEGIN etzpc */ /* USER CODE END etzpc */ }; &hash1{ status = "okay"; /* USER CODE BEGIN hash1 */ /* USER CODE END hash1 */ }; &i2c4{ pinctrl-names = "default"; pinctrl-0 = <&i2c4_pins_z_mx>; status = "okay"; secure-status = "okay"; /* USER CODE BEGIN i2c4 */ i2c-scl-rising-time-ns = <185>; i2c-scl-falling-time-ns = <20>; clock-frequency = <400000>; pmic:stpmic@33{ compatible = "st,stpmic1"; reg = <0x33>; interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells = <2>; status = "okay"; secure-status = "okay"; regulators{ compatible = "st,stpmic1-regulators"; buck1-supply = <&vin>; buck2-supply = <&vin>; buck3-supply = <&vin>; buck4-supply = <&vin>; ldo1-supply = <&v3v3>; ldo2-supply = <&vin>; ldo3-supply = <&vdd_ddr>; ldo4-supply = <&vin>; ldo5-supply = <&vin>; ldo6-supply = <&v3v3>; vref_ddr-supply = <&vin>; boost-supply = <&vin>; pwr_sw1-supply = <&bst_out>; pwr_sw2-supply = <&bst_out>; vddcore:buck1{ regulator-name = "vddcore"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1350000>; regulator-always-on; regulator-initial-mode = <0>; regulator-over-current-protection; lp-stop{ regulator-on-in-suspend; regulator-suspend-microvolt = <1200000>; }; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vdd_ddr:buck2{ regulator-name = "vdd_ddr"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; regulator-always-on; regulator-initial-mode = <0>; regulator-over-current-protection; lp-stop{ regulator-suspend-microvolt = <1350000>; regulator-on-in-suspend; }; standby-ddr-sr{ regulator-suspend-microvolt = <1350000>; regulator-on-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vdd:buck3{ regulator-name = "vdd"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; st,mask-reset; regulator-initial-mode = <0>; regulator-over-current-protection; lp-stop{ regulator-suspend-microvolt = <3300000>; regulator-on-in-suspend; }; standby-ddr-sr{ regulator-suspend-microvolt = <3300000>; regulator-on-in-suspend; }; standby-ddr-off{ regulator-suspend-microvolt = <3300000>; regulator-on-in-suspend; }; }; v3v3:buck4{ regulator-name = "v3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-over-current-protection; regulator-initial-mode = <0>; lp-stop{ regulator-suspend-microvolt = <3300000>; regulator-on-in-suspend; }; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; v1v8_audio:ldo1{ regulator-name = "v1v8_audio"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; v3v3_hdmi:ldo2{ regulator-name = "v3v3_hdmi"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vtt_ddr:ldo3{ regulator-name = "vtt_ddr"; regulator-always-on; regulator-over-current-protection; st,regulator-sink-source; lp-stop{ regulator-off-in-suspend; }; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vdd_usb:ldo4{ regulator-name = "vdd_usb"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vdda:ldo5{ regulator-name = "vdda"; regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; regulator-boot-on; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; v1v2_hdmi:ldo6{ regulator-name = "v1v2_hdmi"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; standby-ddr-sr{ regulator-off-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; vref_ddr:vref_ddr{ regulator-name = "vref_ddr"; regulator-always-on; lp-stop{ regulator-on-in-suspend; }; standby-ddr-sr{ regulator-on-in-suspend; }; standby-ddr-off{ regulator-off-in-suspend; }; }; bst_out:boost{ regulator-name = "bst_out"; }; vbus_otg:pwr_sw1{ regulator-name = "vbus_otg"; }; vbus_sw:pwr_sw2{ regulator-name = "vbus_sw"; regulator-active-discharge = <1>; }; }; }; /* USER CODE END i2c4 */ }; &iwdg2{ status = "okay"; secure-status = "okay"; /*

Hi @cfilipescu​ ,

DTS you provided don't have &rcc node where you should have something like :

.. 
 
	st,pkcs = <
		CLK_CKPER_DISABLED
		CLK_ETH_DISABLED
		CLK_SDMMC12_HCLK6
		CLK_STGEN_HSI
		CLK_USBPHY_DISABLED
		CLK_SPI2S1_DISABLED
		CLK_SPI2S23_DISABLED
		CLK_SPI45_DISABLED
		CLK_SPI6_DISABLED
		CLK_I2C46_DISABLED
		CLK_SDMMC3_DISABLED
		CLK_ADC_DISABLED
		CLK_CEC_DISABLED
		CLK_I2C12_DISABLED
		CLK_I2C35_DISABLED
		CLK_UART1_DISABLED
		CLK_UART24_DISABLED
		CLK_UART35_DISABLED
		CLK_UART6_DISABLED
		CLK_UART78_DISABLED
		CLK_SPDIF_DISABLED
		CLK_SAI1_DISABLED
		CLK_SAI2_DISABLED
		CLK_SAI3_DISABLED
		CLK_SAI4_DISABLED
		CLK_LPTIM1_DISABLED
		CLK_LPTIM23_DISABLED
		CLK_LPTIM45_DISABLED
	>;
 
... 

For which you migth check status of CLK_SDMMC12_

And I don't see node &sdmmc1 in which you enable it :

&sdmmc1{
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc1_pins_mx>;
	status = "okay";
 
	/* USER CODE BEGIN sdmmc1 */
	/* USER CODE END sdmmc1 */
};

Strange since this supposed to be properly generated by CubeMX.

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.

@Community member​ 

I have both of those sections but I was pasting from my phone and for some reason, it truncated the file.

I attached it to this reply.

Hi @cfilipescu​ ,

I understand here you are trying to boot from SDCard. How did you populate the SDCard ?

Did you succeed to do it with CubeProg in serial boot mode ? or did you populate it on PC ?

Also, please confirm you successfully boot exact same hardware with a precedent software version ?

Thanks,

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.

Hi @Community member​ ,

Yes, I am booting from SDcard and I populated it using the PC.

https://github.com/bootlin/buildroot-external-st#flashing-and-booting-the-system

dd if=output/images/sdcard.img of=/dev/sdx bs=8M oflag=sync status=progress

Yes, I can boot exact same hardware with a precedent software version that uses "legacy" BSP partitioning without FIP.