Ths uart uses clock from VPU on the VC4 GPU which is locked
to either 500 or 250Mhz depending on RPi4 or lower. Check which
model is running to set appropriate clock speed.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 30516 Build 28263: arc lint + arc unit
Event Timeline
sys/dev/uart/uart_dev_mu.c | ||
---|---|---|
519 |
If we start using the root compatible properties I would prefer to have it stored in a variable in sys/dev/ofw/ofw_fdt.c and both accessible by the kernel and userland (via sysctl under hw.fdt.compatible/compatibles, the first one will return the first string in the prop and the second all the strings).
sys/dev/uart/uart_dev_mu.c | ||
---|---|---|
548 | Why not comparing the full "raspberrypi,4-model-b" string ? |
The uart is attached before cpufreq is attached. I had wrongly assumed it would be the other way around.
Update to correct RPi baud rate on mu serial port
Add a command to ofw_fdt.c to retrieve Manufacturer model name
modified uart_dev_mu.c to use this new command then added
a sysctl hw.manufacturer to retrieve this model name from user land.
hw.model is already in use.
Tested on both RPi3 and RPi4
Add model and compatible strings
add string sysctl's for both under hw.fdt
lookup model and compatible once and store
I don't understand the need to add new methods to ofw_if. The new methods are just extracting standard properties from a standard dtb in memory; if new functions are needed at all, why aren't they just a couple new convenience functions in ofw_subr.{c,h}?
It might be a good idea to get Nathan Whitehorn's input on this before committing.