/* <:copyright-BRCM:2018:DUAL/GPL:standard Copyright (c) 2018 Broadcom All Rights Reserved This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation (the "GPL"). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. :> */ #ifndef _TLV320DAC3203_H #define _TLV320DAC3203_H #define DAC3203_RATES SNDRV_PCM_RATE_8000_192000 #define DAC3203_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) #define MCLK_8192000 8192000 #define MCLK_11289600 11289600 #define MCLK_12288000 12288000 #define MCLK_16384000 16384000 #define MCLK_22579200 22579200 #define MCLK_24576000 24576000 #define MCLK_32768000 32768000 #define MCLK_45158400 45158400 #define MCLK_49152000 49152000 #define DAC3203_PAGE1 128 /* page 0 */ #define DAC3203_PSEL 0 /*reg 0*/ #define DAC3203_RESET 1 #define DAC3203_CLKMUX 4 #define DAC3203_PLLCLKIN 0x03 #define DAC3203_PLLPR 5 #define DAC3203_PLLEN ( 0x01 << 7 ) #define DAC3203_PLLJ 6 #define DAC3203_PLLDMSB 7 #define DAC3203_PLLDLSB 8 #define DAC3203_NDAC 11 #define DAC3203_NDACEN ( 0x01 << 7 ) #define DAC3203_MDAC 12 #define DAC3203_MDACEN ( 0x01 << 7 ) #define DAC3203_DOSRMSB 13 #define DAC3203_DOSRLSB 14 #define DAC3203_NADC 18 #define DAC3203_NADCEN ( 0x01 << 7 ) #define DAC3203_MADC 19 #define DAC3203_MADCEN ( 0x01 << 7 ) #define DAC3203_AOSR 20 #define DAC3203_CLKMUX2 25 #define DAC3203_CLKOUTM 26 #define DAC3203_IFACE1 27 #define DAC3203_AUDIO_INTERFACE_SHIFT 6 #define DAC3203_I2S_MODE 0x00 #define DAC3203_DSP_MODE 0x01 #define DAC3203_RIGHT_JUSTIFIED_MODE 0x02 #define DAC3203_LEFT_JUSTIFIED_MODE 0x03 #define DAC3203_AUDIO_DATA_LENGTH_SHIFT 4 #define DAC3203_WORD_LEN_16BITS 0x00 #define DAC3203_WORD_LEN_20BITS 0x01 #define DAC3203_WORD_LEN_24BITS 0x02 #define DAC3203_WORD_LEN_32BITS 0x03 #define DAC3203_BCLK_DIR_SHIFT 3 #define DAC3203_WCLK_DIR_SHIFT 2 #define DAC3203_PLLJ_SHIFT 6 #define DAC3203_DOSRMSB_SHIFT 4 #define DAC3203_IFACE2 28 #define DAC3203_IFACE3 29 #define DAC3203_DACMOD2BCLK 0x01 #define I2S_DEFAULT_BIT_POL 0 #define I2S_DEFAULT_BIT_POL_SHIFT 3 #define I2S_DEFAULT_BIT_POL_MASK ( 1<