1-Wire and RPi2

Marek Zarychta zarychtam at plan-b.pwste.edu.pl
Tue Aug 14 22:04:53 UTC 2018


W dniu 14.08.2018 o 21:15, Warner Losh pisze:
>
>
> On Tue, Aug 14, 2018 at 12:20 PM, Marek Zarychta
> <zarychtam at plan-b.pwste.edu.pl <mailto:zarychtam at plan-b.pwste.edu.pl>>
> wrote:
>
>     I followed owc(4) man page, so added "onewire { ..." to rpi2.dts file.
>     Then the kernel was recompiled and reinstalled. Also rpi2.dtb was
>     recompiled using /usr/src/sys/tools/fdt/make_dtb.sh and reinstalled in
>     /boot/msdos.
>
>     The only significant change I can see is changed MAC address assigned
>     for ue0. The 1-Wire device is still missing and I want to find out
>     what
>     I am doing wrong.
>
>     Is 1-Wire bus supported on RPi2 boards running FreeBSD 12.0-ALPHA1?
>
>
> I'd expect it to work. I've not recently confirmed it working though.
>
> Warner

Thank you for this device driver and for the reply. Of course, it works,
I upgraded this box from 11-STABLE, but only partially upgraded boot
environment installed on /boot/msdos partition.

Currently (for FreeBSD 12.0-ALPHA1) getting ow_temp(4) working on
Raspberry Pi 2 is pretty straightforward. I couldn't resist posting a
simple tutorial, maybe some enthusiasts will benefit from it:

pkg install rpi-firmware
cp /usr/local/share/rpi-firmware/overlays/w1-gpio.dtbo /boot/msdos/overlays/
echo 'dtoverlay=w1-gpio' >>/boot/msdos/config.txt
echo 'ow_load="yes"'  >>/boot/loader.conf
echo 'owc_load="yes"' >>/boot/loader.conf
echo 'ow_temp_load="yes"' >>/boot/loader.conf

After reboot:

#dmesg | grep -i wire
owc0: <FDT GPIO attached one-wire bus> at pin 4 on gpiobus0
ow0: <1 Wire Bus> on owc0
ow_temp0: <Advanced One Wire Temperature> romid 28:90:2d:e0:05:00:00:c7
on ow0
ow_temp1: <Advanced One Wire Temperature> romid 28:02:e6:84:05:00:00:d4
on ow0
ow_temp2: <Advanced One Wire Temperature> romid 28:9e:0a:a1:05:00:00:12
on ow0
ow_temp3: <Advanced One Wire Temperature> romid 28:db:82:85:05:00:00:07
on ow0

-- 
Marek Zarychta

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20180815/46860d08/attachment.sig>


More information about the freebsd-arm mailing list