/* <:copyright-BRCM:2018:DUAL/GPL:standard Copyright (c) 2018 Broadcom All Rights Reserved Unless you and Broadcom execute a separate written software license agreement governing use of this software, this software is licensed to you under the terms of the GNU General Public License version 2 (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php, with the following added to such license: As a special exception, the copyright holders of this software give you permission to link this software with independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from this software. The special exception does not apply to any modifications of the software. Not withstanding the above, under no circumstances may you combine this software in any way with any other Broadcom software provided under a license other than the GPL, without Broadcom's express prior written consent. :> */ #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<