From patchwork Sun Jul 28 19:24:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 11063027 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 76E5A13A0 for ; Sun, 28 Jul 2019 19:25:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6745E2624C for ; Sun, 28 Jul 2019 19:25:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5425727FA5; Sun, 28 Jul 2019 19:25:47 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 518552624C for ; Sun, 28 Jul 2019 19:25:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA4361836; Sun, 28 Jul 2019 21:24:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA4361836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1564341944; bh=u/DrY4cjWs4ogDrv+Pcnk+9T4h4J7lpaCBfT8yCgsXE=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=LTjiUnCNr8k2jPAUzGK4xO3nfwL13Q5M8yUMh9k6r3chur7Vo6DCLons4w+aAFyub uf5wLJqOQb3SGMiwRu2dSmX5DXrXxILhAQxr00YMxDND/g+Pki/6JcBpZnTT46GZ2Y EZlVUTR3ipeIpYpVFCCmmD0Rz66GbAVGrV4QHPKM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2CE74F804FE; Sun, 28 Jul 2019 21:24:53 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4AE4F804FD; Sun, 28 Jul 2019 21:24:50 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4DBCF80134 for ; Sun, 28 Jul 2019 21:24:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4DBCF80134 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 26F60201282; Sun, 28 Jul 2019 21:24:46 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 15AE6201275; Sun, 28 Jul 2019 21:24:46 +0200 (CEST) Received: from fsr-ub1864-103.ea.freescale.net (fsr-ub1864-103.ea.freescale.net [10.171.82.17]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 5B56E2060A; Sun, 28 Jul 2019 21:24:45 +0200 (CEST) From: Daniel Baluta To: broonie@kernel.org Date: Sun, 28 Jul 2019 22:24:22 +0300 Message-Id: <20190728192429.1514-1-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, kernel@pengutronix.de, timur@kernel.org, robh@kernel.org, Daniel Baluta , shengjiu.wang@nxp.com, angus@akkea.ca, tiwai@suse.com, linux-kernel@vger.kernel.org, nicoleotsuka@gmail.com, linux-imx@nxp.com, viorel.suman@nxp.com, festevam@gmail.com, mihai.serban@gmail.com, l.stach@pengutronix.de Subject: [alsa-devel] [PATCH v2 0/7] Add support for new SAI IP version X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP So far SAI IPs integrated with imx6 only supported one data line. Starting with imx7 and imx8 SAI integration support up to 8 data lines. New SAI IP version introduces two new registers (Version and Parmeter registers) which are placed at the beginning of register address space. For this reason we need to fix the register's address. Changes since v1: - removed patches from Lucas as they were already accepted - addressed comments from Lucas and Nicolin regarding device tree property naming - removed comment saying that "datalines" must be always consecutively enabled (this is not true, checked with IP owner) - added new patch to document newly introduced compatbile strings - removed patch introducing combined mode as I will still need some time to figure out how to properly allow users to set it. Nicolin, Unfortunately I couldn't find any clean solution on handling registers address shifts. As mentioned in patch 5/7 Tx/Rx data registers and Tx/Rx FIFO registers keep their addresses while others are shifted by 8 bytes. Even if I could create two regmaps as suggested I will still need to update each call of regmap_functions. Daniel Baluta (7): ASoC: fsl_sai: Add registers definition for multiple datalines ASoC: fsl_sai: Update Tx/Rx channel enable mask ASoC: fsl_sai: Add support to enable multiple data lines ASoC: dt-bindings: Document dl-mask property ASoC: fsl_sai: Add support for SAI new version ASoC: fsl_sai: Add support for imx7ulp/imx8mq ASoC: dt-bindings: Introduce compatible strings for 7ULP and 8MQ .../devicetree/bindings/sound/fsl-sai.txt | 10 +- sound/soc/fsl/fsl_sai.c | 331 ++++++++++++------ sound/soc/fsl/fsl_sai.h | 82 +++-- 3 files changed, 293 insertions(+), 130 deletions(-)