[PATCH] arm64: dts: rockchip: Change serial baud rate for Pinephone Pro to 1.5 MB

Ondřej Jirman megi at xff.cz
Fri Jul 28 13:10:36 PDT 2023


Hi Heiko and Javier,

On Fri, Jul 28, 2023 at 08:59:50PM +0200, Heiko Stuebner wrote:
> 
> Hi Javier,
> 
> > Probably won't replace the DTB shipped with the firmware either? If one is
> > replacing the firmware provided DTB witch the one in the mainline kernel,
> > probably such person is also using mainline u-boot?
> 
> Not necessarily.
> 
> I.e. putting an extlinux.conf on an sd-card with a kernel-image and dtb
> is not rocket science ;-)
> 
> > For someone like me who is only using mainline u-boot, linux, etc then
> > having a consistent uart baud rate across all components is really useful.
> > 
> > Otherwise I either have serial console for u-boot or the kernel, but can't
> > have both working so is annoying.
> > 
> > It would be good to have a definite answer on this. Since every time that
> > I try to hack on my PPP, I end changing my DTS and remember this patch :)
> 
> So far people only reported "breaks my setup". I'm in a pickle here ;-) .
> Without anybody saying "I want to also move into this direction" I really
> feel I should not merge a patch that breaks other peoples setups.

Even if this is not changed in kernel, bootloader should fix this situation by
patching the kernel DTB before booting the kernel. U-Boot already patches the
DTB in several ways, so I guess it's possible to just change stdout-path either
in generic code, or in per-board ft_board_setup() for Pinephone Pro to something
that matches whatever the user configured via Kconfig:

https://elixir.bootlin.com/u-boot/latest/source/configs/pinephone-pro-rk3399_defconfig#L79

I mean that if U-Boot allows the user to configure arbitrary baudrate via
KConfig, then it *should* also update the kernel DTB to match, especially if the
choice is different from DTB that it actually embeds:

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/dts/rk3399-pinephone-pro.dts#L29

No static baudrate choice in DT will save anyone anyway, with the provided flexibility
of configuration.

Maybe this would be a nice location to fix this:

https://elixir.bootlin.com/u-boot/v2023.07.02/source/common/fdt_support.c#L131

kind regards,
	o.

> 
> Heiko
> 
> 



More information about the Linux-rockchip mailing list