no dev.cpu on RPI-B

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

no dev.cpu on RPI-B

Bernd Walter-4
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?

--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Peter Jeremy-8
On 2019-Apr-10 00:39:18 +0200, Bernd Walter <[hidden email]> 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@0 {
                        compatible = "arm,1176jzf-s";
                        device_type = "cpu";
                        reg = <0x0>;
                        clock-frequency = <0x29b92700>;
                };
        };
};

--
Peter Jeremy

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Bernd Walter-4
On Wed, Apr 10, 2019 at 09:59:29AM +1000, Peter Jeremy wrote:
> On 2019-Apr-10 00:39:18 +0200, Bernd Walter <[hidden email]> 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.

Thank you very much.
That makes sense, didn't thought about FDT because it works on a Pi3
with the same 12.0-RELEASE.
I'm already using overlays on those systems for SPI, my own APA102 LED driver
and DS18B20 sensors.
It is for an LED matrix running 24 RPI1 with 800 LEDs each.
The systems are nfsroot, but I think the dtso are loaded from the micro-SD
cards :-(
Well - I guess I setup a bootscript on the NFS server to update the data on
the cards.

> 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@0 {
>                         compatible = "arm,1176jzf-s";
>                         device_type = "cpu";
>                         reg = <0x0>;
>                         clock-frequency = <0x29b92700>;
>                 };
>         };
> };
>
> --
> Peter Jeremy



--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Ian Lepore-3
On Wed, 2019-04-10 at 02:35 +0200, Bernd Walter wrote:

