1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2679d7abdSOla Lilja /* 3679d7abdSOla Lilja * Copyright (C) ST-Ericsson SA 2012 4679d7abdSOla Lilja * 5679d7abdSOla Lilja * Author: Ola Lilja <ola.o.lilja@stericsson.com>, 6679d7abdSOla Lilja * Kristoffer Karlsson <kristoffer.karlsson@stericsson.com>, 7679d7abdSOla Lilja * Roger Nilsson <roger.xr.nilsson@stericsson.com>, 8679d7abdSOla Lilja * for ST-Ericsson. 9679d7abdSOla Lilja * 10679d7abdSOla Lilja * Based on the early work done by: 11679d7abdSOla Lilja * Mikko J. Lehto <mikko.lehto@symbio.com>, 12679d7abdSOla Lilja * Mikko Sarmanne <mikko.sarmanne@symbio.com>, 13679d7abdSOla Lilja * for ST-Ericsson. 14679d7abdSOla Lilja */ 15679d7abdSOla Lilja 16679d7abdSOla Lilja #ifndef AB8500_CODEC_REGISTERS_H 17679d7abdSOla Lilja #define AB8500_CODEC_REGISTERS_H 18679d7abdSOla Lilja 19679d7abdSOla Lilja #define AB8500_SUPPORTED_RATE (SNDRV_PCM_RATE_48000) 20679d7abdSOla Lilja #define AB8500_SUPPORTED_FMT (SNDRV_PCM_FMTBIT_S16_LE) 21679d7abdSOla Lilja 22b2962633SFabio Baltieri /* AB8500 interface slot offset definitions */ 23b2962633SFabio Baltieri 24b2962633SFabio Baltieri #define AB8500_AD_DATA0_OFFSET 0 25b2962633SFabio Baltieri #define AB8500_DA_DATA0_OFFSET 8 26b2962633SFabio Baltieri #define AB8500_AD_DATA1_OFFSET 16 27b2962633SFabio Baltieri #define AB8500_DA_DATA1_OFFSET 24 28b2962633SFabio Baltieri 29679d7abdSOla Lilja /* AB8500 audio bank (0x0d) register definitions */ 30679d7abdSOla Lilja 31679d7abdSOla Lilja #define AB8500_POWERUP 0x00 32679d7abdSOla Lilja #define AB8500_AUDSWRESET 0x01 33679d7abdSOla Lilja #define AB8500_ADPATHENA 0x02 34679d7abdSOla Lilja #define AB8500_DAPATHENA 0x03 35679d7abdSOla Lilja #define AB8500_ANACONF1 0x04 36679d7abdSOla Lilja #define AB8500_ANACONF2 0x05 37679d7abdSOla Lilja #define AB8500_DIGMICCONF 0x06 38679d7abdSOla Lilja #define AB8500_ANACONF3 0x07 39679d7abdSOla Lilja #define AB8500_ANACONF4 0x08 40679d7abdSOla Lilja #define AB8500_DAPATHCONF 0x09 41679d7abdSOla Lilja #define AB8500_MUTECONF 0x0A 42679d7abdSOla Lilja #define AB8500_SHORTCIRCONF 0x0B 43679d7abdSOla Lilja #define AB8500_ANACONF5 0x0C 44679d7abdSOla Lilja #define AB8500_ENVCPCONF 0x0D 45679d7abdSOla Lilja #define AB8500_SIGENVCONF 0x0E 46679d7abdSOla Lilja #define AB8500_PWMGENCONF1 0x0F 47679d7abdSOla Lilja #define AB8500_PWMGENCONF2 0x10 48679d7abdSOla Lilja #define AB8500_PWMGENCONF3 0x11 49679d7abdSOla Lilja #define AB8500_PWMGENCONF4 0x12 50679d7abdSOla Lilja #define AB8500_PWMGENCONF5 0x13 51679d7abdSOla Lilja #define AB8500_ANAGAIN1 0x14 52679d7abdSOla Lilja #define AB8500_ANAGAIN2 0x15 53679d7abdSOla Lilja #define AB8500_ANAGAIN3 0x16 54679d7abdSOla Lilja #define AB8500_ANAGAIN4 0x17 55679d7abdSOla Lilja #define AB8500_DIGLINHSLGAIN 0x18 56679d7abdSOla Lilja #define AB8500_DIGLINHSRGAIN 0x19 57679d7abdSOla Lilja #define AB8500_ADFILTCONF 0x1A 58679d7abdSOla Lilja #define AB8500_DIGIFCONF1 0x1B 59679d7abdSOla Lilja #define AB8500_DIGIFCONF2 0x1C 60679d7abdSOla Lilja #define AB8500_DIGIFCONF3 0x1D 61679d7abdSOla Lilja #define AB8500_DIGIFCONF4 0x1E 62679d7abdSOla Lilja #define AB8500_ADSLOTSEL1 0x1F 63679d7abdSOla Lilja #define AB8500_ADSLOTSEL2 0x20 64679d7abdSOla Lilja #define AB8500_ADSLOTSEL3 0x21 65679d7abdSOla Lilja #define AB8500_ADSLOTSEL4 0x22 66679d7abdSOla Lilja #define AB8500_ADSLOTSEL5 0x23 67679d7abdSOla Lilja #define AB8500_ADSLOTSEL6 0x24 68679d7abdSOla Lilja #define AB8500_ADSLOTSEL7 0x25 69679d7abdSOla Lilja #define AB8500_ADSLOTSEL8 0x26 70679d7abdSOla Lilja #define AB8500_ADSLOTSEL9 0x27 71679d7abdSOla Lilja #define AB8500_ADSLOTSEL10 0x28 72679d7abdSOla Lilja #define AB8500_ADSLOTSEL11 0x29 73679d7abdSOla Lilja #define AB8500_ADSLOTSEL12 0x2A 74679d7abdSOla Lilja #define AB8500_ADSLOTSEL13 0x2B 75679d7abdSOla Lilja #define AB8500_ADSLOTSEL14 0x2C 76679d7abdSOla Lilja #define AB8500_ADSLOTSEL15 0x2D 77679d7abdSOla Lilja #define AB8500_ADSLOTSEL16 0x2E 78da33d723SFabio Baltieri #define AB8500_ADSLOTSEL(slot) (AB8500_ADSLOTSEL1 + (slot >> 1)) 79679d7abdSOla Lilja #define AB8500_ADSLOTHIZCTRL1 0x2F 80679d7abdSOla Lilja #define AB8500_ADSLOTHIZCTRL2 0x30 81679d7abdSOla Lilja #define AB8500_ADSLOTHIZCTRL3 0x31 82679d7abdSOla Lilja #define AB8500_ADSLOTHIZCTRL4 0x32 83679d7abdSOla Lilja #define AB8500_DASLOTCONF1 0x33 84679d7abdSOla Lilja #define AB8500_DASLOTCONF2 0x34 85679d7abdSOla Lilja #define AB8500_DASLOTCONF3 0x35 86679d7abdSOla Lilja #define AB8500_DASLOTCONF4 0x36 87679d7abdSOla Lilja #define AB8500_DASLOTCONF5 0x37 88679d7abdSOla Lilja #define AB8500_DASLOTCONF6 0x38 89679d7abdSOla Lilja #define AB8500_DASLOTCONF7 0x39 90679d7abdSOla Lilja #define AB8500_DASLOTCONF8 0x3A 91679d7abdSOla Lilja #define AB8500_CLASSDCONF1 0x3B 92679d7abdSOla Lilja #define AB8500_CLASSDCONF2 0x3C 93679d7abdSOla Lilja #define AB8500_CLASSDCONF3 0x3D 94679d7abdSOla Lilja #define AB8500_DMICFILTCONF 0x3E 95679d7abdSOla Lilja #define AB8500_DIGMULTCONF1 0x3F 96679d7abdSOla Lilja #define AB8500_DIGMULTCONF2 0x40 97679d7abdSOla Lilja #define AB8500_ADDIGGAIN1 0x41 98679d7abdSOla Lilja #define AB8500_ADDIGGAIN2 0x42 99679d7abdSOla Lilja #define AB8500_ADDIGGAIN3 0x43 100679d7abdSOla Lilja #define AB8500_ADDIGGAIN4 0x44 101679d7abdSOla Lilja #define AB8500_ADDIGGAIN5 0x45 102679d7abdSOla Lilja #define AB8500_ADDIGGAIN6 0x46 103679d7abdSOla Lilja #define AB8500_DADIGGAIN1 0x47 104679d7abdSOla Lilja #define AB8500_DADIGGAIN2 0x48 105679d7abdSOla Lilja #define AB8500_DADIGGAIN3 0x49 106679d7abdSOla Lilja #define AB8500_DADIGGAIN4 0x4A 107679d7abdSOla Lilja #define AB8500_DADIGGAIN5 0x4B 108679d7abdSOla Lilja #define AB8500_DADIGGAIN6 0x4C 109679d7abdSOla Lilja #define AB8500_ADDIGLOOPGAIN1 0x4D 110679d7abdSOla Lilja #define AB8500_ADDIGLOOPGAIN2 0x4E 111679d7abdSOla Lilja #define AB8500_HSLEARDIGGAIN 0x4F 112679d7abdSOla Lilja #define AB8500_HSRDIGGAIN 0x50 113679d7abdSOla Lilja #define AB8500_SIDFIRGAIN1 0x51 114679d7abdSOla Lilja #define AB8500_SIDFIRGAIN2 0x52 115679d7abdSOla Lilja #define AB8500_ANCCONF1 0x53 116679d7abdSOla Lilja #define AB8500_ANCCONF2 0x54 117679d7abdSOla Lilja #define AB8500_ANCCONF3 0x55 118679d7abdSOla Lilja #define AB8500_ANCCONF4 0x56 119679d7abdSOla Lilja #define AB8500_ANCCONF5 0x57 120679d7abdSOla Lilja #define AB8500_ANCCONF6 0x58 121679d7abdSOla Lilja #define AB8500_ANCCONF7 0x59 122679d7abdSOla Lilja #define AB8500_ANCCONF8 0x5A 123679d7abdSOla Lilja #define AB8500_ANCCONF9 0x5B 124679d7abdSOla Lilja #define AB8500_ANCCONF10 0x5C 125679d7abdSOla Lilja #define AB8500_ANCCONF11 0x5D 126679d7abdSOla Lilja #define AB8500_ANCCONF12 0x5E 127679d7abdSOla Lilja #define AB8500_ANCCONF13 0x5F 128679d7abdSOla Lilja #define AB8500_ANCCONF14 0x60 129679d7abdSOla Lilja #define AB8500_SIDFIRADR 0x61 130679d7abdSOla Lilja #define AB8500_SIDFIRCOEF1 0x62 131679d7abdSOla Lilja #define AB8500_SIDFIRCOEF2 0x63 132679d7abdSOla Lilja #define AB8500_SIDFIRCONF 0x64 133679d7abdSOla Lilja #define AB8500_AUDINTMASK1 0x65 134679d7abdSOla Lilja #define AB8500_AUDINTSOURCE1 0x66 135679d7abdSOla Lilja #define AB8500_AUDINTMASK2 0x67 136679d7abdSOla Lilja #define AB8500_AUDINTSOURCE2 0x68 137679d7abdSOla Lilja #define AB8500_FIFOCONF1 0x69 138679d7abdSOla Lilja #define AB8500_FIFOCONF2 0x6A 139679d7abdSOla Lilja #define AB8500_FIFOCONF3 0x6B 140679d7abdSOla Lilja #define AB8500_FIFOCONF4 0x6C 141679d7abdSOla Lilja #define AB8500_FIFOCONF5 0x6D 142679d7abdSOla Lilja #define AB8500_FIFOCONF6 0x6E 143679d7abdSOla Lilja #define AB8500_AUDREV 0x6F 144679d7abdSOla Lilja 145679d7abdSOla Lilja #define AB8500_FIRST_REG AB8500_POWERUP 146679d7abdSOla Lilja #define AB8500_LAST_REG AB8500_AUDREV 147679d7abdSOla Lilja #define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1) 148679d7abdSOla Lilja 149679d7abdSOla Lilja #define AB8500_MASK_ALL 0xFF 150da33d723SFabio Baltieri #define AB8500_MASK_SLOT(slot) ((slot & 1) ? 0xF0 : 0x0F) 151679d7abdSOla Lilja #define AB8500_MASK_NONE 0x00 152679d7abdSOla Lilja 153679d7abdSOla Lilja /* AB8500_POWERUP */ 154679d7abdSOla Lilja #define AB8500_POWERUP_POWERUP 7 155679d7abdSOla Lilja #define AB8500_POWERUP_ENANA 3 156679d7abdSOla Lilja 157679d7abdSOla Lilja /* AB8500_AUDSWRESET */ 158679d7abdSOla Lilja #define AB8500_AUDSWRESET_SWRESET 7 159679d7abdSOla Lilja 160679d7abdSOla Lilja /* AB8500_ADPATHENA */ 161679d7abdSOla Lilja #define AB8500_ADPATHENA_ENAD12 7 162679d7abdSOla Lilja #define AB8500_ADPATHENA_ENAD34 5 163679d7abdSOla Lilja #define AB8500_ADPATHENA_ENAD5768 3 164679d7abdSOla Lilja 165679d7abdSOla Lilja /* AB8500_DAPATHENA */ 166679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA1 7 167679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA2 6 168679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA3 5 169679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA4 4 170679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA5 3 171679d7abdSOla Lilja #define AB8500_DAPATHENA_ENDA6 2 172679d7abdSOla Lilja 173679d7abdSOla Lilja /* AB8500_ANACONF1 */ 174679d7abdSOla Lilja #define AB8500_ANACONF1_HSLOWPOW 7 175679d7abdSOla Lilja #define AB8500_ANACONF1_DACLOWPOW1 6 176679d7abdSOla Lilja #define AB8500_ANACONF1_DACLOWPOW0 5 177679d7abdSOla Lilja #define AB8500_ANACONF1_EARDACLOWPOW 4 178679d7abdSOla Lilja #define AB8500_ANACONF1_EARSELCM 2 179679d7abdSOla Lilja #define AB8500_ANACONF1_HSHPEN 1 180679d7abdSOla Lilja #define AB8500_ANACONF1_EARDRVLOWPOW 0 181679d7abdSOla Lilja 182679d7abdSOla Lilja /* AB8500_ANACONF2 */ 183679d7abdSOla Lilja #define AB8500_ANACONF2_ENMIC1 7 184679d7abdSOla Lilja #define AB8500_ANACONF2_ENMIC2 6 185679d7abdSOla Lilja #define AB8500_ANACONF2_ENLINL 5 186679d7abdSOla Lilja #define AB8500_ANACONF2_ENLINR 4 187679d7abdSOla Lilja #define AB8500_ANACONF2_MUTMIC1 3 188679d7abdSOla Lilja #define AB8500_ANACONF2_MUTMIC2 2 189679d7abdSOla Lilja #define AB8500_ANACONF2_MUTLINL 1 190679d7abdSOla Lilja #define AB8500_ANACONF2_MUTLINR 0 191679d7abdSOla Lilja 192679d7abdSOla Lilja /* AB8500_DIGMICCONF */ 193679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC1 7 194679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC2 6 195679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC3 5 196679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC4 4 197679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC5 3 198679d7abdSOla Lilja #define AB8500_DIGMICCONF_ENDMIC6 2 199679d7abdSOla Lilja #define AB8500_DIGMICCONF_HSFADSPEED 0 200679d7abdSOla Lilja 201679d7abdSOla Lilja /* AB8500_ANACONF3 */ 202679d7abdSOla Lilja #define AB8500_ANACONF3_MIC1SEL 7 203679d7abdSOla Lilja #define AB8500_ANACONF3_LINRSEL 6 204679d7abdSOla Lilja #define AB8500_ANACONF3_ENDRVHSL 5 205679d7abdSOla Lilja #define AB8500_ANACONF3_ENDRVHSR 4 206679d7abdSOla Lilja #define AB8500_ANACONF3_ENADCMIC 2 207679d7abdSOla Lilja #define AB8500_ANACONF3_ENADCLINL 1 208679d7abdSOla Lilja #define AB8500_ANACONF3_ENADCLINR 0 209679d7abdSOla Lilja 210679d7abdSOla Lilja /* AB8500_ANACONF4 */ 211679d7abdSOla Lilja #define AB8500_ANACONF4_DISPDVSS 7 212679d7abdSOla Lilja #define AB8500_ANACONF4_ENEAR 6 213679d7abdSOla Lilja #define AB8500_ANACONF4_ENHSL 5 214679d7abdSOla Lilja #define AB8500_ANACONF4_ENHSR 4 215679d7abdSOla Lilja #define AB8500_ANACONF4_ENHFL 3 216679d7abdSOla Lilja #define AB8500_ANACONF4_ENHFR 2 217679d7abdSOla Lilja #define AB8500_ANACONF4_ENVIB1 1 218679d7abdSOla Lilja #define AB8500_ANACONF4_ENVIB2 0 219679d7abdSOla Lilja 220679d7abdSOla Lilja /* AB8500_DAPATHCONF */ 221679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACEAR 6 222679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACHSL 5 223679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACHSR 4 224679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACHFL 3 225679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACHFR 2 226679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACVIB1 1 227679d7abdSOla Lilja #define AB8500_DAPATHCONF_ENDACVIB2 0 228679d7abdSOla Lilja 229679d7abdSOla Lilja /* AB8500_MUTECONF */ 230679d7abdSOla Lilja #define AB8500_MUTECONF_MUTEAR 6 231679d7abdSOla Lilja #define AB8500_MUTECONF_MUTHSL 5 232679d7abdSOla Lilja #define AB8500_MUTECONF_MUTHSR 4 233679d7abdSOla Lilja #define AB8500_MUTECONF_MUTDACEAR 2 234679d7abdSOla Lilja #define AB8500_MUTECONF_MUTDACHSL 1 235679d7abdSOla Lilja #define AB8500_MUTECONF_MUTDACHSR 0 236679d7abdSOla Lilja 237679d7abdSOla Lilja /* AB8500_SHORTCIRCONF */ 238679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_ENSHORTPWD 7 239679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_EARSHORTDIS 6 240679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_HSSHORTDIS 5 241679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_HSPULLDEN 4 242679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_HSOSCEN 2 243679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_HSFADDIS 1 244679d7abdSOla Lilja #define AB8500_SHORTCIRCONF_HSZCDDIS 0 245679d7abdSOla Lilja /* Zero cross should be disabled */ 246679d7abdSOla Lilja 247679d7abdSOla Lilja /* AB8500_ANACONF5 */ 248679d7abdSOla Lilja #define AB8500_ANACONF5_ENCPHS 7 249679d7abdSOla Lilja #define AB8500_ANACONF5_HSLDACTOLOL 5 250679d7abdSOla Lilja #define AB8500_ANACONF5_HSRDACTOLOR 4 251679d7abdSOla Lilja #define AB8500_ANACONF5_ENLOL 3 252679d7abdSOla Lilja #define AB8500_ANACONF5_ENLOR 2 253679d7abdSOla Lilja #define AB8500_ANACONF5_HSAUTOEN 0 254679d7abdSOla Lilja 255679d7abdSOla Lilja /* AB8500_ENVCPCONF */ 256679d7abdSOla Lilja #define AB8500_ENVCPCONF_ENVDETHTHRE 4 257679d7abdSOla Lilja #define AB8500_ENVCPCONF_ENVDETLTHRE 0 258679d7abdSOla Lilja #define AB8500_ENVCPCONF_ENVDETHTHRE_MAX 0x0F 259679d7abdSOla Lilja #define AB8500_ENVCPCONF_ENVDETLTHRE_MAX 0x0F 260679d7abdSOla Lilja 261679d7abdSOla Lilja /* AB8500_SIGENVCONF */ 262679d7abdSOla Lilja #define AB8500_SIGENVCONF_CPLVEN 5 263679d7abdSOla Lilja #define AB8500_SIGENVCONF_ENVDETCPEN 4 264679d7abdSOla Lilja #define AB8500_SIGENVCONF_ENVDETTIME 0 265679d7abdSOla Lilja #define AB8500_SIGENVCONF_ENVDETTIME_MAX 0x0F 266679d7abdSOla Lilja 267679d7abdSOla Lilja /* AB8500_PWMGENCONF1 */ 268679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWMTOVIB1 7 269679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWMTOVIB2 6 270679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM1CTRL 5 271679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM2CTRL 4 272679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM1NCTRL 3 273679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM1PCTRL 2 274679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM2NCTRL 1 275679d7abdSOla Lilja #define AB8500_PWMGENCONF1_PWM2PCTRL 0 276679d7abdSOla Lilja 277679d7abdSOla Lilja /* AB8500_PWMGENCONF2 */ 278679d7abdSOla Lilja /* AB8500_PWMGENCONF3 */ 279679d7abdSOla Lilja /* AB8500_PWMGENCONF4 */ 280679d7abdSOla Lilja /* AB8500_PWMGENCONF5 */ 281679d7abdSOla Lilja #define AB8500_PWMGENCONFX_PWMVIBXPOL 7 282679d7abdSOla Lilja #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC 0 283679d7abdSOla Lilja #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC_MAX 0x64 284679d7abdSOla Lilja 285679d7abdSOla Lilja /* AB8500_ANAGAIN1 */ 286679d7abdSOla Lilja /* AB8500_ANAGAIN2 */ 287679d7abdSOla Lilja #define AB8500_ANAGAINX_ENSEMICX 7 288679d7abdSOla Lilja #define AB8500_ANAGAINX_LOWPOWMICX 6 289679d7abdSOla Lilja #define AB8500_ANAGAINX_MICXGAIN 0 290679d7abdSOla Lilja #define AB8500_ANAGAINX_MICXGAIN_MAX 0x1F 291679d7abdSOla Lilja 292679d7abdSOla Lilja /* AB8500_ANAGAIN3 */ 293679d7abdSOla Lilja #define AB8500_ANAGAIN3_HSLGAIN 4 294679d7abdSOla Lilja #define AB8500_ANAGAIN3_HSRGAIN 0 295679d7abdSOla Lilja #define AB8500_ANAGAIN3_HSXGAIN_MAX 0x0F 296679d7abdSOla Lilja 297679d7abdSOla Lilja /* AB8500_ANAGAIN4 */ 298679d7abdSOla Lilja #define AB8500_ANAGAIN4_LINLGAIN 4 299679d7abdSOla Lilja #define AB8500_ANAGAIN4_LINRGAIN 0 300679d7abdSOla Lilja #define AB8500_ANAGAIN4_LINXGAIN_MAX 0x0F 301679d7abdSOla Lilja 302679d7abdSOla Lilja /* AB8500_DIGLINHSLGAIN */ 303679d7abdSOla Lilja /* AB8500_DIGLINHSRGAIN */ 304679d7abdSOla Lilja #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN 0 305679d7abdSOla Lilja #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN_MAX 0x13 306679d7abdSOla Lilja 307679d7abdSOla Lilja /* AB8500_ADFILTCONF */ 308679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD1NH 7 309679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD2NH 6 310679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD3NH 5 311679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD4NH 4 312679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD1VOICE 3 313679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD2VOICE 2 314679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD3VOICE 1 315679d7abdSOla Lilja #define AB8500_ADFILTCONF_AD4VOICE 0 316679d7abdSOla Lilja 317679d7abdSOla Lilja /* AB8500_DIGIFCONF1 */ 318679d7abdSOla Lilja #define AB8500_DIGIFCONF1_ENMASTGEN 7 319679d7abdSOla Lilja #define AB8500_DIGIFCONF1_IF1BITCLKOS1 6 320679d7abdSOla Lilja #define AB8500_DIGIFCONF1_IF1BITCLKOS0 5 321679d7abdSOla Lilja #define AB8500_DIGIFCONF1_ENFSBITCLK1 4 322679d7abdSOla Lilja #define AB8500_DIGIFCONF1_IF0BITCLKOS1 2 323679d7abdSOla Lilja #define AB8500_DIGIFCONF1_IF0BITCLKOS0 1 324679d7abdSOla Lilja #define AB8500_DIGIFCONF1_ENFSBITCLK0 0 325679d7abdSOla Lilja 326679d7abdSOla Lilja /* AB8500_DIGIFCONF2 */ 327679d7abdSOla Lilja #define AB8500_DIGIFCONF2_FSYNC0P 6 328679d7abdSOla Lilja #define AB8500_DIGIFCONF2_BITCLK0P 5 329679d7abdSOla Lilja #define AB8500_DIGIFCONF2_IF0DEL 4 330679d7abdSOla Lilja #define AB8500_DIGIFCONF2_IF0FORMAT1 3 331679d7abdSOla Lilja #define AB8500_DIGIFCONF2_IF0FORMAT0 2 332679d7abdSOla Lilja #define AB8500_DIGIFCONF2_IF0WL1 1 333679d7abdSOla Lilja #define AB8500_DIGIFCONF2_IF0WL0 0 334679d7abdSOla Lilja 335679d7abdSOla Lilja /* AB8500_DIGIFCONF3 */ 336679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF0DATOIF1AD 7 337679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF0CLKTOIF1CLK 6 338679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF1MASTER 5 339679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF1DATOIF0AD 3 340679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF1CLKTOIF0CLK 2 341679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF0MASTER 1 342679d7abdSOla Lilja #define AB8500_DIGIFCONF3_IF0BFIFOEN 0 343679d7abdSOla Lilja 344679d7abdSOla Lilja /* AB8500_DIGIFCONF4 */ 345679d7abdSOla Lilja #define AB8500_DIGIFCONF4_FSYNC1P 6 346679d7abdSOla Lilja #define AB8500_DIGIFCONF4_BITCLK1P 5 347679d7abdSOla Lilja #define AB8500_DIGIFCONF4_IF1DEL 4 348679d7abdSOla Lilja #define AB8500_DIGIFCONF4_IF1FORMAT1 3 349679d7abdSOla Lilja #define AB8500_DIGIFCONF4_IF1FORMAT0 2 350679d7abdSOla Lilja #define AB8500_DIGIFCONF4_IF1WL1 1 351679d7abdSOla Lilja #define AB8500_DIGIFCONF4_IF1WL0 0 352679d7abdSOla Lilja 353679d7abdSOla Lilja /* AB8500_ADSLOTSELX */ 354da33d723SFabio Baltieri #define AB8500_AD_OUT1 0x0 355da33d723SFabio Baltieri #define AB8500_AD_OUT2 0x1 356da33d723SFabio Baltieri #define AB8500_AD_OUT3 0x2 357da33d723SFabio Baltieri #define AB8500_AD_OUT4 0x3 358da33d723SFabio Baltieri #define AB8500_AD_OUT5 0x4 359da33d723SFabio Baltieri #define AB8500_AD_OUT6 0x5 360da33d723SFabio Baltieri #define AB8500_AD_OUT7 0x6 361da33d723SFabio Baltieri #define AB8500_AD_OUT8 0x7 362da33d723SFabio Baltieri #define AB8500_ZEROES 0x8 363da33d723SFabio Baltieri #define AB8500_TRISTATE 0xF 364679d7abdSOla Lilja #define AB8500_ADSLOTSELX_EVEN_SHIFT 0 365679d7abdSOla Lilja #define AB8500_ADSLOTSELX_ODD_SHIFT 4 366da33d723SFabio Baltieri #define AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(out, slot) \ 367da33d723SFabio Baltieri ((out) << (((slot) & 1) ? \ 368da33d723SFabio Baltieri AB8500_ADSLOTSELX_ODD_SHIFT : AB8500_ADSLOTSELX_EVEN_SHIFT)) 369679d7abdSOla Lilja 370679d7abdSOla Lilja /* AB8500_ADSLOTHIZCTRL1 */ 371679d7abdSOla Lilja /* AB8500_ADSLOTHIZCTRL2 */ 372679d7abdSOla Lilja /* AB8500_ADSLOTHIZCTRL3 */ 373679d7abdSOla Lilja /* AB8500_ADSLOTHIZCTRL4 */ 374679d7abdSOla Lilja /* AB8500_DASLOTCONF1 */ 375679d7abdSOla Lilja #define AB8500_DASLOTCONF1_DA12VOICE 7 376679d7abdSOla Lilja #define AB8500_DASLOTCONF1_SWAPDA12_34 6 377679d7abdSOla Lilja #define AB8500_DASLOTCONF1_DAI7TOADO1 5 378679d7abdSOla Lilja 379679d7abdSOla Lilja /* AB8500_DASLOTCONF2 */ 380679d7abdSOla Lilja #define AB8500_DASLOTCONF2_DAI8TOADO2 5 381679d7abdSOla Lilja 382679d7abdSOla Lilja /* AB8500_DASLOTCONF3 */ 383679d7abdSOla Lilja #define AB8500_DASLOTCONF3_DA34VOICE 7 384679d7abdSOla Lilja #define AB8500_DASLOTCONF3_DAI7TOADO3 5 385679d7abdSOla Lilja 386679d7abdSOla Lilja /* AB8500_DASLOTCONF4 */ 387679d7abdSOla Lilja #define AB8500_DASLOTCONF4_DAI8TOADO4 5 388679d7abdSOla Lilja 389679d7abdSOla Lilja /* AB8500_DASLOTCONF5 */ 390679d7abdSOla Lilja #define AB8500_DASLOTCONF5_DA56VOICE 7 391679d7abdSOla Lilja #define AB8500_DASLOTCONF5_DAI7TOADO5 5 392679d7abdSOla Lilja 393679d7abdSOla Lilja /* AB8500_DASLOTCONF6 */ 394679d7abdSOla Lilja #define AB8500_DASLOTCONF6_DAI8TOADO6 5 395679d7abdSOla Lilja 396679d7abdSOla Lilja /* AB8500_DASLOTCONF7 */ 397679d7abdSOla Lilja #define AB8500_DASLOTCONF7_DAI8TOADO7 5 398679d7abdSOla Lilja 399679d7abdSOla Lilja /* AB8500_DASLOTCONF8 */ 400679d7abdSOla Lilja #define AB8500_DASLOTCONF8_DAI7TOADO8 5 401679d7abdSOla Lilja 402679d7abdSOla Lilja #define AB8500_DASLOTCONFX_SLTODAX_SHIFT 0 403679d7abdSOla Lilja #define AB8500_DASLOTCONFX_SLTODAX_MASK 0x1F 404679d7abdSOla Lilja 405679d7abdSOla Lilja /* AB8500_CLASSDCONF1 */ 406679d7abdSOla Lilja #define AB8500_CLASSDCONF1_PARLHF 7 407679d7abdSOla Lilja #define AB8500_CLASSDCONF1_PARLVIB 6 408679d7abdSOla Lilja #define AB8500_CLASSDCONF1_VIB1SWAPEN 3 409679d7abdSOla Lilja #define AB8500_CLASSDCONF1_VIB2SWAPEN 2 410679d7abdSOla Lilja #define AB8500_CLASSDCONF1_HFLSWAPEN 1 411679d7abdSOla Lilja #define AB8500_CLASSDCONF1_HFRSWAPEN 0 412679d7abdSOla Lilja 413679d7abdSOla Lilja /* AB8500_CLASSDCONF2 */ 414679d7abdSOla Lilja #define AB8500_CLASSDCONF2_FIRBYP3 7 415679d7abdSOla Lilja #define AB8500_CLASSDCONF2_FIRBYP2 6 416679d7abdSOla Lilja #define AB8500_CLASSDCONF2_FIRBYP1 5 417679d7abdSOla Lilja #define AB8500_CLASSDCONF2_FIRBYP0 4 418679d7abdSOla Lilja #define AB8500_CLASSDCONF2_HIGHVOLEN3 3 419679d7abdSOla Lilja #define AB8500_CLASSDCONF2_HIGHVOLEN2 2 420679d7abdSOla Lilja #define AB8500_CLASSDCONF2_HIGHVOLEN1 1 421679d7abdSOla Lilja #define AB8500_CLASSDCONF2_HIGHVOLEN0 0 422679d7abdSOla Lilja 423679d7abdSOla Lilja /* AB8500_CLASSDCONF3 */ 424679d7abdSOla Lilja #define AB8500_CLASSDCONF3_DITHHPGAIN 4 425679d7abdSOla Lilja #define AB8500_CLASSDCONF3_DITHHPGAIN_MAX 0x0A 426679d7abdSOla Lilja #define AB8500_CLASSDCONF3_DITHWGAIN 0 427679d7abdSOla Lilja #define AB8500_CLASSDCONF3_DITHWGAIN_MAX 0x0A 428679d7abdSOla Lilja 429679d7abdSOla Lilja /* AB8500_DMICFILTCONF */ 430679d7abdSOla Lilja #define AB8500_DMICFILTCONF_ANCINSEL 7 431679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DA3TOEAR 6 432679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC1SINC3 5 433679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC2SINC3 4 434679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC3SINC3 3 435679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC4SINC3 2 436679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC5SINC3 1 437679d7abdSOla Lilja #define AB8500_DMICFILTCONF_DMIC6SINC3 0 438679d7abdSOla Lilja 439679d7abdSOla Lilja /* AB8500_DIGMULTCONF1 */ 440679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_DATOHSLEN 7 441679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_DATOHSREN 6 442679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_AD1SEL 5 443679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_AD2SEL 4 444679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_AD3SEL 3 445679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_AD5SEL 2 446679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_AD6SEL 1 447679d7abdSOla Lilja #define AB8500_DIGMULTCONF1_ANCSEL 0 448679d7abdSOla Lilja 449679d7abdSOla Lilja /* AB8500_DIGMULTCONF2 */ 450679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_DATOHFREN 7 451679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_DATOHFLEN 6 452679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_HFRSEL 5 453679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_HFLSEL 4 454679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_FIRSID1SEL 2 455679d7abdSOla Lilja #define AB8500_DIGMULTCONF2_FIRSID2SEL 0 456679d7abdSOla Lilja 457679d7abdSOla Lilja /* AB8500_ADDIGGAIN1 */ 458679d7abdSOla Lilja /* AB8500_ADDIGGAIN2 */ 459679d7abdSOla Lilja /* AB8500_ADDIGGAIN3 */ 460679d7abdSOla Lilja /* AB8500_ADDIGGAIN4 */ 461679d7abdSOla Lilja /* AB8500_ADDIGGAIN5 */ 462679d7abdSOla Lilja /* AB8500_ADDIGGAIN6 */ 463679d7abdSOla Lilja #define AB8500_ADDIGGAINX_FADEDISADX 6 464679d7abdSOla Lilja #define AB8500_ADDIGGAINX_ADXGAIN_MAX 0x3F 465679d7abdSOla Lilja 466679d7abdSOla Lilja /* AB8500_DADIGGAIN1 */ 467679d7abdSOla Lilja /* AB8500_DADIGGAIN2 */ 468679d7abdSOla Lilja /* AB8500_DADIGGAIN3 */ 469679d7abdSOla Lilja /* AB8500_DADIGGAIN4 */ 470679d7abdSOla Lilja /* AB8500_DADIGGAIN5 */ 471679d7abdSOla Lilja /* AB8500_DADIGGAIN6 */ 472679d7abdSOla Lilja #define AB8500_DADIGGAINX_FADEDISDAX 6 473679d7abdSOla Lilja #define AB8500_DADIGGAINX_DAXGAIN_MAX 0x3F 474679d7abdSOla Lilja 475679d7abdSOla Lilja /* AB8500_ADDIGLOOPGAIN1 */ 476679d7abdSOla Lilja /* AB8500_ADDIGLOOPGAIN2 */ 477679d7abdSOla Lilja #define AB8500_ADDIGLOOPGAINX_FADEDISADXL 6 478679d7abdSOla Lilja #define AB8500_ADDIGLOOPGAINX_ADXLBGAIN_MAX 0x3F 479679d7abdSOla Lilja 480679d7abdSOla Lilja /* AB8500_HSLEARDIGGAIN */ 481679d7abdSOla Lilja #define AB8500_HSLEARDIGGAIN_HSSINC1 7 482679d7abdSOla Lilja #define AB8500_HSLEARDIGGAIN_FADEDISHSL 4 483679d7abdSOla Lilja #define AB8500_HSLEARDIGGAIN_HSLDGAIN_MAX 0x09 484679d7abdSOla Lilja 485679d7abdSOla Lilja /* AB8500_HSRDIGGAIN */ 486679d7abdSOla Lilja #define AB8500_HSRDIGGAIN_FADESPEED 6 487679d7abdSOla Lilja #define AB8500_HSRDIGGAIN_FADEDISHSR 4 488679d7abdSOla Lilja #define AB8500_HSRDIGGAIN_HSRDGAIN_MAX 0x09 489679d7abdSOla Lilja 490679d7abdSOla Lilja /* AB8500_SIDFIRGAIN1 */ 491679d7abdSOla Lilja /* AB8500_SIDFIRGAIN2 */ 492679d7abdSOla Lilja #define AB8500_SIDFIRGAINX_FIRSIDXGAIN_MAX 0x1F 493679d7abdSOla Lilja 494679d7abdSOla Lilja /* AB8500_ANCCONF1 */ 495679d7abdSOla Lilja #define AB8500_ANCCONF1_ANCIIRUPDATE 3 496679d7abdSOla Lilja #define AB8500_ANCCONF1_ENANC 2 497679d7abdSOla Lilja #define AB8500_ANCCONF1_ANCIIRINIT 1 498679d7abdSOla Lilja #define AB8500_ANCCONF1_ANCFIRUPDATE 0 499679d7abdSOla Lilja 500679d7abdSOla Lilja /* AB8500_ANCCONF2 */ 501679d7abdSOla Lilja #define AB8500_ANCCONF2_SHIFT 5 502679d7abdSOla Lilja #define AB8500_ANCCONF2_MIN -0x10 503679d7abdSOla Lilja #define AB8500_ANCCONF2_MAX 0xF 504679d7abdSOla Lilja 505679d7abdSOla Lilja /* AB8500_ANCCONF3 */ 506679d7abdSOla Lilja #define AB8500_ANCCONF3_SHIFT 5 507679d7abdSOla Lilja #define AB8500_ANCCONF3_MIN -0x10 508679d7abdSOla Lilja #define AB8500_ANCCONF3_MAX 0xF 509679d7abdSOla Lilja 510679d7abdSOla Lilja /* AB8500_ANCCONF4 */ 511679d7abdSOla Lilja #define AB8500_ANCCONF4_SHIFT 5 512679d7abdSOla Lilja #define AB8500_ANCCONF4_MIN -0x10 513679d7abdSOla Lilja #define AB8500_ANCCONF4_MAX 0xF 514679d7abdSOla Lilja 515679d7abdSOla Lilja /* AB8500_ANC_FIR_COEFFS */ 516679d7abdSOla Lilja #define AB8500_ANC_FIR_COEFF_MIN -0x8000 517679d7abdSOla Lilja #define AB8500_ANC_FIR_COEFF_MAX 0x7FFF 518679d7abdSOla Lilja #define AB8500_ANC_FIR_COEFFS 15 519679d7abdSOla Lilja 520679d7abdSOla Lilja /* AB8500_ANC_IIR_COEFFS */ 521679d7abdSOla Lilja #define AB8500_ANC_IIR_COEFF_MIN -0x800000 522679d7abdSOla Lilja #define AB8500_ANC_IIR_COEFF_MAX 0x7FFFFF 523679d7abdSOla Lilja #define AB8500_ANC_IIR_COEFFS 24 524679d7abdSOla Lilja /* AB8500_ANC_WARP_DELAY */ 525679d7abdSOla Lilja #define AB8500_ANC_WARP_DELAY_SHIFT 16 526679d7abdSOla Lilja #define AB8500_ANC_WARP_DELAY_MIN 0x0000 527679d7abdSOla Lilja #define AB8500_ANC_WARP_DELAY_MAX 0xFFFF 528679d7abdSOla Lilja 529679d7abdSOla Lilja /* AB8500_ANCCONF11 */ 530679d7abdSOla Lilja /* AB8500_ANCCONF12 */ 531679d7abdSOla Lilja /* AB8500_ANCCONF13 */ 532679d7abdSOla Lilja /* AB8500_ANCCONF14 */ 533679d7abdSOla Lilja 534679d7abdSOla Lilja /* AB8500_SIDFIRADR */ 535679d7abdSOla Lilja #define AB8500_SIDFIRADR_FIRSIDSET 7 536679d7abdSOla Lilja #define AB8500_SIDFIRADR_ADDRESS_SHIFT 0 537679d7abdSOla Lilja #define AB8500_SIDFIRADR_ADDRESS_MAX 0x7F 538679d7abdSOla Lilja 539679d7abdSOla Lilja /* AB8500_SIDFIRCOEF1 */ 540679d7abdSOla Lilja /* AB8500_SIDFIRCOEF2 */ 541679d7abdSOla Lilja #define AB8500_SID_FIR_COEFF_MIN 0 542679d7abdSOla Lilja #define AB8500_SID_FIR_COEFF_MAX 0xFFFF 543679d7abdSOla Lilja #define AB8500_SID_FIR_COEFFS 128 544679d7abdSOla Lilja 545679d7abdSOla Lilja /* AB8500_SIDFIRCONF */ 546679d7abdSOla Lilja #define AB8500_SIDFIRCONF_ENFIRSIDS 2 547679d7abdSOla Lilja #define AB8500_SIDFIRCONF_FIRSIDSTOIF1 1 548679d7abdSOla Lilja #define AB8500_SIDFIRCONF_FIRSIDBUSY 0 549679d7abdSOla Lilja 550679d7abdSOla Lilja /* AB8500_AUDINTMASK1 */ 551679d7abdSOla Lilja /* AB8500_AUDINTSOURCE1 */ 552679d7abdSOla Lilja /* AB8500_AUDINTMASK2 */ 553679d7abdSOla Lilja /* AB8500_AUDINTSOURCE2 */ 554679d7abdSOla Lilja 555679d7abdSOla Lilja /* AB8500_FIFOCONF1 */ 556679d7abdSOla Lilja #define AB8500_FIFOCONF1_BFIFOMASK 0x80 557679d7abdSOla Lilja #define AB8500_FIFOCONF1_BFIFO19M2 0x40 558679d7abdSOla Lilja #define AB8500_FIFOCONF1_BFIFOINT_SHIFT 0 559679d7abdSOla Lilja #define AB8500_FIFOCONF1_BFIFOINT_MAX 0x3F 560679d7abdSOla Lilja 561679d7abdSOla Lilja /* AB8500_FIFOCONF2 */ 562679d7abdSOla Lilja #define AB8500_FIFOCONF2_BFIFOTX_SHIFT 0 563679d7abdSOla Lilja #define AB8500_FIFOCONF2_BFIFOTX_MAX 0xFF 564679d7abdSOla Lilja 565679d7abdSOla Lilja /* AB8500_FIFOCONF3 */ 566679d7abdSOla Lilja #define AB8500_FIFOCONF3_BFIFOEXSL_SHIFT 5 567679d7abdSOla Lilja #define AB8500_FIFOCONF3_BFIFOEXSL_MAX 0x5 568679d7abdSOla Lilja #define AB8500_FIFOCONF3_PREBITCLK0_SHIFT 2 569679d7abdSOla Lilja #define AB8500_FIFOCONF3_PREBITCLK0_MAX 0x7 570679d7abdSOla Lilja #define AB8500_FIFOCONF3_BFIFOMAST_SHIFT 1 571679d7abdSOla Lilja #define AB8500_FIFOCONF3_BFIFORUN_SHIFT 0 572679d7abdSOla Lilja 573679d7abdSOla Lilja /* AB8500_FIFOCONF4 */ 574679d7abdSOla Lilja #define AB8500_FIFOCONF4_BFIFOFRAMSW_SHIFT 0 575679d7abdSOla Lilja #define AB8500_FIFOCONF4_BFIFOFRAMSW_MAX 0xFF 576679d7abdSOla Lilja 577679d7abdSOla Lilja /* AB8500_FIFOCONF5 */ 578679d7abdSOla Lilja #define AB8500_FIFOCONF5_BFIFOWAKEUP_SHIFT 0 579679d7abdSOla Lilja #define AB8500_FIFOCONF5_BFIFOWAKEUP_MAX 0xFF 580679d7abdSOla Lilja 581679d7abdSOla Lilja /* AB8500_FIFOCONF6 */ 582679d7abdSOla Lilja #define AB8500_FIFOCONF6_BFIFOSAMPLE_SHIFT 0 583679d7abdSOla Lilja #define AB8500_FIFOCONF6_BFIFOSAMPLE_MAX 0xFF 584679d7abdSOla Lilja 585679d7abdSOla Lilja /* AB8500_AUDREV */ 586679d7abdSOla Lilja 587679d7abdSOla Lilja #endif 588