Merge branch 'master' into gsoc-dir-split
[kugel-rb.git] / firmware / export / pcf5060x.h
blobe2af9d7122d4eabef1733a8e1ba4a3e5a002edc5
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2008 by Rob Purchase
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef PCF5060X_H
22 #define PCF5060X_H
24 /* PCF50605/6 Registers from datasheet rev2.2 */
26 #define PCF5060X_ID 0x00
27 #define PCF5060X_OOCS 0x01
28 #define PCF5060X_INT1 0x02
29 #define PCF5060X_INT2 0x03
30 #define PCF5060X_INT3 0x04
31 #define PCF5060X_INT1M 0x05
32 #define PCF5060X_INT2M 0x06
33 #define PCF5060X_INT3M 0x07
34 #define PCF5060X_OOCC1 0x08
35 #define GOSTDBY 0x1
36 #define TOTRST (0x1 << 1)
37 #define CLK32ON (0x1 << 2)
38 #define WDTRST (0x1 << 3)
39 #define RTCWAK (0x1 << 4)
40 #define CHGWAK (0x1 << 5)
41 #define EXTONWAK (0x01 << 6)
42 #define PCF5060X_OOCC2 0x09
43 #define PCF5060X_RTCSC 0x0a
44 #define PCF5060X_RTCMN 0x0b
45 #define PCF5060X_RTCHR 0x0c
46 #define PCF5060X_RTCWD 0x0d
47 #define PCF5060X_RTCDT 0x0e
48 #define PCF5060X_RTCMT 0x0f
49 #define PCF5060X_RTCYR 0x10
50 #define PCF5060X_RTCSCA 0x11
51 #define PCF5060X_RTCMNA 0x12
52 #define PCF5060X_RTCHRA 0x13
53 #define PCF5060X_RTCWDA 0x14
54 #define PCF5060X_RTCDTA 0x15
55 #define PCF5060X_RTCMTA 0x16
56 #define PCF5060X_RTCYRA 0x17
57 #define PCF5060X_PSSC 0x18
58 #define PCF5060X_PWROKM 0x19
59 #define PCF5060X_PWROKS 0x1a
60 #define PCF5060X_DCDC1 0x1b
61 #define PCF5060X_DCDC2 0x1c
62 #define PCF5060X_DCDC3 0x1d
63 #define PCF5060X_DCDC4 0x1e
64 #define PCF5060X_DCDEC1 0x1f
65 #define PCF5060X_DCDEC2 0x20
66 #define PCF5060X_DCUDC1 0x21
67 #define PCF5060X_DCUDC2 0x22
68 #define PCF5060X_IOREGC 0x23
69 #define PCF5060X_D1REGC1 0x24
70 #define PCF5060X_D2REGC1 0x25
71 #define PCF5060X_D3REGC1 0x26
72 #define PCF5060X_LPREGC1 0x27
73 #define PCF5060X_LPREGC2 0x28
74 #define PCF5060X_MBCC1 0x29
75 #define PCF5060X_MBCC2 0x2a
76 #define PCF5060X_MBCC3 0x2b
77 #define PCF5060X_MBCS1 0x2c
78 #define PCF5060X_BBCC 0x2d
79 #define PCF5060X_ADCC1 0x2e
80 #define PCF5060X_ADCC2 0x2f
81 #define PCF5060X_ADCS1 0x30
82 #define PCF5060X_ADCS2 0x31
83 #define PCF5060X_ADCS3 0x32
84 #define PCF5060X_ACDC1 0x33
85 #define PCF5060X_BVMC 0x34
86 #define PCF5060X_PWMC1 0x35
87 #define PCF5060X_LEDC1 0x36
88 #define PCF5060X_LEDC2 0x37
89 #define PCF5060X_GPOC1 0x38
90 #define PCF5060X_GPOC2 0x39
91 #define PCF5060X_GPOC3 0x3a
92 #define PCF5060X_GPOC4 0x3b
93 #define PCF5060X_GPOC5 0x3c
95 /* ADCC2 mux values */
96 #define PCF5060X_ADC_BATVOLT_RES 0x0
97 #define PCF5060X_ADC_BATVOLT_SUBTR 0x1
98 #define PCF5060X_ADC_ADCIN1_RES 0x2
99 #define PCF5060X_ADC_ADCIN1_SUBTR 0x3
100 #define PCF5060X_ADC_BATTEMP 0x4
101 #define PCF5060X_ADC_ADCIN2 0x5
102 #define PCF5060X_ADC_ADCIN3 0x6
103 #define PCF5060X_ADC_ADCIN3_RATIO 0x7
104 #define PCF5060X_ADC_TSC_X 0x8
105 #define PCF5060X_ADC_TSC_Y 0x9
106 #define PCF5060X_ADC_TSC_P1 0xa
107 #define PCF5060X_ADC_TSC_P2 0xb
108 #define PCF5060X_ADC_BATVOLT_ADCIN1 0xc
109 #define PCF5060X_ADC_TSC_XY 0xe
110 #define PCF5060X_ADC_TSC_P1P2 0xf
112 #endif /* PCF5060X_H */