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.
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).
Why not comparing the full "raspberrypi,4-model-b" string ?
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