From patchwork Tue Feb 27 07:03:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 13573300 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 ECA6CC5478C for ; Tue, 27 Feb 2024 07:19:23 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=/4yNwjJhSS8M1hmPwEXQxBLvCOsxV30IPs5XnJzUjFc=; b=JH02v7kG+yzD6y mZumbGh0nEiPRQqVTICuo4Vbf8mKkK/Y5yYOlc5C+EPK8p3eYnBHLE0s3/HEWOFaPFMsBpnIogfrs uzLSIvwJ83RLd3brJ5dNVcTYKxPeaagIvnqtTXytCfzz/jbKf8j1C6iWu4afQt98QF15AWZkB1aXO jQVKPo3HuTLVTDe/Kfhwr5h43b5sDyzJSd0xR+t17foHLlDbm3HywaRx+ZvSp3rOzMDAr32tFEmiq aTJbBdq8/Wxaet5Apg2z4ixQ+smM4DlIiDyyKGQP6VxciUDaYScD2yxKR1tt2UEA9U8KRe08dxfHe ryciF+vG+hYCLszLIgVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rerk0-000000046Hh-3GPw; Tue, 27 Feb 2024 07:19:04 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rerjw-000000046FN-33O5 for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2024 07:19:02 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 06F291A05DA; Tue, 27 Feb 2024 08:18:54 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C48B21A022F; Tue, 27 Feb 2024 08:18:53 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 25DF5180C2DA; Tue, 27 Feb 2024 15:18:52 +0800 (+08) From: Shengjiu Wang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: shengjiu.wang@gmail.com Subject: [PATCH v2 1/2] arm64: dts: imx8mp-evk: Add HDMI audio sound card support Date: Tue, 27 Feb 2024 15:03:25 +0800 Message-Id: <1709017406-12624-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_231900_970391_6F5C66E4 X-CRM114-Status: UNSURE ( 9.57 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The AUD2HTX is a digital module that provides a bridge between the Audio Subsystem and the HDMI RTX Subsystem. This module includes intermediate storage to queue SDMA transactions prior to being synchronized and passed to the HDMI RTX Subsystem over the Audio Link. AUD2HTX works as the cpu dai in HDMI audio sound card. Signed-off-by: Shengjiu Wang Acked-by: Alexander Stein Reviewed-by: Alexander Stein --- changes in v2: - remove 'status' in sound-hdmi arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 11 +++++++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index f87fa5a948cc..0fc6c0d21cd6 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -138,6 +138,13 @@ simple-audio-card,codec { }; + sound-hdmi { + compatible = "fsl,imx-audio-hdmi"; + model = "audio-hdmi"; + audio-cpu = <&aud2htx>; + hdmi-out; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -191,6 +198,10 @@ &A53_3 { cpu-supply = <®_arm>; }; +&aud2htx { + status = "okay"; +}; + &eqos { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_eqos>; diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 9ab9c057f41e..721ab630d895 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1513,6 +1513,16 @@ micfil: audio-controller@30ca0000 { status = "disabled"; }; + aud2htx: aud2htx@30cb0000 { + compatible = "fsl,imx8mp-aud2htx"; + reg = <0x30cb0000 0x10000>; + interrupts = ; + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_AUD2HTX_IPG>; + clock-names = "bus"; + dmas = <&sdma2 26 2 0>; + dma-names = "tx"; + status = "disabled"; + }; }; sdma3: dma-controller@30e00000 { From patchwork Tue Feb 27 07:03:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 13573299 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 79D93C5478C for ; Tue, 27 Feb 2024 07:19:18 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=V4dNeAHlPPotz0DxLfgU4C0V3AuQqxalNzIAJB+lgo0=; b=2sOBuT/ZUNS1wj Le6VdHdA2VJ0pI8ohgm5cgWzDsi0BZznoRbh7Qz2HOWA8HTCrpTsJWg8CQP7de5lNRGD411vzVcx9 TjJAZ+pv2TCyK7IlQeqjWGWjjb0zWgkxlmTrny7xWrtQrv/OnW4BVm1ikdgC77t396lCm68B1Hdki pwv4hYvEhaExcjNx5Gw+/+z1KsZdMP0CdC561IWDSzQKt3RYVluVo5/C7/UZy6UYRignUs6oVy8lV lG6CiILUYloXjAbl4GEcWfBTmu3OQLSWoVLbArKbiSkI95Co/pV/xkU1UfyLfBtXO0/ERz6KzlNqQ 59coN25p155xzbtxla6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rerk0-000000046HW-0SEJ; Tue, 27 Feb 2024 07:19:04 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rerjw-000000046Fe-0qMV for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2024 07:19:02 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2FB14201473; Tue, 27 Feb 2024 08:18:55 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0251F20044A; Tue, 27 Feb 2024 08:18:55 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 535A2183AD16; Tue, 27 Feb 2024 15:18:53 +0800 (+08) From: Shengjiu Wang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: shengjiu.wang@gmail.com Subject: [PATCH v2 2/2] arm64: dts: imx8mp-evk: Add PDM micphone sound card support Date: Tue, 27 Feb 2024 15:03:26 +0800 Message-Id: <1709017406-12624-2-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1709017406-12624-1-git-send-email-shengjiu.wang@nxp.com> References: <1709017406-12624-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_231900_854158_0BB56781 X-CRM114-Status: GOOD ( 10.00 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add PDM micphone sound card support, configure the pinmux. This sound card supports recording sound from PDM micphone and convert the PDM format data to PCM data. Signed-off-by: Shengjiu Wang --- changes in v2: - none arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index 0fc6c0d21cd6..97a3198f2b59 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -145,6 +145,20 @@ sound-hdmi { hdmi-out; }; + sound-micfil { + compatible = "fsl,imx-audio-card"; + model = "micfil-audio"; + + pri-dai-link { + link-name = "micfil hifi"; + format = "i2s"; + + cpu { + sound-dai = <&micfil>; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -526,6 +540,16 @@ &lcdif1 { status = "okay"; }; +&micfil { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdm>; + assigned-clocks = <&clk IMX8MP_CLK_PDM>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <196608000>; + status = "okay"; +}; + &mipi_dsi { samsung,esc-clock-frequency = <10000000>; status = "okay"; @@ -792,6 +816,16 @@ MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06 0x40 >; }; + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_PDM_CLK 0xd6 + MX8MP_IOMUXC_SAI5_RXD0__AUDIOMIX_PDM_BIT_STREAM00 0xd6 + MX8MP_IOMUXC_SAI5_RXD1__AUDIOMIX_PDM_BIT_STREAM01 0xd6 + MX8MP_IOMUXC_SAI5_RXD2__AUDIOMIX_PDM_BIT_STREAM02 0xd6 + MX8MP_IOMUXC_SAI5_RXD3__AUDIOMIX_PDM_BIT_STREAM03 0xd6 + >; + }; + pinctrl_pmic: pmicgrp { fsl,pins = < MX8MP_IOMUXC_GPIO1_IO03__GPIO1_IO03 0x000001c0