From patchwork Sun Dec 2 21:23:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mesih Kilinc X-Patchwork-Id: 10708343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 355D11057 for ; Sun, 2 Dec 2018 21:24:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2696329DE0 for ; Sun, 2 Dec 2018 21:24:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19E7829F54; Sun, 2 Dec 2018 21:24:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B6A392A2F7 for ; Sun, 2 Dec 2018 21:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=SlYirIHhHMaJW6Nu96NFw2cbRZtEA47PxqZP6wepkjo=; b=GpA Clg05TAhssYCmLf6KAaRZnbvXTpud/FdoAdumrKm5wd2gHTB+ZkInPFbnlt/g4BjczJC5NI2zNof3 +q9CBTl1TOl3BwMalHb/5C8rpfQ/eT7v8IydgxCqqIa/fVfTZxM6vk8fLEZwiLhJnG4+3O+IRl7bn BaKRyl2azRM+h4Ix09ob9qYcfVESJu7Mg5IzKQp9Q9jOI1mbgdXDzdXPtH50mhl9a+NV9+HzmWJTD zsg7jUaeAlZ0fgaCwA07ZNP6qBhvzEIz3KAJeNMxERZjLz37e14wmjfdlI0ppckvbnhERsKqGfzxx f7yI3ySqMM083yPlr209XlCfPqUzFJQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTZDV-000261-JK; Sun, 02 Dec 2018 21:23:53 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gTZDK-0001tS-9G for linux-arm-kernel@lists.infradead.org; Sun, 02 Dec 2018 21:23:43 +0000 Received: by mail-wr1-x443.google.com with SMTP id r10so10112769wrs.10 for ; Sun, 02 Dec 2018 13:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=y4Pigh91c3qMXMgWaohLTWbgGJ76Vl21itHuMEWGe2Y=; b=SZsJd0abWfXSSoJwmX9Qgu7FaiLkulvVrqRj652ySMDdDzG2ea9+jxsPA5ZVeonFph je79w+GNz2mqZz4NXHXj9YH7csrodLbBvHksMcm2TZlVrVZiucpklaOZrY/6aJ+rCdKp PeXBUSHHAfHxrNM+9i4HQA1DXupT4nekNRa/rK1Yn3Iy8ZqUU13R6fNc9q3C7BPsKIVy 5Wheif6BivE/iATa0s5K3nF71SikMN2Oc0A/RsdQ1hVPd/PzMaBCbGENqsiK2txpkpHB U/NAnP2G5Ms/n8BGd5BOz7fvcqmQ+LFjehfsN2t4xnzn66Ve9m07FnpWgzIVBtopd6w5 gImQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y4Pigh91c3qMXMgWaohLTWbgGJ76Vl21itHuMEWGe2Y=; b=qQ5ItBNrQ1p8A5Ndu5WMh8cMTQSmYMCUiciZysv7Z3QEjO4P0RFCTvqf1X251Kr5vY lx2C0ruOEkGirXCQXeEFGQdJNdZgOo5eYkwD3DpSToWIRXury79c7tYi6KsXGA4i3JFw MTLzLeTUV1GipQK5IcnojoVYJvysG+Ov+vvcXSpr0bFWLZs6Y+Y21wnPheAHsg1z16RN aotxrgIoV3xne1fBjveSgQ2Bzk8RD8UO2oNoAEsmGyk64syu2gP3QTSL+ZO5vvxSsX2o S9M6P3rSvj1hkqL2UtLdEpDwXKjCwbONgGvxldqd/4Xb4ji3LCo+TU95SkNEwUsUFTRn 3zEg== X-Gm-Message-State: AA+aEWZ8E1RPT2ANP3IpB30woiCxVYpCOuXvX6HV9Ydulqqne1IxMtgR y2qHrADaRjt9rjXXdLfv2lc= X-Google-Smtp-Source: AFSGD/URshyVaqMcmEPLl6bVYviO3uoCEO0X9JpSRaRjTrOeIUeSH84v5c29LQm0fjrHKfieStuxVQ== X-Received: by 2002:adf:e284:: with SMTP id v4mr7253944wri.26.1543785810325; Sun, 02 Dec 2018 13:23:30 -0800 (PST) Received: from ThinkPad.home ([185.219.177.152]) by smtp.gmail.com with ESMTPSA id d2sm9551043wrs.97.2018.12.02.13.23.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Dec 2018 13:23:29 -0800 (PST) From: Mesih Kilinc To: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sunxi@googlegroups.com Subject: [RFC PATCH 00/10] Add support for DMA and audio codec of F1C100s Date: Mon, 3 Dec 2018 00:23:07 +0300 Message-Id: X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181202_132342_377328_C48DF5C3 X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Mesih Kilinc , Mark Brown , Takashi Iwai , Chen-Yu Tsai , Liam Girdwood , Maxime Ripard , Vinod Koul , Rob Herring , Jaroslav Kysela MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is RFC patchset for Allwinner suniv F1C100s to support DMA and audio codec. Allwinner F1C100s has a audio codec that has necessary digital and analog parts. It has r-l headphone output and microphone, line, r-l FM inputs. ADC can capture any inputs and also output channels via mux. Any input channels or DAC samples can feed output channels. Add support for this audio codec. F1C100s utilizes DMA channels to send and receive ADC-DAC samples. So DMA support needed. Patch 1~5 adds support for DMA. Suniv F1C100s has very similar DMA to sun4i. But there is some dissimilarities also. Suniv features a DMA reset bit in clock control unit. It has smaller number of DMA channels. Several registers has different addresses. It's max burst size is 4 instead of 8. Also DMA endpoint numbers are different. Patch 6 adds DMA max burst option to sun4i-codec. Patch 7~8 Add support for suniv F1C100s audio codec. Patch 9 adds audio codec to suniv-f1c100s.dtsi Patch 10 adds audio codec support to Lichee Pi Nano board. Thanks! Mesih Kilinc (10): dma-engine: sun4i: Add a quirk to support different chips dma-engine: sun4i: Add has_reset option to quirk dt-bindings: dmaengine: Add Allwinner suniv F1C100s DMA dma-engine: sun4i: Add support for Allwinner suniv F1C100s ARM: dts: suniv: f1c100s: Add support for DMA ASoC: sun4i-codec: Add DMA Max Burst field dt-bindigs: sound: Add Allwinner suniv F1C100s Audio Codec ASoC: sun4i-codec: Add support for Allwinner suniv F1C100s ARM: dts: suniv: f1c100s: Add support for Audio Codec ARM: dts: suniv: f1c100s: Activate Audio Codec for Lichee Pi Nano .../devicetree/bindings/dma/sun4i-dma.txt | 4 +- .../devicetree/bindings/sound/sun4i-codec.txt | 5 + arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 8 + arch/arm/boot/dts/suniv-f1c100s.dtsi | 25 ++ drivers/dma/Kconfig | 4 +- drivers/dma/sun4i-dma.c | 221 ++++++++++-- sound/soc/sunxi/sun4i-codec.c | 371 ++++++++++++++++++++- 7 files changed, 601 insertions(+), 37 deletions(-)