From patchwork Sun Oct 8 14:02:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13412731 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 C7A61E95A82 for ; Sun, 8 Oct 2023 14:03:27 +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=1EHTF7cVPcE++ZdGBQxjna8mHO9Z2Xk27By59AuD9AU=; b=1oBKwMeuS8ESE1 FNOcfU9rQuneFpUcbmR3d9KFoINqUkrSKeUX5FvpS+sqVp1k7Olx6e2Z3TsGXhlZT2plGoq+mtE7X +F/xzennCzsCd+Qc8Dhv38fMTDEttGqZHijHDyc7EClCMLC7bm5WCiDAK1MEqzWanYZXRGlJoqkDx 6tueFdNTaYSO0rCFvBLUAGnJmYhxl0NwRYndlCkXTi0ySuu0dQTVVhXDDMUjY+14lGrvw5XF1wInw sTdPvNki6o0OyAIuuAIT22GzRIgSP0Qt19M9E0MwGpLoT32cKts1hgQLyy/CKb2V1kWclaJozlzfn tDFvRzRIyCsfH4jkcb/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpUMz-008vSF-2R; Sun, 08 Oct 2023 14:02:57 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpUMv-008vQt-2l for linux-arm-kernel@lists.infradead.org; Sun, 08 Oct 2023 14:02:55 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-35273f62ca3so10183345ab.1 for ; Sun, 08 Oct 2023 07:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696773772; x=1697378572; 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=KuvXt9sFvOyA/pPS+UN9EsIG1PlSSdh931kGA4/DRos=; b=WW1/wMvQxmoS+dlxUp3g8F5RoxJvgqflxBUSY7YWln4eweX+I88yLYYcJZdrstAozC kNGSZD13qHVWq0JrvZVNizI+Ead2CMVeBY6jG3zD3Oeu25nj9goM5UFFU/pUnOvFirBe PKAJkro8nzXj9V378duKyFsR6ixjqTwu2pPfqEbjVv6tD/Sj9FMxlFcysMouSza+X8ip j4PDf80JlxIC4iLfu8ViaHLEl9Ztq4/cJU+53O0tDznEceeYEPYYCE/Kfp3f963JePfw ywy3foYlqhRTDMuFX/RSNdM5xbKHa4cRYA9KqcO5gmU65csvPGX6uR1hiV5vcuR2BMOm JkFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696773772; x=1697378572; 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=KuvXt9sFvOyA/pPS+UN9EsIG1PlSSdh931kGA4/DRos=; b=h3m1CtpV+2KB7zDEYIEHtceU1i1HcPrbIl+w5844yogb/uasR/+xwq27ZcJcmF7h4y E+nmDLQTziNUMjNk2e4tLJwO7LCq3EBCGaPSfxe05DUdYzI7KUOeGBFqf7VIjDSmEHIK OqNTtp0gwZ+Ua+7BfsS7sFVX23fFgjYOII2WZSiPqolJqKDl3McekRxSutc89WnU6O49 mcedXic8vrQPy5oscVPLrSVA5YSFFqAKuR/v5oQGh8XcqFB7EaS8csEQ8AEh52YBpnrc eQ0TPyWYW60aeHZ+OokCBBx+P6iazQySxEOoOtvlT3fzdX4R5GlGyCEfGWqJwHxRKiJM cdUg== X-Gm-Message-State: AOJu0YxCxI2htuEU78ttZ6FLcmEQtGNNK5yZ3NkEa6Z7z042wLp8t4pF g9g92r+GL3dX8nrXjyDMqhW8xda+aqY= X-Google-Smtp-Source: AGHT+IHz3JglSvRK/HJS7Ms2Uc88OKdv4C6JDCb8MC7Zk4TJZP7o74Arw2OUfnGXngrwh/MdemNIOQ== X-Received: by 2002:a05:6e02:2192:b0:352:6251:2366 with SMTP id j18-20020a056e02219200b0035262512366mr8108291ila.5.1696773772428; Sun, 08 Oct 2023 07:02:52 -0700 (PDT) Received: from aford-System-Version.lan ([2601:447:d002:5be:a2fe:632a:2360:50d3]) by smtp.gmail.com with ESMTPSA id 2-20020a921302000000b0035134f1a240sm2272901ilt.86.2023.10.08.07.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 07:02:51 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 2/4] arm64: dts: imx8mm-beacon: Add DMIC support Date: Sun, 8 Oct 2023 09:02:36 -0500 Message-Id: <20231008140239.6601-2-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231008140239.6601-1-aford173@gmail.com> References: <20231008140239.6601-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231008_070253_891694_DD66F51C X-CRM114-Status: GOOD ( 11.58 ) 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 --- V3: No Change 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