Page MenuHomePhabricator

RPi4: Baudrate is set incorrectly with recent versions of start4.elf
Closed, ResolvedPublic


Ever since the introduction of the [[ | 2019.11.18 version of start4.elf ]] by the Pi Foundation, the baudrate set by TF-A for the rpi4 platform is incorrect.

Our testing shows that all the serial divisors we read have doubled compared to the values that we read with a pre-2019.11.18 version of start4.elf, which indicates that the internal clock base that these divisors are meant to apply on (a.k.a. [[ | PLAT_RPI4_VPU_CLK_RATE in the TF-A repo ]]) has also doubled.

I am planning to submit a patch that fixes this shortly.

Since this is also relevant, the patch I will be submitting fixes another baudrate issue that we have which is that, unless you have core_freq set to exact dividers of 500 (default) in your Raspberry Pi's config.txt, then the baudrate is not set correctly due to the decimal part of the divisor being ignored. For instance, regardless of the start4.elf you use, you will find that the baudrate is not set to its expected 115200 if you set core_freq=400 or core_freq=300 in config.txt.

Event Timeline

pbatard triaged this task as Normal priority.Dec 5 2019, 2:02 PM
pbatard created this task.
pbatard updated the task description. (Show Details)
pbatard updated the task description. (Show Details)Dec 5 2019, 2:05 PM
pbatard closed this task as Resolved.Mar 6 2020, 3:07 PM