xref: /linux/sound/soc/codecs/cs35l35.h (revision 762f99f4f3cb41a775b5157dd761217beba65873)
1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
26387f866SBrian Austin /*
36387f866SBrian Austin  * cs35l35.h -- CS35L35 ALSA SoC audio driver
46387f866SBrian Austin  *
56387f866SBrian Austin  * Copyright 2016 Cirrus Logic, Inc.
66387f866SBrian Austin  *
76387f866SBrian Austin  * Author: Brian Austin <brian.austin@cirrus.com>
86387f866SBrian Austin  */
96387f866SBrian Austin 
106387f866SBrian Austin #ifndef __CS35L35_H__
116387f866SBrian Austin #define __CS35L35_H__
126387f866SBrian Austin 
136387f866SBrian Austin #define CS35L35_FIRSTREG		0x01
146387f866SBrian Austin #define CS35L35_LASTREG			0x7E
156387f866SBrian Austin #define CS35L35_CHIP_ID			0x00035A35
166387f866SBrian Austin #define CS35L35_DEVID_AB		0x01	/* Device ID A & B [RO] */
176387f866SBrian Austin #define CS35L35_DEVID_CD		0x02    /* Device ID C & D [RO] */
186387f866SBrian Austin #define CS35L35_DEVID_E			0x03    /* Device ID E [RO] */
196387f866SBrian Austin #define CS35L35_FAB_ID			0x04	/* Fab ID [RO] */
206387f866SBrian Austin #define CS35L35_REV_ID			0x05	/* Revision ID [RO] */
216387f866SBrian Austin #define CS35L35_PWRCTL1			0x06    /* Power Ctl 1 */
226387f866SBrian Austin #define CS35L35_PWRCTL2			0x07    /* Power Ctl 2 */
236387f866SBrian Austin #define CS35L35_PWRCTL3			0x08	/* Power Ctl 3 */
246387f866SBrian Austin #define CS35L35_CLK_CTL1		0x0A	/* Clocking Ctl 1 */
256387f866SBrian Austin #define CS35L35_CLK_CTL2		0x0B	/* Clocking Ctl 2 */
266387f866SBrian Austin #define CS35L35_CLK_CTL3		0x0C	/* Clocking Ctl 3 */
276387f866SBrian Austin #define CS35L35_SP_FMT_CTL1		0x0D	/* Serial Port Format CTL1 */
286387f866SBrian Austin #define CS35L35_SP_FMT_CTL2		0x0E	/* Serial Port Format CTL2 */
296387f866SBrian Austin #define CS35L35_SP_FMT_CTL3		0x0F	/* Serial Port Format CTL3 */
306387f866SBrian Austin #define CS35L35_MAG_COMP_CTL		0x13	/* Magnitude Comp CTL */
316387f866SBrian Austin #define CS35L35_AMP_INP_DRV_CTL		0x14	/* Amp Input Drive Ctl */
326387f866SBrian Austin #define CS35L35_AMP_DIG_VOL_CTL		0x15	/* Amplifier Dig Volume Ctl */
336387f866SBrian Austin #define CS35L35_AMP_DIG_VOL		0x16	/* Amplifier Dig Volume */
346387f866SBrian Austin #define CS35L35_ADV_DIG_VOL		0x17	/* Advisory Digital Volume */
356387f866SBrian Austin #define CS35L35_PROTECT_CTL		0x18	/* Amp Gain - Prot Ctl Param */
366387f866SBrian Austin #define CS35L35_AMP_GAIN_AUD_CTL	0x19	/* Amp Serial Port Gain Ctl */
376387f866SBrian Austin #define CS35L35_AMP_GAIN_PDM_CTL	0x1A	/* Amplifier Gain PDM Ctl */
386387f866SBrian Austin #define CS35L35_AMP_GAIN_ADV_CTL	0x1B	/* Amplifier Gain Ctl */
396387f866SBrian Austin #define CS35L35_GPI_CTL			0x1C	/* GPI Ctl */
406387f866SBrian Austin #define CS35L35_BST_CVTR_V_CTL		0x1D	/* Boost Conv Voltage Ctl */
416387f866SBrian Austin #define CS35L35_BST_PEAK_I		0x1E	/* Boost Conv Peak Current */
426387f866SBrian Austin #define CS35L35_BST_RAMP_CTL		0x20	/* Boost Conv Soft Ramp Ctl */
436387f866SBrian Austin #define CS35L35_BST_CONV_COEF_1		0x21	/* Boost Conv Coefficients 1 */
446387f866SBrian Austin #define CS35L35_BST_CONV_COEF_2		0x22	/* Boost Conv Coefficients 2 */
456387f866SBrian Austin #define CS35L35_BST_CONV_SLOPE_COMP	0x23	/* Boost Conv Slope Comp */
466387f866SBrian Austin #define CS35L35_BST_CONV_SW_FREQ	0x24	/* Boost Conv L BST SW Freq */
476387f866SBrian Austin #define CS35L35_CLASS_H_CTL		0x30	/* CLS H Control */
486387f866SBrian Austin #define CS35L35_CLASS_H_HEADRM_CTL	0x31	/* CLS H Headroom Ctl */
496387f866SBrian Austin #define CS35L35_CLASS_H_RELEASE_RATE	0x32	/* CLS H Release Rate */
506387f866SBrian Austin #define CS35L35_CLASS_H_FET_DRIVE_CTL	0x33	/* CLS H Weak FET Drive Ctl */
516387f866SBrian Austin #define CS35L35_CLASS_H_VP_CTL		0x34	/* CLS H VP Ctl */
526387f866SBrian Austin #define CS35L35_CLASS_H_STATUS		0x38	/* CLS H Status */
536387f866SBrian Austin #define CS35L35_VPBR_CTL		0x3A	/* VPBR Ctl */
546387f866SBrian Austin #define CS35L35_VPBR_VOL_CTL		0x3B	/* VPBR Volume Ctl */
556387f866SBrian Austin #define CS35L35_VPBR_TIMING_CTL		0x3C	/* VPBR Timing Ctl */
566387f866SBrian Austin #define CS35L35_VPBR_MODE_VOL_CTL	0x3D	/* VPBR Mode/Attack Vol Ctl */
576387f866SBrian Austin #define CS35L35_VPBR_ATTEN_STATUS	0x4B	/* VPBR Attenuation Status */
586387f866SBrian Austin #define CS35L35_SPKR_MON_CTL		0x4E	/* Speaker Monitoring Ctl */
596387f866SBrian Austin #define CS35L35_IMON_SCALE_CTL		0x51	/* IMON Scale Ctl */
606387f866SBrian Austin #define CS35L35_AUDIN_RXLOC_CTL		0x52	/* Audio Input RX Loc Ctl */
616387f866SBrian Austin #define CS35L35_ADVIN_RXLOC_CTL		0x53	/* Advisory Input RX Loc Ctl */
626387f866SBrian Austin #define CS35L35_VMON_TXLOC_CTL		0x54	/* VMON TX Loc Ctl */
636387f866SBrian Austin #define CS35L35_IMON_TXLOC_CTL		0x55	/* IMON TX Loc Ctl */
646387f866SBrian Austin #define CS35L35_VPMON_TXLOC_CTL		0x56	/* VPMON TX Loc Ctl */
656387f866SBrian Austin #define CS35L35_VBSTMON_TXLOC_CTL	0x57	/* VBSTMON TX Loc Ctl */
666387f866SBrian Austin #define CS35L35_VPBR_STATUS_TXLOC_CTL	0x58	/* VPBR Status TX Loc Ctl */
676387f866SBrian Austin #define CS35L35_ZERO_FILL_LOC_CTL	0x59	/* Zero Fill Loc Ctl */
686387f866SBrian Austin #define CS35L35_AUDIN_DEPTH_CTL		0x5A	/* Audio Input Depth Ctl */
696387f866SBrian Austin #define CS35L35_SPKMON_DEPTH_CTL	0x5B	/* SPK Mon Output Depth Ctl */
706387f866SBrian Austin #define CS35L35_SUPMON_DEPTH_CTL	0x5C	/* Supply Mon Out Depth Ctl */
716387f866SBrian Austin #define CS35L35_ZEROFILL_DEPTH_CTL	0x5D	/* Zero Fill Mon Output Ctl */
726387f866SBrian Austin #define CS35L35_MULT_DEV_SYNCH1		0x62	/* Multidevice Synch */
736387f866SBrian Austin #define CS35L35_MULT_DEV_SYNCH2		0x63	/* Multidevice Synch 2 */
746387f866SBrian Austin #define CS35L35_PROT_RELEASE_CTL	0x64	/* Protection Release Ctl */
756387f866SBrian Austin #define CS35L35_DIAG_MODE_REG_LOCK	0x68	/* Diagnostic Mode Reg Lock */
766387f866SBrian Austin #define CS35L35_DIAG_MODE_CTL_1		0x69	/* Diagnostic Mode Ctl 1 */
776387f866SBrian Austin #define CS35L35_DIAG_MODE_CTL_2		0x6A	/* Diagnostic Mode Ctl 2 */
786387f866SBrian Austin #define CS35L35_INT_MASK_1		0x70	/* Interrupt Mask 1 */
796387f866SBrian Austin #define CS35L35_INT_MASK_2		0x71	/* Interrupt Mask 2 */
806387f866SBrian Austin #define CS35L35_INT_MASK_3		0x72	/* Interrupt Mask 3 */
816387f866SBrian Austin #define CS35L35_INT_MASK_4		0x73	/* Interrupt Mask 4 */
826387f866SBrian Austin #define CS35L35_INT_STATUS_1		0x74	/* Interrupt Status 1 */
836387f866SBrian Austin #define CS35L35_INT_STATUS_2		0x75	/* Interrupt Status 2 */
846387f866SBrian Austin #define CS35L35_INT_STATUS_3		0x76	/* Interrupt Status 3 */
856387f866SBrian Austin #define CS35L35_INT_STATUS_4		0x77	/* Interrupt Status 4 */
866387f866SBrian Austin #define CS35L35_PLL_STATUS		0x78	/* PLL Status */
876387f866SBrian Austin #define CS35L35_OTP_TRIM_STATUS		0x7E	/* OTP Trim Status */
886387f866SBrian Austin 
896387f866SBrian Austin #define CS35L35_MAX_REGISTER		0x7F
906387f866SBrian Austin 
916387f866SBrian Austin /* CS35L35_PWRCTL1 */
926387f866SBrian Austin #define CS35L35_SFT_RST			0x80
936387f866SBrian Austin #define CS35L35_DISCHG_FLT		0x02
946387f866SBrian Austin #define CS35L35_PDN_ALL			0x01
956387f866SBrian Austin 
966387f866SBrian Austin /* CS35L35_PWRCTL2 */
976387f866SBrian Austin #define CS35L35_PDN_VMON		0x80
986387f866SBrian Austin #define CS35L35_PDN_IMON		0x40
996387f866SBrian Austin #define CS35L35_PDN_CLASSH		0x20
1006387f866SBrian Austin #define CS35L35_PDN_VPBR		0x10
1016387f866SBrian Austin #define CS35L35_PDN_BST			0x04
1026387f866SBrian Austin #define CS35L35_PDN_AMP			0x01
1036387f866SBrian Austin 
1046387f866SBrian Austin /* CS35L35_PWRCTL3 */
1056387f866SBrian Austin #define CS35L35_PDN_VBSTMON_OUT		0x10
1066387f866SBrian Austin #define CS35L35_PDN_VMON_OUT		0x08
1076387f866SBrian Austin 
1086387f866SBrian Austin #define CS35L35_AUDIN_DEPTH_MASK	0x03
1096387f866SBrian Austin #define CS35L35_AUDIN_DEPTH_SHIFT	0
1106387f866SBrian Austin #define CS35L35_ADVIN_DEPTH_MASK	0x0C
1116387f866SBrian Austin #define CS35L35_ADVIN_DEPTH_SHIFT	2
1126387f866SBrian Austin #define CS35L35_SDIN_DEPTH_8		0x01
1136387f866SBrian Austin #define CS35L35_SDIN_DEPTH_16		0x02
1146387f866SBrian Austin #define CS35L35_SDIN_DEPTH_24		0x03
1156387f866SBrian Austin 
1166387f866SBrian Austin #define CS35L35_SDOUT_DEPTH_8		0x01
1176387f866SBrian Austin #define CS35L35_SDOUT_DEPTH_12		0x02
1186387f866SBrian Austin #define CS35L35_SDOUT_DEPTH_16		0x03
1196387f866SBrian Austin 
1206387f866SBrian Austin #define CS35L35_AUD_IN_LR_MASK		0x80
1216387f866SBrian Austin #define CS35L35_AUD_IN_LR_SHIFT		7
1226387f866SBrian Austin #define CS35L35_ADV_IN_LR_MASK		0x80
1236387f866SBrian Austin #define CS35L35_ADV_IN_LR_SHIFT		7
1246387f866SBrian Austin #define CS35L35_AUD_IN_LOC_MASK		0x0F
1256387f866SBrian Austin #define CS35L35_AUD_IN_LOC_SHIFT	0
1266387f866SBrian Austin #define CS35L35_ADV_IN_LOC_MASK		0x0F
1276387f866SBrian Austin #define CS35L35_ADV_IN_LOC_SHIFT	0
1286387f866SBrian Austin 
1296387f866SBrian Austin #define CS35L35_IMON_DEPTH_MASK		0x03
1306387f866SBrian Austin #define CS35L35_IMON_DEPTH_SHIFT	0
1316387f866SBrian Austin #define CS35L35_VMON_DEPTH_MASK		0x0C
1326387f866SBrian Austin #define CS35L35_VMON_DEPTH_SHIFT	2
1336387f866SBrian Austin #define CS35L35_VBSTMON_DEPTH_MASK	0x03
1346387f866SBrian Austin #define CS35L35_VBSTMON_DEPTH_SHIFT	0
1356387f866SBrian Austin #define CS35L35_VPMON_DEPTH_MASK	0x0C
1366387f866SBrian Austin #define CS35L35_VPMON_DEPTH_SHIFT	2
1376387f866SBrian Austin #define CS35L35_VPBRSTAT_DEPTH_MASK	0x30
1386387f866SBrian Austin #define CS35L35_VPBRSTAT_DEPTH_SHIFT	4
1396387f866SBrian Austin #define CS35L35_ZEROFILL_DEPTH_MASK	0x03
1406387f866SBrian Austin #define CS35L35_ZEROFILL_DEPTH_SHIFT	0x00
1416387f866SBrian Austin 
1426387f866SBrian Austin #define CS35L35_MON_TXLOC_MASK		0x3F
1436387f866SBrian Austin #define CS35L35_MON_TXLOC_SHIFT		0
1446387f866SBrian Austin #define CS35L35_MON_FRM_MASK		0x80
1456387f866SBrian Austin #define CS35L35_MON_FRM_SHIFT		7
1466387f866SBrian Austin 
14706bdf385SCharles Keepax #define CS35L35_IMON_SCALE_MASK		0xF8
14806bdf385SCharles Keepax #define CS35L35_IMON_SCALE_SHIFT	3
14906bdf385SCharles Keepax 
1506387f866SBrian Austin #define CS35L35_MS_MASK			0x80
1516387f866SBrian Austin #define CS35L35_MS_SHIFT		7
1526387f866SBrian Austin #define CS35L35_SPMODE_MASK		0x40
1536387f866SBrian Austin #define CS35L35_SP_DRV_MASK		0x10
1546387f866SBrian Austin #define CS35L35_SP_DRV_SHIFT		4
1556387f866SBrian Austin #define CS35L35_CLK_CTL2_MASK		0xFF
1566387f866SBrian Austin #define CS35L35_PDM_MODE_MASK		0x40
1576387f866SBrian Austin #define CS35L35_PDM_MODE_SHIFT		6
1586387f866SBrian Austin #define CS35L35_CLK_SOURCE_MASK		0x03
1596387f866SBrian Austin #define CS35L35_CLK_SOURCE_SHIFT	0
1606387f866SBrian Austin #define CS35L35_CLK_SOURCE_MCLK		0
1616387f866SBrian Austin #define CS35L35_CLK_SOURCE_SCLK		1
1626387f866SBrian Austin #define CS35L35_CLK_SOURCE_PDM		2
1636387f866SBrian Austin 
1646387f866SBrian Austin #define CS35L35_SP_SCLKS_MASK		0x0F
1656387f866SBrian Austin #define CS35L35_SP_SCLKS_SHIFT		0x00
1666387f866SBrian Austin #define CS35L35_SP_SCLKS_16FS		0x03
1676387f866SBrian Austin #define CS35L35_SP_SCLKS_32FS		0x07
1686387f866SBrian Austin #define CS35L35_SP_SCLKS_48FS		0x0B
1696387f866SBrian Austin #define CS35L35_SP_SCLKS_64FS		0x0F
1706387f866SBrian Austin #define CS35L35_SP_RATE_MASK		0xC0
1711a46b7b8SCharles Keepax #define CS35L35_SP_RATE_SHIFT		6
1726387f866SBrian Austin 
1736387f866SBrian Austin #define CS35L35_PDN_BST_MASK		0x06
1746387f866SBrian Austin #define CS35L35_PDN_BST_FETON_SHIFT	1
1756387f866SBrian Austin #define CS35L35_PDN_BST_FETOFF_SHIFT	2
1766387f866SBrian Austin #define CS35L35_PWR2_PDN_MASK		0xE0
1776387f866SBrian Austin #define CS35L35_PWR3_PDN_MASK		0x1E
1786387f866SBrian Austin #define CS35L35_PDN_ALL_MASK		0x01
1796387f866SBrian Austin #define CS35L35_DISCHG_FILT_MASK	0x02
1806387f866SBrian Austin #define CS35L35_DISCHG_FILT_SHIFT	1
1816387f866SBrian Austin #define CS35L35_MCLK_DIS_MASK		0x04
1826387f866SBrian Austin #define CS35L35_MCLK_DIS_SHIFT		2
1836387f866SBrian Austin 
1846387f866SBrian Austin #define CS35L35_BST_CTL_MASK		0x7F
1856387f866SBrian Austin #define CS35L35_BST_CTL_SHIFT		0
1866387f866SBrian Austin #define CS35L35_BST_IPK_MASK		0x1F
1876387f866SBrian Austin #define CS35L35_BST_IPK_SHIFT		0
1886387f866SBrian Austin #define CS35L35_AMP_MUTE_MASK		0x20
1896387f866SBrian Austin #define CS35L35_AMP_MUTE_SHIFT		5
1906387f866SBrian Austin #define CS35L35_AMP_GAIN_ZC_MASK	0x10
1916387f866SBrian Austin #define CS35L35_AMP_GAIN_ZC_SHIFT	4
1926387f866SBrian Austin 
1932c84afb5SCharles Keepax #define CS35L35_AMP_DIGSFT_MASK		0x02
1942c84afb5SCharles Keepax #define CS35L35_AMP_DIGSFT_SHIFT	1
1952c84afb5SCharles Keepax 
1968d45f2d2SCharles Keepax /* CS35L35_SP_FMT_CTL3 */
1978d45f2d2SCharles Keepax #define CS35L35_SP_I2S_DRV_MASK		0x03
1988d45f2d2SCharles Keepax #define CS35L35_SP_I2S_DRV_SHIFT	0
1998d45f2d2SCharles Keepax 
200b7c752d6SBrian Austin /* Boost Converter Config */
201b7c752d6SBrian Austin #define CS35L35_BST_CONV_COEFF_MASK	0xFF
202b7c752d6SBrian Austin #define CS35L35_BST_CONV_SLOPE_MASK	0xFF
203b7c752d6SBrian Austin #define CS35L35_BST_CONV_LBST_MASK	0x03
204b7c752d6SBrian Austin #define CS35L35_BST_CONV_SWFREQ_MASK	0xF0
205b7c752d6SBrian Austin 
2066387f866SBrian Austin /* Class H Algorithm Control */
2076387f866SBrian Austin #define CS35L35_CH_STEREO_MASK		0x40
2086387f866SBrian Austin #define CS35L35_CH_STEREO_SHIFT		6
2096387f866SBrian Austin #define CS35L35_CH_BST_OVR_MASK		0x04
2106387f866SBrian Austin #define CS35L35_CH_BST_OVR_SHIFT	2
2116387f866SBrian Austin #define CS35L35_CH_BST_LIM_MASK		0x08
2126387f866SBrian Austin #define CS35L35_CH_BST_LIM_SHIFT	3
2136387f866SBrian Austin #define CS35L35_CH_MEM_DEPTH_MASK	0x01
2146387f866SBrian Austin #define CS35L35_CH_MEM_DEPTH_SHIFT	0
2156387f866SBrian Austin #define CS35L35_CH_HDRM_CTL_MASK	0x3F
2166387f866SBrian Austin #define CS35L35_CH_HDRM_CTL_SHIFT	0
2176387f866SBrian Austin #define CS35L35_CH_REL_RATE_MASK	0xFF
2186387f866SBrian Austin #define CS35L35_CH_REL_RATE_SHIFT	0
2196387f866SBrian Austin #define CS35L35_CH_WKFET_DIS_MASK	0x80
2206387f866SBrian Austin #define CS35L35_CH_WKFET_DIS_SHIFT	7
2216387f866SBrian Austin #define CS35L35_CH_WKFET_DEL_MASK	0x70
2226387f866SBrian Austin #define CS35L35_CH_WKFET_DEL_SHIFT	4
2236387f866SBrian Austin #define CS35L35_CH_WKFET_THLD_MASK	0x0F
2246387f866SBrian Austin #define CS35L35_CH_WKFET_THLD_SHIFT	0
2256387f866SBrian Austin #define CS35L35_CH_VP_AUTO_MASK		0x80
2266387f866SBrian Austin #define CS35L35_CH_VP_AUTO_SHIFT	7
2276387f866SBrian Austin #define CS35L35_CH_VP_RATE_MASK		0x60
2286387f866SBrian Austin #define CS35L35_CH_VP_RATE_SHIFT	5
2296387f866SBrian Austin #define CS35L35_CH_VP_MAN_MASK		0x1F
2306387f866SBrian Austin #define CS35L35_CH_VP_MAN_SHIFT		0
2316387f866SBrian Austin 
2326387f866SBrian Austin /* CS35L35_PROT_RELEASE_CTL */
2336387f866SBrian Austin #define CS35L35_CAL_ERR_RLS		0x80
2346387f866SBrian Austin #define CS35L35_SHORT_RLS		0x04
2356387f866SBrian Austin #define CS35L35_OTW_RLS			0x02
2366387f866SBrian Austin #define CS35L35_OTE_RLS			0x01
2376387f866SBrian Austin 
2386387f866SBrian Austin /* INT Mask Registers */
2396387f866SBrian Austin #define CS35L35_INT1_CRIT_MASK		0x38
2406387f866SBrian Austin #define CS35L35_INT2_CRIT_MASK		0xEF
2416387f866SBrian Austin #define CS35L35_INT3_CRIT_MASK		0xEE
2426387f866SBrian Austin #define CS35L35_INT4_CRIT_MASK		0xFF
2436387f866SBrian Austin 
2446387f866SBrian Austin /* PDN DONE Masks */
2456387f866SBrian Austin #define CS35L35_M_PDN_DONE_SHIFT	4
2466387f866SBrian Austin #define CS35L35_M_PDN_DONE_MASK		0x10
2476387f866SBrian Austin 
2486387f866SBrian Austin /* CS35L35_INT_1 */
2496387f866SBrian Austin #define CS35L35_CAL_ERR			0x80
2506387f866SBrian Austin #define CS35L35_OTP_ERR			0x40
2516387f866SBrian Austin #define CS35L35_LRCLK_ERR		0x20
2526387f866SBrian Austin #define CS35L35_SPCLK_ERR		0x10
2536387f866SBrian Austin #define CS35L35_MCLK_ERR		0x08
2546387f866SBrian Austin #define CS35L35_AMP_SHORT		0x04
2556387f866SBrian Austin #define CS35L35_OTW			0x02
2566387f866SBrian Austin #define CS35L35_OTE			0x01
2576387f866SBrian Austin 
2586387f866SBrian Austin /* CS35L35_INT_2 */
2596387f866SBrian Austin #define CS35L35_PDN_DONE		0x10
2606387f866SBrian Austin #define CS35L35_VPBR_ERR		0x02
2616387f866SBrian Austin #define CS35L35_VPBR_CLR		0x01
2626387f866SBrian Austin 
2636387f866SBrian Austin /* CS35L35_INT_3 */
2646387f866SBrian Austin #define CS35L35_BST_HIGH		0x10
2656387f866SBrian Austin #define CS35L35_BST_HIGH_FLAG		0x08
2666387f866SBrian Austin #define CS35L35_BST_IPK_FLAG		0x04
2676387f866SBrian Austin #define CS35L35_LBST_SHORT		0x01
2686387f866SBrian Austin 
2696387f866SBrian Austin /* CS35L35_INT_4 */
2706387f866SBrian Austin #define CS35L35_VMON_OVFL		0x08
2716387f866SBrian Austin #define CS35L35_IMON_OVFL		0x04
2726387f866SBrian Austin 
2736387f866SBrian Austin #define CS35L35_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | \
2746387f866SBrian Austin 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
2756387f866SBrian Austin 
2766387f866SBrian Austin struct  cs35l35_private {
2775d3d0ad6SCharles Keepax 	struct device *dev;
2786387f866SBrian Austin 	struct cs35l35_platform_data pdata;
2796387f866SBrian Austin 	struct regmap *regmap;
2806387f866SBrian Austin 	struct regulator_bulk_data supplies[2];
2816387f866SBrian Austin 	int num_supplies;
2826387f866SBrian Austin 	int sysclk;
2836387f866SBrian Austin 	int sclk;
2846387f866SBrian Austin 	bool pdm_mode;
2856387f866SBrian Austin 	bool i2s_mode;
286*4e7f0ea0SDavid Rhodes 	bool clock_consumer;
2876387f866SBrian Austin 	/* GPIO for /RST */
2886387f866SBrian Austin 	struct gpio_desc *reset_gpio;
2896387f866SBrian Austin 	struct completion pdn_done;
2906387f866SBrian Austin };
2916387f866SBrian Austin 
2926387f866SBrian Austin static const char * const cs35l35_supplies[] = {
2936387f866SBrian Austin 	"VA",
2946387f866SBrian Austin 	"VP",
2956387f866SBrian Austin };
2966387f866SBrian Austin 
2976387f866SBrian Austin #endif
298