Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3959948ybc; Thu, 14 Nov 2019 18:13:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxBkmSdkcEstRN0R2leyL/+6atn/4ANXL79w33Sk3jfEWV+ilAuwH/9SAvcGi6Be3QRrv1Z X-Received: by 2002:a17:906:a0f:: with SMTP id w15mr9651467ejf.321.1573784033246; Thu, 14 Nov 2019 18:13:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573784033; cv=none; d=google.com; s=arc-20160816; b=zso4Xo8LcGa7zuKTwLM5jj9yEIxurR48+8cgo5v8pOszsmLXtT3psi2qSH9ZzIGLni iMKXlf3oXT0Ri2WWPj9wjwJFIovfn75zH3rtBalYa+/Tyqy6PhGQcyddDcoxCQJTSCm7 ezeISimgfWlY1XWUKo7HmptaL64wwCaTVOZJCmwMVsf1KxtWOMIpSHddogwJFSKs/N2L dQHx+nxAogbqWru/rpe9UGibOdMkbU7ZIws31kJmtUOgVq3ZfqBTALdBkrNjLaQ8FSxN RAydECoFjLu9n75GYDMNmnxAYPyhkSoQkDoPbSmRzmyNyt20O+wtJJtsgP0iGVNuLLoc Fdsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iwrIjV3rAOWSyJGG0/sIPU9f3LX/vsYsv+fodZVW0cU=; b=iVAsIaJ5G1hfvNUhUubsGnh2r9F6zyshKq9vQxsBijslIQvF+nRkpuGJYvV/2buQ4S GvGzIJyXe86Do57kGKDNrAJM17eFm8CgmijQ7ARrZ8FsENXbLAIxJaBvEUwlL92PBngS 1NolPxI/VQqGF3IgrRhv5267THAZU/9XLNF9JZJLGCaEHOEw1oFR+K83MliW43Yl5da3 ksUUcVoMa5Ri6qt2g6brm7NrgawaMySKayt61e3DWgMW9TUrcSU4KpGBqo8odbDBrWSz hvK2P5A5w5cP+1gUMsDhKRvWGw4CrSqrSZfrp0XGUItPPx2So7dX4LkZrDHMltVkDb9j mrkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5q0wHOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p29si6093108eda.104.2019.11.14.18.13.28; Thu, 14 Nov 2019 18:13:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B5q0wHOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727210AbfKOCL1 (ORCPT + 99 others); Thu, 14 Nov 2019 21:11:27 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:34355 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfKOCL1 (ORCPT ); Thu, 14 Nov 2019 21:11:27 -0500 Received: by mail-qk1-f196.google.com with SMTP id 205so6926714qkk.1; Thu, 14 Nov 2019 18:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iwrIjV3rAOWSyJGG0/sIPU9f3LX/vsYsv+fodZVW0cU=; b=B5q0wHOfASmZ2Lh14yogezn+rxmdrhLEqWhuNk93pGbwQbaO6sLoWN7peQg5V6zIB6 KHayoKlXplSk/aAY4eaN8FJ/LAw9ESKXao6PP24mYa/m6e90+PSSO74emOhetwN0BmXu x4/s0wWLW7qZEQoT34tbAxMOASITbRC12NeR9YdqxBOuZcoQvxYgnFDcm9j6MATYT+L6 jXZi8EgW68Tv/u65e1Vh0dJ0TP4SInsfheo6NTaxtuF6qIk0orBHmmXtqCB5djpK2PBl 5IIP2SiNR3Z/SA2ocdB8O4KPAnhgDXzbHSYDOGXEhLIbfxrZXIrOrXRk3z8Y3LPaiICF GjMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iwrIjV3rAOWSyJGG0/sIPU9f3LX/vsYsv+fodZVW0cU=; b=NRzz+cBR/kuAcanpMgfleEk6pLGF5FydMMRTXW0he5C7leHwlI2gE1fmJTCsPD/O2D E0MbhsyB4W0hjJxp/s/gsqe6JlVEFYAErIWJLuuKoNrGKaj+fakkxDHBgx9h0H3tvnG+ fv1fuxZssoaV5FNbGv1FWZdDL5enYjaFBZq1owR3gr6n+VXjJX8xgJzHXqrPhX/CfIg2 qxSVwJzsz3u0EzwSiQ0r53pg08YjaIcUNFLYjMhTGEIP8VhmBbXGYc8oEUNmVcehRbZo 3GlaX9zmlPZS5O7o6DD6hpA8N++JrnsNupAWEwwO72CoZliPRxKJ7OTp3ea66ykn+E9P X4Vg== X-Gm-Message-State: APjAAAU/kHUgpsG3G9rCxgE5BaLIFZ0VVTuM0IOjDX0FYf1xs0dbAFmW Ce/Oo7Q19ufhA3M9eHQvAzEsUz2racBNuxPub0CHM2ffnIfcgQ== X-Received: by 2002:a37:a00f:: with SMTP id j15mr10776968qke.103.1573783886106; Thu, 14 Nov 2019 18:11:26 -0800 (PST) MIME-Version: 1.0 References: <20191114211237.GA25375@bogus> In-Reply-To: <20191114211237.GA25375@bogus> From: Shengjiu Wang Date: Fri, 15 Nov 2019 10:11:14 +0800 Message-ID: Subject: Re: [alsa-devel] [PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm To: Rob Herring Cc: Shengjiu Wang , mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, timur@kernel.org, Xiubo.Lee@gmail.com, linuxppc-dev@lists.ozlabs.org, tiwai@suse.com, lgirdwood@gmail.com, Nicolin Chen , broonie@kernel.org, festevam@gmail.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob On Fri, Nov 15, 2019 at 5:14 AM Rob Herring wrote: > > On Mon, Nov 11, 2019 at 05:18:22PM +0800, Shengjiu Wang wrote: > > Add compatible string "fsl,imx8qm-asrc" for imx8qm platform. > > > > There are two asrc modules in imx8qm, the clock mapping is > > different for each other, so add new property "fsl,asrc-clk-map" > > to distinguish them. > > What's the clock mapping? > The two asrc have different clock source connected to it, also the asrc in other platform, like imx6, has different clock source. We collect all these clock source together, defined an enumerate format structure in driver, so for the asrc in each platform, we need to remap the clock source from the enumerate index to the real connection index in hardware. The range of the enumerate structure is 0-0x30, some index may not be used in this platform, but used in other platform the range of the real connection range is 0-0xf, so we do the remapping for [0, 0x30] to [0, 0xf] > > > Signed-off-by: Shengjiu Wang > > --- > > changes in v2 > > -none > > > > changes in v3 > > -use only one compatible string "fsl,imx8qm-asrc", > > -add new property "fsl,asrc-clk-map". > > > > Documentation/devicetree/bindings/sound/fsl,asrc.txt | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt > > index 1d4d9f938689..02edab7cf3e0 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,asrc.txt > > +++ b/Documentation/devicetree/bindings/sound/fsl,asrc.txt > > @@ -8,7 +8,8 @@ three substreams within totally 10 channels. > > > > Required properties: > > > > - - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc". > > + - compatible : Contains "fsl,imx35-asrc", "fsl,imx53-asrc", > > + "fsl,imx8qm-asrc". > > > > - reg : Offset and length of the register set for the device. > > > > @@ -35,6 +36,13 @@ Required properties: > > > > - fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends. > > > > + - fsl,asrc-clk-map : Defines clock map used in driver. which is required > > + by imx8qm/imx8qxp platform > > + <0> - select the map for asrc0 in imx8qm > > + <1> - select the map for asrc1 in imx8qm > > + <2> - select the map for asrc0 in imx8qxp > > + <3> - select the map for asrc1 in imx8qxp > > Is this 4 modes of the h/w or just selecting 1 of 4 settings defined in > the driver? How does one decide? This seems strange. The setting is defined in driver. please see the following definition in driver. This is some kind of hard code, for the asrc0 in imx8qm, we need to set fsl,asrc-clk-map = 0. +/** + * i.MX8QM/i.MX8QXP uses the same map for input and output. + * clk_map_imx8qm[0] is for i.MX8QM asrc0 + * clk_map_imx8qm[1] is for i.MX8QM asrc1 + * clk_map_imx8qm[2] is for i.MX8QXP asrc0 + * clk_map_imx8qm[3] is for i.MX8QXP asrc1 + */ +static unsigned char clk_map_imx8qm[4][ASRC_CLK_MAP_LEN] = { > > imx8qxp should perhaps be a separate compatible. Then you only need 1 of > 2 modes... > Yes, that is an option. If you agree that we can use fsl,asrc-clk-map to distinguish the clock mapping defined in driver, I can do this change that add new compatible string for imx8qxp. Best Regards Wang Shengjiu