From patchwork Wed Oct 4 23:46:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13409666 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 A8A46E936EC for ; Wed, 4 Oct 2023 23:48:07 +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=hGJvVQNiJsJcMgpJKZwDD/Gb+8i/sHY25w7xvjRqEuU=; b=Q9NSID+bqxcmZV EnuD3sCEYJZfXhZwb0l+uaMmp6E3ee9ZfZYJcKTd8C3YMFoBTZ2ZhnFhrrYk82139cR/4McPQqen1 L5erKyY6/4tbuQ9DYkR+siWl+7lBXmwzFrtphvUhXTkuuNb9yaqnropnhvqDrBzoxpCyV9fVcYW8L lbzJPPaQsS7rK5ECXCvZ3Xt0hV1kKbkWXA0aMoOmMOO1LFqVb+qMTxx2ra95g9wpSe0p0jkGTmWFy 1BRLmhDX94aw4PU+KWXnPal2QfmfQMFWeskobt3mnsYeLzOcgtoUwV1Wn3NTzW6HZgsZ54+kMJWnA 5ZOlNC7OLv1T/UchIqXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoBai-001756-32; Wed, 04 Oct 2023 23:47:44 +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 1qoBag-001730-31 for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 23:47:44 +0000 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-79f82b26abfso17700739f.1 for ; Wed, 04 Oct 2023 16:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696463258; x=1697068058; 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=Nwr+bVY4PaR39fDj4d2d/26+nvTGbbpn4jHymgluZU0=; b=WLzDvGXh4PR/rQ+7DaAQ1S6ctNkAG5W8EiPYzkWWzKi8Tj1yhKufo9s9SYFRM5a/eb BzDyrkVEg/6DaZJgR/lVS+t9XBFeaJCOXNq/K6mF0ISwz24VrDbyxLVovOYpl9Uay/78 tpDP9CPc0nwMVizycsQaZWTV9g5Ng4zRGojQJ4HSJagVqC+wbCLX9dfYhC0OSv9BNtcA 6Xy95BiMtSEOx4a5LVAGwGjx7h+CBbr6WsedeouVyyTL31sOfpxAKEHCspLyeeliVE2J CrWe8GCxy/ECkNNd0b0eJ+uVHJyGHL/BRIrqjeOxfuFf1tQKt7rQqCfkJ4/78yXMODd4 t6ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696463258; x=1697068058; 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=Nwr+bVY4PaR39fDj4d2d/26+nvTGbbpn4jHymgluZU0=; b=HKhhb+B6w9Mz89u9fP53BzX0yoBlMddgnplJ9yaR3ys4ag0s+9NRmDzIBdEmPfRBKj 9DiniIAIPBAXHqvMjcamOE8yXWfpe47wgTEPzXOrJ3Rn0XWZ/c0JwLSF/6jh1nudSd+5 PCK08EBd1E6PjwFIFrGtrFXGbowGqn5Xz27oqp1T0MMDw6Qr6XoarZ4TMrq/A5Go4E6o dsJOeIoaU6vVIy4VF7uqfvOX1OkjLNwimaHNFzokCHyorEnNCo1orsvrftWajDHWcXjn 2zLWb9Cgquysghhhx94/GFsfZpPCdTnn4UmtcRF1aPAkou5Vw8osHKQF2lMaR0OG2zcd zFEQ== X-Gm-Message-State: AOJu0YzlOflaGJNa22mVCoDOxahG96YQckz9JtXkbnfYKhQuDVjzLMuw zW2ePPzJ+C3uck03MRZRW6JKySLDTN0= X-Google-Smtp-Source: AGHT+IF0Ik9/+KNOcDbAHFS6MvzMLXXLoCYAV35uTMjDE4nTkQ2tFDV4lV7fOJVgAdACrP8g/SbJgA== X-Received: by 2002:a6b:da06:0:b0:794:d7e8:d239 with SMTP id x6-20020a6bda06000000b00794d7e8d239mr3828208iob.17.1696463257800; Wed, 04 Oct 2023 16:47:37 -0700 (PDT) Received: from aford-System-Version.lan (c-75-72-166-104.hsd1.mn.comcast.net. [75.72.166.104]) by smtp.gmail.com with ESMTPSA id l13-20020a5e880d000000b0079fa3d0d790sm50062ioj.31.2023.10.04.16.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 16:47:37 -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 V2 1/4] arm64: dts: imx8mm-beacon: Migrate sound card to simple-audio-card Date: Wed, 4 Oct 2023 18:46:54 -0500 Message-Id: <20231004234657.44592-1-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_164743_069265_54DAA24C X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. 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 Reviewed-by: Fabio Estevam --- V2: No Change 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 Wed Oct 4 23:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13409667 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 684BDE936ED for ; Wed, 4 Oct 2023 23:48:08 +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=qRZj2K+2vbl/Yg9rwRku9usOy1yD+0i4wZlvTK09O9M=; b=UF3wrF5se4+BhA FykBJney2WXoLcnMeeXnE24QOyAmi4/NcuSnMbR9g9acEa3DheZHktKKKCBhx7VvRksseJsvegEjz rEuvOdNUILuqwpDCggx+8v5un6HUV4LLMBadXxTyuzKz/s4pOpDndUkOH8a50MtiR7rm+nrwiox7T wmx/VYABMd+umbv14qRiZjQEoz36ZSgOJmyAc5rhmei5bpA51o83QSGv52GLY2DhTOqPeCrRTpyYE xLYP6Afxq94IjitfLW3NswhbIYkN6y6Vyjlu4gliNdkFFw10P9ObMHe5s7zn6Tz35cBtC0F9gTdop B1AtdM9JTror0QcPe4Qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoBah-00173c-1E; Wed, 04 Oct 2023 23:47:43 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoBae-001731-0v for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 23:47:41 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-79f8e4108c3so20503839f.3 for ; Wed, 04 Oct 2023 16:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696463259; x=1697068059; 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=oLe99n6dqY5T1J7qsApaL18A2DozvmXs+CapV1oqmyQ=; b=NTFx47ldb3yUzSa4m/ghPRubkXdgr7R/DYOeFJA6do0hFz/a65x5ma4Fv3Mtu5Xztq 0h8ovUYdcpv1AhRFdocBTP3IVA7CaWDEK/HLR+5vyqmTh2V8f9Jz41AMgseMDFa4Stok gNIfgZ3xi6GPrbwXCq8izvkj807zOYtLlas15FaNiJ6vqn1utsfKJqWMTlNY3v1oqnUy WvAmwUcu3bkLXExe995heSCcAQvM16aYP8rL2RJpvLLvCBcjVaggINJ+5vG6vlPfQNYN UvHjllGIHmsQrtOodsk9lBwgzZwyaWNxTo2MbFOml+Xot5AQyg8wTXT6XUR3L3XWWxqC EidA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696463259; x=1697068059; 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=oLe99n6dqY5T1J7qsApaL18A2DozvmXs+CapV1oqmyQ=; b=gyBIKmqTzxty40Sii0LgY0B7D2fCi7sjPlw7lxWQLQ2PTxYKDklkIe0jGRuVL8nfHj ltTEpA0VEvKejIxUlfxYt1B2JgCAnYpynwuVGtu0iToIAMwMPlBRhEmzSfWEdf6Uom9c YobCby6qQbBQEoWxc7DMNeyHbwR22xIfVVfj80fUuXlYEAo++iCALzmrbXizJWs34a+b yXLdvAJ2k1z3jT4Tus/EUFiI8gsDFuPT18GNUU4rGrxll+0rX/1m2gcZQI5p6DRTsQwP szJpUeGkuysJVNcBW25Cr95JY30v8Of6Ilv33vbiO9t17nS5XAn8/rr045XQu00sEQIG XrCQ== X-Gm-Message-State: AOJu0YzquVbdvLVU7nIjZGmWefIpjJlOtOVRcU+T4TmW7ykeQ8LcxvNQ xdFgXLDmat1A/5h7Vy6qXzeVcW/5R7E= X-Google-Smtp-Source: AGHT+IEUy4/pMrC8hA7uPIVGCZ1bc0yXTurG3NimHBvr9JL9n6bNMQAzDYA6zxrm3JmeWCjR8QjfJw== X-Received: by 2002:a6b:a05:0:b0:792:70f2:a8ed with SMTP id z5-20020a6b0a05000000b0079270f2a8edmr4141499ioi.4.1696463259102; Wed, 04 Oct 2023 16:47:39 -0700 (PDT) Received: from aford-System-Version.lan (c-75-72-166-104.hsd1.mn.comcast.net. [75.72.166.104]) by smtp.gmail.com with ESMTPSA id l13-20020a5e880d000000b0079fa3d0d790sm50062ioj.31.2023.10.04.16.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 16:47:38 -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 V2 2/4] arm64: dts: imx8mm-beacon: Add DMIC support Date: Wed, 4 Oct 2023 18:46:55 -0500 Message-Id: <20231004234657.44592-2-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231004234657.44592-1-aford173@gmail.com> References: <20231004234657.44592-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_164740_343661_2D8F4E05 X-CRM114-Status: GOOD ( 11.89 ) 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 Reviewed-by: Fabio Estevam --- V2: Rebase and remove sound-dai-cells since it's been moved to the SoC. diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi index 313e93663d6f..6086dae2e5fb 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,15 @@ 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"; +}; + &mipi_csi { status = "okay"; ports { @@ -365,6 +397,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 Wed Oct 4 23:46:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13409668 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 AF0ADE936EF for ; Wed, 4 Oct 2023 23:48:09 +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=KBaUUAb4UrCaMWe/TfunGyhRnRfhRQzHzc8CAfNgnPM=; b=kdmEInrEXSKZVg k7UQ3C5LFF00r00v3nDKirzGoWKpsFeLlGsGJoh+d1XAm2WStJj62f1BCkg3/ycSr2dNgZIseQ8VV kUQr2fyRq3MkAji92jJO1NKpq8V5ikmGMALpZIjhKezJVTpyGLucfkHc/WIwpOVB0HihjlNoL4fl7 2MSIcgEh8wcR02PxQYMLkGeufmF9rKcvzS4UBBdkjEt1F70+cp39QuodVSUVFN2lQMeOhFxk8Wb9b 0aqBFM83Jsq9wR7U+Y1FzIoA7UsEfpJ9PLSIgt1I6wt4pRUVRrkwm2u8lPxlnW7GxxaiPcP6Rtj7Q W7SZuqvSCpzwMB17MVQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoBal-00176D-27; Wed, 04 Oct 2023 23:47:47 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoBai-00173I-0K for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 23:47:45 +0000 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-79fb78e297bso20227239f.0 for ; Wed, 04 Oct 2023 16:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696463261; x=1697068061; 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=j7CVoIeubu4fPw7g9XiV9QtZYx1CSj0ohu3WANHYf/A=; b=DSTEqqOrvkvLEDwlGQ396RJYK1yAuhKtD5AhhIdVBZwpPVrsOVyM9ExKJBw0kIUoB9 Payj/nm79BMSgqQA3piRR5kckTyct+m6DCIHB1t3a1ENAkRf7SydgUSGIpL73iliyX9U 0DMxweiVBc6Lw9mbutk4Am0myAxotCncuCuVM1FWZBc/g4Ck5usfTDmOvxkUujOYUMUf nnbwDBgQweUimNcsRufSKAG2Re3mvpgh8pjDjVKyrarGWiNXuaisTCgL8jRAlrjrnDiB SvU2Trfp/YozHvqtftmn/fzp1n5kc1l+QPl2b9z+RnBbLdmmic+J4RPKehc/iZicn/c3 hgSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696463261; x=1697068061; 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=j7CVoIeubu4fPw7g9XiV9QtZYx1CSj0ohu3WANHYf/A=; b=K85HBQesC31MgbZotWZM/v1qB8PpDX/iX8NZ8UPe3ArBRCiarxruUYLjQM3lsVNqx3 GgcWohAqXU0t/fNbmD2je2ky9SWT9XqirT0XKc5aSJ5tQ2utD9swb/HyRKbJuIX6mwxt KaFYhqfl4Q9q582ACmD4cVmdaaSF16KVdXoTPlXUhaPqZ3DevZO+ZfXRKhL30o/PUmW8 USFQ4Zv8Tj1Eq0byowE9/rpIynwtNv/uci8/64TbMWI5O9YHLOYtX1LHowS5daeC5W7+ z/e87OikwRw/mNTyFnQyzt1iGKvAZObp2BoYhQMO5bcnDAkKcKb9t7L3UDHH5ntY40nU Jd2Q== X-Gm-Message-State: AOJu0Yx6Vz96M4Imhw659XfEdhiUFN0gEQCtVHRa7jNmR3AZktNCV4N+ YZaT+3HgGsjzwgDfY4DqHYITexLcmGs= X-Google-Smtp-Source: AGHT+IF4xOIcscR7EthWLe8x097ZpHhB9HHToIAa01ce5ksmr3UzkyLzvXo58uNYAiruZWj26rZZ4w== X-Received: by 2002:a6b:ea15:0:b0:790:a010:4c42 with SMTP id m21-20020a6bea15000000b00790a0104c42mr4456241ioc.13.1696463260584; Wed, 04 Oct 2023 16:47:40 -0700 (PDT) Received: from aford-System-Version.lan (c-75-72-166-104.hsd1.mn.comcast.net. [75.72.166.104]) by smtp.gmail.com with ESMTPSA id l13-20020a5e880d000000b0079fa3d0d790sm50062ioj.31.2023.10.04.16.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 16:47:40 -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 V2 3/4] arm64: dts: imx8mn-beacon: Add DMIC support Date: Wed, 4 Oct 2023 18:46:56 -0500 Message-Id: <20231004234657.44592-3-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231004234657.44592-1-aford173@gmail.com> References: <20231004234657.44592-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_164744_149115_846E2F1E X-CRM114-Status: GOOD ( 11.55 ) 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 V2: Rebase and remove sound-dai-cells since it's been moved to the SoC. Reviewed-by: Fabio Estevam diff --git a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi index 16761975f56e..20018ee2c803 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,15 @@ 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"; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -311,6 +342,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 Wed Oct 4 23:46:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13409669 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 485BAE936ED for ; Wed, 4 Oct 2023 23:48:16 +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=DV5nH7M9Nd/J5qhkAQGyWzb24g5owFjkXgaYjCtcosA=; b=wtSHCAt8SRk5wE 91roQ+1JAIFeJRgT6JOM5mHq35XjHoDPYTZaLz/s8LcMN9OKamtXvmDArjXDEZNDbyCCnLPZ+Hpin 6jwMuNqDUBVP9hySYiNjipnMQkhcuWFGF8BuFn0Nfox4xJ0WEX7NdkVzsyzmwP1VmZXUmqR2MGDYW oaqeT4SUkaROJ9Y40AJyr0pNvS/r3t/eaug1R2a7n5sTiHNf4C4D1HZZW7t1e3Gf7Wi4OFRz+f9bA zip9EalLtSNWtEw70rdydkbbMMsjpD7fl08HeqKD9lMSq2MxG03OlVkhvIBhv0QAp9WfSIRPM8lS3 XjOGa1evIFQOp5PoLuVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoBam-00176b-0e; Wed, 04 Oct 2023 23:47:48 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoBai-00173Q-17 for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 23:47:45 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7a2a3fb0713so19334239f.1 for ; Wed, 04 Oct 2023 16:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696463262; x=1697068062; 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=fvKzcw6kAiBcbkeqMYP32mbpOXiT4xaGw7IdDJk9+NA=; b=BkwoTIMDbQVNm5tdfChicBObnLD/jCKfcv9KEu2hUkmbEadRBfw0pOkyB3vs/vW9it aQvB1OxTI1L2bvmAUK6L8o13rP4r5eG8EAe2ehZpmDB7wb5MDGi/BygOmxE68XLcCPv5 pTuoz0d1+oYxUxI29bHkpv035yL6f+3bPgZPnJzblIrqf1oHmuBs3V0X9M8kUwlASj9d PvPTtSwFQinYa6MWTissI5uGCUUUYZz6g3zGKf/SsyWuaM7DYODBcngluPAfG4R6FRQm sxanLPlq4gkFSp1G91LolVdLJaXwfns9kixABtjxjyCWE5rwziYgQUSxZGjQF0BE/vl/ yqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696463262; x=1697068062; 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=fvKzcw6kAiBcbkeqMYP32mbpOXiT4xaGw7IdDJk9+NA=; b=aLIaYSG7Gi4eqQSzAPCYwMvWmjDQcqj4llX/yV0zAQtjXhmo+cpRHr/qzVsZhzulqt NF6mE9qkCkkcd6YujJ+hB5wZzx8QO9Rjab6QxW9h9Q57TySnGndAKJEdgzQNeqciJoWF 5dGLM5VD5UxklULentAGGDXglPtWNYU0HXnzRJPa5K0Q4eHU05k0EOHujk6i/iesaiYD KarFsytym1riiG8CMFGa+M/pqx6U1M9MYqnEJbFORKTfL7Qd9lbRQK/9gYrjOd53iJ8u 9YTn+8UTTh642XpHsirXuoSQcrC5n9NnDxDrZY1St3CxvReR0X5kwmF/VnA9/Tl8e7Nm yieQ== X-Gm-Message-State: AOJu0Yw/4pxY0zKfuiF+mW6Lc46jy3/oss3M0e+ZE8NiTz2XcPork2xx oFO43I+oFrftQelxtT3/CaIZn1iGWQ8= X-Google-Smtp-Source: AGHT+IERgrYzaJpuc7jM4/PCOFndZn8k1/2YZm7ZCTSH1+VQD/f3kQln9HlU0YN5aZqa9r3pfC1ycg== X-Received: by 2002:a05:6602:2012:b0:7a2:ac5a:89c3 with SMTP id y18-20020a056602201200b007a2ac5a89c3mr4094534iod.1.1696463261844; Wed, 04 Oct 2023 16:47:41 -0700 (PDT) Received: from aford-System-Version.lan (c-75-72-166-104.hsd1.mn.comcast.net. [75.72.166.104]) by smtp.gmail.com with ESMTPSA id l13-20020a5e880d000000b0079fa3d0d790sm50062ioj.31.2023.10.04.16.47.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 16:47:41 -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 V2 4/4] arm64: dts: imx8mp-beacon: Add DMIC support Date: Wed, 4 Oct 2023 18:46:57 -0500 Message-Id: <20231004234657.44592-4-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231004234657.44592-1-aford173@gmail.com> References: <20231004234657.44592-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_164744_389009_1FCF8F26 X-CRM114-Status: GOOD ( 10.99 ) 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 Reviewed-by: Fabio Estevam --- V2: No Change 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