Ok I have a DS3231 module working on the Beaglebone. Here is my overlay:
Save the above as /boot/dtb/ds3231.dts
Then compile from the /boot/dtb directory:
Use this to enable the dtb overlay:
/boot/loader.conf
Notice that I already had the ADC enabled , So I added my RTC module
Wiring:
P9_1 =Ground
P9_3 =3.3V
P9_17=i2c1 SCL
P9_18=i2c1 SDA
root@beaglebone:~ # sysctl dev.ds3231
dev.ds3231.0.32khz_enable: 1
dev.ds3231.0.sqw_mode: interrupt
dev.ds3231.0.sqw_freq: 8192
dev.ds3231.0.bbsqw: 0
dev.ds3231.0.temp_conv: 0
dev.ds3231.0.temperature: 22.6C
dev.ds3231.0.%parent: iicbus1
dev.ds3231.0.%pnpinfo: name=ds3231@68 compat=maxim,ds3231
dev.ds3231.0.%location: addr=0xd0
dev.ds3231.0.%driver: ds3231
dev.ds3231.0.%desc: Maxim DS3231 RTC
dev.ds3231.%parent:
Code:
// Definitions for DS3231 I2C based Real Time Clock
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
fragment@0 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
ds3231: ds3231@68 {
compatible = "maxim,ds3231";
reg = <0x68>;
status = "okay";
};
};
};
__overrides__ {
ds3231 = <&ds3231>,"status";
};
};
Then compile from the /boot/dtb directory:
dtc -I dts -O dtb ds3231.dts -o ds3231.dtb
Use this to enable the dtb overlay:
/boot/loader.conf
Code:
fdt_overlays="ds3231.dtb,am335x-beaglebone-tscadc.dtb"
Wiring:
P9_1 =Ground
P9_3 =3.3V
P9_17=i2c1 SCL
P9_18=i2c1 SDA
root@beaglebone:~ # sysctl dev.ds3231
dev.ds3231.0.32khz_enable: 1
dev.ds3231.0.sqw_mode: interrupt
dev.ds3231.0.sqw_freq: 8192
dev.ds3231.0.bbsqw: 0
dev.ds3231.0.temp_conv: 0
dev.ds3231.0.temperature: 22.6C
dev.ds3231.0.%parent: iicbus1
dev.ds3231.0.%pnpinfo: name=ds3231@68 compat=maxim,ds3231
dev.ds3231.0.%location: addr=0xd0
dev.ds3231.0.%driver: ds3231
dev.ds3231.0.%desc: Maxim DS3231 RTC
dev.ds3231.%parent: