1/*
2 * s2mps13.h
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd
5 *              http://www.samsung.com
6 *
7 * This program is free software; you can redistribute  it and/or modify it
8 * under  the terms of  the GNU General  Public License as published by the
9 * Free Software Foundation;  either version 2 of the  License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef __LINUX_MFD_S2MPS13_H
20#define __LINUX_MFD_S2MPS13_H
21
22/* S2MPS13 registers */
23enum s2mps13_reg {
24	S2MPS13_REG_ID,
25	S2MPS13_REG_INT1,
26	S2MPS13_REG_INT2,
27	S2MPS13_REG_INT3,
28	S2MPS13_REG_INT1M,
29	S2MPS13_REG_INT2M,
30	S2MPS13_REG_INT3M,
31	S2MPS13_REG_ST1,
32	S2MPS13_REG_ST2,
33	S2MPS13_REG_PWRONSRC,
34	S2MPS13_REG_OFFSRC,
35	S2MPS13_REG_BU_CHG,
36	S2MPS13_REG_RTCCTRL,
37	S2MPS13_REG_CTRL1,
38	S2MPS13_REG_CTRL2,
39	S2MPS13_REG_RSVD1,
40	S2MPS13_REG_RSVD2,
41	S2MPS13_REG_RSVD3,
42	S2MPS13_REG_RSVD4,
43	S2MPS13_REG_RSVD5,
44	S2MPS13_REG_RSVD6,
45	S2MPS13_REG_CTRL3,
46	S2MPS13_REG_RSVD7,
47	S2MPS13_REG_RSVD8,
48	S2MPS13_REG_WRSTBI,
49	S2MPS13_REG_B1CTRL,
50	S2MPS13_REG_B1OUT,
51	S2MPS13_REG_B2CTRL,
52	S2MPS13_REG_B2OUT,
53	S2MPS13_REG_B3CTRL,
54	S2MPS13_REG_B3OUT,
55	S2MPS13_REG_B4CTRL,
56	S2MPS13_REG_B4OUT,
57	S2MPS13_REG_B5CTRL,
58	S2MPS13_REG_B5OUT,
59	S2MPS13_REG_B6CTRL,
60	S2MPS13_REG_B6OUT,
61	S2MPS13_REG_B7CTRL,
62	S2MPS13_REG_B7SW,
63	S2MPS13_REG_B7OUT,
64	S2MPS13_REG_B8CTRL,
65	S2MPS13_REG_B8OUT,
66	S2MPS13_REG_B9CTRL,
67	S2MPS13_REG_B9OUT,
68	S2MPS13_REG_B10CTRL,
69	S2MPS13_REG_B10OUT,
70	S2MPS13_REG_BB1CTRL,
71	S2MPS13_REG_BB1OUT,
72	S2MPS13_REG_BUCK_RAMP1,
73	S2MPS13_REG_BUCK_RAMP2,
74	S2MPS13_REG_LDO_DVS1,
75	S2MPS13_REG_LDO_DVS2,
76	S2MPS13_REG_LDO_DVS3,
77	S2MPS13_REG_B6OUT2,
78	S2MPS13_REG_L1CTRL,
79	S2MPS13_REG_L2CTRL,
80	S2MPS13_REG_L3CTRL,
81	S2MPS13_REG_L4CTRL,
82	S2MPS13_REG_L5CTRL,
83	S2MPS13_REG_L6CTRL,
84	S2MPS13_REG_L7CTRL,
85	S2MPS13_REG_L8CTRL,
86	S2MPS13_REG_L9CTRL,
87	S2MPS13_REG_L10CTRL,
88	S2MPS13_REG_L11CTRL,
89	S2MPS13_REG_L12CTRL,
90	S2MPS13_REG_L13CTRL,
91	S2MPS13_REG_L14CTRL,
92	S2MPS13_REG_L15CTRL,
93	S2MPS13_REG_L16CTRL,
94	S2MPS13_REG_L17CTRL,
95	S2MPS13_REG_L18CTRL,
96	S2MPS13_REG_L19CTRL,
97	S2MPS13_REG_L20CTRL,
98	S2MPS13_REG_L21CTRL,
99	S2MPS13_REG_L22CTRL,
100	S2MPS13_REG_L23CTRL,
101	S2MPS13_REG_L24CTRL,
102	S2MPS13_REG_L25CTRL,
103	S2MPS13_REG_L26CTRL,
104	S2MPS13_REG_L27CTRL,
105	S2MPS13_REG_L28CTRL,
106	S2MPS13_REG_L29CTRL,
107	S2MPS13_REG_L30CTRL,
108	S2MPS13_REG_L31CTRL,
109	S2MPS13_REG_L32CTRL,
110	S2MPS13_REG_L33CTRL,
111	S2MPS13_REG_L34CTRL,
112	S2MPS13_REG_L35CTRL,
113	S2MPS13_REG_L36CTRL,
114	S2MPS13_REG_L37CTRL,
115	S2MPS13_REG_L38CTRL,
116	S2MPS13_REG_L39CTRL,
117	S2MPS13_REG_L40CTRL,
118	S2MPS13_REG_LDODSCH1,
119	S2MPS13_REG_LDODSCH2,
120	S2MPS13_REG_LDODSCH3,
121	S2MPS13_REG_LDODSCH4,
122	S2MPS13_REG_LDODSCH5,
123};
124
125/*  regulator ids */
126enum s2mps13_regulators {
127	S2MPS13_LDO1,
128	S2MPS13_LDO2,
129	S2MPS13_LDO3,
130	S2MPS13_LDO4,
131	S2MPS13_LDO5,
132	S2MPS13_LDO6,
133	S2MPS13_LDO7,
134	S2MPS13_LDO8,
135	S2MPS13_LDO9,
136	S2MPS13_LDO10,
137	S2MPS13_LDO11,
138	S2MPS13_LDO12,
139	S2MPS13_LDO13,
140	S2MPS13_LDO14,
141	S2MPS13_LDO15,
142	S2MPS13_LDO16,
143	S2MPS13_LDO17,
144	S2MPS13_LDO18,
145	S2MPS13_LDO19,
146	S2MPS13_LDO20,
147	S2MPS13_LDO21,
148	S2MPS13_LDO22,
149	S2MPS13_LDO23,
150	S2MPS13_LDO24,
151	S2MPS13_LDO25,
152	S2MPS13_LDO26,
153	S2MPS13_LDO27,
154	S2MPS13_LDO28,
155	S2MPS13_LDO29,
156	S2MPS13_LDO30,
157	S2MPS13_LDO31,
158	S2MPS13_LDO32,
159	S2MPS13_LDO33,
160	S2MPS13_LDO34,
161	S2MPS13_LDO35,
162	S2MPS13_LDO36,
163	S2MPS13_LDO37,
164	S2MPS13_LDO38,
165	S2MPS13_LDO39,
166	S2MPS13_LDO40,
167	S2MPS13_BUCK1,
168	S2MPS13_BUCK2,
169	S2MPS13_BUCK3,
170	S2MPS13_BUCK4,
171	S2MPS13_BUCK5,
172	S2MPS13_BUCK6,
173	S2MPS13_BUCK7,
174	S2MPS13_BUCK8,
175	S2MPS13_BUCK9,
176	S2MPS13_BUCK10,
177
178	S2MPS13_REGULATOR_MAX,
179};
180
181/*
182 * Default ramp delay in uv/us. Datasheet says that ramp delay can be
183 * controlled however it does not specify which register is used for that.
184 * Let's assume that default value will be set.
185 */
186#define S2MPS13_BUCK_RAMP_DELAY		12500
187
188#endif /*  __LINUX_MFD_S2MPS13_H */
189