Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp2060514rdb; Tue, 5 Sep 2023 13:08:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5/ecJQjUZUAPOigO56ABZww41fwmY6xjlvXu0H8SSeGtS6wjCkrw1bfrDy06Siiw6kpiL X-Received: by 2002:a92:cb0e:0:b0:34c:e6e6:80d5 with SMTP id s14-20020a92cb0e000000b0034ce6e680d5mr17518264ilo.26.1693944525983; Tue, 05 Sep 2023 13:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693944525; cv=none; d=google.com; s=arc-20160816; b=pqJzQhFvPHjDiV7PP/vaOK2D8kBCf/mSKBw5TY8bsy3yJv94H4RueW5X2uvtzcvWRt ozeloNK0MSeSqFRpLIOcIBGYuQdhl8eK3w7dZw67LmtOi2m9LBGiL3wZHJWIZVYU+NPS +K+YZp9c8a+m/JrdzGgK9c5AEm4ogkhba2+Sp/n92PuOF6Hfs9nwTl7PHXvB1n144Gi1 /7mSGCs0WvwaQufxGu+tRiOqyi3bY8QUqyJnI6ocWxYxv8ZZR8D4CCdnU6fP71HE1cmW T8QvjLGp+hMSZh+6FhZHA7XYqZvvzJmKbpHrl2g2TbEc9PINYyu4EEdpWhvJUvtHtvFg rsUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UYuphCJVTBw5X395ddLzbAIWgxz1eVkD4K/+xpz52Vg=; fh=gC1cZmlOWiS1CLlwE/YNZ24shETpOEvzCi+90KMez2U=; b=qszjraSn1B5YZotGVEKJxtoyl/LHlohNLqN97sQOU1dvY+Cky2h+xcOWFq7MjdUa10 wHphpHm5nNtoWXg8faR7RNWKcWJ8gUBdCnGh2R8R14x+AdI5zn2HqrWiolaMtcS7RkqO 1fIF/J05V3NrP42llt65wShNB6a/Giz4Q7ESBXi1k6hvCMISSIp0NBJkr4V2M03M58jv ETOMnHBufPivo6OZe2qDjjyX/nGH9XRvSukBeMX3FYIbdL3MWCYpCGjE0STRFE9xzgXG IpifYJ0A+y96TwAz/42Sp6RTJ7noWu0eYC+ZRP3YYAXyHDTRivS5h2BEt/GquRiKMRbG 8lTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="DT9OI/zr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k72-20020a636f4b000000b00565e92e8734si9719079pgc.769.2023.09.05.13.08.45; Tue, 05 Sep 2023 13:08:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="DT9OI/zr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346128AbjHaLv4 (ORCPT + 2 others); Thu, 31 Aug 2023 07:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239065AbjHaLvx (ORCPT ); Thu, 31 Aug 2023 07:51:53 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80CE9E45; Thu, 31 Aug 2023 04:51:48 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-34cb5c41777so2563735ab.1; 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=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=UYuphCJVTBw5X395ddLzbAIWgxz1eVkD4K/+xpz52Vg=; b=DT9OI/zrC5ed9TS3nsKQnJhQ6dDu8zJP6nG+b5viZth5xhyClKq7mjJG8Yzp2Ymgjk Xk3lRo2lUkrMaCgyR5ASrt6a9KHO5awpjs+gW0Q1g+UjgE1YiCdIGp+5O2C8GdZ7qbx7 vGP9ZNfwFWlqi0T8lPw+qbrcKij3/San9OHIDVOqfkQrpGEjGhcHIXaN3DNrmjjO1f6x JVV3OL2dfPx8yKklcI+aBDuAf0XT+iX/neDUfw9ccEy5D+ZOQeF9HItsY65wjgwdN6MR E31ueVHt2spLLsnls+qVBXgXlyPEsVHFcs6nuAzk05geIfunbTl+XBZPr6jGYYU9HgTY TVZQ== 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=PJtLmK5/+lTxDCpyt0aQbLdYeq4RKOXVahox3yZf0KiUZMelkcsiGAm1hFkPURQ3Zf wjSnQmDQ/hWbduIVWMX9xCOlQRnG2B7BPA/PcRMv1LGr5PaNCESFJyuhgU/eGsrPZlTc iykA7auFwyBmT9+FsCmeFL0m9qyXJCHMJ19ky5tiECL8JnMmMlAx8sPAoYt3cecycS7b jzcrSjw3DJkkpoxLy7BivDmuPRbfagekFy6vS215BPr8GuU2pu7J66jo46MkZ2GKjF6F 1yF7vHhBHc/ACZfGGCKsAQQ0KvdFz/aMgDNpoiClposcpxRdKVB4igf1H9SiyEeG44Vd ITHA== X-Gm-Message-State: AOJu0Yy9pncFAf9VrnBpcY313y9n/zb4Labau7FeqdeWlFFLbTlyKKTw s27q1zBFQg0IMdU4YkQRP8argpMKU34= 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 Content-Transfer-Encoding: 8bit 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.39.2