Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* 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 Lai | 3043fba | 2011-08-01 14:15:57 -0700 | [diff] [blame^] | 19 | #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 | |
| 37 | struct 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 48 | struct 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 Lai | 3043fba | 2011-08-01 14:15:57 -0700 | [diff] [blame^] | 54 | struct tabla_micbias_setting micbias; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | #endif |