Commit 6de8e717 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Chen-Yu Tsai

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: default avatarVasily 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: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Tested-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
parent 498c21f2
......@@ -74,6 +74,32 @@ wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
};
speaker_amp: audio-amplifier {
compatible = "simple-audio-amplifier";
/*
* TODO This is actually a fixed regulator controlled by
* the GPIO line on the PMIC. This should be corrected
* once GPIO support is added for this PMIC.
*/
VCC-supply = <&reg_ldo_io0>;
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
sound-name-prefix = "Speaker Amp";
};
};
&codec {
status = "okay";
};
&codec_analog {
hpvcc-supply = <&reg_eldo1>;
status = "okay";
};
&dai {
status = "okay";
};
&ehci0 {
......@@ -277,6 +303,29 @@ &simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
};
&sound {
status = "okay";
simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
"Microphone", "Internal Microphone Right",
"Headphone", "Headphone Jack",
"Speaker", "Internal Speaker";
simple-audio-card,routing =
"Left DAC", "AIF1 Slot 0 Left",
"Right DAC", "AIF1 Slot 0 Right",
"Speaker Amp INL", "LINEOUT",
"Speaker Amp INR", "LINEOUT",
"Internal Speaker", "Speaker Amp OUTL",
"Internal Speaker", "Speaker Amp OUTR",
"Headphone Jack", "HP",
"AIF1 Slot 0 Left ADC", "Left ADC",
"AIF1 Slot 0 Right ADC", "Right ADC",
"Internal Microphone Left", "MBIAS",
"MIC1", "Internal Microphone Left",
"Internal Microphone Right", "HBIAS",
"MIC2", "Internal Microphone Right";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment