Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2018 00:04:36 +0200
From:      Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: 1-Wire and RPi2
Message-ID:  <de8cd007-7981-26b7-e61d-8f2d103f61cd@plan-b.pwste.edu.pl>
In-Reply-To: <CANCZdfr6SLWrReFQWo27tannLLFiOy2bWGg=qD1uUJTM_%2BrHbQ@mail.gmail.com>
References:  <1e34169b-a638-ca80-13f1-b96585483a76@plan-b.pwste.edu.pl> <CANCZdfr6SLWrReFQWo27tannLLFiOy2bWGg=qD1uUJTM_%2BrHbQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--kM9OzwNNjm9rqRN1BfRkX73G5N0JerjXL
Content-Type: multipart/mixed; boundary="PCwj3c4IzaGkGYHA7Ngtevw9zCLPXLXie";
 protected-headers="v1"
From: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
To: Warner Losh <imp@bsdimp.com>
Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Message-ID: <de8cd007-7981-26b7-e61d-8f2d103f61cd@plan-b.pwste.edu.pl>
Subject: Re: 1-Wire and RPi2
References: <1e34169b-a638-ca80-13f1-b96585483a76@plan-b.pwste.edu.pl>
 <CANCZdfr6SLWrReFQWo27tannLLFiOy2bWGg=qD1uUJTM_+rHbQ@mail.gmail.com>
In-Reply-To: <CANCZdfr6SLWrReFQWo27tannLLFiOy2bWGg=qD1uUJTM_+rHbQ@mail.gmail.com>

--PCwj3c4IzaGkGYHA7Ngtevw9zCLPXLXie
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


W dniu 14.08.2018 o=C2=A021:15, Warner Losh pisze:
>
>
> On Tue, Aug 14, 2018 at 12:20 PM, Marek Zarychta
> <zarychtam@plan-b.pwste.edu.pl <mailto:zarychtam@plan-b.pwste.edu.pl>>
> wrote:
>
>     I followed owc(4) man page, so added "onewire { ..." to rpi2.dts fi=
le.
>     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 assign=
ed
>     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/overla=
ys/
echo 'dtoverlay=3Dw1-gpio' >>/boot/msdos/config.txt
echo 'ow_load=3D"yes"'=C2=A0 >>/boot/loader.conf
echo 'owc_load=3D"yes"' >>/boot/loader.conf
echo 'ow_temp_load=3D"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

--=20
Marek Zarychta


--PCwj3c4IzaGkGYHA7Ngtevw9zCLPXLXie--

--kM9OzwNNjm9rqRN1BfRkX73G5N0JerjXL
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEMOqvKm6wKvS1/ZeCdZ/s//1SjSwFAltzUf0ACgkQdZ/s//1S
jSzYogf7B4aiSC336j8MTSvduqUlGZ+yoo8yq9SdnD9cihiVuBLgSKUhAqDLLsG0
HDw6NZ719dEXWBN2H1r4yw9Ui1M2OtLxrlthaPA3Vyyy3+i9oP9++CkeFuWYIXlV
Tbwij3JUP5cVY+QAA7zwGDzGA6fIHK8HpiE+HrSLuxbxEL1opPvubn/rTagumPDW
Qx4QMA9hBzH7HabCfE7dvaBzCZeCymOCwwK+3NypXRnnhqtB4QXhKots623DmHNf
RwVmmWbJbyiYsXeEDHkNS3JTuMsvjaMMfWRMCGNHy76tpbeKXXJF67odEPo4ElLY
oivexdIr2IOY+dMeYkmVQwSTp0CYHA==
=5oB+
-----END PGP SIGNATURE-----

--kM9OzwNNjm9rqRN1BfRkX73G5N0JerjXL--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?de8cd007-7981-26b7-e61d-8f2d103f61cd>