xref: /linux-6.15/include/linux/rtc/ds1286.h (revision d4a5f6d7)
1*d4a5f6d7SAlexandre Belloni /*
2*d4a5f6d7SAlexandre Belloni  * Copyright (C) 1998, 1999, 2003 Ralf Baechle
3*d4a5f6d7SAlexandre Belloni  *
4*d4a5f6d7SAlexandre Belloni  * This file is subject to the terms and conditions of the GNU General Public
5*d4a5f6d7SAlexandre Belloni  * License.  See the file "COPYING" in the main directory of this archive
6*d4a5f6d7SAlexandre Belloni  * for more details.
7*d4a5f6d7SAlexandre Belloni  */
8*d4a5f6d7SAlexandre Belloni #ifndef __LINUX_DS1286_H
9*d4a5f6d7SAlexandre Belloni #define __LINUX_DS1286_H
10*d4a5f6d7SAlexandre Belloni 
11*d4a5f6d7SAlexandre Belloni /**********************************************************************
12*d4a5f6d7SAlexandre Belloni  * register summary
13*d4a5f6d7SAlexandre Belloni  **********************************************************************/
14*d4a5f6d7SAlexandre Belloni #define RTC_HUNDREDTH_SECOND	0
15*d4a5f6d7SAlexandre Belloni #define RTC_SECONDS		1
16*d4a5f6d7SAlexandre Belloni #define RTC_MINUTES		2
17*d4a5f6d7SAlexandre Belloni #define RTC_MINUTES_ALARM	3
18*d4a5f6d7SAlexandre Belloni #define RTC_HOURS		4
19*d4a5f6d7SAlexandre Belloni #define RTC_HOURS_ALARM		5
20*d4a5f6d7SAlexandre Belloni #define RTC_DAY			6
21*d4a5f6d7SAlexandre Belloni #define RTC_DAY_ALARM		7
22*d4a5f6d7SAlexandre Belloni #define RTC_DATE		8
23*d4a5f6d7SAlexandre Belloni #define RTC_MONTH		9
24*d4a5f6d7SAlexandre Belloni #define RTC_YEAR		10
25*d4a5f6d7SAlexandre Belloni #define RTC_CMD			11
26*d4a5f6d7SAlexandre Belloni #define RTC_WHSEC		12
27*d4a5f6d7SAlexandre Belloni #define RTC_WSEC		13
28*d4a5f6d7SAlexandre Belloni #define RTC_UNUSED		14
29*d4a5f6d7SAlexandre Belloni 
30*d4a5f6d7SAlexandre Belloni /* RTC_*_alarm is always true if 2 MSBs are set */
31*d4a5f6d7SAlexandre Belloni # define RTC_ALARM_DONT_CARE 	0xC0
32*d4a5f6d7SAlexandre Belloni 
33*d4a5f6d7SAlexandre Belloni 
34*d4a5f6d7SAlexandre Belloni /*
35*d4a5f6d7SAlexandre Belloni  * Bits in the month register
36*d4a5f6d7SAlexandre Belloni  */
37*d4a5f6d7SAlexandre Belloni #define RTC_EOSC		0x80
38*d4a5f6d7SAlexandre Belloni #define RTC_ESQW		0x40
39*d4a5f6d7SAlexandre Belloni 
40*d4a5f6d7SAlexandre Belloni /*
41*d4a5f6d7SAlexandre Belloni  * Bits in the Command register
42*d4a5f6d7SAlexandre Belloni  */
43*d4a5f6d7SAlexandre Belloni #define RTC_TDF			0x01
44*d4a5f6d7SAlexandre Belloni #define RTC_WAF			0x02
45*d4a5f6d7SAlexandre Belloni #define RTC_TDM			0x04
46*d4a5f6d7SAlexandre Belloni #define RTC_WAM			0x08
47*d4a5f6d7SAlexandre Belloni #define RTC_PU_LVL		0x10
48*d4a5f6d7SAlexandre Belloni #define RTC_IBH_LO		0x20
49*d4a5f6d7SAlexandre Belloni #define RTC_IPSW		0x40
50*d4a5f6d7SAlexandre Belloni #define RTC_TE			0x80
51*d4a5f6d7SAlexandre Belloni 
52*d4a5f6d7SAlexandre Belloni #endif /* __LINUX_DS1286_H */
53