1*e62d9491SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2eafe5708SHans-Christian Egtvedt /* 3eafe5708SHans-Christian Egtvedt * Driver for the AT73C213 16-bit stereo DAC on Atmel ATSTK1000 4eafe5708SHans-Christian Egtvedt * 5eafe5708SHans-Christian Egtvedt * Copyright (C) 2006 - 2007 Atmel Corporation 6eafe5708SHans-Christian Egtvedt */ 7eafe5708SHans-Christian Egtvedt 8eafe5708SHans-Christian Egtvedt #ifndef _SND_AT73C213_H 9eafe5708SHans-Christian Egtvedt #define _SND_AT73C213_H 10eafe5708SHans-Christian Egtvedt 11eafe5708SHans-Christian Egtvedt /* DAC control register */ 12eafe5708SHans-Christian Egtvedt #define DAC_CTRL 0x00 13eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONPADRV 7 14eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONAUXIN 6 15eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONDACR 5 16eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONDACL 4 17eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONLNOR 3 18eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONLNOL 2 19eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONLNIR 1 20eafe5708SHans-Christian Egtvedt #define DAC_CTRL_ONLNIL 0 21eafe5708SHans-Christian Egtvedt 22eafe5708SHans-Christian Egtvedt /* DAC left line in gain register */ 23eafe5708SHans-Christian Egtvedt #define DAC_LLIG 0x01 24eafe5708SHans-Christian Egtvedt #define DAC_LLIG_LLIG 0 25eafe5708SHans-Christian Egtvedt 26eafe5708SHans-Christian Egtvedt /* DAC right line in gain register */ 27eafe5708SHans-Christian Egtvedt #define DAC_RLIG 0x02 28eafe5708SHans-Christian Egtvedt #define DAC_RLIG_RLIG 0 29eafe5708SHans-Christian Egtvedt 30eafe5708SHans-Christian Egtvedt /* DAC Left Master Playback Gain Register */ 31eafe5708SHans-Christian Egtvedt #define DAC_LMPG 0x03 32eafe5708SHans-Christian Egtvedt #define DAC_LMPG_LMPG 0 33eafe5708SHans-Christian Egtvedt 34eafe5708SHans-Christian Egtvedt /* DAC Right Master Playback Gain Register */ 35eafe5708SHans-Christian Egtvedt #define DAC_RMPG 0x04 36eafe5708SHans-Christian Egtvedt #define DAC_RMPG_RMPG 0 37eafe5708SHans-Christian Egtvedt 38eafe5708SHans-Christian Egtvedt /* DAC Left Line Out Gain Register */ 39eafe5708SHans-Christian Egtvedt #define DAC_LLOG 0x05 40eafe5708SHans-Christian Egtvedt #define DAC_LLOG_LLOG 0 41eafe5708SHans-Christian Egtvedt 42eafe5708SHans-Christian Egtvedt /* DAC Right Line Out Gain Register */ 43eafe5708SHans-Christian Egtvedt #define DAC_RLOG 0x06 44eafe5708SHans-Christian Egtvedt #define DAC_RLOG_RLOG 0 45eafe5708SHans-Christian Egtvedt 46eafe5708SHans-Christian Egtvedt /* DAC Output Level Control Register */ 47eafe5708SHans-Christian Egtvedt #define DAC_OLC 0x07 48eafe5708SHans-Christian Egtvedt #define DAC_OLC_RSHORT 7 49eafe5708SHans-Christian Egtvedt #define DAC_OLC_ROLC 4 50eafe5708SHans-Christian Egtvedt #define DAC_OLC_LSHORT 3 51eafe5708SHans-Christian Egtvedt #define DAC_OLC_LOLC 0 52eafe5708SHans-Christian Egtvedt 53eafe5708SHans-Christian Egtvedt /* DAC Mixer Control Register */ 54eafe5708SHans-Christian Egtvedt #define DAC_MC 0x08 55eafe5708SHans-Christian Egtvedt #define DAC_MC_INVR 5 56eafe5708SHans-Christian Egtvedt #define DAC_MC_INVL 4 57eafe5708SHans-Christian Egtvedt #define DAC_MC_RMSMIN2 3 58eafe5708SHans-Christian Egtvedt #define DAC_MC_RMSMIN1 2 59eafe5708SHans-Christian Egtvedt #define DAC_MC_LMSMIN2 1 60eafe5708SHans-Christian Egtvedt #define DAC_MC_LMSMIN1 0 61eafe5708SHans-Christian Egtvedt 62eafe5708SHans-Christian Egtvedt /* DAC Clock and Sampling Frequency Control Register */ 63eafe5708SHans-Christian Egtvedt #define DAC_CSFC 0x09 64eafe5708SHans-Christian Egtvedt #define DAC_CSFC_OVRSEL 4 65eafe5708SHans-Christian Egtvedt 66eafe5708SHans-Christian Egtvedt /* DAC Miscellaneous Register */ 67eafe5708SHans-Christian Egtvedt #define DAC_MISC 0x0A 68eafe5708SHans-Christian Egtvedt #define DAC_MISC_VCMCAPSEL 7 69eafe5708SHans-Christian Egtvedt #define DAC_MISC_DINTSEL 4 70eafe5708SHans-Christian Egtvedt #define DAC_MISC_DITHEN 3 71eafe5708SHans-Christian Egtvedt #define DAC_MISC_DEEMPEN 2 72eafe5708SHans-Christian Egtvedt #define DAC_MISC_NBITS 0 73eafe5708SHans-Christian Egtvedt 74eafe5708SHans-Christian Egtvedt /* DAC Precharge Control Register */ 75eafe5708SHans-Christian Egtvedt #define DAC_PRECH 0x0C 76eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGPDRV 7 77eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGAUX1 6 78eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGLNOR 5 79eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGLNOL 4 80eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGLNIR 3 81eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHGLNIL 2 82eafe5708SHans-Christian Egtvedt #define DAC_PRECH_PRCHG 1 83eafe5708SHans-Christian Egtvedt #define DAC_PRECH_ONMSTR 0 84eafe5708SHans-Christian Egtvedt 85eafe5708SHans-Christian Egtvedt /* DAC Auxiliary Input Gain Control Register */ 86eafe5708SHans-Christian Egtvedt #define DAC_AUXG 0x0D 87eafe5708SHans-Christian Egtvedt #define DAC_AUXG_AUXG 0 88eafe5708SHans-Christian Egtvedt 89eafe5708SHans-Christian Egtvedt /* DAC Reset Register */ 90eafe5708SHans-Christian Egtvedt #define DAC_RST 0x10 91eafe5708SHans-Christian Egtvedt #define DAC_RST_RESMASK 2 92eafe5708SHans-Christian Egtvedt #define DAC_RST_RESFILZ 1 93eafe5708SHans-Christian Egtvedt #define DAC_RST_RSTZ 0 94eafe5708SHans-Christian Egtvedt 95eafe5708SHans-Christian Egtvedt /* Power Amplifier Control Register */ 96eafe5708SHans-Christian Egtvedt #define PA_CTRL 0x11 97eafe5708SHans-Christian Egtvedt #define PA_CTRL_APAON 6 98eafe5708SHans-Christian Egtvedt #define PA_CTRL_APAPRECH 5 99eafe5708SHans-Christian Egtvedt #define PA_CTRL_APALP 4 100eafe5708SHans-Christian Egtvedt #define PA_CTRL_APAGAIN 0 101eafe5708SHans-Christian Egtvedt 102eafe5708SHans-Christian Egtvedt #endif /* _SND_AT73C213_H */ 103