1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef __MFD_TABLA_PDATA_H__ 20#define __MFD_TABLA_PDATA_H__ 21#include <linux/slimbus/slimbus.h> 22#define MICBIAS_EXT_BYP_CAP 0x00 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define MICBIAS_NO_EXT_BYP_CAP 0x01 25#define SITAR_LDOH_1P95_V 0x0 26#define SITAR_LDOH_2P35_V 0x1 27#define SITAR_LDOH_2P75_V 0x2 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define SITAR_LDOH_2P85_V 0x3 30#define SITAR_CFILT1_SEL 0x0 31#define SITAR_CFILT2_SEL 0x1 32#define SITAR_CFILT3_SEL 0x2 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define TABLA_LDOH_1P95_V 0x0 35#define TABLA_LDOH_2P35_V 0x1 36#define TABLA_LDOH_2P75_V 0x2 37#define TABLA_LDOH_2P85_V 0x3 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define TABLA_CFILT1_SEL 0x0 40#define TABLA_CFILT2_SEL 0x1 41#define TABLA_CFILT3_SEL 0x2 42#define TAIKO_CFILT1_SEL 0x0 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44#define TAIKO_CFILT2_SEL 0x1 45#define TAIKO_CFILT3_SEL 0x2 46#define TAIKO_LDOH_1P95_V 0x0 47#define TAIKO_LDOH_2P35_V 0x1 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49#define TAIKO_LDOH_2P75_V 0x2 50#define TAIKO_LDOH_2P85_V 0x3 51#define MAX_AMIC_CHANNEL 7 52#define TABLA_OCP_300_MA 0x0 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54#define TABLA_OCP_350_MA 0x2 55#define TABLA_OCP_365_MA 0x3 56#define TABLA_OCP_150_MA 0x4 57#define TABLA_OCP_190_MA 0x6 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59#define TABLA_OCP_220_MA 0x7 60#define TABLA_DCYCLE_255 0x0 61#define TABLA_DCYCLE_511 0x1 62#define TABLA_DCYCLE_767 0x2 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64#define TABLA_DCYCLE_1023 0x3 65#define TABLA_DCYCLE_1279 0x4 66#define TABLA_DCYCLE_1535 0x5 67#define TABLA_DCYCLE_1791 0x6 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define TABLA_DCYCLE_2047 0x7 70#define TABLA_DCYCLE_2303 0x8 71#define TABLA_DCYCLE_2559 0x9 72#define TABLA_DCYCLE_2815 0xA 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define TABLA_DCYCLE_3071 0xB 75#define TABLA_DCYCLE_3327 0xC 76#define TABLA_DCYCLE_3583 0xD 77#define TABLA_DCYCLE_3839 0xE 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define TABLA_DCYCLE_4095 0xF 80struct wcd9xxx_amic { 81 u8 legacy_mode:MAX_AMIC_CHANNEL; 82 u8 txfe_enable:MAX_AMIC_CHANNEL; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 u8 txfe_buff:MAX_AMIC_CHANNEL; 85 u8 use_pdata:MAX_AMIC_CHANNEL; 86}; 87struct wcd9xxx_micbias_setting { 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 u8 ldoh_v; 90 u32 cfilt1_mv; 91 u32 cfilt2_mv; 92 u32 cfilt3_mv; 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 u8 bias1_cfilt_sel; 95 u8 bias2_cfilt_sel; 96 u8 bias3_cfilt_sel; 97 u8 bias4_cfilt_sel; 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 u8 bias1_cap_mode; 100 u8 bias2_cap_mode; 101 u8 bias3_cap_mode; 102 u8 bias4_cap_mode; 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104}; 105struct wcd9xxx_ocp_setting { 106 unsigned int use_pdata:1; 107 unsigned int num_attempts:4; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 unsigned int run_time:4; 110 unsigned int wait_time:4; 111 unsigned int hph_ocp_limit:3; 112}; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114#define MAX_REGULATOR 7 115#define WCD9XXX_CDC_VDDA_CP_CUR_MAX 500000 116#define WCD9XXX_CDC_VDDA_RX_CUR_MAX 20000 117#define WCD9XXX_CDC_VDDA_TX_CUR_MAX 20000 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119#define WCD9XXX_VDDIO_CDC_CUR_MAX 5000 120#define WCD9XXX_VDDD_CDC_D_CUR_MAX 5000 121#define WCD9XXX_VDDD_CDC_A_CUR_MAX 5000 122struct wcd9xxx_regulator { 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 const char *name; 125 int min_uV; 126 int max_uV; 127 int optimum_uA; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 struct regulator *regulator; 130}; 131struct wcd9xxx_pdata { 132 int irq; 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 int irq_base; 135 int num_irqs; 136 int reset_gpio; 137 struct wcd9xxx_amic amic_settings; 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 struct slim_device slimbus_slave_device; 140 struct wcd9xxx_micbias_setting micbias; 141 struct wcd9xxx_ocp_setting ocp; 142 struct wcd9xxx_regulator regulator[MAX_REGULATOR]; 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144}; 145#endif 146 147