Chronodot on RPI
Luiz Otavio O Souza
lists.br at gmail.com
Mon Mar 2 03:46:16 UTC 2015
On 1 March 2015 at 16:12, Waitman Gobble wrote:
> Anyone have luck with the ChronoDot (D3231) on Raspberry Pi?
> I have a RPI B+ (rev 1), tried with HEAD r277133 and r279488 without luck.
>
>
> # uname -a
> FreeBSD ARTiming150228 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r277133:
> Tue Jan 13 20:18:52 PST 2015
> waitman at rpidev.waitman.net:/usr/home/waitman/crochet-freebsd/work/obj/arm.armv6/usr/src/sys/TMRDEV
> arm
>
> # uname -a
> FreeBSD raspberry-pi 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279488: Sun
> Mar 1 10:27:33 PST 2015
> waitman at rpidev.waitman.net:/usr/home/waitman/crochet-freebsd/work/obj/arm.armv6/usr/src/sys/TMRDEV
> arm
>
>
> # dmesg | grep iic
> iichb0: <BCM2708/2835 BSC controller> mem 0x205000-0x20501f irq 61 on simplebus0
> iicbus0: <OFW I2C bus> on iichb0
> iic0: <I2C generic I/O> on iicbus0
> iichb1: <BCM2708/2835 BSC controller> mem 0x804000-0x80401f irq 61 on simplebus0
> iicbus1: <OFW I2C bus> on iichb1
> iic1: <I2C generic I/O> on iicbus1
>
>
> a) tried the DS1307 program from Vadim Zaigrin, without success.
>
> b) tried i2cscan from Winston Smith,
>
> only get errors. ie,
>
> ioctl(I2CRDWR) failed: Input/output error
>
> I have VCC pin 1, GND pin 6, SDA on 3 and SCL on 5.
>
> trying /dev/iic0 and /dev/iic1
>
> Any help/suggestions apprecitated.
>
> Thank you,
>
>
> --
> Waitman Gobble
> Los Altos California USA
> 510-830-7975
Hi,
I've just committed a driver for DS3231 (r279399), I'm using a
different breakout board but chronodot will work just fine.
Unfortunately you need to add this device to your kernel and also make
the appropriate changes on DTS.
Please add 'device ds3231' to RPI-B kernel and the following to RPi DTS:
Index: rpi.dts
===================================================================
--- sys/boot/dst/dts/arm/rpi.dts (revision 279408)
+++ sys/boot/dst/dts/arm/rpi.dts (working copy)
@@ -292,6 +292,14 @@
broadcom,function = "ALT3";
};
};
+
+ bsc1 {
+ rtc {
+ compatible = "maxim,ds3231";
+ reg = <0xd0>;
+ };
+ };
+
usb {
hub {
compatible = "usb,hub", "usb,device";
Rebuild your kernel and DTB (binary version of DTS) update your SD
card and hopefully everything will work.
The ds3231(4) settings can be viewed with sysctl dev.ds3231
I've made some modifications to Winston's i2cscan which should now work on RPi:
# ./i2cscan /dev/iic1
Checking device: /dev/iic1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- 4F
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20 - i2c GPIO expander
48 and 4f - lm75
57 - ? (I don't remember what is this one :)
68 - DS3231
You can find the modified i2cscan here:
https://people.freebsd.org/~loos/i2cscan.c
Luiz
More information about the freebsd-arm
mailing list