aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-10-10 10:58:03 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2008-10-13 16:51:53 -0400
commit06532c474718e330a7e3625ef91b94e22991128c (patch)
tree64e611a8d41ecf8df806e4a743473182f13d00f4 /include/linux
parentbc558a60b58f638ee0188affb627d4894a97b1c7 (diff)
mfd: Add WM8350 audio register definitions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/wm8350/audio.h592
1 files changed, 592 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h
new file mode 100644
index 000000000000..43342f767112
--- /dev/null
+++ b/include/linux/mfd/wm8350/audio.h
@@ -0,0 +1,592 @@
1/*
2 * audio.h -- Audio Driver for Wolfson WM8350 PMIC
3 *
4 * Copyright 2007 Wolfson Microelectronics PLC
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 */
12
13#ifndef __LINUX_MFD_WM8350_AUDIO_H_
14#define __LINUX_MFD_WM8350_AUDIO_H_
15
16#define WM8350_CLOCK_CONTROL_1 0x28
17#define WM8350_CLOCK_CONTROL_2 0x29
18#define WM8350_FLL_CONTROL_1 0x2A
19#define WM8350_FLL_CONTROL_2 0x2B
20#define WM8350_FLL_CONTROL_3 0x2C
21#define WM8350_FLL_CONTROL_4 0x2D
22#define WM8350_DAC_CONTROL 0x30
23#define WM8350_DAC_DIGITAL_VOLUME_L 0x32
24#define WM8350_DAC_DIGITAL_VOLUME_R 0x33
25#define WM8350_DAC_LR_RATE 0x35
26#define WM8350_DAC_CLOCK_CONTROL 0x36
27#define WM8350_DAC_MUTE 0x3A
28#define WM8350_DAC_MUTE_VOLUME 0x3B
29#define WM8350_DAC_SIDE 0x3C
30#define WM8350_ADC_CONTROL 0x40
31#define WM8350_ADC_DIGITAL_VOLUME_L 0x42
32#define WM8350_ADC_DIGITAL_VOLUME_R 0x43
33#define WM8350_ADC_DIVIDER 0x44
34#define WM8350_ADC_LR_RATE 0x46
35#define WM8350_INPUT_CONTROL 0x48
36#define WM8350_IN3_INPUT_CONTROL 0x49
37#define WM8350_MIC_BIAS_CONTROL 0x4A
38#define WM8350_OUTPUT_CONTROL 0x4C
39#define WM8350_JACK_DETECT 0x4D
40#define WM8350_ANTI_POP_CONTROL 0x4E
41#define WM8350_LEFT_INPUT_VOLUME 0x50
42#define WM8350_RIGHT_INPUT_VOLUME 0x51
43#define WM8350_LEFT_MIXER_CONTROL 0x58
44#define WM8350_RIGHT_MIXER_CONTROL 0x59
45#define WM8350_OUT3_MIXER_CONTROL 0x5C
46#define WM8350_OUT4_MIXER_CONTROL 0x5D
47#define WM8350_OUTPUT_LEFT_MIXER_VOLUME 0x60
48#define WM8350_OUTPUT_RIGHT_MIXER_VOLUME 0x61
49#define WM8350_INPUT_MIXER_VOLUME_L 0x62
50#define WM8350_INPUT_MIXER_VOLUME_R 0x63
51#define WM8350_INPUT_MIXER_VOLUME 0x64
52#define WM8350_LOUT1_VOLUME 0x68
53#define WM8350_ROUT1_VOLUME 0x69
54#define WM8350_LOUT2_VOLUME 0x6A
55#define WM8350_ROUT2_VOLUME 0x6B
56#define WM8350_BEEP_VOLUME 0x6F
57#define WM8350_AI_FORMATING 0x70
58#define WM8350_ADC_DAC_COMP 0x71
59#define WM8350_AI_ADC_CONTROL 0x72
60#define WM8350_AI_DAC_CONTROL 0x73
61#define WM8350_AIF_TEST 0x74
62#define WM8350_JACK_PIN_STATUS 0xE7
63
64/* Bit values for R08 (0x08) */
65#define WM8350_CODEC_ISEL_1_5 0 /* x1.5 */
66#define WM8350_CODEC_ISEL_1_0 1 /* x1.0 */
67#define WM8350_CODEC_ISEL_0_75 2 /* x0.75 */
68#define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */
69
70#define WM8350_VMID_OFF 0
71#define WM8350_VMID_500K 1
72#define WM8350_VMID_100K 2
73#define WM8350_VMID_10K 3
74
75/*
76 * R40 (0x28) - Clock Control 1
77 */
78#define WM8350_TOCLK_RATE 0x4000
79#define WM8350_MCLK_SEL 0x0800
80#define WM8350_MCLK_DIV_MASK 0x0100
81#define WM8350_BCLK_DIV_MASK 0x00F0
82#define WM8350_OPCLK_DIV_MASK 0x0007
83
84/*
85 * R41 (0x29) - Clock Control 2
86 */
87#define WM8350_LRC_ADC_SEL 0x8000
88#define WM8350_MCLK_DIR 0x0001
89
90/*
91 * R42 (0x2A) - FLL Control 1
92 */
93#define WM8350_FLL_DITHER_WIDTH_MASK 0x3000
94#define WM8350_FLL_DITHER_HP 0x0800
95#define WM8350_FLL_OUTDIV_MASK 0x0700
96#define WM8350_FLL_RSP_RATE_MASK 0x00F0
97#define WM8350_FLL_RATE_MASK 0x0007
98
99/*
100 * R43 (0x2B) - FLL Control 2
101 */
102#define WM8350_FLL_RATIO_MASK 0xF800
103#define WM8350_FLL_N_MASK 0x03FF
104
105/*
106 * R44 (0x2C) - FLL Control 3
107 */
108#define WM8350_FLL_K_MASK 0xFFFF
109
110/*
111 * R45 (0x2D) - FLL Control 4
112 */
113#define WM8350_FLL_FRAC 0x0020
114#define WM8350_FLL_SLOW_LOCK_REF 0x0010
115#define WM8350_FLL_CLK_SRC_MASK 0x0003
116
117/*
118 * R48 (0x30) - DAC Control
119 */
120#define WM8350_DAC_MONO 0x2000
121#define WM8350_AIF_LRCLKRATE 0x1000
122#define WM8350_DEEMP_MASK 0x0030
123#define WM8350_DACL_DATINV 0x0002
124#define WM8350_DACR_DATINV 0x0001
125
126/*
127 * R50 (0x32) - DAC Digital Volume L
128 */
129#define WM8350_DAC_VU 0x0100
130#define WM8350_DACL_VOL_MASK 0x00FF
131
132/*
133 * R51 (0x33) - DAC Digital Volume R
134 */
135#define WM8350_DAC_VU 0x0100
136#define WM8350_DACR_VOL_MASK 0x00FF
137
138/*
139 * R53 (0x35) - DAC LR Rate
140 */
141#define WM8350_DACLRC_ENA 0x0800
142#define WM8350_DACLRC_RATE_MASK 0x07FF
143
144/*
145 * R54 (0x36) - DAC Clock Control
146 */
147#define WM8350_DACCLK_POL 0x0010
148#define WM8350_DAC_CLKDIV_MASK 0x0007
149
150/*
151 * R58 (0x3A) - DAC Mute
152 */
153#define WM8350_DAC_MUTE_ENA 0x4000
154
155/*
156 * R59 (0x3B) - DAC Mute Volume
157 */
158#define WM8350_DAC_MUTEMODE 0x4000
159#define WM8350_DAC_MUTERATE 0x2000
160#define WM8350_DAC_SB_FILT 0x1000
161
162/*
163 * R60 (0x3C) - DAC Side
164 */
165#define WM8350_ADC_TO_DACL_MASK 0x3000
166#define WM8350_ADC_TO_DACR_MASK 0x0C00
167
168/*
169 * R64 (0x40) - ADC Control
170 */
171#define WM8350_ADC_HPF_CUT_MASK 0x0300
172#define WM8350_ADCL_DATINV 0x0002
173#define WM8350_ADCR_DATINV 0x0001
174
175/*
176 * R66 (0x42) - ADC Digital Volume L
177 */
178#define WM8350_ADC_VU 0x0100
179#define WM8350_ADCL_VOL_MASK 0x00FF
180
181/*
182 * R67 (0x43) - ADC Digital Volume R
183 */
184#define WM8350_ADC_VU 0x0100
185#define WM8350_ADCR_VOL_MASK 0x00FF
186
187/*
188 * R68 (0x44) - ADC Divider
189 */
190#define WM8350_ADCL_DAC_SVOL_MASK 0x0F00
191#define WM8350_ADCR_DAC_SVOL_MASK 0x00F0