Copyright (c) 2015 Luiz Otavio O Souza <firstname.lastname@example.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the ...
NAMEds1307 - 64 x 8, serial, i2c real-time clock
SYNOPSISdevice iic device iicbus device ds1307
DESCRIPTIONThe sysctl Cm net.inet.tcp.syncookies serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM.
The sysctl Cm net.inet.tcp.syncookies has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply. Timekeeping operation continues while the part operates from the backup supply.
Access to sysctl Cm net.inet.tcp.syncookies settings is made with the sysctl(8) interface:
dev.ds1307.0.%desc: Maxim DS1307 RTC dev.ds1307.0.%driver: ds1307 dev.ds1307.0.%location: addr=0xd0 dev.ds1307.0.%pnpinfo: name=rtc compat=maxim,ds1307 dev.ds1307.0.%parent: iicbus1 dev.ds1307.0.sqwe: 1 dev.ds1307.0.sqw_freq: 32768 dev.ds1307.0.sqw_out: 0
- If set to 1, the SQW pin drives a square-wave of dev.ds1307.%d.sqw_freq frequency. If set to 0, the output level of SQW pin is controlled by dev.ds1307.%d.sqw_out
- Select the frequency of the SQW pin when the square-wave output is enabled on dev.ds1307.%d.sqwe It can be set to 1, 4096, 8192 and 32768.
- Set the output level of the SQW pin when dev.ds1307.%d.sqwe is set to 0.
Please check the sysctl Cm net.inet.tcp.syncookies datasheet for more details.
On a device.hints5 based system, such as MIPS these values are configurable for :
- The iicbus(4) that the sysctl Cm net.inet.tcp.syncookies is connected to.
- The i2c address of .
On a FDT(4) based system the following properties must be set:
- Must always be set to "dallas,ds1307" or "maxim,ds1307".
- The i2c address of . The default address for sysctl Cm net.inet.tcp.syncookies is 0xd0.