Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // rt1015.h  --  RT1015 ALSA SoC audio amplifier driver
0004 //
0005 // Copyright 2019 Realtek Semiconductor Corp.
0006 // Author: Jack Yu <jack.yu@realtek.com>
0007 //
0008 // This program is free software; you can redistribute it and/or modify
0009 // it under the terms of the GNU General Public License version 2 as
0010 // published by the Free Software Foundation.
0011 //
0012 
0013 #ifndef __RT1015_H__
0014 #define __RT1015_H__
0015 #include <sound/rt1015.h>
0016 
0017 #define RT1015_DEVICE_ID_VAL            0x1011
0018 #define RT1015_DEVICE_ID_VAL2           0x1015
0019 
0020 #define RT1015_RESET                0x0000
0021 #define RT1015_CLK2             0x0004
0022 #define RT1015_CLK3             0x0006
0023 #define RT1015_PLL1             0x000a
0024 #define RT1015_PLL2             0x000c
0025 #define RT1015_DUM_RW1              0x000e
0026 #define RT1015_DUM_RW2              0x0010
0027 #define RT1015_DUM_RW3              0x0012
0028 #define RT1015_DUM_RW4              0x0014
0029 #define RT1015_DUM_RW5              0x0016
0030 #define RT1015_DUM_RW6              0x0018
0031 #define RT1015_CLK_DET              0x0020
0032 #define RT1015_SIL_DET              0x0022
0033 #define RT1015_CUSTOMER_ID          0x0076
0034 #define RT1015_PCODE_FWVER          0x0078
0035 #define RT1015_VER_ID               0x007a
0036 #define RT1015_VENDOR_ID            0x007c
0037 #define RT1015_DEVICE_ID            0x007d
0038 #define RT1015_PAD_DRV1             0x00f0
0039 #define RT1015_PAD_DRV2             0x00f2
0040 #define RT1015_GAT_BOOST            0x00f3
0041 #define RT1015_PRO_ALT              0x00f4
0042 #define RT1015_OSCK_STA             0x00f6
0043 #define RT1015_MAN_I2C              0x0100
0044 #define RT1015_DAC1             0x0102
0045 #define RT1015_DAC2             0x0104
0046 #define RT1015_DAC3             0x0106
0047 #define RT1015_ADC1             0x010c
0048 #define RT1015_ADC2             0x010e
0049 #define RT1015_TDM_MASTER           0x0111
0050 #define RT1015_TDM_TCON             0x0112
0051 #define RT1015_TDM1_1               0x0114
0052 #define RT1015_TDM1_2               0x0116
0053 #define RT1015_TDM1_3               0x0118
0054 #define RT1015_TDM1_4               0x011a
0055 #define RT1015_TDM1_5               0x011c
0056 #define RT1015_MIXER1               0x0300
0057 #define RT1015_MIXER2               0x0302
0058 #define RT1015_ANA_PROTECT1         0x0311
0059 #define RT1015_ANA_CTRL_SEQ1            0x0313
0060 #define RT1015_ANA_CTRL_SEQ2            0x0314
0061 #define RT1015_VBAT_DET_DEB         0x031a
0062 #define RT1015_VBAT_VOLT_DET1           0x031c
0063 #define RT1015_VBAT_VOLT_DET2           0x031d
0064 #define RT1015_VBAT_TEST_OUT1           0x031e
0065 #define RT1015_VBAT_TEST_OUT2           0x031f
0066 #define RT1015_VBAT_PROT_ATT            0x0320
0067 #define RT1015_VBAT_DET_CODE            0x0321
0068 #define RT1015_PWR1             0x0322
0069 #define RT1015_PWR4             0x0328
0070 #define RT1015_PWR5             0x0329
0071 #define RT1015_PWR6             0x032a
0072 #define RT1015_PWR7             0x032b
0073 #define RT1015_PWR8             0x032c
0074 #define RT1015_PWR9             0x032d
0075 #define RT1015_CLASSD_SEQ           0x032e
0076 #define RT1015_SMART_BST_CTRL1          0x0330
0077 #define RT1015_SMART_BST_CTRL2          0x0332
0078 #define RT1015_ANA_CTRL1            0x0334
0079 #define RT1015_ANA_CTRL2            0x0336
0080 #define RT1015_PWR_STATE_CTRL           0x0338
0081 #define RT1015_MONO_DYNA_CTRL           0x04fa
0082 #define RT1015_MONO_DYNA_CTRL1          0x04fc
0083 #define RT1015_MONO_DYNA_CTRL2          0x04fe
0084 #define RT1015_MONO_DYNA_CTRL3          0x0500
0085 #define RT1015_MONO_DYNA_CTRL4          0x0502
0086 #define RT1015_MONO_DYNA_CTRL5          0x0504
0087 #define RT1015_SPK_VOL                  0x0506
0088 #define RT1015_SHORT_DETTOP1            0x0508
0089 #define RT1015_SHORT_DETTOP2            0x050a
0090 #define RT1015_SPK_DC_DETECT1           0x0519
0091 #define RT1015_SPK_DC_DETECT2           0x051a
0092 #define RT1015_SPK_DC_DETECT3           0x051b
0093 #define RT1015_SPK_DC_DETECT4           0x051d
0094 #define RT1015_SPK_DC_DETECT5           0x051f
0095 #define RT1015_BAT_RPO_STEP1            0x0536
0096 #define RT1015_BAT_RPO_STEP2            0x0538
0097 #define RT1015_BAT_RPO_STEP3            0x053a
0098 #define RT1015_BAT_RPO_STEP4            0x053c
0099 #define RT1015_BAT_RPO_STEP5            0x053d
0100 #define RT1015_BAT_RPO_STEP6            0x053e
0101 #define RT1015_BAT_RPO_STEP7            0x053f
0102 #define RT1015_BAT_RPO_STEP8            0x0540
0103 #define RT1015_BAT_RPO_STEP9            0x0541
0104 #define RT1015_BAT_RPO_STEP10           0x0542
0105 #define RT1015_BAT_RPO_STEP11           0x0543
0106 #define RT1015_BAT_RPO_STEP12           0x0544
0107 #define RT1015_SPREAD_SPEC1         0x0568
0108 #define RT1015_SPREAD_SPEC2         0x056a
0109 #define RT1015_PAD_STATUS           0x1000
0110 #define RT1015_PADS_PULLING_CTRL1       0x1002
0111 #define RT1015_PADS_DRIVING         0x1006
0112 #define RT1015_SYS_RST1             0x1007
0113 #define RT1015_SYS_RST2             0x1009
0114 #define RT1015_SYS_GATING1          0x100a
0115 #define RT1015_TEST_MODE1           0x100c
0116 #define RT1015_TEST_MODE2           0x100d
0117 #define RT1015_TIMING_CTRL1         0x100e
0118 #define RT1015_PLL_INT              0x1010
0119 #define RT1015_TEST_OUT1            0x1020
0120 #define RT1015_DC_CALIB_CLSD1           0x1200
0121 #define RT1015_DC_CALIB_CLSD2           0x1202
0122 #define RT1015_DC_CALIB_CLSD3           0x1204
0123 #define RT1015_DC_CALIB_CLSD4           0x1206
0124 #define RT1015_DC_CALIB_CLSD5           0x1208
0125 #define RT1015_DC_CALIB_CLSD6           0x120a
0126 #define RT1015_DC_CALIB_CLSD7           0x120c
0127 #define RT1015_DC_CALIB_CLSD8           0x120e
0128 #define RT1015_DC_CALIB_CLSD9           0x1210
0129 #define RT1015_DC_CALIB_CLSD10          0x1212
0130 #define RT1015_CLSD_INTERNAL1           0x1300
0131 #define RT1015_CLSD_INTERNAL2           0x1302
0132 #define RT1015_CLSD_INTERNAL3           0x1304
0133 #define RT1015_CLSD_INTERNAL4           0x1305
0134 #define RT1015_CLSD_INTERNAL5           0x1306
0135 #define RT1015_CLSD_INTERNAL6           0x1308
0136 #define RT1015_CLSD_INTERNAL7           0x130a
0137 #define RT1015_CLSD_INTERNAL8           0x130c
0138 #define RT1015_CLSD_INTERNAL9           0x130e
0139 #define RT1015_CLSD_OCP_CTRL            0x130f
0140 #define RT1015_VREF_LV              0x1310
0141 #define RT1015_MBIAS1               0x1312
0142 #define RT1015_MBIAS2               0x1314
0143 #define RT1015_MBIAS3               0x1316
0144 #define RT1015_MBIAS4               0x1318
0145 #define RT1015_VREF_LV1             0x131a
0146 #define RT1015_S_BST_TIMING_INTER1      0x1322
0147 #define RT1015_S_BST_TIMING_INTER2      0x1323
0148 #define RT1015_S_BST_TIMING_INTER3      0x1324
0149 #define RT1015_S_BST_TIMING_INTER4      0x1325
0150 #define RT1015_S_BST_TIMING_INTER5      0x1326
0151 #define RT1015_S_BST_TIMING_INTER6      0x1327
0152 #define RT1015_S_BST_TIMING_INTER7      0x1328
0153 #define RT1015_S_BST_TIMING_INTER8      0x1329
0154 #define RT1015_S_BST_TIMING_INTER9      0x132a
0155 #define RT1015_S_BST_TIMING_INTER10     0x132b
0156 #define RT1015_S_BST_TIMING_INTER11     0x1330
0157 #define RT1015_S_BST_TIMING_INTER12     0x1331
0158 #define RT1015_S_BST_TIMING_INTER13     0x1332
0159 #define RT1015_S_BST_TIMING_INTER14     0x1333
0160 #define RT1015_S_BST_TIMING_INTER15     0x1334
0161 #define RT1015_S_BST_TIMING_INTER16     0x1335
0162 #define RT1015_S_BST_TIMING_INTER17     0x1336
0163 #define RT1015_S_BST_TIMING_INTER18     0x1337
0164 #define RT1015_S_BST_TIMING_INTER19     0x1338
0165 #define RT1015_S_BST_TIMING_INTER20     0x1339
0166 #define RT1015_S_BST_TIMING_INTER21     0x133a
0167 #define RT1015_S_BST_TIMING_INTER22     0x133b
0168 #define RT1015_S_BST_TIMING_INTER23     0x133c
0169 #define RT1015_S_BST_TIMING_INTER24     0x133d
0170 #define RT1015_S_BST_TIMING_INTER25     0x133e
0171 #define RT1015_S_BST_TIMING_INTER26     0x133f
0172 #define RT1015_S_BST_TIMING_INTER27     0x1340
0173 #define RT1015_S_BST_TIMING_INTER28     0x1341
0174 #define RT1015_S_BST_TIMING_INTER29     0x1342
0175 #define RT1015_S_BST_TIMING_INTER30     0x1343
0176 #define RT1015_S_BST_TIMING_INTER31     0x1344
0177 #define RT1015_S_BST_TIMING_INTER32     0x1345
0178 #define RT1015_S_BST_TIMING_INTER33     0x1346
0179 #define RT1015_S_BST_TIMING_INTER34     0x1347
0180 #define RT1015_S_BST_TIMING_INTER35     0x1348
0181 #define RT1015_S_BST_TIMING_INTER36     0x1349
0182 
0183 /* 0x0004 */
0184 #define RT1015_CLK_SYS_PRE_SEL_MASK     (0x3 << 14)
0185 #define RT1015_CLK_SYS_PRE_SEL_SFT      14
0186 #define RT1015_CLK_SYS_PRE_SEL_MCLK     (0x0 << 14)
0187 #define RT1015_CLK_SYS_PRE_SEL_PLL      (0x2 << 14)
0188 #define RT1015_PLL_SEL_MASK         (0x1 << 13)
0189 #define RT1015_PLL_SEL_SFT          13
0190 #define RT1015_PLL_SEL_PLL_SRC2         (0x0 << 13)
0191 #define RT1015_PLL_SEL_BCLK         (0x1 << 13)
0192 #define RT1015_FS_PD_MASK           (0x7 << 4)
0193 #define RT1015_FS_PD_SFT            4
0194 
0195 /* 0x000a */
0196 #define RT1015_PLL_M_MAX            0xf
0197 #define RT1015_PLL_M_MASK           (RT1015_PLL_M_MAX << 12)
0198 #define RT1015_PLL_M_SFT            12
0199 #define RT1015_PLL_M_BP             (0x1 << 11)
0200 #define RT1015_PLL_M_BP_SFT         11
0201 #define RT1015_PLL_N_MAX            0x1ff
0202 #define RT1015_PLL_N_MASK           (RT1015_PLL_N_MAX << 0)
0203 #define RT1015_PLL_N_SFT            0
0204 
0205 /* 0x000c */
0206 #define RT1015_PLL_BPK_MASK         (0x1 << 5)
0207 #define RT1015_PLL_BPK              (0x0 << 5)
0208 #define RT1015_PLL_K_MAX            0x1f
0209 #define RT1015_PLL_K_MASK           (RT1015_PLL_K_MAX)
0210 #define RT1015_PLL_K_SFT            0
0211 
0212 /* 0x0020 */
0213 #define RT1015_EN_BCLK_DET_MASK         (0x1 << 15)
0214 #define RT1015_EN_BCLK_DET              (0x1 << 15)
0215 #define RT1015_DIS_BCLK_DET             (0x0 << 15)
0216 
0217 /* 0x007a */
0218 #define RT1015_ID_MASK              0xff
0219 #define RT1015_ID_VERA              0x0
0220 #define RT1015_ID_VERB              0x1
0221 
0222 /* 0x00f2 */
0223 #define RT1015_MONO_LR_SEL_MASK         (0x3 << 4)
0224 #define RT1015_MONO_L_CHANNEL           (0x0 << 4)
0225 #define RT1015_MONO_R_CHANNEL           (0x1 << 4)
0226 #define RT1015_MONO_LR_MIX_CHANNEL          (0x2 << 4)
0227 
0228 /* 0x0102 */
0229 #define RT1015_DAC_VOL_MASK         (0x7f << 9)
0230 #define RT1015_DAC_VOL_SFT          9
0231 
0232 /* 0x0104 */
0233 #define RT1015_DAC_CLK              (0x1 << 13)
0234 #define RT1015_DAC_CLK_BIT          13
0235 
0236 /* 0x0106 */
0237 #define RT1015_DAC_MUTE_MASK            (0x1 << 15)
0238 #define RT1015_DA_MUTE_SFT          15
0239 #define RT1015_DVOL_MUTE_FLAG_SFT       12
0240 
0241 /* 0x0111 */
0242 #define RT1015_TCON_TDM_MS_MASK         (0x1 << 14)
0243 #define RT1015_TCON_TDM_MS_SFT          14
0244 #define RT1015_TCON_TDM_MS_S            (0x0 << 14)
0245 #define RT1015_TCON_TDM_MS_M            (0x1 << 14)
0246 #define RT1015_I2S_DL_MASK          (0x7 << 8)
0247 #define RT1015_I2S_DL_SFT           8
0248 #define RT1015_I2S_DL_16            (0x0 << 8)
0249 #define RT1015_I2S_DL_20            (0x1 << 8)
0250 #define RT1015_I2S_DL_24            (0x2 << 8)
0251 #define RT1015_I2S_DL_8             (0x3 << 8)
0252 #define RT1015_I2S_M_DF_MASK            (0x7 << 0)
0253 #define RT1015_I2S_M_DF_SFT         0
0254 #define RT1015_I2S_M_DF_I2S         (0x0)
0255 #define RT1015_I2S_M_DF_LEFT            (0x1)
0256 #define RT1015_I2S_M_DF_PCM_A           (0x2)
0257 #define RT1015_I2S_M_DF_PCM_B           (0x3)
0258 #define RT1015_I2S_M_DF_PCM_A_N         (0x6)
0259 #define RT1015_I2S_M_DF_PCM_B_N         (0x7)
0260 
0261 /* TDM_tcon Setting (0x0112) */
0262 #define RT1015_I2S_TCON_DF_MASK         (0x7 << 13)
0263 #define RT1015_I2S_TCON_DF_SFT          13
0264 #define RT1015_I2S_TCON_DF_I2S          (0x0 << 13)
0265 #define RT1015_I2S_TCON_DF_LEFT         (0x1 << 13)
0266 #define RT1015_I2S_TCON_DF_PCM_A        (0x2 << 13)
0267 #define RT1015_I2S_TCON_DF_PCM_B        (0x3 << 13)
0268 #define RT1015_I2S_TCON_DF_PCM_A_N      (0x6 << 13)
0269 #define RT1015_I2S_TCON_DF_PCM_B_N      (0x7 << 13)
0270 #define RT1015_TCON_BCLK_SEL_MASK       (0x3 << 10)
0271 #define RT1015_TCON_BCLK_SEL_SFT        10
0272 #define RT1015_TCON_BCLK_SEL_32FS       (0x0 << 10)
0273 #define RT1015_TCON_BCLK_SEL_64FS       (0x1 << 10)
0274 #define RT1015_TCON_BCLK_SEL_128FS      (0x2 << 10)
0275 #define RT1015_TCON_BCLK_SEL_256FS      (0x3 << 10)
0276 #define RT1015_TCON_CH_LEN_MASK         (0x3 << 5)
0277 #define RT1015_TCON_CH_LEN_SFT          5
0278 #define RT1015_TCON_CH_LEN_16B          (0x0 << 5)
0279 #define RT1015_TCON_CH_LEN_20B          (0x1 << 5)
0280 #define RT1015_TCON_CH_LEN_24B          (0x2 << 5)
0281 #define RT1015_TCON_CH_LEN_32B          (0x3 << 5)
0282 #define RT1015_TCON_BCLK_MST_MASK           (0x1 << 4)
0283 #define RT1015_TCON_BCLK_MST_SFT            4
0284 #define RT1015_TCON_BCLK_MST_INV        (0x1 << 4)
0285 
0286 /* TDM1 Setting-1 (0x0114) */
0287 #define RT1015_TDM_INV_BCLK_MASK        (0x1 << 15)
0288 #define RT1015_TDM_INV_BCLK_SFT         15
0289 #define RT1015_TDM_INV_BCLK         (0x1 << 15)
0290 #define RT1015_I2S_CH_TX_MASK           (0x3 << 10)
0291 #define RT1015_I2S_CH_TX_SFT            10
0292 #define RT1015_I2S_TX_2CH           (0x0 << 10)
0293 #define RT1015_I2S_TX_4CH           (0x1 << 10)
0294 #define RT1015_I2S_TX_6CH           (0x2 << 10)
0295 #define RT1015_I2S_TX_8CH           (0x3 << 10)
0296 #define RT1015_I2S_CH_RX_MASK           (0x3 << 8)
0297 #define RT1015_I2S_CH_RX_SFT            8
0298 #define RT1015_I2S_RX_2CH           (0x0 << 8)
0299 #define RT1015_I2S_RX_4CH           (0x1 << 8)
0300 #define RT1015_I2S_RX_6CH           (0x2 << 8)
0301 #define RT1015_I2S_RX_8CH           (0x3 << 8)
0302 #define RT1015_I2S_LR_CH_SEL_MASK           (0x1 << 7)
0303 #define RT1015_I2S_LR_CH_SEL_SFT            7
0304 #define RT1015_I2S_LEFT_CH_SEL          (0x0 << 7)
0305 #define RT1015_I2S_RIGHT_CH_SEL         (0x1 << 7)
0306 #define RT1015_I2S_CH_TX_LEN_MASK           (0x7 << 4)
0307 #define RT1015_I2S_CH_TX_LEN_SFT            4
0308 #define RT1015_I2S_CH_TX_LEN_16B            (0x0 << 4)
0309 #define RT1015_I2S_CH_TX_LEN_20B            (0x1 << 4)
0310 #define RT1015_I2S_CH_TX_LEN_24B            (0x2 << 4)
0311 #define RT1015_I2S_CH_TX_LEN_32B            (0x3 << 4)
0312 #define RT1015_I2S_CH_TX_LEN_8B         (0x4 << 4)
0313 #define RT1015_I2S_CH_RX_LEN_MASK           (0x7 << 0)
0314 #define RT1015_I2S_CH_RX_LEN_SFT            0
0315 #define RT1015_I2S_CH_RX_LEN_16B            (0x0 << 0)
0316 #define RT1015_I2S_CH_RX_LEN_20B            (0x1 << 0)
0317 #define RT1015_I2S_CH_RX_LEN_24B            (0x2 << 0)
0318 #define RT1015_I2S_CH_RX_LEN_32B            (0x3 << 0)
0319 #define RT1015_I2S_CH_RX_LEN_8B         (0x4 << 0)
0320 
0321 /* TDM1 Setting-4 (0x011a) */
0322 #define RT1015_TDM_I2S_TX_L_DAC1_1_MASK         (0x7 << 12)
0323 #define RT1015_TDM_I2S_TX_R_DAC1_1_MASK         (0x7 << 8)
0324 #define RT1015_TDM_I2S_TX_L_DAC1_1_SFT 12
0325 #define RT1015_TDM_I2S_TX_R_DAC1_1_SFT 8
0326 
0327 /* 0x0330 */
0328 #define RT1015_ABST_AUTO_EN_MASK        (0x1 << 13)
0329 #define RT1015_ABST_AUTO_MODE           (0x1 << 13)
0330 #define RT1015_ABST_REG_MODE            (0x0 << 13)
0331 #define RT1015_ABST_FIX_TGT_MASK        (0x1 << 12)
0332 #define RT1015_ABST_FIX_TGT_EN          (0x1 << 12)
0333 #define RT1015_ABST_FIX_TGT_DIS         (0x0 << 12)
0334 #define RT1015_BYPASS_SWR_REG_MASK      (0x1 << 7)
0335 #define RT1015_BYPASS_SWRREG_BYPASS     (0x1 << 7)
0336 #define RT1015_BYPASS_SWRREG_PASS       (0x0 << 7)
0337 
0338 /* 0x0322 */
0339 #define RT1015_PWR_LDO2             (0x1 << 15)
0340 #define RT1015_PWR_LDO2_BIT         15
0341 #define RT1015_PWR_DAC              (0x1 << 14)
0342 #define RT1015_PWR_DAC_BIT          14
0343 #define RT1015_PWR_INTCLK           (0x1 << 13)
0344 #define RT1015_PWR_INTCLK_BIT           13
0345 #define RT1015_PWR_ISENSE           (0x1 << 12)
0346 #define RT1015_PWR_ISENSE_BIT           12
0347 #define RT1015_PWR_VSENSE           (0x1 << 10)
0348 #define RT1015_PWR_VSENSE_BIT           10
0349 #define RT1015_PWR_PLL              (0x1 << 9)
0350 #define RT1015_PWR_PLL_BIT          9
0351 #define RT1015_PWR_BG_1_2           (0x1 << 8)
0352 #define RT1015_PWR_BG_1_2_BIT           8
0353 #define RT1015_PWR_MBIAS_BG         (0x1 << 7)
0354 #define RT1015_PWR_MBIAS_BG_BIT         7
0355 #define RT1015_PWR_VBAT             (0x1 << 6)
0356 #define RT1015_PWR_VBAT_BIT         6
0357 #define RT1015_PWR_MBIAS            (0x1 << 4)
0358 #define RT1015_PWR_MBIAS_BIT            4
0359 #define RT1015_PWR_ADCV             (0x1 << 3)
0360 #define RT1015_PWR_ADCV_BIT         3
0361 #define RT1015_PWR_MIXERV           (0x1 << 2)
0362 #define RT1015_PWR_MIXERV_BIT           2
0363 #define RT1015_PWR_SUMV             (0x1 << 1)
0364 #define RT1015_PWR_SUMV_BIT         1
0365 #define RT1015_PWR_VREFLV           (0x1 << 0)
0366 #define RT1015_PWR_VREFLV_BIT           0
0367 
0368 /* 0x0324 */
0369 #define RT1015_PWR_BASIC            (0x1 << 15)
0370 #define RT1015_PWR_BASIC_BIT            15
0371 #define RT1015_PWR_SD               (0x1 << 14)
0372 #define RT1015_PWR_SD_BIT           14
0373 #define RT1015_PWR_IBIAS            (0x1 << 13)
0374 #define RT1015_PWR_IBIAS_BIT            13
0375 #define RT1015_PWR_VCM              (0x1 << 11)
0376 #define RT1015_PWR_VCM_BIT          11
0377 
0378 /* 0x0328 */
0379 #define RT1015_PWR_SWR              (0x1 << 12)
0380 #define RT1015_PWR_SWR_BIT          12
0381 
0382 /* 0x0519 */
0383 #define RT1015_EN_CLA_D_DC_DET_MASK (0x1 << 12)
0384 #define RT1015_EN_CLA_D_DC_DET      (0x1 << 12)
0385 #define RT1015_DIS_CLA_D_DC_DET     (0x0 << 12)
0386 
0387 /* 0x1300 */
0388 #define RT1015_PWR_CLSD             (0x1 << 12)
0389 #define RT1015_PWR_CLSD_BIT         12
0390 
0391 /* 0x007a */
0392 #define RT1015_ID_MASK              0xff
0393 #define RT1015_ID_VERA              0x0
0394 #define RT1015_ID_VERB              0x1
0395 
0396 /* System Clock Source */
0397 enum {
0398     RT1015_SCLK_S_MCLK,
0399     RT1015_SCLK_S_PLL,
0400 };
0401 
0402 /* PLL1 Source */
0403 enum {
0404     RT1015_PLL_S_MCLK,
0405     RT1015_PLL_S_BCLK,
0406 };
0407 
0408 enum {
0409     RT1015_AIF1,
0410     RT1015_AIFS,
0411 };
0412 
0413 enum {
0414     RT1015_VERA,
0415     RT1015_VERB,
0416 };
0417 
0418 enum {
0419     BYPASS,
0420     ADAPTIVE,
0421     FIXED_ADAPTIVE,
0422 };
0423 
0424 enum {
0425     RT1015_Enable_Boost = 0,
0426     RT1015_Bypass_Boost,
0427 };
0428 
0429 enum {
0430     RT1015_HW_28 = 0,
0431     RT1015_HW_29,
0432 };
0433 
0434 struct rt1015_priv {
0435     struct snd_soc_component *component;
0436     struct rt1015_platform_data pdata;
0437     struct regmap *regmap;
0438     int sysclk;
0439     int sysclk_src;
0440     int pll_src;
0441     int pll_in;
0442     int pll_out;
0443     int boost_mode;
0444     int bypass_boost;
0445     int dac_is_used;
0446     int cali_done;
0447 };
0448 
0449 #endif /* __RT1015_H__ */