xref: /linux/sound/soc/codecs/wcd939x.h (revision fe243a546bcbc405abb7cc5cf26852609cf4e2cc)
1be2af391SNeil Armstrong /* SPDX-License-Identifier: GPL-2.0-only */
2be2af391SNeil Armstrong /*
3be2af391SNeil Armstrong  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
4be2af391SNeil Armstrong  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
5be2af391SNeil Armstrong  */
6be2af391SNeil Armstrong 
7be2af391SNeil Armstrong #ifndef __WCD939X_H__
8be2af391SNeil Armstrong #define __WCD939X_H__
9be2af391SNeil Armstrong #include <linux/soundwire/sdw.h>
10be2af391SNeil Armstrong #include <linux/soundwire/sdw_type.h>
11be2af391SNeil Armstrong 
12be2af391SNeil Armstrong #define WCD939X_BASE					   (0x3000)
13be2af391SNeil Armstrong #define WCD939X_ANA_PAGE				   (0x3000)
14be2af391SNeil Armstrong #define WCD939X_ANA_BIAS				   (0x3001)
15be2af391SNeil Armstrong #define WCD939X_BIAS_ANALOG_BIAS_EN	BIT(7)
16be2af391SNeil Armstrong #define WCD939X_BIAS_PRECHRG_EN	BIT(6)
17be2af391SNeil Armstrong #define WCD939X_BIAS_PRECHRG_CTL_MODE	BIT(5)
18be2af391SNeil Armstrong #define WCD939X_ANA_RX_SUPPLIES				   (0x3008)
19be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_VPOS_EN	BIT(7)
20be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_VNEG_EN	BIT(6)
21be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_VPOS_PWR_LVL	BIT(3)
22be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_VNEG_PWR_LVL	BIT(2)
23be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_REGULATOR_MODE	BIT(1)
24be2af391SNeil Armstrong #define WCD939X_RX_SUPPLIES_RX_BIAS_ENABLE	BIT(0)
25be2af391SNeil Armstrong #define WCD939X_ANA_HPH					   (0x3009)
26be2af391SNeil Armstrong #define WCD939X_HPH_HPHL_ENABLE	BIT(7)
27be2af391SNeil Armstrong #define WCD939X_HPH_HPHR_ENABLE	BIT(6)
28be2af391SNeil Armstrong #define WCD939X_HPH_HPHL_REF_ENABLE	BIT(5)
29be2af391SNeil Armstrong #define WCD939X_HPH_HPHR_REF_ENABLE	BIT(4)
30be2af391SNeil Armstrong #define WCD939X_HPH_PWR_LEVEL	GENMASK(3, 2)
31be2af391SNeil Armstrong #define WCD939X_ANA_EAR					   (0x300a)
32be2af391SNeil Armstrong #define WCD939X_ANA_EAR_COMPANDER_CTL			   (0x300b)
33be2af391SNeil Armstrong #define WCD939X_EAR_COMPANDER_CTL_GAIN_OVRD_REG	BIT(7)
34be2af391SNeil Armstrong #define WCD939X_EAR_COMPANDER_CTL_EAR_GAIN	GENMASK(6, 2)
35be2af391SNeil Armstrong #define WCD939X_EAR_COMPANDER_CTL_COMP_DFF_BYP	BIT(1)
36be2af391SNeil Armstrong #define WCD939X_EAR_COMPANDER_CTL_COMP_DFF_CLK_EDGE	BIT(0)
37be2af391SNeil Armstrong #define WCD939X_ANA_TX_CH1				   (0x300e)
38be2af391SNeil Armstrong #define WCD939X_ANA_TX_CH2				   (0x300f)
39be2af391SNeil Armstrong #define WCD939X_TX_CH2_ENABLE	BIT(7)
40be2af391SNeil Armstrong #define WCD939X_TX_CH2_HPF1_INIT	BIT(6)
41be2af391SNeil Armstrong #define WCD939X_TX_CH2_HPF2_INIT	BIT(5)
42be2af391SNeil Armstrong #define WCD939X_TX_CH2_GAIN	GENMASK(4, 0)
43be2af391SNeil Armstrong #define WCD939X_ANA_TX_CH3				   (0x3010)
44be2af391SNeil Armstrong #define WCD939X_ANA_TX_CH4				   (0x3011)
45be2af391SNeil Armstrong #define WCD939X_TX_CH4_ENABLE	BIT(7)
46be2af391SNeil Armstrong #define WCD939X_TX_CH4_HPF3_INIT	BIT(6)
47be2af391SNeil Armstrong #define WCD939X_TX_CH4_HPF4_INIT	BIT(5)
48be2af391SNeil Armstrong #define WCD939X_TX_CH4_GAIN	GENMASK(4, 0)
49be2af391SNeil Armstrong #define WCD939X_ANA_MICB1_MICB2_DSP_EN_LOGIC		   (0x3012)
50be2af391SNeil Armstrong #define WCD939X_ANA_MICB3_DSP_EN_LOGIC			   (0x3013)
51be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_MECH				   (0x3014)
52be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_L_DET_EN	BIT(7)
53be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_GND_DET_EN	BIT(6)
54be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_MECH_DETECT_TYPE	BIT(5)
55be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_HPHL_PLUG_TYPE	BIT(4)
56be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_GND_PLUG_TYPE	BIT(3)
57be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_MECH_HS_L_PULLUP_COMP_EN	BIT(2)
58be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_MECH_HS_G_PULLUP_COMP_EN	BIT(1)
59be2af391SNeil Armstrong #define WCD939X_MBHC_MECH_SW_HPH_L_P_100K_TO_GND	BIT(0)
60be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_ELECT				   (0x3015)
61be2af391SNeil Armstrong #define WCD939X_MBHC_ELECT_FSM_EN	BIT(7)
62be2af391SNeil Armstrong #define WCD939X_MBHC_ELECT_BTNDET_ISRC_CTL	GENMASK(6, 4)
63be2af391SNeil Armstrong #define WCD939X_MBHC_ELECT_ELECT_DET_TYPE	BIT(3)
64be2af391SNeil Armstrong #define WCD939X_MBHC_ELECT_ELECT_SCHMT_ISRC_CTL	GENMASK(2, 1)
65be2af391SNeil Armstrong #define WCD939X_MBHC_ELECT_BIAS_EN	BIT(0)
66be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_ZDET				   (0x3016)
67be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_ZDET_L_MEAS_EN	BIT(7)
68be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_ZDET_R_MEAS_EN	BIT(6)
69be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_ZDET_CHG_EN	BIT(5)
70be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_ZDET_ILEAK_COMP_EN	BIT(4)
71be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_ELECT_ISRC_EN	BIT(1)
72be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_RESULT_1			   (0x3017)
73be2af391SNeil Armstrong #define WCD939X_MBHC_RESULT_1_Z_RESULT_LSB	GENMASK(7, 0)
74be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_RESULT_2			   (0x3018)
75be2af391SNeil Armstrong #define WCD939X_MBHC_RESULT_2_Z_RESULT_MSB	GENMASK(7, 0)
76be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_RESULT_3			   (0x3019)
77be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN0				   (0x301a)
78be2af391SNeil Armstrong #define WCD939X_MBHC_BTN0_VTH	GENMASK(7, 2)
79be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN1				   (0x301b)
80be2af391SNeil Armstrong #define WCD939X_MBHC_BTN1_VTH	GENMASK(7, 2)
81be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN2				   (0x301c)
82be2af391SNeil Armstrong #define WCD939X_MBHC_BTN2_VTH	GENMASK(7, 2)
83be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN3				   (0x301d)
84be2af391SNeil Armstrong #define WCD939X_MBHC_BTN3_VTH	GENMASK(7, 2)
85be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN4				   (0x301e)
86be2af391SNeil Armstrong #define WCD939X_MBHC_BTN4_VTH	GENMASK(7, 2)
87be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN5				   (0x301f)
88be2af391SNeil Armstrong #define WCD939X_MBHC_BTN5_VTH	GENMASK(7, 2)
89be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN6				   (0x3020)
90be2af391SNeil Armstrong #define WCD939X_MBHC_BTN6_VTH	GENMASK(7, 2)
91be2af391SNeil Armstrong #define WCD939X_ANA_MBHC_BTN7				   (0x3021)
92be2af391SNeil Armstrong #define WCD939X_MBHC_BTN7_VTH	GENMASK(7, 2)
93be2af391SNeil Armstrong #define WCD939X_ANA_MICB1				   (0x3022)
9442cef39bSKrzysztof Kozlowski #define WCD939X_MICB_ENABLE	GENMASK(7, 6)
95*fe243a54SKrzysztof Kozlowski #define WCD939X_MICB_VOUT_CTL	GENMASK(5, 0)
96be2af391SNeil Armstrong #define WCD939X_ANA_MICB2				   (0x3023)
97be2af391SNeil Armstrong #define WCD939X_ANA_MICB2_RAMP				   (0x3024)
98be2af391SNeil Armstrong #define WCD939X_MICB2_RAMP_RAMP_ENABLE	BIT(7)
99be2af391SNeil Armstrong #define WCD939X_MICB2_RAMP_MB2_IN2P_SHORT_ENABLE	BIT(6)
100be2af391SNeil Armstrong #define WCD939X_MICB2_RAMP_ALLSW_OVRD_ENABLE	BIT(5)
101be2af391SNeil Armstrong #define WCD939X_MICB2_RAMP_SHIFT_CTL	GENMASK(4, 2)
102be2af391SNeil Armstrong #define WCD939X_MICB2_RAMP_USB_MGDET_MICB2_RAMP	GENMASK(1, 0)
103be2af391SNeil Armstrong #define WCD939X_ANA_MICB3				   (0x3025)
104be2af391SNeil Armstrong #define WCD939X_ANA_MICB4				   (0x3026)
105be2af391SNeil Armstrong #define WCD939X_BIAS_CTL				   (0x3028)
106be2af391SNeil Armstrong #define WCD939X_BIAS_VBG_FINE_ADJ			   (0x3029)
107be2af391SNeil Armstrong #define WCD939X_LDOL_VDDCX_ADJUST			   (0x3040)
108be2af391SNeil Armstrong #define WCD939X_LDOL_DISABLE_LDOL			   (0x3041)
109be2af391SNeil Armstrong #define WCD939X_MBHC_CTL_CLK				   (0x3056)
110be2af391SNeil Armstrong #define WCD939X_MBHC_CTL_ANA				   (0x3057)
111be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_VNEG_CTL			   (0x3058)
112be2af391SNeil Armstrong #define WCD939X_MBHC_ZDET_BIAS_CTL			   (0x3059)
113be2af391SNeil Armstrong #define WCD939X_MBHC_CTL_BCS				   (0x305a)
114be2af391SNeil Armstrong #define WCD939X_MBHC_MOISTURE_DET_FSM_STATUS		   (0x305b)
115be2af391SNeil Armstrong #define WCD939X_MBHC_TEST_CTL				   (0x305c)
116be2af391SNeil Armstrong #define WCD939X_LDOH_MODE				   (0x3067)
117be2af391SNeil Armstrong #define WCD939X_MODE_LDOH_EN	BIT(7)
118be2af391SNeil Armstrong #define WCD939X_MODE_PWRDN_STATE	BIT(6)
119be2af391SNeil Armstrong #define WCD939X_MODE_SLOWRAMP_EN	BIT(5)
120be2af391SNeil Armstrong #define WCD939X_MODE_VOUT_ADJUST	GENMASK(4, 3)
121be2af391SNeil Armstrong #define WCD939X_MODE_VOUT_COARSE_ADJ	GENMASK(2, 0)
122be2af391SNeil Armstrong #define WCD939X_LDOH_BIAS				   (0x3068)
123be2af391SNeil Armstrong #define WCD939X_LDOH_STB_LOADS				   (0x3069)
124be2af391SNeil Armstrong #define WCD939X_LDOH_SLOWRAMP				   (0x306a)
125be2af391SNeil Armstrong #define WCD939X_MICB1_TEST_CTL_1			   (0x306b)
126be2af391SNeil Armstrong #define WCD939X_TEST_CTL_1_NOISE_FILT_RES_VAL	GENMASK(7, 5)
127be2af391SNeil Armstrong #define WCD939X_TEST_CTL_1_EN_VREFGEN	BIT(4)
128be2af391SNeil Armstrong #define WCD939X_TEST_CTL_1_EN_LDO	BIT(3)
129be2af391SNeil Armstrong #define WCD939X_TEST_CTL_1_LDO_BLEEDER_I_CTRL	GENMASK(2, 0)
130be2af391SNeil Armstrong #define WCD939X_MICB1_TEST_CTL_2			   (0x306c)
131be2af391SNeil Armstrong #define WCD939X_TEST_CTL_2_IBIAS_VREFGEN	GENMASK(7, 6)
132be2af391SNeil Armstrong #define WCD939X_TEST_CTL_2_INRUSH_CURRENT_FIX_DIS	BIT(5)
133be2af391SNeil Armstrong #define WCD939X_TEST_CTL_2_IBIAS_LDO_DRIVER	GENMASK(2, 0)
134be2af391SNeil Armstrong #define WCD939X_MICB1_TEST_CTL_3			   (0x306d)
135be2af391SNeil Armstrong #define WCD939X_TEST_CTL_3_CFILT_REF_EN	BIT(7)
136be2af391SNeil Armstrong #define WCD939X_TEST_CTL_3_RZ_LDO_VAL	GENMASK(6, 4)
137be2af391SNeil Armstrong #define WCD939X_TEST_CTL_3_IBIAS_LDO_STG3	GENMASK(3, 2)
138be2af391SNeil Armstrong #define WCD939X_TEST_CTL_3_ATEST_CTRL	GENMASK(1, 0)
139be2af391SNeil Armstrong #define WCD939X_MICB2_TEST_CTL_1			   (0x306e)
140be2af391SNeil Armstrong #define WCD939X_MICB2_TEST_CTL_2			   (0x306f)
141be2af391SNeil Armstrong #define WCD939X_MICB2_TEST_CTL_3			   (0x3070)
142be2af391SNeil Armstrong #define WCD939X_MICB3_TEST_CTL_1			   (0x3071)
143be2af391SNeil Armstrong #define WCD939X_MICB3_TEST_CTL_2			   (0x3072)
144be2af391SNeil Armstrong #define WCD939X_MICB3_TEST_CTL_3			   (0x3073)
145be2af391SNeil Armstrong #define WCD939X_MICB4_TEST_CTL_1			   (0x3074)
146be2af391SNeil Armstrong #define WCD939X_MICB4_TEST_CTL_2			   (0x3075)
147be2af391SNeil Armstrong #define WCD939X_MICB4_TEST_CTL_3			   (0x3076)
148be2af391SNeil Armstrong #define WCD939X_TX_COM_ADC_VCM				   (0x3077)
149be2af391SNeil Armstrong #define WCD939X_TX_COM_BIAS_ATEST			   (0x3078)
150be2af391SNeil Armstrong #define WCD939X_TX_COM_SPARE1				   (0x3079)
151be2af391SNeil Armstrong #define WCD939X_TX_COM_SPARE2				   (0x307a)
152be2af391SNeil Armstrong #define WCD939X_TX_COM_TXFE_DIV_CTL			   (0x307b)
153be2af391SNeil Armstrong #define WCD939X_TX_COM_TXFE_DIV_START			   (0x307c)
154be2af391SNeil Armstrong #define WCD939X_TX_COM_SPARE3				   (0x307d)
155be2af391SNeil Armstrong #define WCD939X_TX_COM_SPARE4				   (0x307e)
156be2af391SNeil Armstrong #define WCD939X_TX_1_2_TEST_EN				   (0x307f)
157be2af391SNeil Armstrong #define WCD939X_TX_1_2_ADC_IB				   (0x3080)
158be2af391SNeil Armstrong #define WCD939X_TX_1_2_ATEST_REFCTL			   (0x3081)
159be2af391SNeil Armstrong #define WCD939X_TX_1_2_TEST_CTL				   (0x3082)
160be2af391SNeil Armstrong #define WCD939X_TX_1_2_TEST_BLK_EN1			   (0x3083)
161be2af391SNeil Armstrong #define WCD939X_TX_1_2_TXFE1_CLKDIV			   (0x3084)
162be2af391SNeil Armstrong #define WCD939X_TX_1_2_SAR2_ERR				   (0x3085)
163be2af391SNeil Armstrong #define WCD939X_TX_1_2_SAR1_ERR				   (0x3086)
164be2af391SNeil Armstrong #define WCD939X_TX_3_4_TEST_EN				   (0x3087)
165be2af391SNeil Armstrong #define WCD939X_TX_3_4_ADC_IB				   (0x3088)
166be2af391SNeil Armstrong #define WCD939X_TX_3_4_ATEST_REFCTL			   (0x3089)
167be2af391SNeil Armstrong #define WCD939X_TX_3_4_TEST_CTL				   (0x308a)
168be2af391SNeil Armstrong #define WCD939X_TX_3_4_TEST_BLK_EN3			   (0x308b)
169be2af391SNeil Armstrong #define WCD939X_TX_3_4_TXFE3_CLKDIV			   (0x308c)
170be2af391SNeil Armstrong #define WCD939X_TX_3_4_SAR4_ERR				   (0x308d)
171be2af391SNeil Armstrong #define WCD939X_TX_3_4_SAR3_ERR				   (0x308e)
172be2af391SNeil Armstrong #define WCD939X_TX_3_4_TEST_BLK_EN2			   (0x308f)
173be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC2_INT1_EN	BIT(7)
174be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC2_INT2_EN	BIT(6)
175be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC2_SAR_EN	BIT(5)
176be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC2_CMGEN_EN	BIT(4)
177be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC2_CLKGEN_EN	BIT(3)
178be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_ADC12_VREF_NONL2	GENMASK(2, 1)
179be2af391SNeil Armstrong #define WCD939X_TEST_BLK_EN2_TXFE2_MBHC_CLKRST_EN	BIT(0)
180be2af391SNeil Armstrong #define WCD939X_TX_3_4_TXFE2_CLKDIV			   (0x3090)
181be2af391SNeil Armstrong #define WCD939X_TX_3_4_SPARE1				   (0x3091)
182be2af391SNeil Armstrong #define WCD939X_TX_3_4_TEST_BLK_EN4			   (0x3092)
183be2af391SNeil Armstrong #define WCD939X_TX_3_4_TXFE4_CLKDIV			   (0x3093)
184be2af391SNeil Armstrong #define WCD939X_TX_3_4_SPARE2				   (0x3094)
185be2af391SNeil Armstrong #define WCD939X_CLASSH_MODE_1				   (0x3097)
186be2af391SNeil Armstrong #define WCD939X_CLASSH_MODE_2				   (0x3098)
187be2af391SNeil Armstrong #define WCD939X_CLASSH_MODE_3				   (0x3099)
188be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_VCL_1			   (0x309a)
189be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_VCL_2			   (0x309b)
190be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_CCL_1			   (0x309c)
191be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_CCL_2			   (0x309d)
192be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_CCL_3			   (0x309e)
193be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_CCL_4			   (0x309f)
194be2af391SNeil Armstrong #define WCD939X_CLASSH_CTRL_CCL_5			   (0x30a0)
195be2af391SNeil Armstrong #define WCD939X_CLASSH_BUCK_TMUX_A_D			   (0x30a1)
196be2af391SNeil Armstrong #define WCD939X_CLASSH_BUCK_SW_DRV_CNTL			   (0x30a2)
197be2af391SNeil Armstrong #define WCD939X_CLASSH_SPARE				   (0x30a3)
198be2af391SNeil Armstrong #define WCD939X_FLYBACK_EN				   (0x30a4)
199be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_1			   (0x30a5)
200be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_2			   (0x30a6)
201be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_3			   (0x30a7)
202be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_4			   (0x30a8)
203be2af391SNeil Armstrong #define WCD939X_VNEG_CTRL_4_ILIM_SEL	GENMASK(7, 4)
204be2af391SNeil Armstrong #define WCD939X_VNEG_CTRL_4_PW_BUF_POS	GENMASK(3, 2)
205be2af391SNeil Armstrong #define WCD939X_VNEG_CTRL_4_PW_BUF_NEG	GENMASK(1, 0)
206be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_5			   (0x30a9)
207be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_6			   (0x30aa)
208be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_7			   (0x30ab)
209be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_8			   (0x30ac)
210be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEG_CTRL_9			   (0x30ad)
211be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEGDAC_CTRL_1			   (0x30ae)
212be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEGDAC_CTRL_2			   (0x30af)
213be2af391SNeil Armstrong #define WCD939X_FLYBACK_VNEGDAC_CTRL_3			   (0x30b0)
214be2af391SNeil Armstrong #define WCD939X_FLYBACK_CTRL_1				   (0x30b1)
215be2af391SNeil Armstrong #define WCD939X_FLYBACK_TEST_CTL			   (0x30b2)
216be2af391SNeil Armstrong #define WCD939X_RX_AUX_SW_CTL				   (0x30b3)
217be2af391SNeil Armstrong #define WCD939X_RX_PA_AUX_IN_CONN			   (0x30b4)
218be2af391SNeil Armstrong #define WCD939X_RX_TIMER_DIV				   (0x30b5)
219be2af391SNeil Armstrong #define WCD939X_RX_OCP_CTL				   (0x30b6)
220be2af391SNeil Armstrong #define WCD939X_RX_OCP_COUNT				   (0x30b7)
221be2af391SNeil Armstrong #define WCD939X_RX_BIAS_EAR_DAC				   (0x30b8)
222be2af391SNeil Armstrong #define WCD939X_RX_BIAS_EAR_AMP				   (0x30b9)
223be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_LDO				   (0x30ba)
224be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_PA				   (0x30bb)
225be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_RDACBUFF_CNP2		   (0x30bc)
226be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_RDAC_LDO			   (0x30bd)
227be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_CNP1			   (0x30be)
228be2af391SNeil Armstrong #define WCD939X_RX_BIAS_HPH_LOWPOWER			   (0x30bf)
229be2af391SNeil Armstrong #define WCD939X_RX_BIAS_AUX_DAC				   (0x30c0)
230be2af391SNeil Armstrong #define WCD939X_RX_BIAS_AUX_AMP				   (0x30c1)
231be2af391SNeil Armstrong #define WCD939X_RX_BIAS_VNEGDAC_BLEEDER			   (0x30c2)
232be2af391SNeil Armstrong #define WCD939X_RX_BIAS_MISC				   (0x30c3)
233be2af391SNeil Armstrong #define WCD939X_RX_BIAS_BUCK_RST			   (0x30c4)
234be2af391SNeil Armstrong #define WCD939X_RX_BIAS_BUCK_VREF_ERRAMP		   (0x30c5)
235be2af391SNeil Armstrong #define WCD939X_RX_BIAS_FLYB_ERRAMP			   (0x30c6)
236be2af391SNeil Armstrong #define WCD939X_RX_BIAS_FLYB_BUFF			   (0x30c7)
237be2af391SNeil Armstrong #define WCD939X_RX_BIAS_FLYB_MID_RST			   (0x30c8)
238be2af391SNeil Armstrong #define WCD939X_HPH_L_STATUS				   (0x30c9)
239be2af391SNeil Armstrong #define WCD939X_HPH_R_STATUS				   (0x30ca)
240be2af391SNeil Armstrong #define WCD939X_HPH_CNP_EN				   (0x30cb)
241be2af391SNeil Armstrong #define WCD939X_HPH_CNP_WG_CTL				   (0x30cc)
242be2af391SNeil Armstrong #define WCD939X_HPH_CNP_WG_TIME				   (0x30cd)
243be2af391SNeil Armstrong #define WCD939X_HPH_OCP_CTL				   (0x30ce)
244be2af391SNeil Armstrong #define WCD939X_OCP_CTL_OCP_CURR_LIMIT	GENMASK(7, 5)
245be2af391SNeil Armstrong #define WCD939X_OCP_CTL_OCP_FSM_EN	BIT(4)
246be2af391SNeil Armstrong #define WCD939X_OCP_CTL_SPARE_BITS	BIT(3)
247be2af391SNeil Armstrong #define WCD939X_OCP_CTL_SCD_OP_EN	BIT(1)
248be2af391SNeil Armstrong #define WCD939X_HPH_AUTO_CHOP				   (0x30cf)
249be2af391SNeil Armstrong #define WCD939X_HPH_CHOP_CTL				   (0x30d0)
250be2af391SNeil Armstrong #define WCD939X_HPH_PA_CTL1				   (0x30d1)
251be2af391SNeil Armstrong #define WCD939X_HPH_PA_CTL2				   (0x30d2)
252be2af391SNeil Armstrong #define WCD939X_PA_CTL2_HPHPA_GND_R	BIT(6)
253be2af391SNeil Armstrong #define WCD939X_PA_CTL2_HPHPA_GND_L	BIT(4)
254be2af391SNeil Armstrong #define WCD939X_PA_CTL2_GM3_CASCODE_CTL_NORMAL	GENMASK(1, 0)
255be2af391SNeil Armstrong #define WCD939X_HPH_L_EN				   (0x30d3)
256be2af391SNeil Armstrong #define WCD939X_L_EN_CONST_SEL_L	GENMASK(7, 6)
257be2af391SNeil Armstrong #define WCD939X_L_EN_GAIN_SOURCE_SEL	BIT(5)
258be2af391SNeil Armstrong #define WCD939X_L_EN_SPARE_BITS	GENMASK(4, 0)
259be2af391SNeil Armstrong #define WCD939X_HPH_L_TEST				   (0x30d4)
260be2af391SNeil Armstrong #define WCD939X_HPH_L_ATEST				   (0x30d5)
261be2af391SNeil Armstrong #define WCD939X_HPH_R_EN				   (0x30d6)
262be2af391SNeil Armstrong #define WCD939X_R_EN_CONST_SEL_R	GENMASK(7, 6)
263be2af391SNeil Armstrong #define WCD939X_R_EN_GAIN_SOURCE_SEL	BIT(5)
264be2af391SNeil Armstrong #define WCD939X_R_EN_SPARE_BITS	GENMASK(4, 0)
265be2af391SNeil Armstrong #define WCD939X_HPH_R_TEST				   (0x30d7)
266be2af391SNeil Armstrong #define WCD939X_HPH_R_ATEST				   (0x30d8)
267be2af391SNeil Armstrong #define WCD939X_R_ATEST_DACR_REF_ATEST1_CONN	BIT(7)
268be2af391SNeil Armstrong #define WCD939X_R_ATEST_LDO1_R_ATEST2_CONN	BIT(6)
269be2af391SNeil Armstrong #define WCD939X_R_ATEST_LDO_R_ATEST2_CAL	BIT(5)
270be2af391SNeil Armstrong #define WCD939X_R_ATEST_LDO2_R_ATEST2_CONN	BIT(4)
271be2af391SNeil Armstrong #define WCD939X_R_ATEST_LDO_1P65V_ATEST1_CONN	BIT(3)
272be2af391SNeil Armstrong #define WCD939X_R_ATEST_HPH_GND_OVR	BIT(1)
273be2af391SNeil Armstrong #define WCD939X_HPH_RDAC_CLK_CTL1			   (0x30d9)
274be2af391SNeil Armstrong #define WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_EN	BIT(7)
275be2af391SNeil Armstrong #define WCD939X_RDAC_CLK_CTL1_OPAMP_CHOP_CLK_DIV_CTRL	GENMASK(6, 4)
276be2af391SNeil Armstrong #define WCD939X_RDAC_CLK_CTL1_SPARE_BITS	GENMASK(3, 0)
277be2af391SNeil Armstrong #define WCD939X_HPH_RDAC_CLK_CTL2			   (0x30da)
278be2af391SNeil Armstrong #define WCD939X_HPH_RDAC_LDO_CTL			   (0x30db)
279be2af391SNeil Armstrong #define WCD939X_HPH_RDAC_CHOP_CLK_LP_CTL		   (0x30dc)
280be2af391SNeil Armstrong #define WCD939X_HPH_REFBUFF_UHQA_CTL			   (0x30dd)
281be2af391SNeil Armstrong #define WCD939X_REFBUFF_UHQA_CTL_SPARE_BITS	GENMASK(7, 6)
282be2af391SNeil Armstrong #define WCD939X_REFBUFF_UHQA_CTL_HPH_VNEGREG2_COMP_CTL_OV	BIT(5)
283be2af391SNeil Armstrong #define WCD939X_REFBUFF_UHQA_CTL_REFBUFN_RBIAS_ADJUST	BIT(4)
284be2af391SNeil Armstrong #define WCD939X_REFBUFF_UHQA_CTL_REFBUFP_IOUT_CTL	GENMASK(3, 2)
285be2af391SNeil Armstrong #define WCD939X_REFBUFF_UHQA_CTL_REFBUFN_IOUT_CTL	GENMASK(1, 0)
286be2af391SNeil Armstrong #define WCD939X_HPH_REFBUFF_LP_CTL			   (0x30de)
287be2af391SNeil Armstrong #define WCD939X_REFBUFF_LP_CTL_HPH_VNEGREG2_CURR_COMP	GENMASK(7, 6)
288be2af391SNeil Armstrong #define WCD939X_REFBUFF_LP_CTL_SPARE_BITS	GENMASK(5, 4)
289be2af391SNeil Armstrong #define WCD939X_REFBUFF_LP_CTL_EN_PREREF_FILT_STARTUP_CLKDIV	BIT(3)
290be2af391SNeil Armstrong #define WCD939X_REFBUFF_LP_CTL_PREREF_FILT_STARTUP_CLKDIV_CTL	GENMASK(2, 1)
291be2af391SNeil Armstrong #define WCD939X_REFBUFF_LP_CTL_PREREF_FILT_BYPASS	BIT(0)
292be2af391SNeil Armstrong #define WCD939X_HPH_L_DAC_CTL				   (0x30df)
293be2af391SNeil Armstrong #define WCD939X_HPH_R_DAC_CTL				   (0x30e0)
294be2af391SNeil Armstrong #define WCD939X_HPH_SURGE_COMP_SEL			   (0x30e1)
295be2af391SNeil Armstrong #define WCD939X_HPH_SURGE_EN				   (0x30e2)
296be2af391SNeil Armstrong #define WCD939X_EN_EN_SURGE_PROTECTION_HPHL	BIT(7)
297be2af391SNeil Armstrong #define WCD939X_EN_EN_SURGE_PROTECTION_HPHR	BIT(6)
298be2af391SNeil Armstrong #define WCD939X_EN_SEL_SURGE_COMP_IQ	GENMASK(5, 4)
299be2af391SNeil Armstrong #define WCD939X_EN_SURGE_VOLT_MODE_SHUTOFF_EN	BIT(3)
300be2af391SNeil Armstrong #define WCD939X_EN_LATCH_INTR_OP_STG_HIZ_EN	BIT(2)
301be2af391SNeil Armstrong #define WCD939X_EN_SURGE_LATCH_REG_RESET	BIT(1)
302be2af391SNeil Armstrong #define WCD939X_EN_SWTICH_VN_VNDAC_NSURGE_EN	BIT(0)
303be2af391SNeil Armstrong #define WCD939X_HPH_SURGE_MISC1				   (0x30e3)
304be2af391SNeil Armstrong #define WCD939X_HPH_SURGE_STATUS			   (0x30e4)
305be2af391SNeil Armstrong #define WCD939X_EAR_EN					   (0x30e9)
306be2af391SNeil Armstrong #define WCD939X_EAR_PA_CON				   (0x30ea)
307be2af391SNeil Armstrong #define WCD939X_EAR_SP_CON				   (0x30eb)
308be2af391SNeil Armstrong #define WCD939X_EAR_DAC_CON				   (0x30ec)
309be2af391SNeil Armstrong #define WCD939X_DAC_CON_DAC_SAMPLE_EDGE_SEL	BIT(7)
310be2af391SNeil Armstrong #define WCD939X_DAC_CON_REF_DBG_EN	BIT(6)
311be2af391SNeil Armstrong #define WCD939X_DAC_CON_REF_DBG_GAIN	GENMASK(5, 3)
312be2af391SNeil Armstrong #define WCD939X_DAC_CON_GAIN_DAC	GENMASK(2, 1)
313be2af391SNeil Armstrong #define WCD939X_DAC_CON_INV_DATA	BIT(0)
314be2af391SNeil Armstrong #define WCD939X_EAR_CNP_FSM_CON				   (0x30ed)
315be2af391SNeil Armstrong #define WCD939X_EAR_TEST_CTL				   (0x30ee)
316be2af391SNeil Armstrong #define WCD939X_EAR_STATUS_REG_1			   (0x30ef)
317be2af391SNeil Armstrong #define WCD939X_EAR_STATUS_REG_2			   (0x30f0)
318be2af391SNeil Armstrong #define WCD939X_FLYBACK_NEW_CTRL_2			   (0x30f6)
319be2af391SNeil Armstrong #define WCD939X_FLYBACK_NEW_CTRL_3			   (0x30f7)
320be2af391SNeil Armstrong #define WCD939X_FLYBACK_NEW_CTRL_4			   (0x30f8)
321be2af391SNeil Armstrong #define WCD939X_ANA_NEW_PAGE				   (0x3100)
322be2af391SNeil Armstrong #define WCD939X_HPH_NEW_ANA_HPH2			   (0x3101)
323be2af391SNeil Armstrong #define WCD939X_HPH_NEW_ANA_HPH3			   (0x3102)
324be2af391SNeil Armstrong #define WCD939X_SLEEP_CTL				   (0x3103)
325be2af391SNeil Armstrong #define WCD939X_SLEEP_WATCHDOG_CTL			   (0x3104)
326be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_ELECT_REM_CLAMP_CTL		   (0x311f)
327be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_CTL_1				   (0x3120)
328be2af391SNeil Armstrong #define WCD939X_CTL_1_RCO_EN	BIT(7)
329be2af391SNeil Armstrong #define WCD939X_CTL_1_ADC_MODE	BIT(4)
330be2af391SNeil Armstrong #define WCD939X_CTL_1_ADC_ENABLE	BIT(3)
331be2af391SNeil Armstrong #define WCD939X_CTL_1_DETECTION_DONE	BIT(2)
332be2af391SNeil Armstrong #define WCD939X_CTL_1_BTN_DBNC_CTL	GENMASK(1, 0)
333be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_CTL_2				   (0x3121)
334be2af391SNeil Armstrong #define WCD939X_CTL_2_MUX_CTL	GENMASK(6, 4)
335be2af391SNeil Armstrong #define WCD939X_CTL_2_M_RTH_CTL	GENMASK(3, 2)
336be2af391SNeil Armstrong #define WCD939X_CTL_2_HS_VREF_CTL	GENMASK(1, 0)
337be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_PLUG_DETECT_CTL		   (0x3122)
338be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_ZDET_ANA_CTL			   (0x3123)
339be2af391SNeil Armstrong #define WCD939X_ZDET_ANA_CTL_AVERAGING_EN	BIT(7)
340be2af391SNeil Armstrong #define WCD939X_ZDET_ANA_CTL_MAXV_CTL	GENMASK(6, 4)
341be2af391SNeil Armstrong #define WCD939X_ZDET_ANA_CTL_RANGE_CTL	GENMASK(3, 0)
342be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_ZDET_RAMP_CTL			   (0x3124)
343be2af391SNeil Armstrong #define WCD939X_ZDET_RAMP_CTL_ACC1_MIN_CTL	GENMASK(6, 4)
344be2af391SNeil Armstrong #define WCD939X_ZDET_RAMP_CTL_TIME_CTL	GENMASK(3, 0)
345be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_FSM_STATUS			   (0x3125)
346be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_ADC_TIMEOUT	BIT(7)
347be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_ADC_COMPLETE	BIT(6)
348be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_HS_M_COMP_STATUS	BIT(5)
349be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_FAST_PRESS_FLAG_STATUS	BIT(4)
350be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_FAST_REMOVAL_FLAG_STATUS	BIT(3)
351be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_REMOVAL_FLAG_STATUS	BIT(2)
352be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_ELECT_REM_RT_STATUS	BIT(1)
353be2af391SNeil Armstrong #define WCD939X_FSM_STATUS_BTN_STATUS	BIT(0)
354be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_ADC_RESULT			   (0x3126)
355be2af391SNeil Armstrong #define WCD939X_ADC_RESULT_VALUE	GENMASK(7, 0)
356be2af391SNeil Armstrong #define WCD939X_TX_NEW_CH12_MUX				   (0x3127)
357be2af391SNeil Armstrong #define WCD939X_TX_NEW_CH34_MUX				   (0x3128)
358be2af391SNeil Armstrong #define WCD939X_DIE_CRACK_DET_EN			   (0x312c)
359be2af391SNeil Armstrong #define WCD939X_DIE_CRACK_DET_OUT			   (0x312d)
360be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_RDAC_GAIN_CTL		   (0x3132)
361be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_GAIN_CTL_L		   (0x3133)
362be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_L_EN_HPHPA_2VPK	BIT(7)
363be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_L_RX_SUPPLY_LEVEL	BIT(6)
364be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_L_DAC_DR_BOOST	BIT(5)
365be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_L_VALUE	GENMASK(4, 0)
366be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_RDAC_VREF_CTL		   (0x3134)
367be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_RDAC_OVERRIDE_CTL		   (0x3135)
368be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_GAIN_CTL_R		   (0x3136)
369be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_R_D_RCO_CLK_EN	BIT(7)
370be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_R_SPARE_BITS	GENMASK(6, 5)
371be2af391SNeil Armstrong #define WCD939X_PA_GAIN_CTL_R_VALUE	GENMASK(4, 0)
372be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_MISC1			   (0x3137)
373be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_MISC2			   (0x3138)
374be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_RDAC_MISC		   (0x3139)
375be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_TIMER1			   (0x313a)
376be2af391SNeil Armstrong #define WCD939X_TIMER1_CURR_IDIV_CTL_CMPDR_OFF	GENMASK(7, 5)
377be2af391SNeil Armstrong #define WCD939X_TIMER1_CURR_IDIV_CTL_AUTOCHOP	GENMASK(4, 2)
378be2af391SNeil Armstrong #define WCD939X_TIMER1_AUTOCHOP_TIMER_CTL_EN	BIT(1)
379be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_TIMER2			   (0x313b)
380be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_TIMER3			   (0x313c)
381be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_TIMER4			   (0x313d)
382be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_RDAC_MISC2		   (0x313e)
383be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_PA_RDAC_MISC3		   (0x313f)
384be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_L		   (0x3140)
385be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_L_EN_HD2_RES_DIV_L	BIT(7)
386be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_L_HD2_RES_DIV_PULLGND_L	BIT(6)
387be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_L_HD2_RES_DIV_CTL_L	GENMASK(5, 0)
388be2af391SNeil Armstrong #define WCD939X_HPH_NEW_INT_RDAC_HD2_CTL_R		   (0x3141)
389be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_R_EN_HD2_RES_DIV_R	BIT(7)
390be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_R_HD2_RES_DIV_PULLGND_L	BIT(6)
391be2af391SNeil Armstrong #define WCD939X_RDAC_HD2_CTL_R_HD2_RES_DIV_CTL_R	GENMASK(5, 0)
392be2af391SNeil Armstrong #define WCD939X_RX_NEW_INT_HPH_RDAC_BIAS_LOHIFI		   (0x3145)
393be2af391SNeil Armstrong #define WCD939X_RX_NEW_INT_HPH_RDAC_BIAS_ULP		   (0x3146)
394be2af391SNeil Armstrong #define WCD939X_RX_NEW_INT_HPH_RDAC_LDO_LP		   (0x3147)
395be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_INT_MOISTURE_DET_DC_CTRL	   (0x31af)
396be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_DC_CTRL_ONCOUNT	GENMASK(6, 5)
397be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_DC_CTRL_OFFCOUNT	GENMASK(4, 0)
398be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_INT_MOISTURE_DET_POLLING_CTRL	   (0x31b0)
399be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_POLLING_CTRL_HPHL_PA_EN	BIT(6)
400be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_POLLING_CTRL_DTEST_EN	GENMASK(5, 4)
401be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_POLLING_CTRL_MOIST_OVRD_POLLING	BIT(3)
402be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_POLLING_CTRL_MOIST_EN_POLLING	BIT(2)
403be2af391SNeil Armstrong #define WCD939X_MOISTURE_DET_POLLING_CTRL_MOIST_DBNC_TIME	GENMASK(1, 0)
404be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_INT_MECH_DET_CURRENT		   (0x31b1)
405be2af391SNeil Armstrong #define WCD939X_MECH_DET_CURRENT_HSDET_PULLUP_CTL	GENMASK(4, 0)
406be2af391SNeil Armstrong #define WCD939X_MBHC_NEW_INT_ZDET_CLK_AND_MOISTURE_CTL_NEW (0x31b2)
407be2af391SNeil Armstrong #define WCD939X_EAR_INT_NEW_CHOPPER_CON			   (0x31b7)
408be2af391SNeil Armstrong #define WCD939X_EAR_INT_NEW_CNP_VCM_CON1		   (0x31b8)
409be2af391SNeil Armstrong #define WCD939X_EAR_INT_NEW_CNP_VCM_CON2		   (0x31b9)
410be2af391SNeil Armstrong #define WCD939X_EAR_INT_NEW_DYNAMIC_BIAS		   (0x31ba)
411be2af391SNeil Armstrong #define WCD939X_SLEEP_INT_WATCHDOG_CTL_1		   (0x31d0)
412be2af391SNeil Armstrong #define WCD939X_SLEEP_INT_WATCHDOG_CTL_2		   (0x31d1)
413be2af391SNeil Armstrong #define WCD939X_DIE_CRACK_INT_DET_INT1			   (0x31d3)
414be2af391SNeil Armstrong #define WCD939X_DIE_CRACK_INT_DET_INT2			   (0x31d4)
415be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_DIVSTOP_L2		   (0x31d5)
416be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_DIVSTOP_L1		   (0x31d6)
417be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_DIVSTOP_L0		   (0x31d7)
418be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_DIVSTOP_ULP1P2M	   (0x31d8)
419be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_DIVSTOP_ULP0P6M	   (0x31d9)
420be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG1_L2L1	   (0x31da)
421be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG1_L0		   (0x31db)
422be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG1_ULP	   (0x31dc)
423be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG2MAIN_L2L1	   (0x31dd)
424be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG2MAIN_L0	   (0x31de)
425be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG2MAIN_ULP	   (0x31df)
426be2af391SNeil Armstrong #define WCD939X_FE_ICTRL_STG2MAIN_ULP_VALUE	GENMASK(4, 0)
427be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG2CASC_L2L1L0	   (0x31e0)
428be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_FE_ICTRL_STG2CASC_ULP	   (0x31e1)
429be2af391SNeil Armstrong #define WCD939X_FE_ICTRL_STG2CASC_ULP_ICTRL_SCBIAS_ULP0P6M	GENMASK(7, 4)
430be2af391SNeil Armstrong #define WCD939X_FE_ICTRL_STG2CASC_ULP_VALUE	GENMASK(3, 0)
431be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_SCBIAS_L2L1		   (0x31e2)
432be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_SCBIAS_L0ULP		   (0x31e3)
433be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_INT_L2		   (0x31e4)
434be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_INT_L1		   (0x31e5)
435be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_INT_L0		   (0x31e6)
436be2af391SNeil Armstrong #define WCD939X_TX_COM_NEW_INT_ADC_INT_ULP		   (0x31e7)
437be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAGE				   (0x3400)
438be2af391SNeil Armstrong #define WCD939X_DIGITAL_CHIP_ID0			   (0x3401)
439be2af391SNeil Armstrong #define WCD939X_DIGITAL_CHIP_ID1			   (0x3402)
440be2af391SNeil Armstrong #define WCD939X_DIGITAL_CHIP_ID2			   (0x3403)
441be2af391SNeil Armstrong #define WCD939X_DIGITAL_CHIP_ID3			   (0x3404)
442be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_TX_CLK_RATE			   (0x3405)
443be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RST_CTL			   (0x3406)
444be2af391SNeil Armstrong #define WCD939X_DIGITAL_TOP_CLK_CFG			   (0x3407)
445be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_ANA_CLK_CTL			   (0x3408)
446be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_TX_DIV4_CLK_EN	BIT(5)
447be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_TX_DIV2_CLK_EN	BIT(4)
448be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_TX_CLK_EN	BIT(3)
449be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_RX_DIV4_CLK_EN	BIT(2)
450be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_RX_DIV2_CLK_EN	BIT(1)
451be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_RX_CLK_EN	BIT(0)
452be2af391SNeil Armstrong #define WCD939X_CDC_ANA_CLK_CTL_ANA_TX_DIV2_CLK_EN	BIT(4)
453be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DIG_CLK_CTL			   (0x3409)
454be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_TXD3_CLK_EN	BIT(7)
455be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_TXD2_CLK_EN	BIT(6)
456be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_TXD1_CLK_EN	BIT(5)
457be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_TXD0_CLK_EN	BIT(4)
458be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_RXD2_CLK_EN	BIT(2)
459be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_RXD1_CLK_EN	BIT(1)
460be2af391SNeil Armstrong #define WCD939X_CDC_DIG_CLK_CTL_RXD0_CLK_EN	BIT(0)
461be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_RST_EN			   (0x340a)
462be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_PATH_MODE			   (0x340b)
463be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RX_RST			   (0x340c)
464be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RX0_CTL			   (0x340d)
465be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RX1_CTL			   (0x340e)
466be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RX2_CTL			   (0x340f)
467be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX_ANA_MODE_0_1		   (0x3410)
468be2af391SNeil Armstrong #define WCD939X_CDC_TX_ANA_MODE_0_1_TXD1_MODE	GENMASK(7, 4)
469be2af391SNeil Armstrong #define WCD939X_CDC_TX_ANA_MODE_0_1_TXD0_MODE	GENMASK(3, 0)
470be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX_ANA_MODE_2_3		   (0x3411)
471be2af391SNeil Armstrong #define WCD939X_CDC_TX_ANA_MODE_2_3_TXD3_MODE	GENMASK(7, 4)
472be2af391SNeil Armstrong #define WCD939X_CDC_TX_ANA_MODE_2_3_TXD2_MODE	GENMASK(3, 0)
473be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_COMP_CTL_0			   (0x3414)
474be2af391SNeil Armstrong #define WCD939X_CDC_COMP_CTL_0_HPHL_COMP_EN	BIT(1)
475be2af391SNeil Armstrong #define WCD939X_CDC_COMP_CTL_0_HPHR_COMP_EN	BIT(0)
476be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_ANA_TX_CLK_CTL		   (0x3417)
477be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_MBHC_1P2M_CLK_EN	BIT(5)
478be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_TX3_ADC_CLK_EN	BIT(4)
479be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_TX2_ADC_CLK_EN	BIT(3)
480be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_TX1_ADC_CLK_EN	BIT(2)
481be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_TX0_ADC_CLK_EN	BIT(1)
482be2af391SNeil Armstrong #define WCD939X_CDC_ANA_TX_CLK_CTL_ANA_TXSCBIAS_CLK_EN	BIT(0)
483be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A1_0		   (0x3418)
484be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A1_1		   (0x3419)
485be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A2_0		   (0x341a)
486be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A2_1		   (0x341b)
487be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A3_0		   (0x341c)
488be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A3_1		   (0x341d)
489be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A4_0		   (0x341e)
490be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A4_1		   (0x341f)
491be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A5_0		   (0x3420)
492be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A5_1		   (0x3421)
493be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A6_0		   (0x3422)
494be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_A7_0		   (0x3423)
495be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_C_0			   (0x3424)
496be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_C_1			   (0x3425)
497be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_C_2			   (0x3426)
498be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_C_3			   (0x3427)
499be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R1			   (0x3428)
500be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R2			   (0x3429)
501be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R3			   (0x342a)
502be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R4			   (0x342b)
503be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R5			   (0x342c)
504be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R6			   (0x342d)
505be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_DSM_R7			   (0x342e)
506be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A1_0		   (0x342f)
507be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A1_1		   (0x3430)
508be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A2_0		   (0x3431)
509be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A2_1		   (0x3432)
510be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A3_0		   (0x3433)
511be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A3_1		   (0x3434)
512be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A4_0		   (0x3435)
513be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A4_1		   (0x3436)
514be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A5_0		   (0x3437)
515be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A5_1		   (0x3438)
516be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A6_0		   (0x3439)
517be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_A7_0		   (0x343a)
518be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_C_0			   (0x343b)
519be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_C_1			   (0x343c)
520be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_C_2			   (0x343d)
521be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_C_3			   (0x343e)
522be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R1			   (0x343f)
523be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R2			   (0x3440)
524be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R3			   (0x3441)
525be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R4			   (0x3442)
526be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R5			   (0x3443)
527be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R6			   (0x3444)
528be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_DSM_R7			   (0x3445)
529be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_RX_0		   (0x3446)
530be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_RX_1		   (0x3447)
531be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_DSD_0		   (0x3448)
532be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_DSD_1		   (0x3449)
533be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_DSD_2		   (0x344a)
534be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_GAIN_DSD_0		   (0x344b)
535be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_GAIN_DSD_1		   (0x344c)
536be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_GAIN_DSD_2		   (0x344d)
537be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_HPH_GAIN_CTL		   (0x344e)
538be2af391SNeil Armstrong #define WCD939X_CDC_HPH_GAIN_CTL_HPH_STEREO_EN	BIT(4)
539be2af391SNeil Armstrong #define WCD939X_CDC_HPH_GAIN_CTL_HPHR_RX_EN	BIT(3)
540be2af391SNeil Armstrong #define WCD939X_CDC_HPH_GAIN_CTL_HPHL_RX_EN	BIT(2)
541be2af391SNeil Armstrong #define WCD939X_CDC_HPH_GAIN_CTL_HPHR_DSD_EN	BIT(1)
542be2af391SNeil Armstrong #define WCD939X_CDC_HPH_GAIN_CTL_HPHL_DSD_EN	BIT(0)
543be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_GAIN_CTL		   (0x344f)
544be2af391SNeil Armstrong #define WCD939X_CDC_EAR_GAIN_CTL_EAR_EN	BIT(0)
545be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_EAR_PATH_CTL		   (0x3450)
546be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_SWR_CLH			   (0x3451)
547be2af391SNeil Armstrong #define WCD939X_CDC_SWR_CLH_CLH_CTL	GENMASK(7, 0)
548be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_CLH_BYP			   (0x3452)
549be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX0_CTL			   (0x3453)
550be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX1_CTL			   (0x3454)
551be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX2_CTL			   (0x3455)
552be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX_RST			   (0x3456)
553be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_REQ_CTL			   (0x3457)
554be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_TX3_WIDE_BAND	BIT(5)
555be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_TX2_WIDE_BAND	BIT(4)
556be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_TX1_WIDE_BAND	BIT(3)
557be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_TX0_WIDE_BAND	BIT(2)
558be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_FS_RATE_4P8	BIT(1)
559be2af391SNeil Armstrong #define WCD939X_CDC_REQ_CTL_NO_NOTCH	BIT(0)
560be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_RST				   (0x3458)
561be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_AMIC_CTL			   (0x345a)
562be2af391SNeil Armstrong #define WCD939X_CDC_AMIC_CTL_AMIC5_IN_SEL	BIT(3)
563be2af391SNeil Armstrong #define WCD939X_CDC_AMIC_CTL_AMIC4_IN_SEL	BIT(2)
564be2af391SNeil Armstrong #define WCD939X_CDC_AMIC_CTL_AMIC3_IN_SEL	BIT(1)
565be2af391SNeil Armstrong #define WCD939X_CDC_AMIC_CTL_AMIC1_IN_SEL	BIT(0)
566be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC_CTL			   (0x345b)
567be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_CTL_DMIC_LEGACY_SW_MODE	BIT(3)
568be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_CTL_DMIC_DIV_BAK_EN	BIT(2)
569be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_CTL_CLK_SCALE_EN	BIT(1)
570be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_CTL_SOFT_RESET	BIT(0)
571be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC1_CTL			   (0x345c)
572be2af391SNeil Armstrong #define WCD939X_CDC_DMIC1_CTL_DMIC_CLK_SCALE_SEL	GENMASK(6, 4)
573be2af391SNeil Armstrong #define WCD939X_CDC_DMIC1_CTL_DMIC_CLK_EN	BIT(3)
574be2af391SNeil Armstrong #define WCD939X_CDC_DMIC1_CTL_DMIC_CLK_SEL	GENMASK(2, 0)
575be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC2_CTL			   (0x345d)
576be2af391SNeil Armstrong #define WCD939X_CDC_DMIC2_CTL_DMIC_LEFT_EN	BIT(7)
577be2af391SNeil Armstrong #define WCD939X_CDC_DMIC2_CTL_DMIC_CLK_SCALE_SEL	GENMASK(6, 4)
578be2af391SNeil Armstrong #define WCD939X_CDC_DMIC2_CTL_DMIC_CLK_EN	BIT(3)
579be2af391SNeil Armstrong #define WCD939X_CDC_DMIC2_CTL_DMIC_CLK_SEL	GENMASK(2, 0)
580be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC3_CTL			   (0x345e)
581be2af391SNeil Armstrong #define WCD939X_CDC_DMIC3_CTL_DMIC_CLK_SCALE_SEL	GENMASK(6, 4)
582be2af391SNeil Armstrong #define WCD939X_CDC_DMIC3_CTL_DMIC_CLK_EN	BIT(3)
583be2af391SNeil Armstrong #define WCD939X_CDC_DMIC3_CTL_DMIC_CLK_SEL	GENMASK(2, 0)
584be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC4_CTL			   (0x345f)
585be2af391SNeil Armstrong #define WCD939X_CDC_DMIC4_CTL_DMIC_CLK_SCALE_SEL	GENMASK(6, 4)
586be2af391SNeil Armstrong #define WCD939X_CDC_DMIC4_CTL_DMIC_CLK_EN	BIT(3)
587be2af391SNeil Armstrong #define WCD939X_CDC_DMIC4_CTL_DMIC_CLK_SEL	GENMASK(2, 0)
588be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_PRG_CTL			   (0x3460)
589be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_CTL			   (0x3461)
590be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC_RATE_1_2		   (0x3462)
591be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_RATE_1_2_DMIC2_RATE	GENMASK(7, 4)
592be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_RATE_1_2_DMIC1_RATE	GENMASK(3, 0)
593be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_DMIC_RATE_3_4		   (0x3463)
594be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_RATE_3_4_DMIC4_RATE	GENMASK(7, 4)
595be2af391SNeil Armstrong #define WCD939X_CDC_DMIC_RATE_3_4_DMIC3_RATE	GENMASK(3, 0)
596be2af391SNeil Armstrong #define WCD939X_DIGITAL_PDM_WD_CTL0			   (0x3465)
597be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL0_HOLD_OFF	BIT(4)
598be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL0_TIME_OUT_SEL	BIT(3)
599be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL0_PDM_WD_EN	GENMASK(2, 0)
600be2af391SNeil Armstrong #define WCD939X_DIGITAL_PDM_WD_CTL1			   (0x3466)
601be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL1_HOLD_OFF	BIT(4)
602be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL1_TIME_OUT_SEL	BIT(3)
603be2af391SNeil Armstrong #define WCD939X_PDM_WD_CTL1_PDM_WD_EN	GENMASK(2, 0)
604be2af391SNeil Armstrong #define WCD939X_DIGITAL_PDM_WD_CTL2			   (0x3467)
605be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_MODE			   (0x346a)
606be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_MASK_0			   (0x346b)
607be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_MASK_1			   (0x346c)
608be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_MASK_2			   (0x346d)
609be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_STATUS_0			   (0x346e)
610be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_STATUS_1			   (0x346f)
611be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_STATUS_2			   (0x3470)
612be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_CLEAR_0			   (0x3471)
613be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_CLEAR_1			   (0x3472)
614be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_CLEAR_2			   (0x3473)
615be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_LEVEL_0			   (0x3474)
616be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_LEVEL_1			   (0x3475)
617be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_LEVEL_2			   (0x3476)
618be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_SET_0			   (0x3477)
619be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_SET_1			   (0x3478)
620be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_SET_2			   (0x3479)
621be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_TEST_0			   (0x347a)
622be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_TEST_1			   (0x347b)
623be2af391SNeil Armstrong #define WCD939X_DIGITAL_INTR_TEST_2			   (0x347c)
624be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_MODE_DBG_EN			   (0x347f)
625be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_MODE_DBG_0_1			   (0x3480)
626be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_MODE_DBG_2_3			   (0x3481)
627be2af391SNeil Armstrong #define WCD939X_DIGITAL_LB_IN_SEL_CTL			   (0x3482)
628be2af391SNeil Armstrong #define WCD939X_DIGITAL_LOOP_BACK_MODE			   (0x3483)
629be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_DAC_TEST			   (0x3484)
630be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_RX_0		   (0x3485)
631be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_TX_0		   (0x3486)
632be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_RX_1		   (0x3487)
633be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_TX_1		   (0x3488)
634be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_TX_2		   (0x3489)
635be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_0			   (0x348a)
636be2af391SNeil Armstrong #define WCD939X_DIGITAL_SWR_HM_TEST_1			   (0x348b)
637be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_SWR_0			   (0x348c)
638be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_SWR_1			   (0x348d)
639be2af391SNeil Armstrong #define WCD939X_DIGITAL_I2C_CTL				   (0x348e)
640be2af391SNeil Armstrong #define WCD939X_DIGITAL_CDC_TX_TANGGU_SW_MODE		   (0x348f)
641be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_TEST_CTL_0		   (0x3490)
642be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_TEST_CTL_1		   (0x3491)
643be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_T_DATA_0			   (0x3492)
644be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_T_DATA_1			   (0x3493)
645be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_PDM_RX0			   (0x3494)
646be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_PDM_RX1			   (0x3495)
647be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_PDM_TX0			   (0x3496)
648be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_PDM_TX1			   (0x3497)
649be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_CTL_PDM_TX2			   (0x3498)
650be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_INP_DIS_0			   (0x3499)
651be2af391SNeil Armstrong #define WCD939X_DIGITAL_PAD_INP_DIS_1			   (0x349a)
652be2af391SNeil Armstrong #define WCD939X_DIGITAL_DRIVE_STRENGTH_0		   (0x349b)
653be2af391SNeil Armstrong #define WCD939X_DIGITAL_DRIVE_STRENGTH_1		   (0x349c)
654be2af391SNeil Armstrong #define WCD939X_DIGITAL_DRIVE_STRENGTH_2		   (0x349d)
655be2af391SNeil Armstrong #define WCD939X_DIGITAL_RX_DATA_EDGE_CTL		   (0x349e)
656be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_DATA_EDGE_CTL		   (0x349f)
657be2af391SNeil Armstrong #define WCD939X_DIGITAL_GPIO_MODE			   (0x34a0)
658be2af391SNeil Armstrong #define WCD939X_DIGITAL_PIN_CTL_OE			   (0x34a1)
659be2af391SNeil Armstrong #define WCD939X_DIGITAL_PIN_CTL_DATA_0			   (0x34a2)
660be2af391SNeil Armstrong #define WCD939X_DIGITAL_PIN_CTL_DATA_1			   (0x34a3)
661be2af391SNeil Armstrong #define WCD939X_DIGITAL_PIN_STATUS_0			   (0x34a4)
662be2af391SNeil Armstrong #define WCD939X_DIGITAL_PIN_STATUS_1			   (0x34a5)
663be2af391SNeil Armstrong #define WCD939X_DIGITAL_DIG_DEBUG_CTL			   (0x34a6)
664be2af391SNeil Armstrong #define WCD939X_DIGITAL_DIG_DEBUG_EN			   (0x34a7)
665be2af391SNeil Armstrong #define WCD939X_DIGITAL_ANA_CSR_DBG_ADD			   (0x34a8)
666be2af391SNeil Armstrong #define WCD939X_DIGITAL_ANA_CSR_DBG_CTL			   (0x34a9)
667be2af391SNeil Armstrong #define WCD939X_DIGITAL_SSP_DBG				   (0x34aa)
668be2af391SNeil Armstrong #define WCD939X_DIGITAL_MODE_STATUS_0			   (0x34ab)
669be2af391SNeil Armstrong #define WCD939X_DIGITAL_MODE_STATUS_1			   (0x34ac)
670be2af391SNeil Armstrong #define WCD939X_DIGITAL_SPARE_0				   (0x34ad)
671be2af391SNeil Armstrong #define WCD939X_DIGITAL_SPARE_1				   (0x34ae)
672be2af391SNeil Armstrong #define WCD939X_DIGITAL_SPARE_2				   (0x34af)
673be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_0			   (0x34b0)
674be2af391SNeil Armstrong #define WCD939X_EFUSE_REG_0_WCD939X_ID	GENMASK(4, 1)
675be2af391SNeil Armstrong #define WCD939X_EFUSE_REG_0_EFUSE_BLOWN	BIT(0)
676be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_1			   (0x34b1)
677be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_2			   (0x34b2)
678be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_3			   (0x34b3)
679be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_4			   (0x34b4)
680be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_5			   (0x34b5)
681be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_6			   (0x34b6)
682be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_7			   (0x34b7)
683be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_8			   (0x34b8)
684be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_9			   (0x34b9)
685be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_10			   (0x34ba)
686be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_11			   (0x34bb)
687be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_12			   (0x34bc)
688be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_13			   (0x34bd)
689be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_14			   (0x34be)
690be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_15			   (0x34bf)
691be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_16			   (0x34c0)
692be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_17			   (0x34c1)
693be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_18			   (0x34c2)
694be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_19			   (0x34c3)
695be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_20			   (0x34c4)
696be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_21			   (0x34c5)
697be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_22			   (0x34c6)
698be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_23			   (0x34c7)
699be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_24			   (0x34c8)
700be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_25			   (0x34c9)
701be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_26			   (0x34ca)
702be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_27			   (0x34cb)
703be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_28			   (0x34cc)
704be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_29			   (0x34cd)
705be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_30			   (0x34ce)
706be2af391SNeil Armstrong #define WCD939X_DIGITAL_EFUSE_REG_31			   (0x34cf)
707be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_REQ_FB_CTL_0			   (0x34d0)
708be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_REQ_FB_CTL_1			   (0x34d1)
709be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_REQ_FB_CTL_2			   (0x34d2)
710be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_REQ_FB_CTL_3			   (0x34d3)
711be2af391SNeil Armstrong #define WCD939X_DIGITAL_TX_REQ_FB_CTL_4			   (0x34d4)
712be2af391SNeil Armstrong #define WCD939X_DIGITAL_DEM_BYPASS_DATA0		   (0x34d5)
713be2af391SNeil Armstrong #define WCD939X_DIGITAL_DEM_BYPASS_DATA1		   (0x34d6)
714be2af391SNeil Armstrong #define WCD939X_DIGITAL_DEM_BYPASS_DATA2		   (0x34d7)
715be2af391SNeil Armstrong #define WCD939X_DIGITAL_DEM_BYPASS_DATA3		   (0x34d8)
716be2af391SNeil Armstrong #define WCD939X_DIGITAL_DEM_SECOND_ORDER		   (0x34d9)
717be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_CTRL			   (0x34da)
718be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_0_STATIC_DATA_0		   (0x34db)
719be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_0_STATIC_DATA_1		   (0x34dc)
720be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_0_STATIC_DATA_2		   (0x34dd)
721be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_0_STATIC_DATA_3		   (0x34de)
722be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_1_STATIC_DATA_0		   (0x34df)
723be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_1_STATIC_DATA_1		   (0x34e0)
724be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_1_STATIC_DATA_2		   (0x34e1)
725be2af391SNeil Armstrong #define WCD939X_DIGITAL_DSM_1_STATIC_DATA_3		   (0x34e2)
726be2af391SNeil Armstrong #define WCD939X_RX_TOP_PAGE				   (0x3500)
727be2af391SNeil Armstrong #define WCD939X_RX_TOP_TOP_CFG0				   (0x3501)
728be2af391SNeil Armstrong #define WCD939X_TOP_CFG0_HPH_DAC_RATE_SEL	BIT(1)
729be2af391SNeil Armstrong #define WCD939X_TOP_CFG0_PGA_UPDATE	BIT(0)
730be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_COMP_WR_LSB			   (0x3502)
731be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_COMP_WR_MSB			   (0x3503)
732be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_COMP_LUT			   (0x3504)
733be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_COMP_RD_LSB			   (0x3505)
734be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_COMP_RD_MSB			   (0x3506)
735be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_COMP_WR_LSB			   (0x3507)
736be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_COMP_WR_MSB			   (0x3508)
737be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_COMP_LUT			   (0x3509)
738be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_COMP_RD_LSB			   (0x350a)
739be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_COMP_RD_MSB			   (0x350b)
740be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG1			   (0x350c)
741be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG2			   (0x350d)
742be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG3			   (0x350e)
743be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG4			   (0x350f)
744be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG5			   (0x3510)
745be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD0_DEBUG_CFG6			   (0x3511)
746be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG1			   (0x3512)
747be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG2			   (0x3513)
748be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG3			   (0x3514)
749be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG4			   (0x3515)
750be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG5			   (0x3516)
751be2af391SNeil Armstrong #define WCD939X_RX_TOP_DSD1_DEBUG_CFG6			   (0x3517)
752be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_CFG0			   (0x351c)
753be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG0_INT_EN	BIT(1)
754be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG0_DLY_ZN_EN	BIT(0)
755be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_CFG1			   (0x351d)
756be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG1_DSM_SOFT_RST	BIT(5)
757be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG1_INT_SOFT_RST	BIT(4)
758be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG1_FMT_CONV	BIT(3)
759be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG1_IDLE_OVRD_EN	BIT(2)
760be2af391SNeil Armstrong #define WCD939X_HPHL_PATH_CFG1_RX_DC_DROOP_COEFF_SEL	GENMASK(1, 0)
761be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_CFG0			   (0x351e)
762be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG0_INT_EN	BIT(2)
763be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG0_DLY_ZN_EN	BIT(1)
764be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_CFG1			   (0x351f)
765be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG1_DSM_SOFT_RST	BIT(5)
766be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG1_INT_SOFT_RST	BIT(4)
767be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG1_FMT_CONV	BIT(3)
768be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG1_IDLE_OVRD_EN	BIT(2)
769be2af391SNeil Armstrong #define WCD939X_HPHR_PATH_CFG1_RX_DC_DROOP_COEFF_SEL	GENMASK(1, 0)
770be2af391SNeil Armstrong #define WCD939X_RX_TOP_PATH_CFG2			   (0x3520)
771be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_SEC0			   (0x3521)
772be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_SEC1			   (0x3522)
773be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_SEC2			   (0x3523)
774be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHL_PATH_SEC3			   (0x3524)
775be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_SEC0			   (0x3525)
776be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_SEC1			   (0x3526)
777be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_SEC2			   (0x3527)
778be2af391SNeil Armstrong #define WCD939X_RX_TOP_HPHR_PATH_SEC3			   (0x3528)
779be2af391SNeil Armstrong #define WCD939X_RX_TOP_PATH_SEC4			   (0x3529)
780be2af391SNeil Armstrong #define WCD939X_RX_TOP_PATH_SEC5			   (0x352a)
781be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL0			   (0x3540)
782be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL1			   (0x3541)
783be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL2			   (0x3542)
784be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL3			   (0x3543)
785be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL4			   (0x3544)
786be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL5			   (0x3545)
787be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL6			   (0x3546)
788be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL7			   (0x3547)
789be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL8			   (0x3548)
790be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL9			   (0x3549)
791be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL10			   (0x354a)
792be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL11			   (0x354b)
793be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL12			   (0x354c)
794be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL13			   (0x354d)
795be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL14			   (0x354e)
796be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL15			   (0x354f)
797be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL16			   (0x3550)
798be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL17			   (0x3551)
799be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL18			   (0x3552)
800be2af391SNeil Armstrong #define WCD939X_COMPANDER_HPHL_CTL19			   (0x3553)
801be2af391SNeil Armstrong #define WCD939X_R_CTL0					   (0x3560)
802be2af391SNeil Armstrong #define WCD939X_R_CTL1					   (0x3561)
803be2af391SNeil Armstrong #define WCD939X_R_CTL2					   (0x3562)
804be2af391SNeil Armstrong #define WCD939X_R_CTL3					   (0x3563)
805be2af391SNeil Armstrong #define WCD939X_R_CTL4					   (0x3564)
806be2af391SNeil Armstrong #define WCD939X_R_CTL5					   (0x3565)
807be2af391SNeil Armstrong #define WCD939X_R_CTL6					   (0x3566)
808be2af391SNeil Armstrong #define WCD939X_R_CTL7					   (0x3567)
809be2af391SNeil Armstrong #define WCD939X_R_CTL8					   (0x3568)
810be2af391SNeil Armstrong #define WCD939X_R_CTL9					   (0x3569)
811be2af391SNeil Armstrong #define WCD939X_R_CTL10					   (0x356a)
812be2af391SNeil Armstrong #define WCD939X_R_CTL11					   (0x356b)
813be2af391SNeil Armstrong #define WCD939X_R_CTL12					   (0x356c)
814be2af391SNeil Armstrong #define WCD939X_R_CTL13					   (0x356d)
815be2af391SNeil Armstrong #define WCD939X_R_CTL14					   (0x356e)
816be2af391SNeil Armstrong #define WCD939X_R_CTL15					   (0x356f)
817be2af391SNeil Armstrong #define WCD939X_R_CTL16					   (0x3570)
818be2af391SNeil Armstrong #define WCD939X_R_CTL17					   (0x3571)
819be2af391SNeil Armstrong #define WCD939X_R_CTL18					   (0x3572)
820be2af391SNeil Armstrong #define WCD939X_R_CTL19					   (0x3573)
821be2af391SNeil Armstrong #define WCD939X_E_PATH_CTL				   (0x3580)
822be2af391SNeil Armstrong #define WCD939X_E_CFG0					   (0x3581)
823be2af391SNeil Armstrong #define WCD939X_CFG0_AUTO_DISABLE_ANC	BIT(2)
824be2af391SNeil Armstrong #define WCD939X_CFG0_AUTO_DISABLE_DSD	BIT(1)
825be2af391SNeil Armstrong #define WCD939X_CFG0_IDLE_STEREO	BIT(0)
826be2af391SNeil Armstrong #define WCD939X_E_CFG1					   (0x3582)
827be2af391SNeil Armstrong #define WCD939X_E_CFG2					   (0x3583)
828be2af391SNeil Armstrong #define WCD939X_E_CFG3					   (0x3584)
829be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_PATH_CTL			   (0x3590)
830be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG0				   (0x3591)
831be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG1				   (0x3592)
832be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG2				   (0x3593)
833be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG3				   (0x3594)
834be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG4				   (0x3595)
835be2af391SNeil Armstrong #define WCD939X_DSD_HPHL_CFG5				   (0x3596)
836be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_PATH_CTL			   (0x35a0)
837be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG0				   (0x35a1)
838be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG1				   (0x35a2)
839be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG2				   (0x35a3)
840be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG3				   (0x35a4)
841be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG4				   (0x35a5)
842be2af391SNeil Armstrong #define WCD939X_DSD_HPHR_CFG5				   (0x35a6)
843be2af391SNeil Armstrong #define WCD939X_MAX_REGISTER				   (WCD939X_DSD_HPHR_CFG5)
844be2af391SNeil Armstrong 
845be2af391SNeil Armstrong #define WCD939X_MAX_SWR_PORTS		(6)
846be2af391SNeil Armstrong #define WCD939X_MAX_RX_SWR_PORTS	(6)
847be2af391SNeil Armstrong #define WCD939X_MAX_TX_SWR_PORTS	(4)
848be2af391SNeil Armstrong #define WCD939X_MAX_SWR_CH_IDS		(15)
849be2af391SNeil Armstrong 
850be2af391SNeil Armstrong struct wcd939x_sdw_ch_info {
851be2af391SNeil Armstrong 	int port_num;
852be2af391SNeil Armstrong 	unsigned int ch_mask;
853be2af391SNeil Armstrong };
854be2af391SNeil Armstrong 
855be2af391SNeil Armstrong #define WCD_SDW_CH(id, pn, cmask)	\
856be2af391SNeil Armstrong 	[id] = {			\
857be2af391SNeil Armstrong 		.port_num = pn,		\
858be2af391SNeil Armstrong 		.ch_mask = cmask,	\
859be2af391SNeil Armstrong 	}
860be2af391SNeil Armstrong 
861be2af391SNeil Armstrong enum wcd939x_tx_sdw_ports {
862be2af391SNeil Armstrong 	WCD939X_ADC_1_4_PORT = 1,
863be2af391SNeil Armstrong 	WCD939X_ADC_DMIC_1_2_PORT,
864be2af391SNeil Armstrong 	WCD939X_DMIC_0_3_MBHC_PORT,
865be2af391SNeil Armstrong 	WCD939X_DMIC_3_7_PORT,
866be2af391SNeil Armstrong };
867be2af391SNeil Armstrong 
868be2af391SNeil Armstrong enum wcd939x_tx_sdw_channels {
869be2af391SNeil Armstrong 	WCD939X_ADC1,
870be2af391SNeil Armstrong 	WCD939X_ADC2,
871be2af391SNeil Armstrong 	WCD939X_ADC3,
872be2af391SNeil Armstrong 	WCD939X_ADC4,
873be2af391SNeil Armstrong 	WCD939X_DMIC0,
874be2af391SNeil Armstrong 	WCD939X_DMIC1,
875be2af391SNeil Armstrong 	WCD939X_MBHC,
876be2af391SNeil Armstrong 	WCD939X_DMIC2,
877be2af391SNeil Armstrong 	WCD939X_DMIC3,
878be2af391SNeil Armstrong 	WCD939X_DMIC4,
879be2af391SNeil Armstrong 	WCD939X_DMIC5,
880be2af391SNeil Armstrong 	WCD939X_DMIC6,
881be2af391SNeil Armstrong 	WCD939X_DMIC7,
882be2af391SNeil Armstrong };
883be2af391SNeil Armstrong 
884be2af391SNeil Armstrong enum wcd939x_rx_sdw_ports {
885be2af391SNeil Armstrong 	WCD939X_HPH_PORT = 1,
886be2af391SNeil Armstrong 	WCD939X_CLSH_PORT,
887be2af391SNeil Armstrong 	WCD939X_COMP_PORT,
888be2af391SNeil Armstrong 	WCD939X_LO_PORT,
889be2af391SNeil Armstrong 	WCD939X_DSD_PORT,
890be2af391SNeil Armstrong 	WCD939X_HIFI_PCM_PORT,
891be2af391SNeil Armstrong };
892be2af391SNeil Armstrong 
893be2af391SNeil Armstrong enum wcd939x_rx_sdw_channels {
894be2af391SNeil Armstrong 	WCD939X_HPH_L,
895be2af391SNeil Armstrong 	WCD939X_HPH_R,
896be2af391SNeil Armstrong 	WCD939X_CLSH,
897be2af391SNeil Armstrong 	WCD939X_COMP_L,
898be2af391SNeil Armstrong 	WCD939X_COMP_R,
899be2af391SNeil Armstrong 	WCD939X_LO,
900be2af391SNeil Armstrong 	WCD939X_DSD_L,
901be2af391SNeil Armstrong 	WCD939X_DSD_R,
902be2af391SNeil Armstrong 	WCD939X_HIFI_PCM_L,
903be2af391SNeil Armstrong 	WCD939X_HIFI_PCM_R,
904be2af391SNeil Armstrong };
905be2af391SNeil Armstrong 
906be2af391SNeil Armstrong enum {
907be2af391SNeil Armstrong 	WCD939X_SDW_DIR_RX,
908be2af391SNeil Armstrong 	WCD939X_SDW_DIR_TX,
909be2af391SNeil Armstrong };
910be2af391SNeil Armstrong 
911be2af391SNeil Armstrong struct wcd939x_priv;
912be2af391SNeil Armstrong struct wcd939x_sdw_priv {
913be2af391SNeil Armstrong 	struct sdw_slave *sdev;
914be2af391SNeil Armstrong 	struct sdw_stream_config sconfig;
915be2af391SNeil Armstrong 	struct sdw_stream_runtime *sruntime;
916be2af391SNeil Armstrong 	struct sdw_port_config port_config[WCD939X_MAX_SWR_PORTS];
917be2af391SNeil Armstrong 	struct wcd939x_sdw_ch_info *ch_info;
918be2af391SNeil Armstrong 	bool port_enable[WCD939X_MAX_SWR_CH_IDS];
919be2af391SNeil Armstrong 	int active_ports;
920be2af391SNeil Armstrong 	int num_ports;
921be2af391SNeil Armstrong 	bool is_tx;
922be2af391SNeil Armstrong 	struct wcd939x_priv *wcd939x;
923be2af391SNeil Armstrong 	struct irq_domain *slave_irq;
924be2af391SNeil Armstrong 	struct regmap *regmap;
925be2af391SNeil Armstrong };
926be2af391SNeil Armstrong 
927be2af391SNeil Armstrong #if IS_ENABLED(CONFIG_SND_SOC_WCD939X_SDW)
928be2af391SNeil Armstrong int wcd939x_sdw_free(struct wcd939x_sdw_priv *wcd,
929be2af391SNeil Armstrong 		     struct snd_pcm_substream *substream,
930be2af391SNeil Armstrong 		     struct snd_soc_dai *dai);
931be2af391SNeil Armstrong int wcd939x_sdw_set_sdw_stream(struct wcd939x_sdw_priv *wcd,
932be2af391SNeil Armstrong 			       struct snd_soc_dai *dai,
933be2af391SNeil Armstrong 			       void *stream, int direction);
934be2af391SNeil Armstrong int wcd939x_sdw_hw_params(struct wcd939x_sdw_priv *wcd,
935be2af391SNeil Armstrong 			  struct snd_pcm_substream *substream,
936be2af391SNeil Armstrong 			  struct snd_pcm_hw_params *params,
937be2af391SNeil Armstrong 			  struct snd_soc_dai *dai);
938be2af391SNeil Armstrong 
939be2af391SNeil Armstrong struct device *wcd939x_sdw_device_get(struct device_node *np);
940be2af391SNeil Armstrong unsigned int wcd939x_swr_get_current_bank(struct sdw_slave *sdev);
941be2af391SNeil Armstrong 
942be2af391SNeil Armstrong struct regmap *wcd939x_swr_get_regmap(struct wcd939x_sdw_priv *wcd);
943be2af391SNeil Armstrong #else
944be2af391SNeil Armstrong 
945be2af391SNeil Armstrong static inline int wcd939x_sdw_free(struct wcd939x_sdw_priv *wcd,
946be2af391SNeil Armstrong 				   struct snd_pcm_substream *substream,
947be2af391SNeil Armstrong 				   struct snd_soc_dai *dai)
948be2af391SNeil Armstrong {
949be2af391SNeil Armstrong 	return -EOPNOTSUPP;
950be2af391SNeil Armstrong }
951be2af391SNeil Armstrong 
952be2af391SNeil Armstrong static inline int wcd939x_sdw_set_sdw_stream(struct wcd939x_sdw_priv *wcd,
953be2af391SNeil Armstrong 					     struct snd_soc_dai *dai,
954be2af391SNeil Armstrong 					     void *stream, int direction)
955be2af391SNeil Armstrong {
956be2af391SNeil Armstrong 	return -EOPNOTSUPP;
957be2af391SNeil Armstrong }
958be2af391SNeil Armstrong 
959be2af391SNeil Armstrong static inline int wcd939x_sdw_hw_params(struct wcd939x_sdw_priv *wcd,
960be2af391SNeil Armstrong 					struct snd_pcm_substream *substream,
961be2af391SNeil Armstrong 					struct snd_pcm_hw_params *params,
962be2af391SNeil Armstrong 					struct snd_soc_dai *dai)
963be2af391SNeil Armstrong {
964be2af391SNeil Armstrong 	return -EOPNOTSUPP;
965be2af391SNeil Armstrong }
966be2af391SNeil Armstrong 
967be2af391SNeil Armstrong static inline struct device *wcd939x_sdw_device_get(struct device_node *np)
968be2af391SNeil Armstrong {
969be2af391SNeil Armstrong 	return NULL;
970be2af391SNeil Armstrong }
971be2af391SNeil Armstrong 
972be2af391SNeil Armstrong static inline unsigned int wcd939x_swr_get_current_bank(struct sdw_slave *sdev)
973be2af391SNeil Armstrong {
974be2af391SNeil Armstrong 	return 0;
975be2af391SNeil Armstrong }
976be2af391SNeil Armstrong 
977be2af391SNeil Armstrong struct regmap *wcd939x_swr_get_regmap(struct wcd939x_sdw_priv *wcd)
978be2af391SNeil Armstrong {
979be2af391SNeil Armstrong 	return PTR_ERR(-EINVAL);
980be2af391SNeil Armstrong }
981be2af391SNeil Armstrong #endif /* CONFIG_SND_SOC_WCD939X_SDW */
982be2af391SNeil Armstrong 
983be2af391SNeil Armstrong #endif /* __WCD939X_H__ */
984