forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/codecs/tlv320aic32x4.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * tlv320aic32x4.h
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96
....@@ -16,6 +13,7 @@
1613 extern const struct regmap_config aic32x4_regmap_config;
1714 int aic32x4_probe(struct device *dev, struct regmap *regmap);
1815 int aic32x4_remove(struct device *dev);
16
+int aic32x4_register_clocks(struct device *dev, const char *mclk_name);
1917
2018 /* tlv320aic32x4 register space (in decimal to match datasheet) */
2119
....@@ -77,6 +75,8 @@
7775
7876 #define AIC32X4_PWRCFG AIC32X4_REG(1, 1)
7977 #define AIC32X4_LDOCTL AIC32X4_REG(1, 2)
78
+#define AIC32X4_LPLAYBACK AIC32X4_REG(1, 3)
79
+#define AIC32X4_RPLAYBACK AIC32X4_REG(1, 4)
8080 #define AIC32X4_OUTPWRCTL AIC32X4_REG(1, 9)
8181 #define AIC32X4_CMMODE AIC32X4_REG(1, 10)
8282 #define AIC32X4_HPLROUTE AIC32X4_REG(1, 12)
....@@ -96,6 +96,7 @@
9696 #define AIC32X4_FLOATINGINPUT AIC32X4_REG(1, 58)
9797 #define AIC32X4_LMICPGAVOL AIC32X4_REG(1, 59)
9898 #define AIC32X4_RMICPGAVOL AIC32X4_REG(1, 60)
99
+#define AIC32X4_REFPOWERUP AIC32X4_REG(1, 123)
99100
100101 /* Bits, masks, and shifts */
101102
....@@ -195,6 +196,7 @@
195196 /* AIC32X4_MICBIAS */
196197 #define AIC32X4_MICBIAS_LDOIN BIT(3)
197198 #define AIC32X4_MICBIAS_2075V 0x60
199
+#define AIC32x4_MICBIAS_MASK GENMASK(6, 3)
198200
199201 /* AIC32X4_LMICPGANIN */
200202 #define AIC32X4_LMICPGANIN_IN2R_10K 0x10
....@@ -204,4 +206,20 @@
204206 #define AIC32X4_RMICPGANIN_IN1L_10K 0x10
205207 #define AIC32X4_RMICPGANIN_CM1R_10K 0x40
206208
209
+/* AIC32X4_REFPOWERUP */
210
+#define AIC32X4_REFPOWERUP_SLOW 0x04
211
+#define AIC32X4_REFPOWERUP_40MS 0x05
212
+#define AIC32X4_REFPOWERUP_80MS 0x06
213
+#define AIC32X4_REFPOWERUP_120MS 0x07
214
+
215
+/* Common mask and enable for all of the dividers */
216
+#define AIC32X4_DIVEN BIT(7)
217
+#define AIC32X4_DIV_MASK GENMASK(6, 0)
218
+
219
+/* Clock Limits */
220
+#define AIC32X4_MAX_DOSR_FREQ 6200000
221
+#define AIC32X4_MIN_DOSR_FREQ 2800000
222
+#define AIC32X4_MAX_CODEC_CLKIN_FREQ 110000000
223
+#define AIC32X4_MAX_PLL_CLKIN 20000000
224
+
207225 #endif /* _TLV320AIC32X4_H */