blob: 13d52fbdef99bd21ed037d38a5fe0d46e8c193be [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __MFD_TABLA_PDATA_H__
14
15#define __MFD_TABLA_PDATA_H__
16
17#include <linux/slimbus/slimbus.h>
18
Patrick Lai3043fba2011-08-01 14:15:57 -070019#define TABLA_LDOH_1P95_V 0x0
20#define TABLA_LDOH_2P35_V 0x1
21#define TABLA_LDOH_2P75_V 0x2
22#define TABLA_LDOH_2P85_V 0x3
23
24#define TABLA_CFILT1_SEL 0x0
25#define TABLA_CFILT2_SEL 0x1
26#define TABLA_CFILT3_SEL 0x2
27
28/* Each micbias can be assigned to one of three cfilters
29 * Vbatt_min >= .15V + ldoh_v
30 * ldoh_v >= .15v + cfiltx_mv
31 * If ldoh_v = 1.95 160 mv < cfiltx_mv < 1800 mv
32 * If ldoh_v = 2.35 200 mv < cfiltx_mv < 2200 mv
33 * If ldoh_v = 2.75 240 mv < cfiltx_mv < 2600 mv
34 * If ldoh_v = 2.85 250 mv < cfiltx_mv < 2700 mv
35 */
36
37struct tabla_micbias_setting {
38 u8 ldoh_v;
39 u32 cfilt1_mv; /* in mv */
40 u32 cfilt2_mv; /* in mv */
41 u32 cfilt3_mv; /* in mv */
42 u8 bias1_cfilt_sel;
43 u8 bias2_cfilt_sel;
44 u8 bias3_cfilt_sel;
45 u8 bias4_cfilt_sel;
46};
47
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070048struct tabla_pdata {
49 int irq;
50 int irq_base;
51 int num_irqs;
52 int reset_gpio;
53 struct slim_device slimbus_slave_device;
Patrick Lai3043fba2011-08-01 14:15:57 -070054 struct tabla_micbias_setting micbias;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070055};
56
57#endif