0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _WM8741_H
0013 #define _WM8741_H
0014
0015
0016
0017
0018 #define WM8741_DACLLSB_ATTENUATION 0x00
0019 #define WM8741_DACLMSB_ATTENUATION 0x01
0020 #define WM8741_DACRLSB_ATTENUATION 0x02
0021 #define WM8741_DACRMSB_ATTENUATION 0x03
0022 #define WM8741_VOLUME_CONTROL 0x04
0023 #define WM8741_FORMAT_CONTROL 0x05
0024 #define WM8741_FILTER_CONTROL 0x06
0025 #define WM8741_MODE_CONTROL_1 0x07
0026 #define WM8741_MODE_CONTROL_2 0x08
0027 #define WM8741_RESET 0x09
0028 #define WM8741_ADDITIONAL_CONTROL_1 0x20
0029
0030 #define WM8741_REGISTER_COUNT 11
0031 #define WM8741_MAX_REGISTER 0x20
0032
0033
0034
0035
0036
0037
0038
0039
0040 #define WM8741_UPDATELL 0x0020
0041 #define WM8741_UPDATELL_MASK 0x0020
0042 #define WM8741_UPDATELL_SHIFT 5
0043 #define WM8741_UPDATELL_WIDTH 1
0044 #define WM8741_LAT_4_0_MASK 0x001F
0045 #define WM8741_LAT_4_0_SHIFT 0
0046 #define WM8741_LAT_4_0_WIDTH 5
0047
0048
0049
0050
0051 #define WM8741_UPDATELM 0x0020
0052 #define WM8741_UPDATELM_MASK 0x0020
0053 #define WM8741_UPDATELM_SHIFT 5
0054 #define WM8741_UPDATELM_WIDTH 1
0055 #define WM8741_LAT_9_5_0_MASK 0x001F
0056 #define WM8741_LAT_9_5_0_SHIFT 0
0057 #define WM8741_LAT_9_5_0_WIDTH 5
0058
0059
0060
0061
0062 #define WM8741_UPDATERL 0x0020
0063 #define WM8741_UPDATERL_MASK 0x0020
0064 #define WM8741_UPDATERL_SHIFT 5
0065 #define WM8741_UPDATERL_WIDTH 1
0066 #define WM8741_RAT_4_0_MASK 0x001F
0067 #define WM8741_RAT_4_0_SHIFT 0
0068 #define WM8741_RAT_4_0_WIDTH 5
0069
0070
0071
0072
0073 #define WM8741_UPDATERM 0x0020
0074 #define WM8741_UPDATERM_MASK 0x0020
0075 #define WM8741_UPDATERM_SHIFT 5
0076 #define WM8741_UPDATERM_WIDTH 1
0077 #define WM8741_RAT_9_5_0_MASK 0x001F
0078 #define WM8741_RAT_9_5_0_SHIFT 0
0079 #define WM8741_RAT_9_5_0_WIDTH 5
0080
0081
0082
0083
0084 #define WM8741_AMUTE 0x0080
0085 #define WM8741_AMUTE_MASK 0x0080
0086 #define WM8741_AMUTE_SHIFT 7
0087 #define WM8741_AMUTE_WIDTH 1
0088 #define WM8741_ZFLAG_MASK 0x0060
0089 #define WM8741_ZFLAG_SHIFT 5
0090 #define WM8741_ZFLAG_WIDTH 2
0091 #define WM8741_IZD 0x0010
0092 #define WM8741_IZD_MASK 0x0010
0093 #define WM8741_IZD_SHIFT 4
0094 #define WM8741_IZD_WIDTH 1
0095 #define WM8741_SOFT 0x0008
0096 #define WM8741_SOFT_MASK 0x0008
0097 #define WM8741_SOFT_SHIFT 3
0098 #define WM8741_SOFT_WIDTH 1
0099 #define WM8741_ATC 0x0004
0100 #define WM8741_ATC_MASK 0x0004
0101 #define WM8741_ATC_SHIFT 2
0102 #define WM8741_ATC_WIDTH 1
0103 #define WM8741_ATT2DB 0x0002
0104 #define WM8741_ATT2DB_MASK 0x0002
0105 #define WM8741_ATT2DB_SHIFT 1
0106 #define WM8741_ATT2DB_WIDTH 1
0107 #define WM8741_VOL_RAMP 0x0001
0108 #define WM8741_VOL_RAMP_MASK 0x0001
0109 #define WM8741_VOL_RAMP_SHIFT 0
0110 #define WM8741_VOL_RAMP_WIDTH 1
0111
0112
0113
0114
0115 #define WM8741_PWDN 0x0080
0116 #define WM8741_PWDN_MASK 0x0080
0117 #define WM8741_PWDN_SHIFT 7
0118 #define WM8741_PWDN_WIDTH 1
0119 #define WM8741_REV 0x0040
0120 #define WM8741_REV_MASK 0x0040
0121 #define WM8741_REV_SHIFT 6
0122 #define WM8741_REV_WIDTH 1
0123 #define WM8741_BCP 0x0020
0124 #define WM8741_BCP_MASK 0x0020
0125 #define WM8741_BCP_SHIFT 5
0126 #define WM8741_BCP_WIDTH 1
0127 #define WM8741_LRP 0x0010
0128 #define WM8741_LRP_MASK 0x0010
0129 #define WM8741_LRP_SHIFT 4
0130 #define WM8741_LRP_WIDTH 1
0131 #define WM8741_FMT_MASK 0x000C
0132 #define WM8741_FMT_SHIFT 2
0133 #define WM8741_FMT_WIDTH 2
0134 #define WM8741_IWL_MASK 0x0003
0135 #define WM8741_IWL_SHIFT 0
0136 #define WM8741_IWL_WIDTH 2
0137
0138
0139
0140
0141 #define WM8741_ZFLAG_HI 0x0080
0142 #define WM8741_ZFLAG_HI_MASK 0x0080
0143 #define WM8741_ZFLAG_HI_SHIFT 7
0144 #define WM8741_ZFLAG_HI_WIDTH 1
0145 #define WM8741_DEEMPH_MASK 0x0060
0146 #define WM8741_DEEMPH_SHIFT 5
0147 #define WM8741_DEEMPH_WIDTH 2
0148 #define WM8741_DSDFILT_MASK 0x0018
0149 #define WM8741_DSDFILT_SHIFT 3
0150 #define WM8741_DSDFILT_WIDTH 2
0151 #define WM8741_FIRSEL_MASK 0x0007
0152 #define WM8741_FIRSEL_SHIFT 0
0153 #define WM8741_FIRSEL_WIDTH 3
0154
0155
0156
0157
0158 #define WM8741_MODE8X 0x0080
0159 #define WM8741_MODE8X_MASK 0x0080
0160 #define WM8741_MODE8X_SHIFT 7
0161 #define WM8741_MODE8X_WIDTH 1
0162 #define WM8741_OSR_MASK 0x0060
0163 #define WM8741_OSR_SHIFT 5
0164 #define WM8741_OSR_WIDTH 2
0165 #define WM8741_SR_MASK 0x001C
0166 #define WM8741_SR_SHIFT 2
0167 #define WM8741_SR_WIDTH 3
0168 #define WM8741_MODESEL_MASK 0x0003
0169 #define WM8741_MODESEL_SHIFT 0
0170 #define WM8741_MODESEL_WIDTH 2
0171
0172
0173
0174
0175 #define WM8741_DSD_GAIN 0x0040
0176 #define WM8741_DSD_GAIN_MASK 0x0040
0177 #define WM8741_DSD_GAIN_SHIFT 6
0178 #define WM8741_DSD_GAIN_WIDTH 1
0179 #define WM8741_SDOUT 0x0020
0180 #define WM8741_SDOUT_MASK 0x0020
0181 #define WM8741_SDOUT_SHIFT 5
0182 #define WM8741_SDOUT_WIDTH 1
0183 #define WM8741_DOUT 0x0010
0184 #define WM8741_DOUT_MASK 0x0010
0185 #define WM8741_DOUT_SHIFT 4
0186 #define WM8741_DOUT_WIDTH 1
0187 #define WM8741_DIFF_MASK 0x000C
0188 #define WM8741_DIFF_SHIFT 2
0189 #define WM8741_DIFF_WIDTH 2
0190 #define WM8741_DITHER_MASK 0x0003
0191 #define WM8741_DITHER_SHIFT 0
0192 #define WM8741_DITHER_WIDTH 2
0193
0194
0195 #define WM8741_DIFF_MODE_STEREO 0
0196 #define WM8741_DIFF_MODE_STEREO_REVERSED 2
0197 #define WM8741_DIFF_MODE_MONO_LEFT 1
0198 #define WM8741_DIFF_MODE_MONO_RIGHT 3
0199
0200
0201
0202
0203 #define WM8741_DSD_LEVEL 0x0002
0204 #define WM8741_DSD_LEVEL_MASK 0x0002
0205 #define WM8741_DSD_LEVEL_SHIFT 1
0206 #define WM8741_DSD_LEVEL_WIDTH 1
0207 #define WM8741_DSD_NO_NOTCH 0x0001
0208 #define WM8741_DSD_NO_NOTCH_MASK 0x0001
0209 #define WM8741_DSD_NO_NOTCH_SHIFT 0
0210 #define WM8741_DSD_NO_NOTCH_WIDTH 1
0211
0212 #define WM8741_SYSCLK 0
0213
0214 struct wm8741_platform_data {
0215 u32 diff_mode;
0216 };
0217
0218 #endif