xref: /openbmc/linux/sound/soc/codecs/wm2000.h (revision 939dc51bddc245df51c1e8ee44bf136621475149)
13a66d387SMark Brown /*
23a66d387SMark Brown  * wm2000.h  --  WM2000 Soc Audio driver
33a66d387SMark Brown  *
43a66d387SMark Brown  * This program is free software; you can redistribute it and/or modify
53a66d387SMark Brown  * it under the terms of the GNU General Public License version 2 as
63a66d387SMark Brown  * published by the Free Software Foundation.
73a66d387SMark Brown  */
83a66d387SMark Brown 
93a66d387SMark Brown #ifndef _WM2000_H
103a66d387SMark Brown #define _WM2000_H
113a66d387SMark Brown 
123a66d387SMark Brown #define WM2000_REG_SYS_START	    0x8000
1333e7546eSMark Brown #define WM2000_REG_ANC_GAIN_CTRL    0x8fa2
1433e7546eSMark Brown #define WM2000_REG_MSE_TH2          0x8fdf
1533e7546eSMark Brown #define WM2000_REG_MSE_TH1          0x8fe0
163a66d387SMark Brown #define WM2000_REG_SPEECH_CLARITY   0x8fef
173a66d387SMark Brown #define WM2000_REG_SYS_WATCHDOG     0x8ff6
183a66d387SMark Brown #define WM2000_REG_ANA_VMID_PD_TIME 0x8ff7
193a66d387SMark Brown #define WM2000_REG_ANA_VMID_PU_TIME 0x8ff8
203a66d387SMark Brown #define WM2000_REG_CAT_FLTR_INDX    0x8ff9
213a66d387SMark Brown #define WM2000_REG_CAT_GAIN_0       0x8ffa
223a66d387SMark Brown #define WM2000_REG_SYS_STATUS       0x8ffc
233a66d387SMark Brown #define WM2000_REG_SYS_MODE_CNTRL   0x8ffd
243a66d387SMark Brown #define WM2000_REG_SYS_START0       0x8ffe
253a66d387SMark Brown #define WM2000_REG_SYS_START1       0x8fff
263a66d387SMark Brown #define WM2000_REG_ID1              0xf000
273a66d387SMark Brown #define WM2000_REG_ID2              0xf001
283a66d387SMark Brown #define WM2000_REG_REVISON          0xf002
293a66d387SMark Brown #define WM2000_REG_SYS_CTL1         0xf003
303a66d387SMark Brown #define WM2000_REG_SYS_CTL2         0xf004
313a66d387SMark Brown #define WM2000_REG_ANC_STAT         0xf005
323a66d387SMark Brown #define WM2000_REG_IF_CTL           0xf006
33*939dc51bSMark Brown #define WM2000_REG_ANA_MIC_CTL      0xf028
34*939dc51bSMark Brown #define WM2000_REG_SPK_CTL          0xf034
353a66d387SMark Brown 
363a66d387SMark Brown /* SPEECH_CLARITY */
373a66d387SMark Brown #define WM2000_SPEECH_CLARITY   0x01
383a66d387SMark Brown 
393a66d387SMark Brown /* SYS_STATUS */
403a66d387SMark Brown #define WM2000_STATUS_MOUSE_ACTIVE              0x40
413a66d387SMark Brown #define WM2000_STATUS_CAT_FREQ_COMPLETE         0x20
423a66d387SMark Brown #define WM2000_STATUS_CAT_GAIN_COMPLETE         0x10
433a66d387SMark Brown #define WM2000_STATUS_THERMAL_SHUTDOWN_COMPLETE 0x08
443a66d387SMark Brown #define WM2000_STATUS_ANC_DISABLED              0x04
453a66d387SMark Brown #define WM2000_STATUS_POWER_DOWN_COMPLETE       0x02
463a66d387SMark Brown #define WM2000_STATUS_BOOT_COMPLETE             0x01
473a66d387SMark Brown 
483a66d387SMark Brown /* SYS_MODE_CNTRL */
493a66d387SMark Brown #define WM2000_MODE_ANA_SEQ_INCLUDE 0x80
503a66d387SMark Brown #define WM2000_MODE_MOUSE_ENABLE    0x40
513a66d387SMark Brown #define WM2000_MODE_CAT_FREQ_ENABLE 0x20
523a66d387SMark Brown #define WM2000_MODE_CAT_GAIN_ENABLE 0x10
533a66d387SMark Brown #define WM2000_MODE_BYPASS_ENTRY    0x08
543a66d387SMark Brown #define WM2000_MODE_STANDBY_ENTRY   0x04
553a66d387SMark Brown #define WM2000_MODE_THERMAL_ENABLE  0x02
563a66d387SMark Brown #define WM2000_MODE_POWER_DOWN      0x01
573a66d387SMark Brown 
583a66d387SMark Brown /* SYS_CTL1 */
593a66d387SMark Brown #define WM2000_SYS_STBY          0x01
603a66d387SMark Brown 
613a66d387SMark Brown /* SYS_CTL2 */
623a66d387SMark Brown #define WM2000_MCLK_DIV2_ENA_CLR 0x80
633a66d387SMark Brown #define WM2000_MCLK_DIV2_ENA_SET 0x40
643a66d387SMark Brown #define WM2000_ANC_ENG_CLR       0x20
653a66d387SMark Brown #define WM2000_ANC_ENG_SET       0x10
663a66d387SMark Brown #define WM2000_ANC_INT_N_CLR     0x08
673a66d387SMark Brown #define WM2000_ANC_INT_N_SET     0x04
683a66d387SMark Brown #define WM2000_RAM_CLR           0x02
693a66d387SMark Brown #define WM2000_RAM_SET           0x01
703a66d387SMark Brown 
713a66d387SMark Brown /* ANC_STAT */
723a66d387SMark Brown #define WM2000_ANC_ENG_IDLE      0x01
733a66d387SMark Brown 
743a66d387SMark Brown #endif
75