From patchwork Fri Mar 4 18:17:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12769771 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 56207C433EF for ; Fri, 4 Mar 2022 18:19:33 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mnxme3ZNhtsjzbRrYsg91NOYM6dvqLmG+kX1vQFz9QI=; b=PMMDgnYggIaLyd s8l2IntNhB8/NESkJoOu2LH+Q/DGmnAK7xUEl41dpD05TDjykzKZbt/Rnz0Me5u8j6c5yFzxPBglX G6v+Qb6BRBe4WBQf0sohNx3NFnwX/6WQ5HDUzjEM6SAJNIhzG4zIu63ZFS2HeBVXGmNHmF3jkliXo WNG6X2SPutc7uYjUcZOjq50Y6fPyY3CzTReT/TFt2mnXdcWH6Oa4QAeitwvsLzWJ8jdzBijxgOyKg HVR/ZPSzz/kSBP78/H09KMNRoqEJspLhfNDXJNVhOhjOje84/KWqrhun3NJrbO4XNeui4SIIqsNRo 9nohEzk0oqAr2Um80mdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCVS-00Ba3t-75; Fri, 04 Mar 2022 18:18:22 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCVO-00Ba22-S7 for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2022 18:18:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646417898; x=1677953898; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3K/f0lywjBs7m0IsU3YQYGlkUI2bCsgf5Tt3pD3ngwk=; b=YaTsCMHyFGtPQD4XGqIPOcgWxzgK9bLDcvcJhd89cTeShevOWPybgVeD NLSyIJXD1o3zwEVIoshkNj1rex8s3MWWbUnfDuC8h2c3chxFNLFT/QqRn +/00NkqecaEaTj2lTxsGbS9rWZIegELU71TnfkvXSslcR18mG79qTn++c RovPsE1x/Rjny6ywZNyY7ekAo9TBOvgKYkHHQPKWjm9gDfcLaKTkFowuc rZaxUqsIf0/oydVOAzhfiw6ctt5CDfd8Pn59AR0gqUNI3MzjxT6aE0LzS ZGuS2FOl6lgPA+N6tjicwYanw3AeWyyvyBiPBmbQNARtPud9xinZ7kkYS Q==; X-IronPort-AV: E=Sophos;i="5.90,155,1643698800"; d="scan'208";a="150898114" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Mar 2022 11:18:16 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 4 Mar 2022 11:18:16 -0700 Received: from rob-ult-m19940.amer.actel.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 4 Mar 2022 11:18:13 -0700 From: Codrin Ciubotariu To: , , , Subject: [PATCH 0/6] Add driver for SAMA7G5's PDMC Date: Fri, 4 Mar 2022 20:17:50 +0200 Message-ID: <20220304181756.1894561-1-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220304_101819_023964_C3A44D14 X-CRM114-Status: GOOD ( 14.42 ) 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: , Cc: lars@metafoo.de, robh+dt@kernel.org, tiwai@suse.com, broonie@kernel.org, Codrin Ciubotariu , perex@perex.cz Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds support for Pulse Density Microphone Controller (PDMC), present on Microchip's SAMA7G5. The PDMC interfaces up to 4 digital microphones having Pulse Density Modulated (PDM) outputs. It generates a single clock line and samples 1 or 2 data lines. The signal path includes an audio grade programmable decimation filter and outputs 24-bit audio words. The source of each channel can be independently defined as PDMC_DS0 or PDMC_DS1, sampled at the rising or falling edge of PDMC_CLK. The patch series starts with a fix on the ASoC DMA engine support. Then continues with the bindings and the driver of PDMC. It is followed by the DT nodes for SAMA7G5 and SAMA7G5-EK. In the end, the drivers for PDMC and PDM microphones are enabled in sama7_defconfig. Codrin Ciubotariu (6): ASoC: dmaengine: do not use a NULL prepare_slave_config() callback ASoC: add DT bindings for Microchip PDMC ASoC: atmel: mchp-pdmc: add PDMC driver ARM: dts: at91: sama7g5: add nodes for PDMC ARM: dts: at91: sama7g5ek: add node for PDMC0 ARM: configs: at91: sama7_defconfig: add MCHP PDMC and DMIC drivers .../devicetree/bindings/sound/mchp,pdmc.yaml | 99 ++ arch/arm/boot/dts/at91-sama7g5ek.dts | 21 +- arch/arm/boot/dts/sama7g5.dtsi | 24 + arch/arm/configs/sama7_defconfig | 2 + include/dt-bindings/sound/mchp,pdmc.h | 13 + sound/soc/atmel/Kconfig | 16 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/mchp-pdmc.c | 1084 +++++++++++++++++ sound/soc/soc-generic-dmaengine-pcm.c | 6 +- 9 files changed, 1263 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mchp,pdmc.yaml create mode 100644 include/dt-bindings/sound/mchp,pdmc.h create mode 100644 sound/soc/atmel/mchp-pdmc.c