Commit 15094482 authored by Guido Günther's avatar Guido Günther Committed by Shawn Guo

arm64: dts: librem5-devkit: Add mux for built-in vs headset mic

Add mux so we can select either headset or built-in microphone input.
Signed-off-by: default avatarGuido Günther <agx@sigxcpu.org>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 39a346d9
...@@ -163,18 +163,29 @@ wwan_codec: sound-wwan-codec { ...@@ -163,18 +163,29 @@ wwan_codec: sound-wwan-codec {
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
}; };
mic_mux: mic-mux {
compatible = "simple-audio-mux";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_micsel>;
mux-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
sound-name-prefix = "Mic Mux";
};
sound { sound {
compatible = "simple-audio-card"; compatible = "simple-audio-card";
simple-audio-card,aux-devs = <&speaker_amp>; simple-audio-card,aux-devs = <&speaker_amp>, <&mic_mux>;
simple-audio-card,name = "Librem 5 Devkit"; simple-audio-card,name = "Librem 5 Devkit";
simple-audio-card,format = "i2s"; simple-audio-card,format = "i2s";
simple-audio-card,widgets = simple-audio-card,widgets =
"Microphone", "Microphone Jack", "Microphone", "Builtin Microphone",
"Microphone", "Headset Microphone",
"Headphone", "Headphone Jack", "Headphone", "Headphone Jack",
"Speaker", "Builtin Speaker"; "Speaker", "Builtin Speaker";
simple-audio-card,routing = simple-audio-card,routing =
"MIC_IN", "Microphone Jack", "MIC_IN", "Mic Mux OUT",
"Microphone Jack", "Mic Bias", "Mic Mux IN1", "Headset Microphone",
"Mic Mux IN2", "Builtin Microphone",
"Mic Mux OUT", "Mic Bias",
"Headphone Jack", "HP_OUT", "Headphone Jack", "HP_OUT",
"Builtin Speaker", "Speaker Amp OUTR", "Builtin Speaker", "Speaker Amp OUTR",
"Speaker Amp INR", "LINE_OUT"; "Speaker Amp INR", "LINE_OUT";
...@@ -649,6 +660,12 @@ MX8MQ_IOMUXC_SAI5_RXFS_GPIO3_IO19 0x8 /* IMU_INT */ ...@@ -649,6 +660,12 @@ MX8MQ_IOMUXC_SAI5_RXFS_GPIO3_IO19 0x8 /* IMU_INT */
>; >;
}; };
pinctrl_micsel: micselgrp {
fsl,pins = <
MX8MQ_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0xc6 /* MIC_SEL */
>;
};
pinctrl_spkamp: spkamp { pinctrl_spkamp: spkamp {
fsl,pins = < fsl,pins = <
MX8MQ_IOMUXC_SPDIF_TX_GPIO5_IO3 0x81 /* MUTE */ MX8MQ_IOMUXC_SPDIF_TX_GPIO5_IO3 0x81 /* MUTE */
......
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