> On Wed, Apr 10, 2019 at 09:59:29AM +1000, Peter Jeremy wrote:
> > On 2019-Apr-10 00:39:18 +0200, Bernd Walter <
> > [hidden email]> 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.
>
> Thank you very much.
> That makes sense, didn't thought about FDT because it works on a Pi3
> with the same 12.0-RELEASE.
> I'm already using overlays on those systems for SPI, my own APA102
> LED driver
> and DS18B20 sensors.
> It is for an LED matrix running 24 RPI1 with 800 LEDs each.
> The systems are nfsroot, but I think the dtso are loaded from the
> micro-SD
> cards :-(
> Well - I guess I setup a bootscript on the NFS server to update the
> data on
> the cards.
>

I think that's true if you use uboot or the config.txt file to load the
overlays.  If you set fdt_overlays="file1.dtbo,file2.dtbo,etc" in
/boot/loader.conf the overlays should come from /boot/dtb/overlays in
the same /boot folder.

-- Ian

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Bernd Walter-4
On Tue, Apr 09, 2019 at 06:44:19PM -0600, Ian Lepore wrote:

> On Wed, 2019-04-10 at 02:35 +0200, Bernd Walter wrote:
> > On Wed, Apr 10, 2019 at 09:59:29AM +1000, Peter Jeremy wrote:
> > > On 2019-Apr-10 00:39:18 +0200, Bernd Walter <
> > > [hidden email]> 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.
> >
> > Thank you very much.
> > That makes sense, didn't thought about FDT because it works on a Pi3
> > with the same 12.0-RELEASE.
> > I'm already using overlays on those systems for SPI, my own APA102
> > LED driver
> > and DS18B20 sensors.
> > It is for an LED matrix running 24 RPI1 with 800 LEDs each.
> > The systems are nfsroot, but I think the dtso are loaded from the
> > micro-SD
> > cards :-(
> > Well - I guess I setup a bootscript on the NFS server to update the
> > data on
> > the cards.
> >
>
> I think that's true if you use uboot or the config.txt file to load the
> overlays.  If you set fdt_overlays="file1.dtbo,file2.dtbo,etc" in
> /boot/loader.conf the overlays should come from /boot/dtb/overlays in
> the same /boot folder.

I switch to network via loader.conf:
[42]matrix# cat /boot/loader.conf
# Configure USB OTG; see usb_template(4).
hw.usb.template=3
umodem_load="YES"
# Disable the beastie menu and color
beastie_disable="YES"
loader_color="NO"

currdev="net0"

fdt_overlays="rpi-apa102-matrix.dtbo"
#fdt_overlays="spigen-rpi-b.dtbo"

owc_load="YES"
ow_load="YES"
ow_temp_load="YES"
apa102_load="YES"


I know that it loads the kernel and modules from network, but the
loader, the loader.conf and maybe the dtbo files are from the card.
I couldn't get u-boot to switch to network.
Well - not a major issue.
I used an extra UFS partition for that, but it should have also worked
by placing the files on the msdosfs partition.
I've copyed the whole /boot over to the UFS, but that's more than
required.

--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Kyle Evans-3
On Tue, Apr 9, 2019 at 9:47 PM Bernd Walter <[hidden email]> wrote:

>
> On Tue, Apr 09, 2019 at 06:44:19PM -0600, Ian Lepore wrote:
> > On Wed, 2019-04-10 at 02:35 +0200, Bernd Walter wrote:
> > > On Wed, Apr 10, 2019 at 09:59:29AM +1000, Peter Jeremy wrote:
> > > > On 2019-Apr-10 00:39:18 +0200, Bernd Walter <
> > > > [hidden email]> 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.
> > >
> > > Thank you very much.
> > > That makes sense, didn't thought about FDT because it works on a Pi3
> > > with the same 12.0-RELEASE.
> > > I'm already using overlays on those systems for SPI, my own APA102
> > > LED driver
> > > and DS18B20 sensors.
> > > It is for an LED matrix running 24 RPI1 with 800 LEDs each.
> > > The systems are nfsroot, but I think the dtso are loaded from the
> > > micro-SD
> > > cards :-(
> > > Well - I guess I setup a bootscript on the NFS server to update the
> > > data on
> > > the cards.
> > >
> >
> > I think that's true if you use uboot or the config.txt file to load the
> > overlays.  If you set fdt_overlays="file1.dtbo,file2.dtbo,etc" in
> > /boot/loader.conf the overlays should come from /boot/dtb/overlays in
> > the same /boot folder.
>
> I switch to network via loader.conf:
> [42]matrix# cat /boot/loader.conf
> # Configure USB OTG; see usb_template(4).
> hw.usb.template=3
> umodem_load="YES"
> # Disable the beastie menu and color
> beastie_disable="YES"
> loader_color="NO"
>
> currdev="net0"
>
> fdt_overlays="rpi-apa102-matrix.dtbo"
> #fdt_overlays="spigen-rpi-b.dtbo"
>
> owc_load="YES"
> ow_load="YES"
> ow_temp_load="YES"
> apa102_load="YES"
>
>
> I know that it loads the kernel and modules from network, but the
> loader, the loader.conf and maybe the dtbo files are from the card.
> I couldn't get u-boot to switch to network.
> Well - not a major issue.
> I used an extra UFS partition for that, but it should have also worked
> by placing the files on the msdosfs partition.
> I've copyed the whole /boot over to the UFS, but that's more than
> required.
>

DTBO should be getting loaded from the same device that your
kernel/kmods are- it does (...as of the last time I touched it) what
is effectively `load -t dtbo $filename` for every file in your
fdt_overlays.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Bernd Walter-4
In reply to this post by Bernd Walter-4
On Wed, Apr 10, 2019 at 02:35:08AM +0200, Bernd Walter wrote:

> On Wed, Apr 10, 2019 at 09:59:29AM +1000, Peter Jeremy wrote:
> > On 2019-Apr-10 00:39:18 +0200, Bernd Walter <[hidden email]> 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.
>
> Thank you very much.
> That makes sense, didn't thought about FDT because it works on a Pi3
> with the same 12.0-RELEASE.
> I'm already using overlays on those systems for SPI, my own APA102 LED driver
> and DS18B20 sensors.
> It is for an LED matrix running 24 RPI1 with 800 LEDs each.
> The systems are nfsroot, but I think the dtso are loaded from the micro-SD
> cards :-(
> Well - I guess I setup a bootscript on the NFS server to update the data on
> the cards.

Much better, but still no temperature:
[52]matrix# sysctl dev.cpu
dev.cpu.0.%parent: cpulist0
dev.cpu.0.%pnpinfo: name=cpu@0 compat=arm,1176jzf-s
dev.cpu.0.%location:
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: Open Firmware CPU
dev.cpu.%parent:

Will take a deeper look into it and compare to the previous FDT once I
find time.

--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Peter Jeremy-8
On 2019-Apr-11 22:28:03 +0200, Bernd Walter <[hidden email]> wrote:

>Much better, but still no temperature:
>[52]matrix# sysctl dev.cpu
>dev.cpu.0.%parent: cpulist0
>dev.cpu.0.%pnpinfo: name=cpu@0 compat=arm,1176jzf-s
>dev.cpu.0.%location:
>dev.cpu.0.%driver: cpu
>dev.cpu.0.%desc: Open Firmware CPU
>dev.cpu.%parent:
>
>Will take a deeper look into it and compare to the previous FDT once I
>find time.
I did some digging and found that I'd missed a required patch to
bcm2835_cpufreq which I've just committed as r346265.  Sorry about that.

--
Peter Jeremy

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: no dev.cpu on RPI-B

Bernd Walter-4
On Tue, Apr 16, 2019 at 07:48:11PM +1000, Peter Jeremy wrote:

> On 2019-Apr-11 22:28:03 +0200, Bernd Walter <[hidden email]> wrote:
> >Much better, but still no temperature:
> >[52]matrix# sysctl dev.cpu
> >dev.cpu.0.%parent: cpulist0
> >dev.cpu.0.%pnpinfo: name=cpu@0 compat=arm,1176jzf-s
> >dev.cpu.0.%location:
> >dev.cpu.0.%driver: cpu
> >dev.cpu.0.%desc: Open Firmware CPU
> >dev.cpu.%parent:
> >
> >Will take a deeper look into it and compare to the previous FDT once I
> >find time.
>
> I did some digging and found that I'd missed a required patch to
> bcm2835_cpufreq which I've just committed as r346265.  Sorry about that.

Perfect:
[48]matrix# sysctl dev.cpu
dev.cpu.0.temperature: 33.6C
dev.cpu.0.freq_levels: 700/-1 600/-1 500/-1 400/-1 300/-1
dev.cpu.0.freq: 700
dev.cpu.0.%parent: cpulist0
dev.cpu.0.%pnpinfo: name=cpu@0 compat=arm,1176jzf-s
dev.cpu.0.%location:
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: Open Firmware CPU
dev.cpu.%parent:

Thank you

--
B.Walter <[hidden email]> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"