Re: ALPHA1 on Raspberry Pi 3B+ (& RPi4B) [found where bcm2835_firmware turned into ofw_firmware, making bcm2835_firmware not found]

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sun, 13 Aug 2023 06:20:18 UTC
On Aug 12, 2023, at 17:42, Mike Karels <mike@karels.net> wrote:

> . . .
> 
> Two other failures:
> 
> bcm2835_cpufreq0: <CPU Frequency Control> on cpu0
> bcm2835_cpufreq0: Unable to find firmware device
> device_attach: bcm2835_cpufreq0 attach returned 6
> . . .
> I'll append the full dmesg.boot.
> 
> Mike
> 
> ---<<BOOT>>---
> . . .
> ofwbus0: <Open Firmware Device Tree>
> simplebus0: <Flattened device tree simple bus> on ofwbus0
> ofw_firmware0: <OFW Firmware Group> on simplebus0

The above line does not match the historical identification:

simplebus3: <Flattened device tree simple bus> on ofwbus0
simple_mfd0: <Simple MFD (Multi-Functions Device)> mem 0x7d5d2000-0x7d5d2eff on simplebus0
bcm2835_firmware0: <BCM2835 Firmware> on simplebus0
ofw_clkbus1: <OFW clocks bus> on bcm2835_firmware0

The modern result outputs no line like:

bcm2835_firmware0: <BCM2835 Firmware> on simplebus0

The older result did not output a line like:

ofw_firmware0: <OFW Firmware Group> on simplebus0

In other words the RPi* support was broken by the following
change effectively disabling having bcm2835_firmware to
be found by bcm2835_cpufreq:

author Emmanuel Vadot <manu@FreeBSD.org> 2022-12-06 10:57:37 +0000
committer Emmanuel Vadot <manu@FreeBSD.org> 2023-08-08 13:13:31 +0000
commit fdfd3a90b6ceba838a40c3c51472883e7de8a440 (patch)
. . .
ofw: Add a ofw_firmware driver

Some SoCs have an external firmware doing power management, clock and other stuffs. (Xilinx, ARM Juno etc ...) The way it is represent in the DTB is usually having a 'firmware' node under the root node and have some nodes under it with the correct compatible strings. The firmware node itself doesn't have any compatible strings. This driver is simple subclassed from simplebus and attaches at BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE so early drivers (like clock drivers) can still have a change to attach early.

Reviewed by: andrew
Sponsored by: Beckhoff Automation GmbH & Co. KG 
Differential Revision: https://reviews.freebsd.org/D37612

> ofw_clkbus0: <OFW clocks bus> on ofw_firmware0
> ofw_clkbus1: <OFW clocks bus> on ofwbus0
> clk_fixed0: <Fixed clock> on ofw_clkbus1
> clk_fixed1: <Fixed clock> on ofw_clkbus1
. . .



===
Mark Millard
marklmi at yahoo.com