From patchwork Thu Aug 31 11:51:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13371435 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 564B2C83F12 for ; Thu, 31 Aug 2023 11:52:25 +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: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:In-Reply-To:References: List-Owner; bh=aur9y0O6EmtFGzEaCAnS6Csmcctuo2ZIFgu3HOqPWu0=; b=neHToHx2vIwcOR u078Kxdg/sews6IkCB796LZ3n4gvrnVLbswkIVogXd3WZC7Ro8lGbP3EfYWrcEKSK52MKbDFFN6aq 78Lzno9bNYe2s/1ZIeS1+ZTx/+57lUcMnuHbBm4G8HxOHyX/f4PsFWOWKLD6EhxAh9jy5XNU3ozpl xI0HT+hznSAuQE5lS2Kx9PXdwGgZLiUIwDtJahz8ArbXkU3umgX8QxBw1RSvWqP8oimnO99sUoRBr Pt5hV8k2VAgE7e+SDe5xZ6dl4c3RRnrSTgUwd+tueDLDjQJ17PA5Apy3NcJs9BUy8drkBaUjcJrKP 4NfkCvmxoWls4x/j4qEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDF-00FDv1-1l; Thu, 31 Aug 2023 11:51:49 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDC-00FDtP-1b for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 11:51:47 +0000 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7926a450a0aso26471239f.3 for ; Thu, 31 Aug 2023 04:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693482703; x=1694087503; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ihsq1G+Hub3rKossUtgp/zZy1yTWO30XUHy6RAXp+uk=; b=sLtdt5FQ/S868HbP1Xp4vEQGKZa/bMomr41hO6ds+gxk3rF/vUW1KfNr2J9Wbyhdfc tn7pGLvMSyyRrW/er4XRXaluwxKr81jHjAQZs6MOn5M7yM4yWaJ8i0VnaSoH08m23o4+ /wi/utIP/gZsewBPuso/kxPbbIWW+kL3rFF0GgGbhGbln/v5Ne85y3ouOlHP/IE6QaUc w+h+c2aOqHgm2qdAtQ2vsqjvZ1fAOaEawhU5F+hUFLfiYdDlI5AOyQdsI9z9SmfLW1bk U1AeFV1HvAvNlfjtp3wf+uNEb9sp9mdfj3TAv6p3YF8N5TeKYlxkVGiNz531uIsSuH3o 8uvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693482703; x=1694087503; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ihsq1G+Hub3rKossUtgp/zZy1yTWO30XUHy6RAXp+uk=; b=FS2j9cwqY+kOCQ/BCSUfZxl9iMgkXakjn5KtmqLzXrdGIFJZlRKjQsej0MCEfRcCHl DGzq4WqRez+CjHpwZUgz/reyQu9yilEnMXruB/GOP9ex7X9TMScdoSr1wYlEtQQAEGtZ 6C+rHi2y7d9bPrfstHc/8aopidYO9IamuMfiOawWshT0Xw0+eh5Up8P+nRPypl9XZ9ir Xjdviu5lQ7LDsxFXb/X6rWA+e5e+yBdCQPMBEvhLXJHG+f94GG8NE9sKoXrYIV8JAjb3 0v9Ui/g1TtmCifHvoXfVzBjUTcDKTgCeiyj6HdLmX3IQ+3V0nN2f1eVhCfDqYvz7eHdo p4gQ== X-Gm-Message-State: AOJu0YwF4vopsN8yOYS2PQXPR988EQiLEVtQSZXSj+gkg22EXi8vylZs /S4lspiaVd2Qczppv/SnTyXLcVRDccc= X-Google-Smtp-Source: AGHT+IEnv1P/QYCarKpZ1Xer0P5ZGSgekwP3ctv3JCpSTmZKWn/RaUOys/p1eV8kWbXegyupSqv0Hw== X-Received: by 2002:a6b:fe15:0:b0:787:1a8f:1d08 with SMTP id x21-20020a6bfe15000000b007871a8f1d08mr4906178ioh.15.1693482702990; Thu, 31 Aug 2023 04:51:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 04:51:42 -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 1/4] arm64: dts: imx8mm-beacon: Migrate sound card to simple-audio-card Date: Thu, 31 Aug 2023 06:51:25 -0500 Message-Id: <20230831115128.254226-1-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230831_045146_531334_EFFB60B6 X-CRM114-Status: GOOD ( 10.18 ) 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 Instead of using a custom glue layer connecting the wm8962 CODEC to the SAI3 sound-dai, migrate the sound card to simple-audio-card. This also brings this board in line with the imx8mn-beacon and imx8mp-beacon. 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 b10e2a703a44..313e93663d6f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi @@ -98,18 +98,30 @@ reg_usdhc2_vmmc: regulator-usdhc2 { enable-active-high; }; - sound { - compatible = "fsl,imx-audio-wm8962"; - model = "wm8962-audio"; - audio-cpu = <&sai3>; - audio-codec = <&wm8962>; - audio-routing = - "Headphone Jack", "HPOUTL", - "Headphone Jack", "HPOUTR", - "Ext Spk", "SPKOUTL", - "Ext Spk", "SPKOUTR", - "AMIC", "MICBIAS", - "IN3R", "AMIC"; + sound-wm8962 { + compatible = "simple-audio-card"; + simple-audio-card,name = "wm8962"; + simple-audio-card,format = "i2s"; + simple-audio-card,widgets = "Headphone", "Headphones", + "Microphone", "Headset Mic", + "Speaker", "Speaker"; + simple-audio-card,routing = "Headphones", "HPOUTL", + "Headphones", "HPOUTR", + "Speaker", "SPKOUTL", + "Speaker", "SPKOUTR", + "Headset Mic", "MICBIAS", + "IN3R", "Headset Mic"; + + simple-audio-card,cpu { + sound-dai = <&sai3>; + }; + + simple-audio-card,codec { + sound-dai = <&wm8962>; + clocks = <&clk IMX8MM_CLK_SAI3_ROOT>; + frame-master; + bitclock-master; + }; }; }; @@ -192,6 +204,7 @@ wm8962: audio-codec@1a { 0x0000 /* 4:FN_DMICCDAT */ 0x0000 /* 5:Default */ >; + #sound-dai-cells = <0>; }; pca6416_0: gpio@20 { 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 From patchwork Thu Aug 31 11:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13371436 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 E2497C83F10 for ; Thu, 31 Aug 2023 11:52:25 +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=9exUbVv3mYb3k16ZFn2zH6uSmOm9X96+/He5Lgbi4XQ=; b=Ff1PxlmO9MTbwV xvVb96sFhRLsgiv6hVXmGtDv8jUvJRW2GW7lxBmbtPFCymUKRp4mWAt5G195M73vMLa8560wkZMy8 i2l8imRF3hdcMJMGUC1lrGF9CmoSQyFc8+l1jzemkzsCrify6Aj/hmsPsB8TzlgBfupQaD2OOfP3y 4Rl1aOu05FyZ2zktBZic7fNJqC8tu/IFI/HdWw56QLYusE24oKZ96AIo0JLqr20tt9yd9l7EMFYOM Vs5zssM/bwZEppSzo5wu8RHgWy4UwKGNmHGCW6DBMt1NhXATjAcauvUcAUUOPNy5qm8uPgqbKv+Wp bw7Nxer53qkfq6ogDrEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDP-00FDy7-1T; Thu, 31 Aug 2023 11:51:59 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDE-00FDty-2A for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 11:51:49 +0000 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7923ae72111so27401439f.0 for ; Thu, 31 Aug 2023 04:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693482706; x=1694087506; 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=M+kNWrgmNs4s12nz1ZRGpluVgBLXFMVQIrdkMeSABd4=; b=AUA6KkBtKrbhs9w5lUHWM3TLpTVFXP1yLaejbvGHlrL6+NwZUlBbRAI95QFZQtclBa r8jv2obLEWXD48TF5oLMNflHEU52Q/vKrxm96bCBMk37xy1ZRgOMvVTQPKqLYtth/9b5 EifseAv7enYRT5Cn7NKi21WjGVGoKnwFdvXMVp5xW6sXWMHjpEcWaN9ZVAyIcZ7xzaWW cN2cop3v1AL8vPe3snFBF/+HUizIQbkP+6UhoooD4GRTnt8tt2tJZqkcFRsiSoEbPWsq rLR5zA2kCewF5Ei9ti463qvQKmwm+uCM5X3XEz4xa+2m496ikYZlAXlBiV/H6xvInUvn RR5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693482706; x=1694087506; 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=M+kNWrgmNs4s12nz1ZRGpluVgBLXFMVQIrdkMeSABd4=; b=cQZJY8L6z5l8dV9Qmxb4S63DRW+ILHsQLFpUakPmVHRFjUhfwxQyHINdin7MJ8Vm7V xxy0RqxxkYLS1Q9QJe6azjF8CS+HlRixmcc6E8UHHxOofcmencGxHgk4/xngG3IOytt6 qOp0f3HKI85Cc4lL2vIKHhDk8d+Q3qaKGdGSLdbHjdXMAQEw/8DbKrLxEhZGhf4GI1Us 8SY6TxdX62Rk2xe25sYwitszd70nRdb73xP1RN4Afwzyt2cV+v2q2ugFI3qMaSMe4mWK gUZmMfyVhvecC7vxEPXPT93npH48sSSoeghINAMxvkmUfFK+xLLJEfbXe0T7ENUW1cZ3 8Jkw== X-Gm-Message-State: AOJu0YzGTYpjSqSnG9s82x1HVUcCitaRCFxyAvheofE79m1elUSVJMVi FBMWnJEIXO2PWV5Z+COp7xKlCSqtBw4= X-Google-Smtp-Source: AGHT+IFqcrNSlFBq1FDUlcMdCiwIg1ohn3weVauam3YbXpkxgZTUk93HsxScIFm8E5LyyojQ0lUOBA== X-Received: by 2002:a6b:d902:0:b0:790:fab3:2052 with SMTP id r2-20020a6bd902000000b00790fab32052mr5174751ioc.5.1693482706145; Thu, 31 Aug 2023 04:51:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 04:51:45 -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 3/4] arm64: dts: imx8mn-beacon: Add DMIC support Date: Thu, 31 Aug 2023 06:51:27 -0500 Message-Id: <20230831115128.254226-3-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_706531_93239A12 X-CRM114-Status: GOOD ( 11.74 ) 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/imx8mn-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi index 16761975f56e..0b51c0c71423 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi @@ -4,6 +4,12 @@ */ / { + dmic_codec: dmic-codec { + compatible = "dmic-codec"; + num-channels = <1>; + #sound-dai-cells = <0>; + }; + leds { compatible = "gpio-leds"; @@ -74,6 +80,22 @@ reg_usb_otg_vbus: regulator-usb { 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"; @@ -221,6 +243,16 @@ mipi_csi_in: endpoint { }; }; +&micfil { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdm>; + assigned-clocks = <&clk IMX8MN_CLK_PDM>; + assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>; + assigned-clock-rates = <49152000>; + status = "okay"; + #sound-dai-cells = <0>; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -311,6 +343,13 @@ MX8MN_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 >; }; + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX8MN_IOMUXC_SAI5_RXC_PDM_CLK 0xd6 + MX8MN_IOMUXC_SAI5_RXD0_PDM_BIT_STREAM0 0xd6 + >; + }; + pinctrl_reg_usb_otg: reg-otggrp { fsl,pins = < MX8MN_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19 From patchwork Thu Aug 31 11:51:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13371437 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 61C00C83F12 for ; Thu, 31 Aug 2023 11:52:29 +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=aZ1D7XjDj2V24EDRSopWahBRvaR6Ork4vTUZwNtyAP4=; b=WubtLnp8gM9QQ5 h3Ot6SdgrLIlMMnL4gt5VuV5pZ3h/ytUMpaDSKm3+V9Fhz92veEZEGppKqhKNvrFMi6ZPF+eiBpvi uzNNSsc3VcqMGjogcmx6In86lCPPxzbNQvVoNddjg1ZWQ0E5aY80a6WsULnEnnih/AmHTWtqBDyHd pDQCh8qwA6uJR5z9j3/8x7AtuYHx9Y3ZQrUAnqXbqsq1OZMwzgMlj3Z9O82HnJxqqzpgxilyJ+0AI nFQjRl0SeUIEu6DMGe00z09L9aug4pNHRAoTgai0DNPeIYQPEw/cKfeOXQ4uv/2K4PMQtoP2EQXwe S+Ur7cx+cyv73HHG71ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDP-00FDyV-39; Thu, 31 Aug 2023 11:51:59 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDH-00FDud-0D for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 11:51:52 +0000 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-34cc8e8cbd4so2602695ab.0 for ; Thu, 31 Aug 2023 04:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693482708; x=1694087508; 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=UYuphCJVTBw5X395ddLzbAIWgxz1eVkD4K/+xpz52Vg=; b=hae1do/J4MtT1o9MfDvIbNsTdtpndrx8Na/MxpChD3jJIrnDBlk54h9tvxy1UM2o39 jENI0guOsTy+71H3hbic5PbNR+FotcBx3AZza9os9bXWRfUzmi9N84jkTU0TcXrYSMGq UHFTXzUryU7ZHZYTVlpZoJtaRvKboWwwNQmbn6u9w8OJf0tMpN3Bfg4PVl3Lbx0Kz3EX lxq/S2vqa3j3BYyga6lqQfveitHsRiUX3bBMXMHbBTBGOhBEs7AkjzoL4CxQM63czWf9 2VD/a0kfCDrgKQR9fpArQidfSFyTi6s2Imi6OjLiPN8UQmmEC3qTLgp4nfu9Rh9XBXrB bPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693482708; x=1694087508; 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=UYuphCJVTBw5X395ddLzbAIWgxz1eVkD4K/+xpz52Vg=; b=LrwueTAM4eyP0dq/1rr66ReFpjKOUQsPxleZtAclZ8tM0hssleHTbZbCLutJBji3Xl yHjc4jSKtutOu9yKcgHbw6arSur6wkMGXTDjq+jkq18y0g11o4iX+f+iDI57gDX9scqH UGp95nvk8zffhu7N+I3sjS43FemiG12F7pVbJ7Z4GsQJAIdoeXK30J4NMuLMGocIifKl ohhDY/0TNHq0epua9aY4FJSnJAAxmY6JMJ9OTlt6oIAch9HiEuRtFdoyJLgOAXFM/ARO FbRZ5oHJhib4OfNeJkGrtTRayIdrl65w3x0ZyEKN8DgYvlBCKsZUlYqUPqQVtHoWOT74 wmRw== X-Gm-Message-State: AOJu0Yxy7XuK0QsGcNlubXkRfXiZcNZdMfqJqhReqflVJdDgdRax8M4Z opKwEb/hb1XtAodWMthvEO6lbqvjoic= X-Google-Smtp-Source: AGHT+IHJcAeSKb3dVp1FGvE0rQrWpXkXhudpoKU555XVw9oWPRW92roA3e+JUwqYENI6MTcO0fwnYg== X-Received: by 2002:a05:6e02:ee7:b0:34c:b992:58b1 with SMTP id j7-20020a056e020ee700b0034cb99258b1mr4955572ilk.2.1693482707727; Thu, 31 Aug 2023 04:51:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 04:51:47 -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 4/4] arm64: dts: imx8mp-beacon: Add DMIC support Date: Thu, 31 Aug 2023 06:51:28 -0500 Message-Id: <20230831115128.254226-4-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_045151_101150_A3A99906 X-CRM114-Status: GOOD ( 11.46 ) 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/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts index acd265d8b58e..ee64c6ffb551 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts @@ -49,6 +49,12 @@ ss_ep: endpoint { }; }; + dmic_codec: dmic-codec { + compatible = "dmic-codec"; + num-channels = <1>; + #sound-dai-cells = <0>; + }; + gpio-keys { compatible = "gpio-keys"; autorepeat; @@ -147,6 +153,22 @@ reg_usb1_host_vbus: regulator-usb1-vbus { enable-active-high; }; + sound-dmic { + compatible = "simple-audio-card"; + simple-audio-card,name = "sound-pdm"; + simple-audio-card,format = "i2s"; + 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"; @@ -174,6 +196,11 @@ simple-audio-card,codec { }; }; +&audio_blk_ctrl { + assigned-clocks = <&clk IMX8MP_AUDIO_PLL1>, <&clk IMX8MP_AUDIO_PLL2>; + assigned-clock-rates = <393216000>, <135475200>; +}; + &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi2>; @@ -364,6 +391,15 @@ hd3ss3220_out_ep: endpoint { }; }; +&micfil { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdm>; + assigned-clocks = <&clk IMX8MP_CLK_PDM>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <49152000>; + status = "okay"; +}; + &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pcie>; @@ -545,6 +581,13 @@ MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x10 /* PCIe_nRST */ >; }; + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_PDM_CLK 0xd6 + MX8MP_IOMUXC_SAI5_RXD0__AUDIOMIX_PDM_BIT_STREAM00 0xd6 + >; + }; + pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp { fsl,pins = < MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x40