acpi: Add IORT helper functions
[coreboot2.git] / src / drivers / i2c / da7219 / chip.h
blob5ca787c391cd5c83a98f16653972d5b8f9f1b6b7
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __DRIVERS_I2C_DA7219_CHIP_H__
4 #define __DRIVERS_I2C_DA7219_CHIP_H__
6 #include <acpi/acpi_device.h>
8 /*
9 * Dialog Semiconductor DA7219 Audio Codec devicetree bindings
10 * linux/Documentation/devicetree/bindings/sound/da7219.txt
12 struct drivers_i2c_da7219_config {
13 /* Interrupt configuration */
14 struct acpi_irq irq;
16 /* Use GPIO based interrupt instead of PIRQ */
17 struct acpi_gpio irq_gpio;
19 /* I2C Bus Frequency in Hertz (default 400kHz) */
20 unsigned int bus_speed;
23 * micbias-lvl : Voltage (mV) for Mic Bias
24 * [<1600>, <1800>, <2000>, <2200>, <2400>, <2600>]
26 unsigned int micbias_lvl;
29 * mic-amp-in-sel : Mic input source type
30 * ["diff", "se_p", "se_n"]
32 const char *mic_amp_in_sel;
35 * Properties for da7219_aad child node
39 * micbias-pulse-lvl : Mic bias higher voltage pulse level (mV)
40 * [<2800>, <2900>]
42 unsigned int micbias_pulse_lvl;
45 * micbias-pulse-time : Mic bias higher voltage pulse duration (ms)
47 unsigned int micbias_pulse_time;
50 * btn-cfg : Periodic button press measurements for 4-pole jack (ms)
51 * [<2>, <5>, <10>, <50>, <100>, <200>, <500>]
53 unsigned int btn_cfg;
56 * mic-det-thr : Impedance threshold for mic detection measurement (Ohms)
57 * [<200>, <500>, <750>, <1000>]
59 unsigned int mic_det_thr;
62 * jack-ins-deb : Debounce time for jack insertion (ms)
63 * [<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>]
65 unsigned int jack_ins_deb;
68 * jack-det-rate : Jack type detection latency (3/4 pole)
69 * ["32ms_64ms", "64ms_128ms", "128ms_256ms", "256ms_512ms"]
71 const char *jack_det_rate;
74 * jack-rem-deb : Debounce time for jack removal (ms)
75 * [<1>, <5>, <10>, <20>]
77 unsigned int jack_rem_deb;
80 * a-d-btn-thr : Impedance threshold between buttons A and D
81 * [0x0 - 0xFF]
83 unsigned int a_d_btn_thr;
86 * d-b-btn-thr : Impedance threshold between buttons D and B
87 * [0x0 - 0xFF]
89 unsigned int d_b_btn_thr;
92 * b-c-btn-thr : Impedance threshold between buttons B and C
93 * [0x0 - 0xFF]
95 unsigned int b_c_btn_thr;
98 * c-mic-btn-thr : Impedance threshold between button C and Mic
99 * [0x0 - 0xFF]
101 unsigned int c_mic_btn_thr;
104 * btn-avg : Number of 8-bit readings for averaged button measurement
105 * [<1>, <2>, <4>, <8>]
107 unsigned int btn_avg;
110 * adc-1bit-rpt : Repeat count for 1-bit button measurement
111 * [<1>, <2>, <4>, <8>]
113 unsigned int adc_1bit_rpt;
116 * mclk-name : Pass the system clk to da7219
117 * ["name of mclk" ]
119 const char *mclk_name;
122 #endif /* __DRIVERS_I2C_DA7219_CHIP_H__ */