summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2021-02-21 14:07:10 +0300
committerShawn Guo <shawnguo@kernel.org>2021-03-15 07:22:29 +0300
commit15094482fc595346a3ba0e66fd59bb80d1e56c6c (patch)
tree46076c479208634ba741479f8115e730ecda9525
parent39a346d923e2d93342d2037b410d8ba9c44e3c2d (diff)
downloadlinux-15094482fc595346a3ba0e66fd59bb80d1e56c6c.tar.xz
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: Guido Günther <agx@sigxcpu.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
index 9c4fad71a6b0..51b37979d624 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
@@ -163,18 +163,29 @@
#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 {
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,format = "i2s";
simple-audio-card,widgets =
- "Microphone", "Microphone Jack",
+ "Microphone", "Builtin Microphone",
+ "Microphone", "Headset Microphone",
"Headphone", "Headphone Jack",
"Speaker", "Builtin Speaker";
simple-audio-card,routing =
- "MIC_IN", "Microphone Jack",
- "Microphone Jack", "Mic Bias",
+ "MIC_IN", "Mic Mux OUT",
+ "Mic Mux IN1", "Headset Microphone",
+ "Mic Mux IN2", "Builtin Microphone",
+ "Mic Mux OUT", "Mic Bias",
"Headphone Jack", "HP_OUT",
"Builtin Speaker", "Speaker Amp OUTR",
"Speaker Amp INR", "LINE_OUT";
@@ -649,6 +660,12 @@
>;
};
+ pinctrl_micsel: micselgrp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0xc6 /* MIC_SEL */
+ >;
+ };
+
pinctrl_spkamp: spkamp {
fsl,pins = <
MX8MQ_IOMUXC_SPDIF_TX_GPIO5_IO3 0x81 /* MUTE */