Skip to content

Commit 498c21f

Browse files
anarsoulwens
authored andcommitted
arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine
This commit enables I2S, digital and analog parts of audiocodec on Pine64 and SoPine boards. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> [wens@csie.org: Dropped headphone_amp; added headphone amp regulator supply] Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent ec4a954 commit 498c21f

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@
7575
};
7676
};
7777

78+
&codec {
79+
status = "okay";
80+
};
81+
82+
&codec_analog {
83+
hpvcc-supply = <&reg_eldo1>;
84+
status = "okay";
85+
};
86+
87+
&dai {
88+
status = "okay";
89+
};
90+
7891
&de {
7992
status = "okay";
8093
};
@@ -259,6 +272,20 @@
259272
vcc-hdmi-supply = <&reg_dldo1>;
260273
};
261274

275+
&sound {
276+
simple-audio-card,aux-devs = <&codec_analog>;
277+
simple-audio-card,widgets = "Microphone", "Microphone Jack",
278+
"Headphone", "Headphone Jack";
279+
simple-audio-card,routing =
280+
"Left DAC", "AIF1 Slot 0 Left",
281+
"Right DAC", "AIF1 Slot 0 Right",
282+
"Headphone Jack", "HP",
283+
"AIF1 Slot 0 Left ADC", "Left ADC",
284+
"AIF1 Slot 0 Right ADC", "Right ADC",
285+
"MIC2", "Microphone Jack";
286+
status = "okay";
287+
};
288+
262289
/* On Euler connector */
263290
&spdif {
264291
status = "disabled";

arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@
8080
};
8181
};
8282

83+
&codec {
84+
status = "okay";
85+
};
86+
87+
&codec_analog {
88+
status = "okay";
89+
};
90+
91+
&dai {
92+
status = "okay";
93+
};
94+
8395
&de {
8496
status = "okay";
8597
};
@@ -164,6 +176,20 @@
164176
vcc-hdmi-supply = <&reg_dldo1>;
165177
};
166178

179+
&sound {
180+
simple-audio-card,aux-devs = <&codec_analog>;
181+
simple-audio-card,widgets = "Microphone", "Microphone Jack",
182+
"Headphone", "Headphone Jack";
183+
simple-audio-card,routing =
184+
"Left DAC", "AIF1 Slot 0 Left",
185+
"Right DAC", "AIF1 Slot 0 Right",
186+
"Headphone Jack", "HP",
187+
"AIF1 Slot 0 Left ADC", "Left ADC",
188+
"AIF1 Slot 0 Right ADC", "Right ADC",
189+
"MIC2", "Microphone Jack";
190+
status = "okay";
191+
};
192+
167193
&uart0 {
168194
pinctrl-names = "default";
169195
pinctrl-0 = <&uart0_pb_pins>;

arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747

4848
#include <dt-bindings/gpio/gpio.h>
4949

50+
&codec_analog {
51+
hpvcc-supply = <&reg_eldo1>;
52+
};
53+
5054
&mmc0 {
5155
pinctrl-names = "default";
5256
pinctrl-0 = <&mmc0_pins>;

0 commit comments

Comments
 (0)