Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp868344pxb; Sun, 21 Feb 2021 03:10:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJl9ZfN9IoeUIl90TX/QRkKsmaCbOuW7V7cK8B9vKDtK0PCe0VuQ9NHeR3Hd0IH5dzLf3V X-Received: by 2002:a17:906:3e17:: with SMTP id k23mr16758443eji.332.1613905850060; Sun, 21 Feb 2021 03:10:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613905850; cv=none; d=google.com; s=arc-20160816; b=qCL1hfteY0tHLkBT8/QqZ8uqp5hKTL3y8HXpiVYOOX1fTAEF9lG0pCPotUhJxoNkE5 v6sE2wmoYKgJnAENGijlddDm2l0ke/eSVv7GBmu0T2MrkKFTNTfoIEZgSzhBm/nxEan2 XyhZjAwzI2s7CX37HSeJXp1lCh7eeMFDUvyrqGQwYMMdXY4oBbejNYOr7lVkAHLX5sTe C2eJk+nGHaZPVv054zwU4vjjUCwS8i+mcVAP/k2OPTgpP9xb75KHYhlJcaYBFHT/6+3d 5hB7diyEev3FFCGbOGa+0VoFcMnyMjFtfzufHWHB4DGqvfQEEe9nw785T2awsHI13gr/ zE2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=ciE3T5fXq1VMB1ZlcPj6c04ck9/pCxASXCY6mU93YJs=; b=Si9cMGZL27LRwFg3r31Q/AQRjdDy8LzR9yK1BchZi2sGPCb8/IgN3f0FcS4+dBNAoQ AYfjDwMSv/qn/kgZ5f7lOGdinY39cvvHZK+PsUfbOr8a2DowAu3kb6RAkoCu/I9qpOng CFXhvqSHQOJQtbi8s70NKY3kndMRth1H0RFoGqtGSZsXP11JgAYKogCP4P9i8mtv2MNm Z/8DKW4MuXD9oJwAlCeWitY8LD1LjrmfYnyDGISYNUJ2fFuy0xGB11UZCy3spwxyI6ci Nb6w2qGJwGoF2kY9JEOwr9cYS4ZZehSkdVs+SY5qfvd2Ue/6M4dHXT0O33jhjGY25weH Ed5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si9720845ejy.672.2021.02.21.03.10.27; Sun, 21 Feb 2021 03:10:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229998AbhBULIl (ORCPT + 99 others); Sun, 21 Feb 2021 06:08:41 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:59992 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhBULIk (ORCPT ); Sun, 21 Feb 2021 06:08:40 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 88CBAFB07; Sun, 21 Feb 2021 12:07:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26h5ZKKtVGCy; Sun, 21 Feb 2021 12:07:20 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id D6A7840404; Sun, 21 Feb 2021 12:07:11 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , =?UTF-8?q?Guido=20G=C3=BCnther?= , Martin Kepplinger , "Angus Ainslie (Purism)" , Krzysztof Kozlowski , Bjorn Andersson , Li Yang , Geert Uytterhoeven , Michael Walle , Max Krummenacher , Nishanth Menon , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 5/6] arm64: dts: librem5-devkit: Add mux for built-in vs headset mic Date: Sun, 21 Feb 2021 12:07:10 +0100 Message-Id: X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add mux so we can select either headset or built-in microphone input. Signed-off-by: Guido Günther --- .../dts/freescale/imx8mq-librem5-devkit.dts | 25 ++++++++++++++++--- 1 file 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 aac05bbaa001..f818af592046 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 @@ wwan_codec: sound-wwan-codec { #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"; @@ -650,6 +661,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 { fsl,pins = < MX8MQ_IOMUXC_SPDIF_TX_GPIO5_IO3 0x81 /* MUTE */ -- 2.30.0