aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/mt6323
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-01-27 06:47:38 -0500
committerLee Jones <lee.jones@linaro.org>2016-03-16 04:50:30 -0400
commit44760cf3bf0a29da8f5cc271698c8772b8f79673 (patch)
tree75d3f97c53a35093bc93fed590606df0ec191980 /include/linux/mfd/mt6323
parent1d2c25ed4558cc591072e43e16118f08f7eeb206 (diff)
mfd: mt6397: Add MT6323 support to MT6397 driver
Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/mt6323')
-rw-r--r--include/linux/mfd/mt6323/core.h36
-rw-r--r--include/linux/mfd/mt6323/registers.h408
2 files changed, 444 insertions, 0 deletions
diff --git a/include/linux/mfd/mt6323/core.h b/include/linux/mfd/mt6323/core.h
new file mode 100644
index 000000000000..06d0ec3b1f8f
--- /dev/null
+++ b/include/linux/mfd/mt6323/core.h
@@ -0,0 +1,36 @@
1/*
2 * Copyright (c) 2016 Chen Zhong <chen.zhong@mediatek.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __MFD_MT6323_CORE_H__
10#define __MFD_MT6323_CORE_H__
11
12enum MT6323_IRQ_STATUS_numbers {
13 MT6323_IRQ_STATUS_SPKL_AB = 0,
14 MT6323_IRQ_STATUS_SPKL,
15 MT6323_IRQ_STATUS_BAT_L,
16 MT6323_IRQ_STATUS_BAT_H,
17 MT6323_IRQ_STATUS_WATCHDOG,
18 MT6323_IRQ_STATUS_PWRKEY,
19 MT6323_IRQ_STATUS_THR_L,
20 MT6323_IRQ_STATUS_THR_H,
21 MT6323_IRQ_STATUS_VBATON_UNDET,
22 MT6323_IRQ_STATUS_BVALID_DET,
23 MT6323_IRQ_STATUS_CHRDET,
24 MT6323_IRQ_STATUS_OV,
25 MT6323_IRQ_STATUS_LDO = 16,
26 MT6323_IRQ_STATUS_FCHRKEY,
27 MT6323_IRQ_STATUS_ACCDET,
28 MT6323_IRQ_STATUS_AUDIO,
29 MT6323_IRQ_STATUS_RTC,
30 MT6323_IRQ_STATUS_VPROC,
31 MT6323_IRQ_STATUS_VSYS,
32 MT6323_IRQ_STATUS_VPA,
33 MT6323_IRQ_STATUS_NR,
34};
35
36#endif /* __MFD_MT6323_CORE_H__ */
diff --git a/include/linux/mfd/mt6323/registers.h b/include/linux/mfd/mt6323/registers.h
new file mode 100644
index 000000000000..160f3c0e2589
--- /dev/null
+++ b/include/linux/mfd/mt6323/registers.h
@@ -0,0 +1,408 @@
1/*
2 * Copyright (c) 2016 Chen Zhong <chen.zhong@mediatek.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __MFD_MT6323_REGISTERS_H__
10#define __MFD_MT6323_REGISTERS_H__
11
12/* PMIC Registers */
13#define MT6323_CHR_CON0 0x0000
14#define MT6323_CHR_CON1 0x0002
15#define MT6323_CHR_CON2 0x0004
16#define MT6323_CHR_CON3 0x0006
17#define MT6323_CHR_CON4 0x0008
18#define MT6323_CHR_CON5 0x000A
19#define MT6323_CHR_CON6 0x000C
20#define MT6323_CHR_CON7 0x000E
21#define MT6323_CHR_CON8 0x0010
22#define MT6323_CHR_CON9 0x0012
23#define MT6323_CHR_CON10 0x0014
24#define MT6323_CHR_CON11 0x0016
25#define MT6323_CHR_CON12 0x0018
26#define MT6323_CHR_CON13 0x001A
27#define MT6323_CHR_CON14 0x001C
28#define MT6323_CHR_CON15 0x001E
29#define MT6323_CHR_CON16 0x0020
30#define MT6323_CHR_CON17 0x0022
31#define MT6323_CHR_CON18 0x0024
32#define MT6323_CHR_CON19 0x0026
33#define MT6323_CHR_CON20 0x0028
34#define MT6323_CHR_CON21 0x002A
35#define MT6323_CHR_CON22 0x002C
36#define MT6323_CHR_CON23 0x002E
37#define MT6323_CHR_CON24 0x0030
38#define MT6323_CHR_CON25 0x0032
39#define MT6323_CHR_CON26 0x0034
40#define MT6323_CHR_CON27 0x0036
41#define MT6323_CHR_CON28 0x0038
42#define MT6323_CHR_CON29 0x003A
43#define MT6323_STRUP_CON0 0x003C
44#define MT6323_STRUP_CON2 0x003E
45#define MT6323_STRUP_CON3 0x0040
46#define MT6323_STRUP_CON4 0x0042
47#define MT6323_STRUP_CON5 0x0044
48#define MT6323_STRUP_CON6 0x0046
49#define MT6323_STRUP_CON7 0x0048
50#define MT6323_STRUP_CON8 0x004A
51#define MT6323_STRUP_CON9 0x004C
52#define MT6323_STRUP_CON10 0x004E
53#define MT6323_STRUP_CON11 0x0050
54#define MT6323_SPK_CON0 0x0052
55#define MT6323_SPK_CON1 0x0054
56#define MT6323_SPK_CON2 0x0056
57#define MT6323_SPK_CON6 0x005E
58#define MT6323_SPK_CON7 0x0060
59#define MT6323_SPK_CON8 0x0062
60#define MT6323_SPK_CON9 0x0064
61#define MT6323_SPK_CON10 0x0066
62#define MT6323_SPK_CON11 0x0068
63#define MT6323_SPK_CON12 0x006A
64#define MT6323_CID 0x0100
65#define MT6323_TOP_CKPDN0 0x0102
66#define MT6323_TOP_CKPDN0_SET 0x0104
67#define MT6323_TOP_CKPDN0_CLR 0x0106
68#define MT6323_TOP_CKPDN1 0x0108
69#define MT6323_TOP_CKPDN1_SET 0x010A
70#define MT6323_TOP_CKPDN1_CLR 0x010C
71#define MT6323_TOP_CKPDN2 0x010E
72#define MT6323_TOP_CKPDN2_SET 0x0110
73#define MT6323_TOP_CKPDN2_CLR 0x0112
74#define MT6323_TOP_RST_CON 0x0114
75#define MT6323_TOP_RST_CON_SET 0x0116
76#define MT6323_TOP_RST_CON_CLR 0x0118
77#define MT6323_TOP_RST_MISC 0x011A
78#define MT6323_TOP_RST_MISC_SET 0x011C
79#define MT6323_TOP_RST_MISC_CLR 0x011E
80#define MT6323_TOP_CKCON0 0x0120
81#define MT6323_TOP_CKCON0_SET 0x0122
82#define MT6323_TOP_CKCON0_CLR 0x0124
83#define MT6323_TOP_CKCON1 0x0126
84#define MT6323_TOP_CKCON1_SET 0x0128
85#define MT6323_TOP_CKCON1_CLR 0x012A
86#define MT6323_TOP_CKTST0 0x012C
87#define MT6323_TOP_CKTST1 0x012E
88#define MT6323_TOP_CKTST2 0x0130
89#define MT6323_TEST_OUT 0x0132
90#define MT6323_TEST_CON0 0x0134
91#define MT6323_TEST_CON1 0x0136
92#define MT6323_EN_STATUS0 0x0138
93#define MT6323_EN_STATUS1 0x013A
94#define MT6323_OCSTATUS0 0x013C
95#define MT6323_OCSTATUS1 0x013E
96#define MT6323_PGSTATUS 0x0140
97#define MT6323_CHRSTATUS 0x0142
98#define MT6323_TDSEL_CON 0x0144
99#define MT6323_RDSEL_CON 0x0146
100#define MT6323_SMT_CON0 0x0148
101#define MT6323_SMT_CON1 0x014A
102#define MT6323_SMT_CON2 0x014C
103#define MT6323_SMT_CON3 0x014E
104#define MT6323_SMT_CON4 0x0150
105#define MT6323_DRV_CON0 0x0152
106#define MT6323_DRV_CON1 0x0154
107#define MT6323_DRV_CON2 0x0156
108#define MT6323_DRV_CON3 0x0158
109#define MT6323_DRV_CON4 0x015A
110#define MT6323_SIMLS1_CON 0x015C
111#define MT6323_SIMLS2_CON 0x015E
112#define MT6323_INT_CON0 0x0160
113#define MT6323_INT_CON0_SET 0x0162
114#define MT6323_INT_CON0_CLR 0x0164
115#define MT6323_INT_CON1 0x0166
116#define MT6323_INT_CON1_SET 0x0168
117#define MT6323_INT_CON1_CLR 0x016A
118#define MT6323_INT_MISC_CON 0x016C
119#define MT6323_INT_MISC_CON_SET 0x016E
120#define MT6323_INT_MISC_CON_CLR 0x0170
121#define MT6323_INT_STATUS0 0x0172
122#define MT6323_INT_STATUS1 0x0174
123#define MT6323_OC_GEAR_0 0x0176
124#define MT6323_OC_GEAR_1 0x0178
125#define MT6323_OC_GEAR_2 0x017A
126#define MT6323_OC_CTL_VPROC 0x017C
127#define MT6323_OC_CTL_VSYS 0x017E
128#define MT6323_OC_CTL_VPA 0x0180
129#define MT6323_FQMTR_CON0 0x0182
130#define MT6323_FQMTR_CON1 0x0184
131#define MT6323_FQMTR_CON2 0x0186
132#define MT6323_RG_SPI_CON 0x0188
133#define MT6323_DEW_DIO_EN 0x018A
134#define MT6323_DEW_READ_TEST 0x018C
135#define MT6323_DEW_WRITE_TEST 0x018E
136#define MT6323_DEW_CRC_SWRST 0x0190
137#define MT6323_DEW_CRC_EN 0x0192
138#define MT6323_DEW_CRC_VAL 0x0194
139#define MT6323_DEW_DBG_MON_SEL 0x0196
140#define MT6323_DEW_CIPHER_KEY_SEL 0x0198
141#define MT6323_DEW_CIPHER_IV_SEL 0x019A
142#define MT6323_DEW_CIPHER_EN 0x019C
143#define MT6323_DEW_CIPHER_RDY 0x019E
144#define MT6323_DEW_CIPHER_MODE 0x01A0
145#define MT6323_DEW_CIPHER_SWRST 0x01A2
146#define MT6323_DEW_RDDMY_NO 0x01A4
147#define MT6323_DEW_RDATA_DLY_SEL 0x01A6
148#define MT6323_BUCK_CON0 0x0200
149#define MT6323_BUCK_CON1 0x0202
150#define MT6323_BUCK_CON2 0x0204
151#define MT6323_BUCK_CON3 0x0206
152#define MT6323_BUCK_CON4 0x0208
153#define MT6323_BUCK_CON5 0x020A
154#define MT6323_VPROC_CON0 0x020C
155#define MT6323_VPROC_CON1 0x020E
156#define MT6323_VPROC_CON2 0x0210
157#define MT6323_VPROC_CON3 0x0212
158#define MT6323_VPROC_CON4 0x0214
159#define MT6323_VPROC_CON5 0x0216
160#define MT6323_VPROC_CON7 0x02