From patchwork Thu Aug 31 11:51:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13371438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC264C83F10 for ; Thu, 31 Aug 2023 11:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ivEwxf/i1PHzJaLbvmG+zbooTJGupdSe1hJ56p7Qbrg=; b=bFbiNqlLZOIIwi /e+XaUm97akL0FFyEsOldoZRhws8Xz4n+zGzZVZrfZpuHV93+VETtKjOtVHaPxdykw8rAM28VmBir rR8rB3JSFrSplwArE5gh7oNNqBvPqxsixKLYQmE4MoIAoAFhgJnzV5VP/4TZrWlWIDt7cZSpRQgm9 QH3Cs8S2BnUMviv/3w6sSBmgXiTxC7ItE9J+/7ND14jpit2f5QZY+1Wj37NRLRpHrbVYK8meYk1MS KCdDvaE7m5icQpHUK9VafoQ83iWmHH4HplX3zOf05Mv3AjgpRwTiOx8zxFxSjcBteRp6MGc41l8d2 yd/uH2i4lgTb4Hqj8cVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDO-00FDxm-2v; Thu, 31 Aug 2023 11:51:58 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDE-00FDtQ-0G for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 11:51:49 +0000 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-34cc8e8cbd4so2602555ab.0 for ; Thu, 31 Aug 2023 04:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693482705; x=1694087505; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OfUzkZpC6rdjKYz9PfqxdgDOVImLXmjN2Ob+UFv9fCI=; b=QRi0u5Z07V/Vp1HPxFIIlC/SpSoSX/ucWhGUJE7csvhq2iQDo2Un+Mj6YcPU/MLv8H Td9mO6e5rHxlLWfs0D6GCfpVYakEecbz0JqA9Hfwc1L9qWK2ilti8O4yI4km+6iVOQc1 Nclo17ffjOBMzi6PGgjqb/L2gpAPGGK/YWvqRhug9YwJQh1ojjMto+753grjylJbGuyp XMG0rFk9csIYClzHZA71NmOHNLnQYGec08+DynjzkAVYay5QWfuHlv3BU7+U7CxQNHQr fyfuSpD6ut9AsqkgCDsklYN8tb1TBvB4EhE/elExM4NqshsWkG0iZLx627AcSOMo4BT6 3bDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693482705; x=1694087505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OfUzkZpC6rdjKYz9PfqxdgDOVImLXmjN2Ob+UFv9fCI=; b=PNoEA6/WYBQn/6UhW6PvqLs15Jc8Ju0IqUOXdSNCWiNXH6M6zKYWCh2V0RVN3hSamt bEHD18yr0B7HT4cCe9zEriJrwMFH0LU8qnzPmET6ID+10NC/Nblem0BMJFyk/WvZe945 a0TulqHhHZw8a2ZPd9XZpJ05rGkaUtxNT4Gixb7gLRVPQLZbFc4+ySSAk3N8w1o5SL4v bCzNRi+paf7SouKiZ4vCeH5JitFpSjrSB3QhoNlnFgZHvQAV6VEHt9Z933X4DtoXy/02 ldN/J1bw3jfiWwQ/r6Kzrid3kw8gjAZz528s5UxhjKV6Go9YARdGm/sNkQc+0C5HtG8V WOjQ== X-Gm-Message-State: AOJu0Ywc79X2gmRaCZCv56eXgRhmWzxMYZkm+v2vD2wTHUsYf2n6q/L0 uawXRQD3rG+g+DUmOl/mgXHT6HcagVc= X-Google-Smtp-Source: AGHT+IFeFDeXFOoBQ84rxQO9XbuweuUTlmCmC4f45FCzPK0ABR8WvTiRSiDkUN3Q3WXEdPhG9P8MRA== X-Received: by 2002:a92:4b08:0:b0:34c:a9dd:5fe3 with SMTP id m8-20020a924b08000000b0034ca9dd5fe3mr5415080ilg.23.1693482704623; Thu, 31 Aug 2023 04:51:44 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:2a0f:e1d5:3688:f2b8]) by smtp.gmail.com with ESMTPSA id o28-20020a02cc3c000000b0042b1d495aecsm353529jap.123.2023.08.31.04.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 04:51:44 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] arm64: dts: imx8mm-beacon: Add DMIC support Date: Thu, 31 Aug 2023 06:51:26 -0500 Message-Id: <20230831115128.254226-2-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831115128.254226-1-aford173@gmail.com> References: <20230831115128.254226-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230831_045148_118642_166B8A3E X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The baseboard has a connector for a pulse density microphone. This is connected via the micfil interface and uses the DMIC audio codec with the simple-audio-card. Signed-off-by: Adam Ford diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi index 313e93663d6f..d0dd4c81a557 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi @@ -6,6 +6,13 @@ #include / { + + dmic_codec: dmic-codec { + compatible = "dmic-codec"; + num-channels = <1>; + #sound-dai-cells = <0>; + }; + leds { compatible = "gpio-leds"; @@ -98,6 +105,22 @@ reg_usdhc2_vmmc: regulator-usdhc2 { enable-active-high; }; + sound-dmic { + compatible = "simple-audio-card"; + simple-audio-card,name = "dmic"; + simple-audio-card,format = "pdm"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,frame-master = <&dailink_master>; + + dailink_master: simple-audio-card,cpu { + sound-dai = <&micfil>; + }; + + simple-audio-card,codec { + sound-dai = <&dmic_codec>; + }; + }; + sound-wm8962 { compatible = "simple-audio-card"; simple-audio-card,name = "wm8962"; @@ -228,6 +251,16 @@ pca6416_1: gpio@21 { }; }; +&micfil { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdm>; + assigned-clocks = <&clk IMX8MM_CLK_PDM>; + assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; + assigned-clock-rates = <49152000>; + status = "okay"; + #sound-dai-cells = <0>; +}; + &mipi_csi { status = "okay"; ports { @@ -365,6 +398,13 @@ MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 >; }; + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX8MM_IOMUXC_SAI5_RXC_PDM_CLK 0xd6 + MX8MM_IOMUXC_SAI5_RXD0_PDM_DATA0 0xd6 + >; + }; + pinctrl_reg_usb_otg1: usbotg1grp { fsl,pins = < MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19