cancel
Showing results for 
Search instead for 
Did you mean: 

Change default tf-a and u-boot serial linux console.

Lmoio.1
Senior

Hello, my main seriale console should be USART2 instead of UART4. I modified the kernel dts as follows:

	chosen {
		stdout-path = "serial0:115200n8";
	};
 
	aliases {
		ethernet0 = &ethernet0;
		mmc0 = &sdmmc1;
		mmc1 = &sdmmc2;
		serial0 = &usart2;
	};

and it configures correctly the kernel console.

If I try the same modification in tf-a and u-boot dts, at boot i see the log starting on uart4, but it blocks at this point

Preparing exit to normal world 
No serial driver found

Should I modify some boot env too?

22 REPLIES 22
Olivier GALLIEN
ST Employee

Hi @gianlucarenzi​ ,

"The devicetree from my point-of-view is automatically generated by STMCubeMX (latest version as today's) "

This sentence put me on the track of 2 possible issues:

  • First, latest STM32CubeMX support only latest DV3.0 and related BSP component. In this release U-boot SPL is no longer supported, except for DDR Utility.
  • STM32CubeMX generate a ready to boot DT for DK board project .. but not for MP151A project. You have to pay attention to complete it by filling USER SECTION.You can use the DK one as reference.

Hope it help

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.

At the moment, I am digging more carefully at the device-tree stuff, and adapting from others stm32mp1 based board dts files in the u-boot git (2022.01.rc1) and using uart4 as the stm32157c-dk2 I have, now the prompt appear on the console, so it looks like somewhere there is a *hardcoded* configuration (I am supposing something related to usart1 clocks initialization) that it brings the card to resetting on booting. Anyway now I am looking for the correct device-tree initialization stuff, accessing to devices (pmic) and others directly to u-boot prompt. As soon as everything is working good, I will jump to Linux.

Anyway I had to have 4 more files ( .dts, .dtsi, -u-boot.dtsi and ddr3 setup ) to enable all stuff correctly in u-boot. Now I tested 512MB with mtest and it takes more than 5 minutes. Is it normal?

The console output is giving me those informations:

U-Boot SPL 2022.01-rc1 (Nov 17 2021 - 18:31:57 +0100)

RAM: EK440 DDR3-DDR3L 16bits 533000kHz

WDT:  Started watchdog@5a002000 with servicing (32s timeout)

U-Boot 2022.01-rc1 (Nov 17 2021 - 18:31:57 +0100)

CPU: STM32MP151AAA Rev.Z

Model: Eurek EK440

Board: stm32mp1 in basic mode (eurek,ek440)

DRAM: 512 MiB

Clocks:

- MPU : 650 MHz

- MCU : 208.878 MHz

- AXI : 266.500 MHz

- PER : 24 MHz

- DDR : 533 MHz

WDT:  Started watchdog@5a002000 with servicing (32s timeout)

NAND: 0 MiB

MMC:  STM32 SD/MMC: 0, STM32 SD/MMC: 1

Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:   serial

Out:  serial

Err:  serial

invalid MAC address in OTP 00:00:00:00:00:00

Net:

Error: ethernet@5800a000 address not set.

No ethernet found.

Hit any key to stop autoboot: 0

After that I can stop the booting process and the uboot commands help me out to find what's working and what's not.

In attachment the device-tree files I was talking about before.

Can you check if there is some strange issue?

Regards,

Gianluca

Hi @gianlucarenzi​ ,

First, u-boot git (2022.01.rc1) is not a version part of the delivered ST ecosystem.

The latest, part of the release DV3.1 done yesterday, is v2020.10-stm32mp1-r2

I advise you to use consistent DV3.1 BSP components for your development.

Then, we are here far from the initial post topic.

In case you would like further support from Community please post a new question.

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.