Re: RPI4 clock speeds and serial port

Mark Millard via freebsd-arm <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>

On 2021-Mar-18, at 11:07, bob prohaska <[email protected]> wrote:

> On Thu, Mar 18, 2021 at 05:28:27PM +0000, tech-lists wrote:
>> hi,
>> 
>> On Thu, Mar 18, 2021 at 10:00:53AM -0700, bob prohaska wrote:
>> 
>>> /boot/msdos/config.txt contains
>>> 
>>> root@nemesis:~ # more /boot/msdos/config.txt
>>> [all]
>>> arm_64bit=1
>>> dtparam=audio=on,i2c_arm=on,spi=on
>>> dtoverlay=mmc
>>> dtoverlay=disable-bt

Note that use of disable-bt (which is
something standard to my context as well).
This switches would serial hardware is
used, such that the hardware that is not
cpu/gpu clock rate dependent is used.

I forgot to mention this context in my
prior reply.

>>> device_tree_address=0x4000
>>> kernel=u-boot.bin
>>> 
>>> [pi4]
>>> #hdmi_safe=1
>>> armstub=armstub8-gic.bin
>>> 
>>> Can one change the cpu speed without disturbing the serial console
>>> by using something like
>>> 
>>> arm_freq=1750
>>> 
>>> in config.txt, provided adequate cooling provisions are made?
>> 
>> I have this config.txt on both a rpi4 stable/13 and main/14. I have a
>> flirc case on stable/13 and one of those cases that looks like armour
>> made from solid metal on main/rpi4.
>> In both cases, the approved 5.1V @3.1W power supply is used.
>> The highest temp I've seen under load is 72 degC and that's at 25 degC
> 
> 72 C is rather toasty 8-)
> 
>> ambient. On both machines my config.txt looks like this:
>> 
>> arm_control=0x200
>> dtparam=audio=on,i2c_arm=on,spi=on
>> dtoverlay=mmc
>> dtoverlay=pwm
>> dtoverlay=disable-bt
>> device_tree_address=0x4000
>> kernel=u-boot.bin
>> over_voltage=6
>> arm_freq=2000
>> sdram_freq_min=3200
>> 
>> In order to clock it, I need to enable powerd on startup in
>> /etc/rc.conf:
>> 
>> powerd_enable="YES"
>> 
>> Because I also want that higher clock to run as much as possible, I tell
>> powerd to have an absurdly low trigger to get the clocked speed:
>> 
>> powerd_flags="-r 1"
>> 
>> and here's the clocked speed:
>> 
>> % sysctl -a | fgrep cpu.0
>> dev.cpu.0.temperature: 49.6C
>> dev.cpu.0.freq_levels: 2000/-1 600/-1
>> dev.cpu.0.freq: 2000
>> dev.cpu.0.%parent: cpulist0
>> dev.cpu.0.%pnpinfo: name=cpu@0 compat=arm,cortex-a72
>> dev.cpu.0.%location: dev.cpu.0.%driver: cpu
>> dev.cpu.0.%desc: Open Firmware CPU
>> 
>>> I'd rather not complicate use of the serial console at this point
>> 
>> not sure why the serial console would be a factor. I have a
>> console-wired rpi4 running main/14 and I never considered it. I console
>> into this machine like this:
>> 
>> cu -l /dev/cuaU0 -s 115200
>> 
> 
> Maybe on FreeBSD it doesn't matter. Pi-related sites report that the
> mini-UART baudrate is tied to the clock of the GPU, if that changes
> the baudrate changes too. It wasn't clear to me if the speed-changes to
> config.txt affected the GPU clock. Apparently not, at least in FreeBSD.

You are correct that the mini-UART has the dependencies.
But use of:

dtoverlay=disable-bt

avoids use of the mini-UART. The same is true
of instead using:

dtoverlay=miniuart-bt

but, then, Bluetooth suffers the variability.
(I just do not try to use Bluetooth.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.