1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * rt715-sdca-sdw.h -- RT715 ALSA SoC audio driver header
5 * Copyright(c) 2020 Realtek Semiconductor Corp.
8 #ifndef __RT715_SDW_SDCA_H__
9 #define __RT715_SDW_SDCA_H__
11 #include <linux/soundwire/sdw_registers.h>
13 static const struct reg_default rt715_reg_defaults_sdca
[] = {
79 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_CX_CLK_SEL_EN
,
80 RT715_SDCA_CX_CLK_SEL_CTRL
, CH_00
), 0x1 },
81 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
82 RT715_SDCA_FU_MUTE_CTRL
, CH_01
), 0x01 },
83 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
84 RT715_SDCA_FU_MUTE_CTRL
, CH_02
), 0x01 },
85 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
86 RT715_SDCA_FU_MUTE_CTRL
, CH_03
), 0x01 },
87 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
88 RT715_SDCA_FU_MUTE_CTRL
, CH_04
), 0x01 },
89 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
90 RT715_SDCA_FU_MUTE_CTRL
, CH_01
), 0x01 },
91 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
92 RT715_SDCA_FU_MUTE_CTRL
, CH_02
), 0x01 },
93 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
94 RT715_SDCA_FU_MUTE_CTRL
, CH_03
), 0x01 },
95 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
96 RT715_SDCA_FU_MUTE_CTRL
, CH_04
), 0x01 },
97 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
98 RT715_SDCA_FU_MUTE_CTRL
, CH_01
), 0x01 },
99 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
100 RT715_SDCA_FU_MUTE_CTRL
, CH_02
), 0x01 },
101 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_SMPU_TRIG_ST_EN
,
102 RT715_SDCA_SMPU_TRIG_EN_CTRL
, CH_00
), 0x02 },
103 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_SMPU_TRIG_ST_EN
,
104 RT715_SDCA_SMPU_TRIG_ST_CTRL
, CH_00
), 0x00 },
105 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
106 RT715_SDCA_FU_MUTE_CTRL
, CH_01
), 0x01 },
107 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
108 RT715_SDCA_FU_MUTE_CTRL
, CH_02
), 0x01 },
111 static const struct reg_default rt715_mbq_reg_defaults_sdca
[] = {
112 { 0x200002b, 0x0420 },
113 { 0x2000036, 0x0000 },
114 { 0x2000037, 0x0000 },
115 { 0x2000039, 0xaa81 },
116 { 0x2000044, 0x0202 },
117 { 0x6100000, 0x0100 },
118 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
119 RT715_SDCA_FU_VOL_CTRL
, CH_01
), 0x00 },
120 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
121 RT715_SDCA_FU_VOL_CTRL
, CH_02
), 0x00 },
122 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
123 RT715_SDCA_FU_VOL_CTRL
, CH_03
), 0x00 },
124 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC8_9_VOL
,
125 RT715_SDCA_FU_VOL_CTRL
, CH_04
), 0x00 },
126 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
127 RT715_SDCA_FU_VOL_CTRL
, CH_01
), 0x00 },
128 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
129 RT715_SDCA_FU_VOL_CTRL
, CH_02
), 0x00 },
130 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
131 RT715_SDCA_FU_VOL_CTRL
, CH_03
), 0x00 },
132 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC10_11_VOL
,
133 RT715_SDCA_FU_VOL_CTRL
, CH_04
), 0x00 },
134 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
135 RT715_SDCA_FU_VOL_CTRL
, CH_01
), 0x00 },
136 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_ADC7_27_VOL
,
137 RT715_SDCA_FU_VOL_CTRL
, CH_02
), 0x00 },
138 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
139 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_01
), 0x00 },
140 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
141 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_02
), 0x00 },
142 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
143 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_03
), 0x00 },
144 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
145 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_04
), 0x00 },
146 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
147 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_05
), 0x00 },
148 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
149 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_06
), 0x00 },
150 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
151 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_07
), 0x00 },
152 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_AMIC_GAIN_EN
,
153 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_08
), 0x00 },
154 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
155 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_01
), 0x00 },
156 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
157 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_02
), 0x00 },
158 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
159 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_03
), 0x00 },
160 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
161 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_04
), 0x00 },
162 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
163 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_05
), 0x00 },
164 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
165 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_06
), 0x00 },
166 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
167 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_07
), 0x00 },
168 { SDW_SDCA_CTL(FUN_MIC_ARRAY
, RT715_SDCA_FU_DMIC_GAIN_EN
,
169 RT715_SDCA_FU_DMIC_GAIN_CTRL
, CH_08
), 0x00 },
171 #endif /* __RT715_SDW_SDCA_H__ */