Skip to content

Commit c704f4e

Browse files
committed
Merge remote-tracking branches 'asoc/topic/max98504', 'asoc/topic/max9867', 'asoc/topic/max9877', 'asoc/topic/mtk' and 'asoc/topic/nau8825' into asoc-next
6 parents abc026f + 51ded0f + 0ac4aeb + 49220e9 + 97e1145 + 308e3e0 commit c704f4e

36 files changed

+6168
-751
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Maxim MAX98504 class D mono speaker amplifier
2+
3+
This device supports I2C control interface and an IRQ output signal. It features
4+
a PCM and PDM digital audio interface (DAI) and a differential analog input.
5+
6+
Required properties:
7+
8+
- compatible : "maxim,max98504"
9+
- reg : should contain the I2C slave device address
10+
- DVDD-supply, DIOVDD-supply, PVDD-supply: power supplies for the device,
11+
as covered in ../regulator/regulator.txt
12+
- interrupts : should specify the interrupt line the device is connected to,
13+
as described in ../interrupt-controller/interrupts.txt
14+
15+
Optional properties:
16+
17+
- maxim,brownout-threshold - the PVDD brownout threshold, the value must be
18+
from 0, 1...21 range, corresponding to 2.6V, 2.65V...3.65V voltage range
19+
- maxim,brownout-attenuation - the brownout attenuation to the speaker gain
20+
applied during the "attack hold" and "timed hold" phase, the value must be
21+
from 0...6 (dB) range
22+
- maxim,brownout-attack-hold-ms - the brownout attack hold phase time in ms,
23+
0...255 (VBATBROWN_ATTK_HOLD, register 0x0018)
24+
- maxim,brownout-timed-hold-ms - the brownout timed hold phase time in ms,
25+
0...255 (VBATBROWN_TIME_HOLD, register 0x0019)
26+
- maxim,brownout-release-rate-ms - the brownout release phase step time in ms,
27+
0...255 (VBATBROWN_RELEASE, register 0x001A)
28+
29+
The default value when the above properties are not specified is 0,
30+
the maxim,brownout-threshold property must be specified to actually enable
31+
the PVDD brownout protection.
32+
33+
Example:
34+
35+
max98504@31 {
36+
compatible = "maxim,max98504";
37+
reg = <0x31>;
38+
interrupt-parent = <&gpio_bank_0>;
39+
interrupts = <2 0>;
40+
41+
DVDD-supply = <&regulator>;
42+
DIOVDD-supply = <&regulator>;
43+
PVDD-supply = <&regulator>;
44+
};
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
Mediatek AFE PCM controller for mt2701
2+
3+
Required properties:
4+
- compatible = "mediatek,mt2701-audio";
5+
- reg: register location and size
6+
- interrupts: Should contain AFE interrupt
7+
- clock-names: should have these clock names:
8+
"infra_sys_audio_clk",
9+
"top_audio_mux1_sel",
10+
"top_audio_mux2_sel",
11+
"top_audio_mux1_div",
12+
"top_audio_mux2_div",
13+
"top_audio_48k_timing",
14+
"top_audio_44k_timing",
15+
"top_audpll_mux_sel",
16+
"top_apll_sel",
17+
"top_aud1_pll_98M",
18+
"top_aud2_pll_90M",
19+
"top_hadds2_pll_98M",
20+
"top_hadds2_pll_294M",
21+
"top_audpll",
22+
"top_audpll_d4",
23+
"top_audpll_d8",
24+
"top_audpll_d16",
25+
"top_audpll_d24",
26+
"top_audintbus_sel",
27+
"clk_26m",
28+
"top_syspll1_d4",
29+
"top_aud_k1_src_sel",
30+
"top_aud_k2_src_sel",
31+
"top_aud_k3_src_sel",
32+
"top_aud_k4_src_sel",
33+
"top_aud_k5_src_sel",
34+
"top_aud_k6_src_sel",
35+
"top_aud_k1_src_div",
36+
"top_aud_k2_src_div",
37+
"top_aud_k3_src_div",
38+
"top_aud_k4_src_div",
39+
"top_aud_k5_src_div",
40+
"top_aud_k6_src_div",
41+
"top_aud_i2s1_mclk",
42+
"top_aud_i2s2_mclk",
43+
"top_aud_i2s3_mclk",
44+
"top_aud_i2s4_mclk",
45+
"top_aud_i2s5_mclk",
46+
"top_aud_i2s6_mclk",
47+
"top_asm_m_sel",
48+
"top_asm_h_sel",
49+
"top_univpll2_d4",
50+
"top_univpll2_d2",
51+
"top_syspll_d5";
52+
53+
Example:
54+
55+
afe: mt2701-afe-pcm@11220000 {
56+
compatible = "mediatek,mt2701-audio";
57+
reg = <0 0x11220000 0 0x2000>,
58+
<0 0x112A0000 0 0x20000>;
59+
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
60+
<GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
61+
clocks = <&infracfg CLK_INFRA_AUDIO>,
62+
<&topckgen CLK_TOP_AUD_MUX1_SEL>,
63+
<&topckgen CLK_TOP_AUD_MUX2_SEL>,
64+
<&topckgen CLK_TOP_AUD_MUX1_DIV>,
65+
<&topckgen CLK_TOP_AUD_MUX2_DIV>,
66+
<&topckgen CLK_TOP_AUD_48K_TIMING>,
67+
<&topckgen CLK_TOP_AUD_44K_TIMING>,
68+
<&topckgen CLK_TOP_AUDPLL_MUX_SEL>,
69+
<&topckgen CLK_TOP_APLL_SEL>,
70+
<&topckgen CLK_TOP_AUD1PLL_98M>,
71+
<&topckgen CLK_TOP_AUD2PLL_90M>,
72+
<&topckgen CLK_TOP_HADDS2PLL_98M>,
73+
<&topckgen CLK_TOP_HADDS2PLL_294M>,
74+
<&topckgen CLK_TOP_AUDPLL>,
75+
<&topckgen CLK_TOP_AUDPLL_D4>,
76+
<&topckgen CLK_TOP_AUDPLL_D8>,
77+
<&topckgen CLK_TOP_AUDPLL_D16>,
78+
<&topckgen CLK_TOP_AUDPLL_D24>,
79+
<&topckgen CLK_TOP_AUDINTBUS_SEL>,
80+
<&clk26m>,
81+
<&topckgen CLK_TOP_SYSPLL1_D4>,
82+
<&topckgen CLK_TOP_AUD_K1_SRC_SEL>,
83+
<&topckgen CLK_TOP_AUD_K2_SRC_SEL>,
84+
<&topckgen CLK_TOP_AUD_K3_SRC_SEL>,
85+
<&topckgen CLK_TOP_AUD_K4_SRC_SEL>,
86+
<&topckgen CLK_TOP_AUD_K5_SRC_SEL>,
87+
<&topckgen CLK_TOP_AUD_K6_SRC_SEL>,
88+
<&topckgen CLK_TOP_AUD_K1_SRC_DIV>,
89+
<&topckgen CLK_TOP_AUD_K2_SRC_DIV>,
90+
<&topckgen CLK_TOP_AUD_K3_SRC_DIV>,
91+
<&topckgen CLK_TOP_AUD_K4_SRC_DIV>,
92+
<&topckgen CLK_TOP_AUD_K5_SRC_DIV>,
93+
<&topckgen CLK_TOP_AUD_K6_SRC_DIV>,
94+
<&topckgen CLK_TOP_AUD_I2S1_MCLK>,
95+
<&topckgen CLK_TOP_AUD_I2S2_MCLK>,
96+
<&topckgen CLK_TOP_AUD_I2S3_MCLK>,
97+
<&topckgen CLK_TOP_AUD_I2S4_MCLK>,
98+
<&topckgen CLK_TOP_AUD_I2S5_MCLK>,
99+
<&topckgen CLK_TOP_AUD_I2S6_MCLK>,
100+
<&topckgen CLK_TOP_ASM_M_SEL>,
101+
<&topckgen CLK_TOP_ASM_H_SEL>,
102+
<&topckgen CLK_TOP_UNIVPLL2_D4>,
103+
<&topckgen CLK_TOP_UNIVPLL2_D2>,
104+
<&topckgen CLK_TOP_SYSPLL_D5>;
105+
106+
clock-names = "infra_sys_audio_clk",
107+
"top_audio_mux1_sel",
108+
"top_audio_mux2_sel",
109+
"top_audio_mux1_div",
110+
"top_audio_mux2_div",
111+
"top_audio_48k_timing",
112+
"top_audio_44k_timing",
113+
"top_audpll_mux_sel",
114+
"top_apll_sel",
115+
"top_aud1_pll_98M",
116+
"top_aud2_pll_90M",
117+
"top_hadds2_pll_98M",
118+
"top_hadds2_pll_294M",
119+
"top_audpll",
120+
"top_audpll_d4",
121+
"top_audpll_d8",
122+
"top_audpll_d16",
123+
"top_audpll_d24",
124+
"top_audintbus_sel",
125+
"clk_26m",
126+
"top_syspll1_d4",
127+
"top_aud_k1_src_sel",
128+
"top_aud_k2_src_sel",
129+
"top_aud_k3_src_sel",
130+
"top_aud_k4_src_sel",
131+
"top_aud_k5_src_sel",
132+
"top_aud_k6_src_sel",
133+
"top_aud_k1_src_div",
134+
"top_aud_k2_src_div",
135+
"top_aud_k3_src_div",
136+
"top_aud_k4_src_div",
137+
"top_aud_k5_src_div",
138+
"top_aud_k6_src_div",
139+
"top_aud_i2s1_mclk",
140+
"top_aud_i2s2_mclk",
141+
"top_aud_i2s3_mclk",
142+
"top_aud_i2s4_mclk",
143+
"top_aud_i2s5_mclk",
144+
"top_aud_i2s6_mclk",
145+
"top_asm_m_sel",
146+
"top_asm_h_sel",
147+
"top_univpll2_d4",
148+
"top_univpll2_d2",
149+
"top_syspll_d5";
150+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
MT2701 with CS42448 CODEC
2+
3+
Required properties:
4+
- compatible: "mediatek,mt2701-cs42448-machine"
5+
- mediatek,platform: the phandle of MT2701 ASoC platform
6+
- audio-routing: a list of the connections between audio
7+
- mediatek,audio-codec: the phandles of cs42448 codec
8+
- mediatek,audio-codec-bt-mrg the phandles of bt-sco dummy codec
9+
- pinctrl-names: Should contain only one value - "default"
10+
- pinctrl-0: Should specify pin control groups used for this controller.
11+
- i2s1-in-sel-gpio1, i2s1-in-sel-gpio2: Should specify two gpio pins to
12+
control I2S1-in mux.
13+
14+
Example:
15+
16+
sound:sound {
17+
compatible = "mediatek,mt2701-cs42448-machine";
18+
mediatek,platform = <&afe>;
19+
/* CS42448 Machine name */
20+
audio-routing =
21+
"Line Out Jack", "AOUT1L",
22+
"Line Out Jack", "AOUT1R",
23+
"Line Out Jack", "AOUT2L",
24+
"Line Out Jack", "AOUT2R",
25+
"Line Out Jack", "AOUT3L",
26+
"Line Out Jack", "AOUT3R",
27+
"Line Out Jack", "AOUT4L",
28+
"Line Out Jack", "AOUT4R",
29+
"AIN1L", "AMIC",
30+
"AIN1R", "AMIC",
31+
"AIN2L", "Tuner In",
32+
"AIN2R", "Tuner In",
33+
"AIN3L", "Satellite Tuner In",
34+
"AIN3R", "Satellite Tuner In",
35+
"AIN3L", "AUX In",
36+
"AIN3R", "AUX In";
37+
mediatek,audio-codec = <&cs42448>;
38+
mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
39+
pinctrl-names = "default";
40+
pinctrl-0 = <&aud_pins_default>;
41+
i2s1-in-sel-gpio1 = <&pio 53 0>;
42+
i2s1-in-sel-gpio2 = <&pio 54 0>;
43+
};

Documentation/devicetree/bindings/sound/mt8173-rt5650.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
MT8173 with RT5650 CODECS
1+
MT8173 with RT5650 CODECS and HDMI via I2S
22

33
Required properties:
44
- compatible : "mediatek,mt8173-rt5650"
55
- mediatek,audio-codec: the phandles of rt5650 codecs
6+
and of the hdmi encoder node
67
- mediatek,platform: the phandle of MT8173 ASoC platform
78

89
Optional subnodes:
@@ -12,12 +13,17 @@ Required codec-capture subnode properties:
1213
<&rt5650 0> : Default setting. Connect rt5650 I2S1 for capture. (dai_name = rt5645-aif1)
1314
<&rt5650 1> : Connect rt5650 I2S2 for capture. (dai_name = rt5645-aif2)
1415

16+
- mediatek,mclk: the MCLK source
17+
0 : external oscillator, MCLK = 12.288M
18+
1 : internal source from mt8173, MCLK = sampling rate*256
19+
1520
Example:
1621

1722
sound {
1823
compatible = "mediatek,mt8173-rt5650";
19-
mediatek,audio-codec = <&rt5650>;
24+
mediatek,audio-codec = <&rt5650 &hdmi0>;
2025
mediatek,platform = <&afe>;
26+
mediatek,mclk = <0>;
2127
codec-capture {
2228
sound-dai = <&rt5650 1>;
2329
};

sound/soc/codecs/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ config SND_SOC_MAX98357A
557557
config SND_SOC_MAX98371
558558
tristate
559559

560+
config SND_SOC_MAX98504
561+
tristate "Maxim MAX98504 speaker amplifier"
562+
depends on I2C
563+
560564
config SND_SOC_MAX9867
561565
tristate
562566

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ snd-soc-wm-hubs-objs := wm_hubs.o
213213

214214
# Amp
215215
snd-soc-max9877-objs := max9877.o
216+
snd-soc-max98504-objs := max98504.o
216217
snd-soc-tpa6130a2-objs := tpa6130a2.o
217218
snd-soc-tas2552-objs := tas2552.o
218219

@@ -429,4 +430,5 @@ obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o
429430

430431
# Amp
431432
obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o
433+
obj-$(CONFIG_SND_SOC_MAX98504) += snd-soc-max98504.o
432434
obj-$(CONFIG_SND_SOC_TPA6130A2) += snd-soc-tpa6130a2.o

0 commit comments

Comments
 (0)