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: 729373 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C37031A66 for ; Wed, 4 Oct 2023 23:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fYg6fe2j" Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A18EDC9; Wed, 4 Oct 2023 16:47:38 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-79f82b26abfso17700639f.1; 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=vger.kernel.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=fYg6fe2j2O5sTu7aVxp6U+yUO780Q30XpJfEa7Gj9d8E2k/YpCrrd+j8LK1eRgDlMe 7W6h8jN0YdfNMCMKQ5ldwKOz477mj+UjaNje5WpFgQr8YkleQfQ0PZXBEgFiL5p5njMf eOOg6jtbNnszRNEsSILj3MPJ2LNSV5/liPbJA9xM2W6ebQMh4K8FWcE9Lpqhzz8TSp/d 3P+XfjchIdwL6LqUC5+Dokfsn+4w5KQUhTbfbz+qGmcjY26JZV/c1Uf/A7zsZn+Vc+Hp FBbaf5SXlnOaaXxw2C/XC1folX2qgnPD1jRsZA3ya2WiqDDKcAVO4mPNRPcIomzDcdgh n6Sg== 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=O89FF0vzfeS8PWswPDVVTbccEZ3mFpDn8errWKEU2EGrLzUDx2PjZNx4pp79eTbQVA 4bRgtARMmilu3D+Zz934/O6a5JSmYpHYD/Y+saMWSL6vv+LIQYrjLRtzoV7aEGEc+Q5D BBz/WWPyGXr/uMetN1sunOH9/fFQNoD3NBaCV0qV1cS6dnJc3k9phXwAil5AIsN6vuW2 pJnMImu8WJzFAnFCtjeNqd5o7p8BocMv7mSmgvKRf3cenPaTGX5qbIYkhM49vnhCJHKy H3VYICzXUXXzKBTCHPfMrDq3q+5E4Grri+gEufN5T2W0RWH6ac7JL06VFIN+8oKg2fCP NNZA== X-Gm-Message-State: AOJu0YyReqJR0kPd3plnfvir3XgiHEv6MgR35RgOXrOvGGPI/tBO2fB+ x4FYvZqTay4Ex2C3u6WO6VQ= 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 Reviewed-by: Fabio Estevam 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: 730863 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E8E031A92 for ; Wed, 4 Oct 2023 23:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aFZg0N5o" Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1091C0; Wed, 4 Oct 2023 16:47:39 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-79f8e4108c3so20503739f.3; Wed, 04 Oct 2023 16:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696463259; x=1697068059; darn=vger.kernel.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=aFZg0N5oPa5tIOUlxMC/E1US0y+WhAyF7EKiEjMuDP99+N26Iz3q7/RJwLyP+tWyRX hpoYVfNx08X6pHbP9krfK0js6rg6ZhN3Czcgpl1XcEIYtlt6UKlWHScG94BhRTakpfBR C8i+vaKcy7QdxkYF+UkLTzJFRq+tSfwXitYP9o1GiOg25ZGXCbGmRcZbhh1Ak3FX60cR 1reeY8sexPZc/Zo0Sb9JPzhPHf52RK8/nAXReXEWVhnZhCQErnWUFJll3YjTJy6MIial pN4g+JrVRk0iNp6SBotxHuZyymVUOYCV3ScMtA9gVel7H58reWAeleiZDryCae0ze4vM L8Ww== 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=QdFHN3YLME3Nx07YrJTqtVcehqa61gr1/UOSLZQpqUln4znH2kekpmqQwE2QpAKA8F DdN9OZdoGzgBMdZb19wJHPOxmWokcfz3mGYd+jmSa8+ErkctIZjm1B3cZjpkCavzngeO VCxgQmuKnR7+E2XBkbOF9UKboyyNVOtr8wI1jzY+jw/S1Qpff8cJdVCnRZf6zgwFOS7B R1ChgaN3eK519B1oecjmizCO+Y/BeV6CQELaw5D536AkCYixOS3OyT0fM95AEZ+QVb0L 8vKOe7cj6QW1j63T3yUR+0UgA++VU5EEGLcH/WNQSJibpiiPAol7l57ynDPJeusACuTr aybg== X-Gm-Message-State: AOJu0YzXNRVcx8u6nvWZ7nN9JcgNFYT0ebBnyklN8YAwpoNjMq/iQKVy aA6JlTz9tEA0e+ENb5r51m0= 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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. 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: 729372 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F307F374E1 for ; Wed, 4 Oct 2023 23:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Us56DTPm" Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D307CE; Wed, 4 Oct 2023 16:47:41 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-79fe612beabso19337639f.3; 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=vger.kernel.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=Us56DTPmvkEMrMKO5Pvc4M3H5b3SEpDF9betEuNSuLpudxPzEZNQVufbleJK90ewCf yXhmng5Aw36ZLccU/Cmv006qZCkKnQIPrTf+jxEjtLiX7AiT/0krT+nnt0/9Y2oaEGnc 8a6qZeEGJzTEqCGbdDwrPHypB+k0qANuA3oa3HnniWTdVIZXP7PLMUhXotZb5zL981kO 5ZPfE7Qg8UCNas4rCPsu8tCXSA3ydoOxCAXLv6VnYh2HM0iAhBJkPp+BxPlZ1GPS2mfd lGEywjF01BLKjS9gLomgnHfCJxYyxZ1blTciuydW6v2ZkIy20hDs41c4sMPJQJWNFEGp qQ6g== 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=ZcbOtEDG1aLy0DiWIT867nxZH47ttU6ewNh0u8vdNzPzxLmadxvtswSGKm8I2KMStZ UDH43fBzUkbnzKcM04gn8O7YyoYHMrRvXQfuuQ+Md6NhVCNhjKfWaqMMUEA9fwuRuTek Vqt3ksfUjF+ZKw0p6751Q7bd9cQAlJ4eACC12KDIJI6RRd9R1Cx5l/5mWzBTAUpl98yR ZjrM0OJK0a3XjZNw1emIKCztvDCOoIaElPdh2jRmXe/4y1sBgxpW9QhMoLNnFQBigOc6 7JhgZSBOyOj4IBKmNWC+2At5pvz/1tCd6WGDQowr/1pRin66BE/6wtBHR1P123qQ33sJ 6NFg== X-Gm-Message-State: AOJu0YwXzxSMBxa8zm+WsVwohLfPL01LRxUgZdWKLvxvv7T/ycBp9qEw HaOU8Apei1ogPVovdTQcEns= 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: 730862 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B17D31A92 for ; Wed, 4 Oct 2023 23:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="czqYeRQQ" Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0420C0; Wed, 4 Oct 2023 16:47:42 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-79faba5fe12so19075139f.3; 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=vger.kernel.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=czqYeRQQZQBCEeP/ItM/hFvdLpsrHV8LIDUeMPc/g5K5VovMejmgXMUVoRp2qtFwdW DKn4p9aAslY/DfNaPtPE0iqDzW/wI1t3VNGgPzg9dj82IhluD0dpac52fJtkpHRYQLBY VrEGCZgkjqMWOC3S15yZODB6hE+InoC6hI4x73BwMRcZycqO7VtswgxNAtsYg1hdffWx kDQ6uJQu9CYb789DqYxrq17NqzhNIJlXq7xALPACp8X5yhhKt9N3GIct7NnlCyNjhvK/ ZsoDO+/edKp4RcXdMU1YIXgBUQYpoEl80uzNP5GdGco0wSOAQmn1N2RL/4DUMz8v+KGv NIfw== 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=e9apZ52cK02x8UbJiBFpJ1BClzorbrgcj4RJcJBnqyzUh7Qp7utIJaQcbYy3GawVUt VdriK4CZpwzeemJKalYzpkS3K/LCHyDc2UwHzc/95NhP4dYs6tzOEixUNqRETJFWLZix zt/9aZ1IpwWR4oAz5In14b9zhkPJCjqtOesU8l9X8nVOpj2PMyO9dyOzuVfXEBQVwpfk CAIQkiJAU8ARD6OTR/QdJSGSqEnle7W+zTkS7iq0Q79SPJnWwqoF7xWzplr6BLhxqJEK rf0t5EkIabNVfig8nrvwvnbln96x1vzFfwmazl96gtX8Q45W1gLrdNJkXNrcr3abaDWr AI6g== X-Gm-Message-State: AOJu0YzKNkUlMbEMq654D5bSFy5RA+V20Mh8Aai/AoQ0PhM9jxNankfh 3PxYcgPGU6iAt3g8PzYxX+w= 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: 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