From patchwork Sun Oct 8 14:02:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 730685 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20AD6C150 for ; Sun, 8 Oct 2023 14:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gappIRqr" Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F954CA; Sun, 8 Oct 2023 07:02:51 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-352753fb42eso15719425ab.1; Sun, 08 Oct 2023 07:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696773770; x=1697378570; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i817gm/mHayZlPnquKIwRuj/bCQb7oFHdZW9Ygf1Wzw=; b=gappIRqrv8KXeXcqhkFYSSf4OzssNhdwzyyny+Xg+5XbnWM5VdGHYfASdOlQU1ik8I sswI079Ash/546f2iTQEew1Jnv+SY9MfU8VJxuXYlpA+anLF/wllBobTHXCS7DjI5qDK CYGAJdRVLp9C8+w7y+pVmzNzKTSXljp8AwKGsBAsusNYK0k9EO5FdJ1sic7Y7JXzDPmX o5UKUjRJIXXQTLIZ1weG8c7NWTLwUQ6v4nXoRHoEF37nBco02SDN0UtSUpAkX7TIdwpg DkvCtfS2+UO8T3+QHoCmdI/G7n7COSLjLHHM0szI5pVf69D0/Kj0G3VVTuoUabgRr2JP NTIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696773770; x=1697378570; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i817gm/mHayZlPnquKIwRuj/bCQb7oFHdZW9Ygf1Wzw=; b=tbTCf+YYMZcVLyuB010WS3BUBtpjEkH0bHXLrid79JFgMNxVEauHAzOpTn7Se+J4iQ YcYbbb6heAlSPvf2MgI1jgQxr6f4d7++OEYj20xGfqxlB5jfQbdaLrE88eyEhLrMvsPG AOTgdT1CUPGMzn1RZj2va0LngB1Oj/IMna2IC8DMGfKzWsWiK/blN70bOG6Fk+oooOmG gCD8WgG221Ia74B6OHnTkF4lczi1HFs4ZO0ZpB+m404Ot88feCztGJFoBaM3iLIvRovy GRG5NfiZ6UBmZ1mmzPTmkYro7vhMopxOsCplXot2h/JF4ZdpL04QdiRLdH6PBdS28u0l hVyg== X-Gm-Message-State: AOJu0YycHapCU+4ujvtMrzKy81lJHhOxxXD/vqwcGlPpDjQZ1O7C4a4E QAm+h7Qdp4QGs8kuhzlrgZo= X-Google-Smtp-Source: AGHT+IHRU/p6K757tMjeqS8Ii2krhvKfRulLKOsvixbCZCCoLxXOmhUGypkPJ7IguLsJm9buWGS/YQ== X-Received: by 2002:a05:6e02:d45:b0:345:66f5:3404 with SMTP id h5-20020a056e020d4500b0034566f53404mr13375528ilj.0.1696773770370; Sun, 08 Oct 2023 07:02:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 07:02:49 -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 1/4] arm64: dts: imx8mm-beacon: Migrate sound card to simple-audio-card Date: Sun, 8 Oct 2023 09:02:35 -0500 Message-Id: <20231008140239.6601-1-aford173@gmail.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Instead of using a custom glue layer connecting the wm8962 CODEC to the SAI3 sound-dai, migrate the sound card to simple-audio-card. This also brings this board in line with the imx8mn-beacon and imx8mp-beacon. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam --- V3: No Change V2: No Change diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi index b10e2a703a44..313e93663d6f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi @@ -98,18 +98,30 @@ reg_usdhc2_vmmc: regulator-usdhc2 { enable-active-high; }; - sound { - compatible = "fsl,imx-audio-wm8962"; - model = "wm8962-audio"; - audio-cpu = <&sai3>; - audio-codec = <&wm8962>; - audio-routing = - "Headphone Jack", "HPOUTL", - "Headphone Jack", "HPOUTR", - "Ext Spk", "SPKOUTL", - "Ext Spk", "SPKOUTR", - "AMIC", "MICBIAS", - "IN3R", "AMIC"; + sound-wm8962 { + compatible = "simple-audio-card"; + simple-audio-card,name = "wm8962"; + simple-audio-card,format = "i2s"; + simple-audio-card,widgets = "Headphone", "Headphones", + "Microphone", "Headset Mic", + "Speaker", "Speaker"; + simple-audio-card,routing = "Headphones", "HPOUTL", + "Headphones", "HPOUTR", + "Speaker", "SPKOUTL", + "Speaker", "SPKOUTR", + "Headset Mic", "MICBIAS", + "IN3R", "Headset Mic"; + + simple-audio-card,cpu { + sound-dai = <&sai3>; + }; + + simple-audio-card,codec { + sound-dai = <&wm8962>; + clocks = <&clk IMX8MM_CLK_SAI3_ROOT>; + frame-master; + bitclock-master; + }; }; }; @@ -192,6 +204,7 @@ wm8962: audio-codec@1a { 0x0000 /* 4:FN_DMICCDAT */ 0x0000 /* 5:Default */ >; + #sound-dai-cells = <0>; }; pca6416_0: gpio@20 { 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: 731644 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D3B2C8F7 for ; Sun, 8 Oct 2023 14:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fw56lyJ4" Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C71CF; Sun, 8 Oct 2023 07:02:53 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-3526c9c401aso13220585ab.1; 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=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=KuvXt9sFvOyA/pPS+UN9EsIG1PlSSdh931kGA4/DRos=; b=Fw56lyJ4tLD5dvnyatxlJrY87V5QogjRSXlG1efSd3g+zIzvAT9AoSEgDlExIr1V6x X1UXYucxU/pgrwBZ/LxMGaxb235fNyVk6q5eTRu9k4Y2eyUyPrXV4ZVV6Vg2XZ4AET0J vd9pGlmvaVY0+LlUrw3cwKfD2lFSjgxatSy9p0Xdm5gf9KfbKg11K5dxrDXhxuSOEWKD gZ4eEVDKLzHK5z2JlkHQWd5uaV2s110Xt1b27tiZydVqF+gfLSdGv7MvFMwPjNWaxhi9 tITfBt1PZCQvpNEM+Ri8bxkbrudm4OghNX9JoKZMOdlP0fpRRDF7aJa1SU0eGbmcfI8g m2pw== 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=MD+LeXTAicEEv8PtQ9UMlmkUoz4C9gmfxC2xIzeGCNXXB0Twqt/QpTcJzlbDKVwteF viSCpVtM7WRX+tcVDxpkHTDS/ZLhWmZg+wu9IkIBb9RreAKOBie3VnUwxMfOkEY9qP6X SoPxDrV+h0zJNGubk/t07/xFytzpWx0+YT+BGkjCm4ZnN1LtrevCH6nf6tlk2rc6Dk8D kjD9x0TS6QhWtpUVSLdmfEmeyEbYKcJidQvqjHReQ4ZAS5oPbhY09gYLQVa8gFxNVmhj LzkSIOZvbjFwNbuZ4CZeq2phNADLPLe+El4EqjyeIdIHCD+V1TGKkY/jetC2buj8co9v qQtw== X-Gm-Message-State: AOJu0YzYIz0zVe1B1hdh20WFXIDZM3VaiJFJeSEyoSARmQ6LIDyc1H/G n26QcVhUGd6m6dehmVwyncQ= 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 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 From patchwork Sun Oct 8 14:02:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 730684 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E232BC150 for ; Sun, 8 Oct 2023 14:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ENV4VPiD" Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A669FDB; Sun, 8 Oct 2023 07:02:54 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-352a27ab1aeso14614515ab.3; Sun, 08 Oct 2023 07:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696773774; x=1697378574; 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=xTC0xEmiJQH7h7RgVwIyYpryKqxuFMiJlFaccvcwhZQ=; b=ENV4VPiDBvLRzzsLHM2PZwTTLRSPlG2becQIU9xNVwZyEeAnJW2rnuw6vPfYI8YAW4 BJwxZuA8CxJqS+5fr4+Mxc0bHvQFtsFMsH9CSSNAv4j/ljSP54MNT5cN7oq6M0qPdcJQ Leq6rxtvkibHU0jG6VEPm6OUJjGfdoFcfg7oRnKB1tOtCceR6brtyIS1HtxcDy1A6C8l 7P3Jh6pqtpBWnhG4mL0lBL7dXB3YWIY6jVcyCew2p6BoN5mP4346yfsp6f/mdMxi5evs uucpJccwmKWOXNPJw7OziMHsO0MNEy636qHXGhnKE0GXV24nGLmrb7BFFRFFsy16WtzJ E7dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696773774; x=1697378574; 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=xTC0xEmiJQH7h7RgVwIyYpryKqxuFMiJlFaccvcwhZQ=; b=GDhZbeegVUDfjGiYG3gMybN5xnPo3zuYNxDaHYFhL6uGIt5anBoBiGK8OvnKsfxPLy BFrZxRjO8zL+HqsusgY5yi/KDFcXdAZ/Ssyk5ipb9PjIILxlw7zgLRIqs/A8itA75nd5 Kv0Y5PjQcIjaasuTphRISeR/VBsjHdns/PSnL7YT2xvLUEeIXi2TYeOWQw/zuqJwXx/i G6JDtFd4qPeSLvf63nnnD2ETXmhYjtFTJSxMJyoG2uWSI+z7c2TpJBv84LmCbQ6nUbXB +BU/cfYUNRypx1/HYhBWl1qDaZ7+xI8NfRVRIjcPbA7yzUnI/cS75s31dRKnyKfFSYae 0ycg== X-Gm-Message-State: AOJu0YyT5qbJ1LXKeZNpPfjJ+ahFTOiSXQfgtmoCAQCRqBSS607FE/Hx yhgWOJVP18vU/n7qsgEWKlQ= X-Google-Smtp-Source: AGHT+IEzCYpXETF0AL0AJMaTo99wIyDMfeggA89aScfylY2EDiRMqv7flqKYaaYtyItJUrON4lRM4A== X-Received: by 2002:a05:6e02:2189:b0:34f:35e8:5098 with SMTP id j9-20020a056e02218900b0034f35e85098mr16568780ila.20.1696773773923; Sun, 08 Oct 2023 07:02:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 07:02:53 -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 3/4] arm64: dts: imx8mn-beacon: Add DMIC support Date: Sun, 8 Oct 2023 09:02:37 -0500 Message-Id: <20231008140239.6601-3-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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 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 --- V3: Fix missing tripple-hyphen to separate notes from git commit V2: Rebase and remove sound-dai-cells since it's been moved to the SoC. Reviewed-by: Fabio Estevam diff --git a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi index 16761975f56e..20018ee2c803 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-beacon-baseboard.dtsi @@ -4,6 +4,12 @@ */ / { + dmic_codec: dmic-codec { + compatible = "dmic-codec"; + num-channels = <1>; + #sound-dai-cells = <0>; + }; + leds { compatible = "gpio-leds"; @@ -74,6 +80,22 @@ reg_usb_otg_vbus: regulator-usb { 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"; @@ -221,6 +243,15 @@ mipi_csi_in: endpoint { }; }; +&micfil { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdm>; + assigned-clocks = <&clk IMX8MN_CLK_PDM>; + assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>; + assigned-clock-rates = <49152000>; + status = "okay"; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -311,6 +342,13 @@ MX8MN_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 >; }; + pinctrl_pdm: pdmgrp { + fsl,pins = < + MX8MN_IOMUXC_SAI5_RXC_PDM_CLK 0xd6 + MX8MN_IOMUXC_SAI5_RXD0_PDM_BIT_STREAM0 0xd6 + >; + }; + pinctrl_reg_usb_otg: reg-otggrp { fsl,pins = < MX8MN_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19 From patchwork Sun Oct 8 14:02:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 731643 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 772C7EEB4 for ; Sun, 8 Oct 2023 14:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ODFspaIs" Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A17E4; Sun, 8 Oct 2023 07:02:56 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-3515aad4a87so15692245ab.3; Sun, 08 Oct 2023 07:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696773775; x=1697378575; 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=xeyjdW8u16yegotDnSCZCKulMzcwtuKO9IQY/3/chxk=; b=ODFspaIsFEKn0Sp3cDy0Vk4G0hGt/z0HVwMqHEwOGtDD7380V+EVmGRrOsqsgMo6hc c58cPSFKC8f/WRmC33PhZmptlCwV5to9BhdMNW8jQoJj/W6TIgJovui7SDeMhgEt1o1d FSw11F/ZyWZEW58PdKJGGf79VF8HNoUDDee3ZDkabPiL+nxPziA71MQEtnAzhz99eLPt 96V5QYfwsuFsGIQEjAckvkcDlp4HRAUvGMWDLJ+25DWYHhs8WUccBZIPk4bpWPkYrbBA 10XxXTNlgIzKoCZQmiN1dXQEtMbiPRGq0KHejJxicLnyhm5hOubswH57rGMYYjzV9XTj oKrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696773775; x=1697378575; 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=xeyjdW8u16yegotDnSCZCKulMzcwtuKO9IQY/3/chxk=; b=WrvzJvgd3MIfVRqGEpfdQbFAVQJ5aOaVHR004sxpgYIZPCYBvfQRjZKp8wwtI2JCER jQodwFYnmpl6dsbNfKWHaik/qy6mZ7ROtv9oiYNhX1zRMcjIfP44l6sum7nYYqZ/rfH3 gWOVsF3cJO9F1unVQHMzis9hD3lVdVIeinFOtwxpW3QyS3DORlJFFgOE80QdA2FBL/gQ RTgC/v4cp2fRkmXGctM8dMRK5KVibAbdBHk5XszhELxjE/E2TU1L7rRjyRvg1nz3RtBz mS8+ve4qF4zm+pQkmnFsdlWuFeItzyJU6+Ea8Ocr+l/P313ZhzHCSQaAvTo0nlFC/dCC ue7w== X-Gm-Message-State: AOJu0YwOzy5LRKln7GL1dQKn9Zv2xEppgsywouGslyx369xzq8Yl0+fU 7gqgQ5Hbvv9bBVFbNWxWS64= X-Google-Smtp-Source: AGHT+IGplamwSERc2ILth4+Q1zSQcJ80lOf9usqGVtmWE5J0YzDjORtyRMadvGb1VIqozKA934WDPQ== X-Received: by 2002:a05:6e02:c62:b0:351:e6e:7723 with SMTP id f2-20020a056e020c6200b003510e6e7723mr12047296ilj.25.1696773775435; Sun, 08 Oct 2023 07:02:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 07:02:55 -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 4/4] arm64: dts: imx8mp-beacon: Add DMIC support Date: Sun, 8 Oct 2023 09:02:38 -0500 Message-Id: <20231008140239.6601-4-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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 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: No Change 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