no dev.cpu on RPI-B

Peter Jeremy peter at rulingia.com
Wed Apr 10 00:00:01 UTC 2019


On 2019-Apr-10 00:39:18 +0200, Bernd Walter <ticso at cicely7.cicely.de> wrote:
>I was hoping for dev.cpu.0.temperature as it exists on the Pi3.
>Is something missing in my setup (using 12-RELEASE kernel from image),
>or is there no support for that?

I ran into this when I switched from the FreeBSD FDT to the default Linux FDT.
The latter is missing the CPU description.  The fix is to create your own
FDT overlay and get the loader to load it.  There's a similar problem with the
SPI controller.

I used the FDT below, compiled with:
$ dtc -@ -O dtb -o /boot/dtb/overlays/rpi-cpus.dtbo -i /usr/src/sys/dts/arm -i /usr/src/sys/gnu/dts/arm rpi-cpus.dtso

And add the following to loader.conf:
fdt_overlays="rpi-cpus.dtbo"

------- rpi-cpus.dtso
/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2835";
};

&{/} {
        cpus {
                cpu at 0 {
                        compatible = "arm,1176jzf-s";
                        device_type = "cpu";
                        reg = <0x0>;
                        clock-frequency = <0x29b92700>;
                };
        };
};

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20190410/7c6db65c/attachment.sig>


More information about the freebsd-arm mailing list