I’m trying to get a M41T00 RTC up on a custom cape using Angstrom and kernel 3.8.13. The DS1307 is well supported and the adafruit rtc cape dts file has an example device tree overlay fragment which looks like this:
fragment@0 {
target = <&i2c2>;
overlay {
/* shut up DTC warnings */
#address-cells = <1>;
#size-cells = <0>;
/* DS1307 RTC module */
rtc@68 {
compatible = “dallas,ds1307”;
reg = <0x68>;
};
};
};
After looking at the rtc-ds1307.c module source, I see that there is a type enumeration with a m41t00 entry which tweaks certain operations in the module. My question is how do I communicate this option using device tree overlays?
Will something like this work?
fragment@0 {
target = <&i2c2>;
overlay {
/* shut up DTC warnings */
#address-cells = <1>;
#size-cells = <0>;
/* M41T00 RTC module */
rtc@68 {
compatible = “dallas,ds1307”;
reg = <0x68>;
ds_type = “m41t00”;
};
};
};
Thanks!
–David