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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 04, 2023 at 09:51:11AM +0200, Heiko Stübner wrote:
> Hi,
> 
> Am Montag, 3. April 2023, 19:59:37 CEST schrieb Javier Martinez Canillas:
> > This baud rate is set for the device by mainline u-boot and is also what
> > is set in the Pinebook Pro Device Tree, which is a device similar to the
> > PinePhone Pro but with a different form factor.
> > 
> > Otherwise, the baud rate of the firmware and Linux don't match by default
> > and a 'console=ttyS2,1500000n8' kernel command line parameter is required
> > to have proper output for both.
> 
> The interesting question is always if this will break someone else's setup.
> I've never really understood the strange setting of 1.5MBps, but on the
> other hand it _is_ a reality on most boards.

Normal users of the phone probably run with UART console disabled, because
UART is muxed with audio jack output and to enable it they have to add
console=ttyS2 to the kernel command line and flip a physical switch inside
the phone.

Fortunately, not sepcifying stdout-path baud rate in the options part
of the string, will make the serial driver probe for the baud rate from
the previous boot stage and make the user happy by keeping whatever was
already set in the bootloader.

  https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_port.c#L3496

So we can make the kernel just keep the baudrate setup from the previous
boot stage by:

	stdout-path = "serial2";

regards,
	o.

> Personally I don't care that much either way, but would like a comment
> from the other people working on that device - if possible.
> 
> I guess if we don't hear anything, I'll apply it nevertheless at some point
> 
> 
> Heiko
> 
> 
> > Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
> > ---
> > 
> > I tried to instead get rid of the baud rate altogether, as suggested by
> > Peter Robinson. AFAIU that should just pick whatever bad rate has been
> > using by the early console.
> > 
> > But neither using 'stdout-path = "serial2" nor 'stdout-path = &uart2'
> > worked for me.
> > 
> > In both cases I didn't have any output unless setting a baud rate using
> > the 'console='param.
> > 
> >  arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> > index a0795a2b1cb1..6bbe65bd5bd4 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> > @@ -26,7 +26,7 @@ aliases {
> >  	};
> >  
> >  	chosen {
> > -		stdout-path = "serial2:115200n8";
> > +		stdout-path = "serial2:1500000n8";
> >  	};
> >  
> >  	gpio-keys {
> > 
> > base-commit: 3adf89324a2b2a9dbc2c12d8895021e7e34e3346
> > 
> 
> 
> 
> 



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux