Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2811595iob; Mon, 16 May 2022 06:49:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBs5Rr5ihnUAps8f6GGHQ5E8J4VwQCMCUezStklHYd3SmXiiOq8sUOwmxA4KFSvTbo4NX5 X-Received: by 2002:a17:907:2cc5:b0:6f9:1fc:ebef with SMTP id hg5-20020a1709072cc500b006f901fcebefmr15066699ejc.121.1652708979726; Mon, 16 May 2022 06:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652708979; cv=none; d=google.com; s=arc-20160816; b=pW+A10UlzTBy/nps5cJGiNtTlgWgjU+5l0CRzaflsfRnY8q9CiZ6Zcflm8ALOOZwJx uVkTb8FEHYIuCx5gRtLiY4v6yyg3k12HAfwEp3G+Sk1n4FAxXCZ7qZ5ADauR161LMYvr Y38sxhXVT43gUYpRFbHexPCSqsSc8wVfTAYFuf9ZtuYyp28OYD5YBTXEPBCDWyB8guMT Eow8nJeq0fY8EE8gujIUKf87IvmFM+v5sDxH1lCki82AvN6IahcjTAi2siLhCTp3Udo0 /x5OScG3ixKWzv984XkM63nbUDysoJeTgyheSOmW6PGJc6PdD9kuwZ76l8hNIAF2ogse fH1Q== 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=3jIV+uu0BJ9kbqEviCccDSBwDcbwkS2UKgJkPWDzvy0=; b=WpswvjZl1jIol6UCGg/XoDgUV3XBpsvDMtY69fzLee0fkbUnLsBL29dw0/8MRRQcLu ADvkzuDz1w8J2G8WJ+9NexfB0kg4CUEoEg7L2NmjZJjBG5yzJO7ONPTK0TjMxqJXHPKX Z6ucXDt0k4xAIfGeipWa8J5LbjH3QOewkcG4I3UmAWgWpqmublK2Auw8oRvcbse6iS/H Wn28nNmGV4SzXi57/uOACDwCmt28OgIyFfaNHpul/UQyBD0B5LSApcX34GJCTXBeq8g7 5i1NWrOEmo2NlzsuE0bdReSAXsCiofpE93nCpDSnIC8DfS7kEnO2eHOrVNH/BMe+Xe/C XwWQ== 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 hj1-20020a1709069fc100b006e88caf4a78si11832729ejc.76.2022.05.16.06.49.12; Mon, 16 May 2022 06:49:39 -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 S241617AbiEPITS (ORCPT + 99 others); Mon, 16 May 2022 04:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241587AbiEPISu (ORCPT ); Mon, 16 May 2022 04:18:50 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEAE736E36 for ; Mon, 16 May 2022 01:18:47 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6B8A4200513; Mon, 16 May 2022 10:18:46 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 33F5820050C; Mon, 16 May 2022 10:18:46 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B6ECD180031D; Mon, 16 May 2022 16:18:44 +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 3/3] ASoC: fsl_sai: Add support for i.MX8ULP Date: Mon, 16 May 2022 16:06:12 +0800 Message-Id: <1652688372-10274-4-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 Add i.MX8ULP specific soc data, the max register is FSL_SAI_RTCAP the IP version is also 0x0301, So version can't be used for the condition of register FSL_SAI_MCTL setting. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index b528722acd65..fa950dde5310 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1147,7 +1147,7 @@ static int fsl_sai_probe(struct platform_device *pdev) /* Select MCLK direction */ if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) && - sai->verid.version >= 0x0301) { + sai->soc_data->max_register >= FSL_SAI_MCTL) { regmap_update_bits(sai->regmap, FSL_SAI_MCTL, FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN); } @@ -1272,6 +1272,17 @@ static const struct fsl_sai_soc_data fsl_sai_imx8mp_data = { .max_register = FSL_SAI_MDIV, }; +static const struct fsl_sai_soc_data fsl_sai_imx8ulp_data = { + .use_imx_pcm = true, + .use_edma = true, + .fifo_depth = 16, + .reg_offset = 8, + .mclk0_is_mclk1 = false, + .pins = 4, + .flags = PMQOS_CPU_LATENCY, + .max_register = FSL_SAI_RTCAP, +}; + static const struct of_device_id fsl_sai_ids[] = { { .compatible = "fsl,vf610-sai", .data = &fsl_sai_vf610_data }, { .compatible = "fsl,imx6sx-sai", .data = &fsl_sai_imx6sx_data }, @@ -1281,6 +1292,7 @@ static const struct of_device_id fsl_sai_ids[] = { { .compatible = "fsl,imx8qm-sai", .data = &fsl_sai_imx8qm_data }, { .compatible = "fsl,imx8mm-sai", .data = &fsl_sai_imx8mm_data }, { .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data }, + { .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_sai_ids); -- 2.17.1