Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2647251iob; Mon, 16 May 2022 03:04:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3Ydq4IjyT72jNJYfuoO6UEnqKuRdWMl/Ip1fkecOX+ojLJ9cxhJETFvBMftJrEutOWSPm X-Received: by 2002:a05:6402:1151:b0:42a:be24:5529 with SMTP id g17-20020a056402115100b0042abe245529mr310933edw.366.1652695448876; Mon, 16 May 2022 03:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652695448; cv=none; d=google.com; s=arc-20160816; b=LZO0BCCxLvMRJbe4Rblwy3yHVoqa7/v87TBvjVEFB6SvcQedyJe40rqpL/fpXirPDW 92nA0M22vunhDnSwQ9wwruYjp8wA+Xgm+aDcBDcOYUgRb+DXyTlBdEpaeIBdP/JLpiLP aY8fMBFjFoMJT4urP8wA9qsmiHreMRDSeTqUB31f3VN92D5psV+f5LiQ7BvHHNUroRkC GU6cuO4XtqEPCOPHQd6kVkrWFCqjeQluU5e33vF4P/eC2m6VHGZOIN0JZ1hkBLCPbAHa XYUJO1BkP5VnCoyaQeu4ExFzqOEVH8BG+i4/uZyk5oDg6dw1h6NoR8lQckOsd90kuF/x 3vZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=bGveHqH0f9sn/kwg73CnIlIuheUxAwtDyOxwSsavbyc=; b=oHR37fYze7XZdpSN02syNigm+fLzDzeNelVhhIeB0/WEMSFtU0P6HS8tTP86Kc1WME Y1hjs8fEm63MkE3+dgxP8GF2fLmoZBN8+E5Uk6YyZvPAOc7D3YBv8zkRWDMONTV3bDAl DMjFPGji5aJSvcAw0I8l9Qin6Cx2VS1Auf8IzTQros3qxJC7D+yCGG34zeRyTQfCudxQ l/JEEauaPygyavPIQfd+PCuFj0FegMs5qyHDSVKqLNJQGpt03xn+c0lOL2KcMKrhhI9b W7oZ2o44YgpqPLtAVg5NjBXsq/6hdmhdHZy90hzE54eTD1Ep9NqJyRQca1K2qfJ1VLVV 03mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id zk4-20020a17090733c400b006e81dd29c00si8781490ejb.569.2022.05.16.03.03.42; Mon, 16 May 2022 03:04:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241586AbiEPISu (ORCPT + 99 others); Mon, 16 May 2022 04:18:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241581AbiEPISt (ORCPT ); Mon, 16 May 2022 04:18:49 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9C0A36E2B for ; Mon, 16 May 2022 01:18:45 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6FCD01A0475; Mon, 16 May 2022 10:18:44 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 38D331A0474; Mon, 16 May 2022 10:18:44 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B841F180031D; Mon, 16 May 2022 16:18:42 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ASoC: fsl_sai: Add support for i.MX8MM Date: Mon, 16 May 2022 16:06:10 +0800 Message-Id: <1652688372-10274-2-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1652688372-10274-1-git-send-email-shengjiu.wang@nxp.com> References: <1652688372-10274-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On i.MX8MM the max register is FSL_SAI_MCTL, which is different with previous platform, so add max_register in soc data to distinguish platforms. And add specific soc data for i.MX8MM Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 17 +++++++++++++++++ sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 18 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index ffc24afb5a7a..1ac65de094b9 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1203,6 +1203,7 @@ static const struct fsl_sai_soc_data fsl_sai_vf610_data = { .reg_offset = 0, .mclk0_is_mclk1 = false, .flags = 0, + .max_register = FSL_SAI_RMR, }; static const struct fsl_sai_soc_data fsl_sai_imx6sx_data = { @@ -1213,6 +1214,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx6sx_data = { .reg_offset = 0, .mclk0_is_mclk1 = true, .flags = 0, + .max_register = FSL_SAI_RMR, }; static const struct fsl_sai_soc_data fsl_sai_imx7ulp_data = { @@ -1223,6 +1225,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx7ulp_data = { .reg_offset = 8, .mclk0_is_mclk1 = false, .flags = PMQOS_CPU_LATENCY, + .max_register = FSL_SAI_RMR, }; static const struct fsl_sai_soc_data fsl_sai_imx8mq_data = { @@ -1233,6 +1236,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx8mq_data = { .reg_offset = 8, .mclk0_is_mclk1 = false, .flags = 0, + .max_register = FSL_SAI_RMR, }; static const struct fsl_sai_soc_data fsl_sai_imx8qm_data = { @@ -1243,6 +1247,18 @@ static const struct fsl_sai_soc_data fsl_sai_imx8qm_data = { .reg_offset = 0, .mclk0_is_mclk1 = false, .flags = 0, + .max_register = FSL_SAI_RMR, +}; + +static const struct fsl_sai_soc_data fsl_sai_imx8mm_data = { + .use_imx_pcm = true, + .use_edma = false, + .fifo_depth = 128, + .reg_offset = 8, + .mclk0_is_mclk1 = false, + .pins = 8, + .flags = 0, + .max_register = FSL_SAI_MCTL, }; static const struct of_device_id fsl_sai_ids[] = { @@ -1252,6 +1268,7 @@ static const struct of_device_id fsl_sai_ids[] = { { .compatible = "fsl,imx7ulp-sai", .data = &fsl_sai_imx7ulp_data }, { .compatible = "fsl,imx8mq-sai", .data = &fsl_sai_imx8mq_data }, { .compatible = "fsl,imx8qm-sai", .data = &fsl_sai_imx8qm_data }, + { .compatible = "fsl,imx8mm-sai", .data = &fsl_sai_imx8mm_data }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_sai_ids); diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index 7310fd02cc3c..e4965efe6102 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h @@ -223,6 +223,7 @@ struct fsl_sai_soc_data { unsigned int pins; unsigned int reg_offset; unsigned int flags; + unsigned int max_register; }; /** -- 2.17.1