xref: /linux/sound/soc/codecs/tas571x.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
23fd6e7d9SKevin Cernekee /*
33fd6e7d9SKevin Cernekee  * TAS571x amplifier audio driver
43fd6e7d9SKevin Cernekee  *
53fd6e7d9SKevin Cernekee  * Copyright (C) 2015 Google, Inc.
63fd6e7d9SKevin Cernekee  */
73fd6e7d9SKevin Cernekee 
83fd6e7d9SKevin Cernekee #ifndef _TAS571X_H
93fd6e7d9SKevin Cernekee #define _TAS571X_H
103fd6e7d9SKevin Cernekee 
113fd6e7d9SKevin Cernekee /* device registers */
12a593ed09SPetr Kulhavy #define TAS571X_CLK_CTRL_REG		0x00
13a593ed09SPetr Kulhavy #define TAS571X_DEV_ID_REG		0x01
14a593ed09SPetr Kulhavy #define TAS571X_ERR_STATUS_REG		0x02
15a593ed09SPetr Kulhavy #define TAS571X_SYS_CTRL_1_REG		0x03
163fd6e7d9SKevin Cernekee #define TAS571X_SDI_REG			0x04
173fd6e7d9SKevin Cernekee #define TAS571X_SDI_FMT_MASK		0x0f
183fd6e7d9SKevin Cernekee 
193fd6e7d9SKevin Cernekee #define TAS571X_SYS_CTRL_2_REG		0x05
203fd6e7d9SKevin Cernekee #define TAS571X_SYS_CTRL_2_SDN_MASK	0x40
213fd6e7d9SKevin Cernekee 
223fd6e7d9SKevin Cernekee #define TAS571X_SOFT_MUTE_REG		0x06
233fd6e7d9SKevin Cernekee #define TAS571X_SOFT_MUTE_CH1_SHIFT	0
243fd6e7d9SKevin Cernekee #define TAS571X_SOFT_MUTE_CH2_SHIFT	1
253fd6e7d9SKevin Cernekee #define TAS571X_SOFT_MUTE_CH3_SHIFT	2
263fd6e7d9SKevin Cernekee 
273fd6e7d9SKevin Cernekee #define TAS571X_MVOL_REG		0x07
283fd6e7d9SKevin Cernekee #define TAS571X_CH1_VOL_REG		0x08
293fd6e7d9SKevin Cernekee #define TAS571X_CH2_VOL_REG		0x09
30a593ed09SPetr Kulhavy #define TAS571X_CH3_VOL_REG		0x0a
31a593ed09SPetr Kulhavy #define TAS571X_VOL_CFG_REG		0x0e
32a593ed09SPetr Kulhavy #define TAS571X_MODULATION_LIMIT_REG	0x10
33a593ed09SPetr Kulhavy #define TAS571X_IC_DELAY_CH1_REG	0x11
34a593ed09SPetr Kulhavy #define TAS571X_IC_DELAY_CH2_REG	0x12
35a593ed09SPetr Kulhavy #define TAS571X_IC_DELAY_CH3_REG	0x13
36a593ed09SPetr Kulhavy #define TAS571X_IC_DELAY_CH4_REG	0x14
373fd6e7d9SKevin Cernekee 
38a593ed09SPetr Kulhavy #define TAS571X_PWM_CH_SDN_GROUP_REG	0x19	/* N/A on TAS5717, TAS5719 */
39a593ed09SPetr Kulhavy #define TAS571X_PWM_CH1_SDN_MASK	(1<<0)
40a593ed09SPetr Kulhavy #define TAS571X_PWM_CH2_SDN_SHIFT	(1<<1)
41a593ed09SPetr Kulhavy #define TAS571X_PWM_CH3_SDN_SHIFT	(1<<2)
42a593ed09SPetr Kulhavy #define TAS571X_PWM_CH4_SDN_SHIFT	(1<<3)
43a593ed09SPetr Kulhavy 
44a593ed09SPetr Kulhavy #define TAS571X_START_STOP_PERIOD_REG	0x1a
453fd6e7d9SKevin Cernekee #define TAS571X_OSC_TRIM_REG		0x1b
46a593ed09SPetr Kulhavy #define TAS571X_BKND_ERR_REG		0x1c
47a593ed09SPetr Kulhavy #define TAS571X_INPUT_MUX_REG		0x20
48a593ed09SPetr Kulhavy #define TAS571X_CH4_SRC_SELECT_REG	0x21
49a593ed09SPetr Kulhavy #define TAS571X_PWM_MUX_REG		0x25
503fd6e7d9SKevin Cernekee 
51dca3fed8SPetr Kulhavy /* 20-byte biquad registers */
52f516d322SJerome Brunet #define TAS5707_CH1_BQ0_REG		0x29
53f516d322SJerome Brunet #define TAS5707_CH1_BQ1_REG		0x2a
54f516d322SJerome Brunet #define TAS5707_CH1_BQ2_REG		0x2b
55f516d322SJerome Brunet #define TAS5707_CH1_BQ3_REG		0x2c
56f516d322SJerome Brunet #define TAS5707_CH1_BQ4_REG		0x2d
57f516d322SJerome Brunet #define TAS5707_CH1_BQ5_REG		0x2e
58f516d322SJerome Brunet #define TAS5707_CH1_BQ6_REG		0x2f
59f516d322SJerome Brunet 
60f516d322SJerome Brunet #define TAS5707_CH2_BQ0_REG		0x30
61f516d322SJerome Brunet #define TAS5707_CH2_BQ1_REG		0x31
62f516d322SJerome Brunet #define TAS5707_CH2_BQ2_REG		0x32
63f516d322SJerome Brunet #define TAS5707_CH2_BQ3_REG		0x33
64f516d322SJerome Brunet #define TAS5707_CH2_BQ4_REG		0x34
65f516d322SJerome Brunet #define TAS5707_CH2_BQ5_REG		0x35
66f516d322SJerome Brunet #define TAS5707_CH2_BQ6_REG		0x36
67f516d322SJerome Brunet 
68dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ0_REG		0x26
69dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ1_REG		0x27
70dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ2_REG		0x28
71dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ3_REG		0x29
72dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ4_REG		0x2a
73dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ5_REG		0x2b
74dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ6_REG		0x2c
75dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ7_REG		0x2d
76dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ8_REG		0x2e
77dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ9_REG		0x2f
78dca3fed8SPetr Kulhavy 
79dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ0_REG		0x30
80dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ1_REG		0x31
81dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ2_REG		0x32
82dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ3_REG		0x33
83dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ4_REG		0x34
84dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ5_REG		0x35
85dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ6_REG		0x36
86dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ7_REG		0x37
87dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ8_REG		0x38
88dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ9_REG		0x39
89dca3fed8SPetr Kulhavy 
90dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ10_REG		0x58
91dca3fed8SPetr Kulhavy #define TAS5717_CH1_BQ11_REG		0x59
92dca3fed8SPetr Kulhavy 
93dca3fed8SPetr Kulhavy #define TAS5717_CH4_BQ0_REG		0x5a
94dca3fed8SPetr Kulhavy #define TAS5717_CH4_BQ1_REG		0x5b
95dca3fed8SPetr Kulhavy 
96dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ10_REG		0x5c
97dca3fed8SPetr Kulhavy #define TAS5717_CH2_BQ11_REG		0x5d
98dca3fed8SPetr Kulhavy 
99dca3fed8SPetr Kulhavy #define TAS5717_CH3_BQ0_REG		0x5e
100dca3fed8SPetr Kulhavy #define TAS5717_CH3_BQ1_REG		0x5f
101dca3fed8SPetr Kulhavy 
102f7d3d2d8SPetr Kulhavy #define TAS5717_CH1_RIGHT_CH_MIX_REG	0x72
103f7d3d2d8SPetr Kulhavy #define TAS5717_CH1_LEFT_CH_MIX_REG	0x73
104f7d3d2d8SPetr Kulhavy #define TAS5717_CH2_LEFT_CH_MIX_REG	0x76
105f7d3d2d8SPetr Kulhavy #define TAS5717_CH2_RIGHT_CH_MIX_REG	0x77
106f7d3d2d8SPetr Kulhavy 
1073fd6e7d9SKevin Cernekee #endif /* _TAS571X_H */
108