NetBSD-Bugs archive

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

Re: port-evbarm/54941: Raspberry Pi Zero W serial console corrupted when CPU frequency changed



The following reply was made to PR port-evbarm/54941; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-evbarm/54941: Raspberry Pi Zero W serial console corrupted when CPU frequency changed
Date: Fri, 7 Feb 2020 04:32:42 -0000 (UTC)

 rokuyama.rk%gmail.com@localhost writes:
 
 >Serial console (mini UART; com0) on Raspberry Pi Zero W (RPI0W) gets
 >corrupted when CPU frequency (machdep.cpu.frequency.target) is changed
 >from 700 to 1000 by sysctl(8).
 
 >This is because the baud rate of mini UART is linked to CPU frequency:
 >  https://www.raspberrypi.org/documentation/configuration/uart.md
 
 That's a limitation of the hardware. It also occurs when the CPU
 frequency is changed by the firmware (e.g. when temperature is too
 high or voltage too low).
 
 You can force firmware to keep frequency (which also stops users from
 selecting a frequency) with the force_turbo=1 firmware setting (also some
 other possibilities).
 
 You can switch console to the PL011 UART (and disable/restrict the Bluetooth
 interface by doing so) with a DTB overlay. Not sure if our DTB allows it,
 but that's the common method used with Linux.
 
 >The real fix should be to adjust the baud rate when CPU frequency is
 >changed in vcmbox_cpufreq_sysctl_helper():
 
 Adjusting the UART configuration in the com driver (not the sysctl helper)
 would be possible. However, it doesn't really fix the problem. At every
 frequency switch a concurrent send or receive operation on the console
 still gets corrupted.
 
 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv%serpens.de@localhost
                                 "A potential Snark may lurk in every tree."
 


Home | Main Index | Thread Index | Old Index