From patchwork Thu Aug 31 11:51:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13371437 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 61C00C83F12 for ; Thu, 31 Aug 2023 11:52:29 +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=aZ1D7XjDj2V24EDRSopWahBRvaR6Ork4vTUZwNtyAP4=; b=WubtLnp8gM9QQ5 h3Ot6SdgrLIlMMnL4gt5VuV5pZ3h/ytUMpaDSKm3+V9Fhz92veEZEGppKqhKNvrFMi6ZPF+eiBpvi uzNNSsc3VcqMGjogcmx6In86lCPPxzbNQvVoNddjg1ZWQ0E5aY80a6WsULnEnnih/AmHTWtqBDyHd pDQCh8qwA6uJR5z9j3/8x7AtuYHx9Y3ZQrUAnqXbqsq1OZMwzgMlj3Z9O82HnJxqqzpgxilyJ+0AI nFQjRl0SeUIEu6DMGe00z09L9aug4pNHRAoTgai0DNPeIYQPEw/cKfeOXQ4uv/2K4PMQtoP2EQXwe S+Ur7cx+cyv73HHG71ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDP-00FDyV-39; Thu, 31 Aug 2023 11:51:59 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbgDH-00FDud-0D for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 11:51:52 +0000 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-34cc8e8cbd4so2602695ab.0 for ; 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=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=UYuphCJVTBw5X395ddLzbAIWgxz1eVkD4K/+xpz52Vg=; b=hae1do/J4MtT1o9MfDvIbNsTdtpndrx8Na/MxpChD3jJIrnDBlk54h9tvxy1UM2o39 jENI0guOsTy+71H3hbic5PbNR+FotcBx3AZza9os9bXWRfUzmi9N84jkTU0TcXrYSMGq UHFTXzUryU7ZHZYTVlpZoJtaRvKboWwwNQmbn6u9w8OJf0tMpN3Bfg4PVl3Lbx0Kz3EX lxq/S2vqa3j3BYyga6lqQfveitHsRiUX3bBMXMHbBTBGOhBEs7AkjzoL4CxQM63czWf9 2VD/a0kfCDrgKQR9fpArQidfSFyTi6s2Imi6OjLiPN8UQmmEC3qTLgp4nfu9Rh9XBXrB bPXg== 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=LrwueTAM4eyP0dq/1rr66ReFpjKOUQsPxleZtAclZ8tM0hssleHTbZbCLutJBji3Xl yHjc4jSKtutOu9yKcgHbw6arSur6wkMGXTDjq+jkq18y0g11o4iX+f+iDI57gDX9scqH UGp95nvk8zffhu7N+I3sjS43FemiG12F7pVbJ7Z4GsQJAIdoeXK30J4NMuLMGocIifKl ohhDY/0TNHq0epua9aY4FJSnJAAxmY6JMJ9OTlt6oIAch9HiEuRtFdoyJLgOAXFM/ARO FbRZ5oHJhib4OfNeJkGrtTRayIdrl65w3x0ZyEKN8DgYvlBCKsZUlYqUPqQVtHoWOT74 wmRw== X-Gm-Message-State: AOJu0Yxy7XuK0QsGcNlubXkRfXiZcNZdMfqJqhReqflVJdDgdRax8M4Z opKwEb/hb1XtAodWMthvEO6lbqvjoic= X-Google-Smtp-Source: AGHT+IHJcAeSKb3dVp1FGvE0rQrWpXkXhudpoKU555XVw9oWPRW92roA3e+JUwqYENI6MTcO0fwnYg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230831_045151_101150_A3A99906 X-CRM114-Status: GOOD ( 11.46 ) 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 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