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