Skip to content

Commit 6de8e71

Browse files
anarsoulwens
authored andcommitted
arm64: dts: allwinner: a64: enable sound on Pinebook
The Pinebook has a headphone jack tied to the HP headphone output of the SoC, and internal speakers connected to the LINEOUT of the SoC, through a standalone amplifier. This commit enables I2S, digital and analog parts of audio codec on Pinebook, along with a device node for the external amplifier. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> [wens@csie.org: dropped headphone_amp; added headphone amp regulator supply; fixed speaker_amp node name and sound-name-prefix name] 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 498c21f commit 6de8e71

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,32 @@
7474
compatible = "mmc-pwrseq-simple";
7575
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
7676
};
77+
78+
speaker_amp: audio-amplifier {
79+
compatible = "simple-audio-amplifier";
80+
/*
81+
* TODO This is actually a fixed regulator controlled by
82+
* the GPIO line on the PMIC. This should be corrected
83+
* once GPIO support is added for this PMIC.
84+
*/
85+
VCC-supply = <&reg_ldo_io0>;
86+
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
87+
sound-name-prefix = "Speaker Amp";
88+
};
89+
90+
};
91+
92+
&codec {
93+
status = "okay";
94+
};
95+
96+
&codec_analog {
97+
hpvcc-supply = <&reg_eldo1>;
98+
status = "okay";
99+
};
100+
101+
&dai {
102+
status = "okay";
77103
};
78104

79105
&ehci0 {
@@ -277,6 +303,29 @@
277303
vcc-hdmi-supply = <&reg_dldo1>;
278304
};
279305

306+
&sound {
307+
status = "okay";
308+
simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
309+
simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
310+
"Microphone", "Internal Microphone Right",
311+
"Headphone", "Headphone Jack",
312+
"Speaker", "Internal Speaker";
313+
simple-audio-card,routing =
314+
"Left DAC", "AIF1 Slot 0 Left",
315+
"Right DAC", "AIF1 Slot 0 Right",
316+
"Speaker Amp INL", "LINEOUT",
317+
"Speaker Amp INR", "LINEOUT",
318+
"Internal Speaker", "Speaker Amp OUTL",
319+
"Internal Speaker", "Speaker Amp OUTR",
320+
"Headphone Jack", "HP",
321+
"AIF1 Slot 0 Left ADC", "Left ADC",
322+
"AIF1 Slot 0 Right ADC", "Right ADC",
323+
"Internal Microphone Left", "MBIAS",
324+
"MIC1", "Internal Microphone Left",
325+
"Internal Microphone Right", "HBIAS",
326+
"MIC2", "Internal Microphone Right";
327+
};
328+
280329
&uart0 {
281330
pinctrl-names = "default";
282331
pinctrl-0 = <&uart0_pb_pins>;

0 commit comments

Comments
 (0)