Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp730661rwb; Fri, 23 Sep 2022 03:26:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qdx8EPe2V0Vg7HXlHXI4kfARMhlCurfFQ+uhcNC/zCxqRXi5Pe8DCnk5/+ty99D+iaFvT X-Received: by 2002:a05:6402:42c5:b0:44e:b640:16fb with SMTP id i5-20020a05640242c500b0044eb64016fbmr7960448edc.29.1663928780755; Fri, 23 Sep 2022 03:26:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663928780; cv=pass; d=google.com; s=arc-20160816; b=kpkdO9MWq3nJpMp8hifDDhnHM8kubylPxwEUgnqwETNMtxuCDopZzF/ErUGPYLz92W 4AUa8neCom0NP6qy4vF8APZYftQOWyqrtG4nMh64dL5ZC34wynC93zneKeGQHx33NuMZ Kk/+Ho4GOPplSWOf9yUfpzn020y6OL5ka2Wj0EOzgKOjTt+6SEDYc3jk7uk6d6f35121 kMCbXPWzmv597aAJaCN9IscqPuL6HSZSpu5aSWWDW9LCg0lgjd77Oa4k+togiqZsxPdN Z7uvtFSXsFH9H5aMzt6iTrttHFpV8roxhOYz16n22swKepZRviYqMhNHOlfN5ZcaQPLh MYkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=A07iPSt4dr7WZn0qJ5FzweBarro6FnzJbDXu/QiTapw=; b=Za+2KNydCKz8h8mhjIu7QQAzTavsvPqaNg/fWxVXwV/m+Cr9BOcx97tug5F95Bytqd 8ZLn7+fFF0BBpZ2sB17RHOvXhFM2y8NZe/qfUCkFnPER8ASiZ87ZLeKyiw3mDqT9kOhU 3O3QZ0q5k3sij84BMARd92ledpfhZoCW0/5iHXAThPlo2nTCC2SDGS161O1Qmi0/zqWh 3kQfSKztPtmjK1CIV8aIsntBZETp+WIoZIViazhq9pZDTXI2kWjy1phkUx7AS/Jr86/I xG8eiwSoM9d5I0l0YJJ1Dc4wybZw7evJFkeKmII6tiQzbGnLUxd/nLs5zxVqhHpb7krK NDEw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fy0snUTp; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (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 sg11-20020a170907a40b00b0073d81e22d19si8150302ejc.544.2022.09.23.03.25.55; Fri, 23 Sep 2022 03:26:20 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fy0snUTp; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbiIWJ4V (ORCPT + 99 others); Fri, 23 Sep 2022 05:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231796AbiIWJ4R (ORCPT ); Fri, 23 Sep 2022 05:56:17 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2079.outbound.protection.outlook.com [40.107.104.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74CB212387F; Fri, 23 Sep 2022 02:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=na0kSsRuKOPX9caXV+XlFo1ZF55hoxAVZIBr3+AsoETV84T5nMuACdoK1U+jbDEvkFwGGAFMIYsyG1ihQiGlEA9qdNa1VYdNkfMjwIKn90UTFR35uH97yjUV9maunXYpGB3z7Xb9Epc21G6kk+SdcLvROGqLk21MUo3VMMfVFtAbp3KvIXzEpfsLurPfLv2XuNv2kM7Oug0O/mmo8Ysss/PwCx1S8TM/tqBD9iPYonq0dF6EDdFE65qGB1ur9EdYu3YSneq2i86k/qldEEg8dUFZKA5sRg1iVcIb9762hgyDKFQgBvsiKfgmm1iw8JNZNfOurxx8x1z8+zPQ2WjBbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A07iPSt4dr7WZn0qJ5FzweBarro6FnzJbDXu/QiTapw=; b=oBcaV1qkBo0eyN0r0Gbw5PpgN/mSjGk+9oOx1UwNy/NVWDU/vB6ClSKHVeZ3+Yy/724nd5DW81hWaKbVIxSEgocb9UCs1DOc44B9I+HC69/zADDs4H/5giZEyyj6dKbkF+gYM0IQR6My+cIv/Qmichg8MhSbEREF37kcY3fUqfW8C6WA4JT3/du6SivNY0C+cNuFlMBqzv3XDfeAhnrk9MaikY5qDYw9I4cnzLRylwQj9/VLsGQPxqPp9hUbyt0cKL00c1E2v0pACEYA8cbcJkrbmlcXKzaG5F2BuHMBGcdf5KHSBTk6Lp9gnCVvPABpiriAB4ZMaCVmvb667IpK9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A07iPSt4dr7WZn0qJ5FzweBarro6FnzJbDXu/QiTapw=; b=fy0snUTpGDD7Mu1weidtKHqn/HiMxut1K187oRATgMMqq35r241KYQGi+TdDO7xPVYmwZlUtiokD/MbuVTSyq8HSLmYsuBjc4vRNBke1NMcVn4zF9geQo0m4AZgQdWuYx9Yj2MwEAVlC5tj0yXUL2//ceckFHNTa1XF1oxMm2kw= Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by VI1PR04MB6863.eurprd04.prod.outlook.com (2603:10a6:803:12f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.20; Fri, 23 Sep 2022 09:56:07 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::7008:1596:bb4:d904]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::7008:1596:bb4:d904%4]) with mapi id 15.20.5654.020; Fri, 23 Sep 2022 09:56:07 +0000 From: Chancel Liu To: Rob Herring CC: "lgirdwood@gmail.com" , "broonie@kernel.org" , "perex@perex.cz" , "tiwai@suse.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "shengjiu.wang@gmail.com" , "S.J. Wang" , "Xiubo.Lee@gmail.com" , "festevam@gmail.com" , "nicoleotsuka@gmail.com" , "linuxppc-dev@lists.ozlabs.org" Subject: RE: Re: [PATCH v2 1/7] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign the rpmsg channel Thread-Topic: Re: [PATCH v2 1/7] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign the rpmsg channel Thread-Index: AQHYzzKzIRcLJ21/30SyeFStqUuMIg== Date: Fri, 23 Sep 2022 09:56:07 +0000 Message-ID: References: <20220914105145.2543646-1-chancel.liu@nxp.com> <20220914105145.2543646-2-chancel.liu@nxp.com> <20220916185048.GA1061412-robh@kernel.org> In-Reply-To: <20220916185048.GA1061412-robh@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: VI1PR04MB4222:EE_|VI1PR04MB6863:EE_ x-ms-office365-filtering-correlation-id: 8eeb9b13-ffbc-407c-d2ce-08da9d49d619 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dm0r35HEz6QkYvyHee9QY1RpZSMiwIkQEY/FjrbvLJ0DhR7BVDKaUVyekT4lJ18v7VmV4bhFVHa1xf08Wb/uwMrkj1O8TFkvo19LkA90x01JV2aUVibOAUA66CGTKfznXMTUEwUBvy7qD8j4ql/ufGWlV2MxtAG7Zdejhj7EULTGDIUqJUSxqoWH38uYlzGufTmZ1vIN9wigSGhFGPZ2eTQXR8sXHIrg2Ekbtwa+UhgRyX/I2ge0K+ixczeNh+jJWmggAXe2J5lWRc4PPQF+VOG+EFmuLRvPKrWeu71rb3FFMQUL4F4x/xkipPMHTPXHfRr9kbQfk7QzUAAUINU5OSdCNqVC0LFS/9LDv0oENLuHW1gojTeamn76FdWyHpoWMo7f+R0dK8/DBe2NsaE4QpPjf6EpIgxnEhBaKy53LZhkUy19VLQiaNwM6Erva73Yv8HfEEjn3r0xZh6mb6pkDlY3WeqQkcZDYHebdyhofskreB6gCcwBkgCYcqFbVvIzc5r+aUAWeEiAiiLpiKfJn19dEB9+ks0pMMEdkTZ9bO5YZCx3zW8QgB4UHDq+mKmHzzhzym6uO4v+RFr9lsJ4FAy8N09u9vekfnhh+YuY+Xhwsy8wWv0Xhh1WE5Xl+E8mX4c54nSli1jf8rCQHWuEmaNASn9ceStEUKIzBXy1DI8UqsulXEOSyU943Vo0w5LaRBdCjoVbaV53GAf/Xf9drzPhmS2Q/YEOVfiJKRSkyQJknNtTEKasEQDKWAMCs8qb6pp2RX8E974kWdsVuENcVQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199015)(54906003)(26005)(6916009)(9686003)(2906002)(6506007)(7696005)(76116006)(186003)(66446008)(86362001)(66476007)(66946007)(4326008)(66556008)(64756008)(83380400001)(316002)(33656002)(55016003)(41300700001)(122000001)(8936002)(5660300002)(8676002)(7416002)(52536014)(38100700002)(44832011)(478600001)(38070700005)(71200400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zhFPTHMvrad2d+w3NV++4YtpTl+XtURLF2N4aw5A8/6L1Mz5rik24aw+nxFL?= =?us-ascii?Q?H8X+BKbWxOZl/+w4+/EwUNJTcq30GYs27oi+Jv3xs45jfRDv5hdOKfInZoVe?= =?us-ascii?Q?4+cD6m/6Np/+NHPWWg7IqFFm7momVhXoVLFzCxq/oitX3RihQtpwifdkU04E?= =?us-ascii?Q?F/C41EQZo+MevfL7871S64dSOAlkI9JnqVK8Od+h0MvCaApAHGxwBexHF6FN?= =?us-ascii?Q?1Dfu1VoU+wsn/6mJf3G5a7J9s5O2YJxnXssbHngrUxP4YdQEvOXiEtEAjPwP?= =?us-ascii?Q?vrTOFLaRLUjSL1GJE3QvsbOWrqxg6wpJqaR+ep2agVAXRFbLSc1FaZhtZtdD?= =?us-ascii?Q?jO5xFQuwpEABAlwNVEc6UxhF49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?us-ascii?Q?L8J5HOpBMiuAB1lrvSEwIp7qBtj8aHzMFB3LV/Bl7SUXtMC7mObuI3ULwOLv?= =?us-ascii?Q?UDZ6M6oHl2SRJxyjNZTPYDpY95hPNLF58o0xSfWOaT9UIn7t7+HJYUwu59E4?= =?us-ascii?Q?bXXqamtTefE/K7W+ZPKBnh/1ey37yhn8p7x5vL2AqO1IMiUwmh9i7YUlyvAb?= =?us-ascii?Q?6kRlCzVbSBxnMVBGZISaFBec7tze1q0GYwY8i1lGyeVWSyRqzDzK11nfcSdq?= =?us-ascii?Q?vVrE+Xm+kZE9Pz2QDRU3RwTk4D5KzBm3FrwjJyrzWtxm1a5gEqqQQJxYEl+v?= =?us-ascii?Q?Vb0eskD4twcFNXDOklbGaOWyQx0FcaUTLx0YbUA4?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8eeb9b13-ffbc-407c-d2ce-08da9d49d619 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2022 09:56:07.5911 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8qhR0PxfqGbm24lmD/5jz/C6Nbp2Drp3VGAshCDL3I2McdvCTSws264A+QSEn2oe4LEoJ6LPM2fgH49WIustzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6863 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 a string property to assign the rpmsg channel this sound card sits > > on. It also represents the name of ASoC platform driver. This property > > can be omitted if there is only one sound card and it sits on > > "rpmsg-audio-channel". > > > > Signed-off-by: Chancel Liu > > --- > > .../devicetree/bindings/sound/fsl,rpmsg.yaml | 37 ++++++++++++++++++- > > 1 file changed, 35 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml > b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml > > index d370c98a62c7..3744ae794c00 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml > > +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml > > @@ -11,8 +11,11 @@ maintainers: > > > > description: | > > fsl_rpmsg is a virtual audio device. Mapping to real hardware device= s > > - are SAI, DMA controlled by Cortex M core. What we see from Linux > > - side is a device which provides audio service by rpmsg channel. > > + are SAI, MICFIL, DMA controlled by Cortex M core. What we see from > > + Linux side is a device which provides audio service by rpmsg channel= . > > + We can create different sound cards which access different hardwares > > + such as SAI, MICFIL, .etc through building rpmsg channels between > > + Cortex-A and Cortex-M. > > > > properties: > > compatible: > > @@ -85,6 +88,17 @@ properties: > > This is a boolean property. If present, the receiving function > > will be enabled. > > > > + fsl,rpmsg-channel-name: > > + $ref: /schemas/types.yaml#/definitions/string > > + description: | > > + A string property to assign rpmsg channel this sound card sits o= n. > > + It also represents the name of ASoC platform driver. This proper= ty >=20 > That's a Linux detail which doesn't belong in DT. >=20 We pass hardware parameters in dts node to set up clocks or other configurations. These configurations are finally sent to Cortex-M by rpmsg channel because Cortex-M actually controls real hardware devices. If there's only one sound card sits on one rpmsg channel we will not need this property. But if there are several sound cards we need to specify correct rpmsg channel. Thus hardware configurations can be properly sent to Cortex-M. From this level to speak, this property is hardware-related since rpmsg channel represents the real hardware audio controller. Here I attach the discussion in version 1 patches for your information: --- This property aims to tell the ASoC driver which rpmsg channel the sound card depends on. If there are several sound cards sit on rpmsg, we should pass correct information in dts node to specify the name of rpmsg channel. That is why I meant to add this property.=20 Actually this property is hardware-related. As we discussed before, this kind of sound card based on rpmsg works under this mechanism Cortex-A core tells the Cortex-M core configuration of the PCM parameters then Cortex-M controls real hardware devices. This property specifying rpmsg channel represents the real hardware audio controller. --- That's my idea adding this property. Do you have any suggstion? Regards,=20 Chancel Liu > > + can be omitted if there is only one sound card and it sits on > > + "rpmsg-audio-channel". > > + enum: > > + - rpmsg-audio-channel > > + - rpmsg-micfil-channel > > + > > required: > > - compatible > > - model > > @@ -107,3 +121,22 @@ examples: > > <&clk IMX8MN_AUDIO_PLL2_OUT>; > > clock-names =3D "ipg", "mclk", "dma", "pll8k", "pll11k"; > > }; > > + > > + - | > > + #include > > + > > + rpmsg_micfil: audio-controller { > > + compatible =3D "fsl,imx8mm-rpmsg-audio"; > > + model =3D "micfil-audio"; > > + fsl,rpmsg-channel-name =3D "rpmsg-micfil-channel"; > > + fsl,enable-lpa; > > + fsl,rpmsg-in; > > + clocks =3D <&clk IMX8MM_CLK_PDM_IPG>, > > + <&clk IMX8MM_CLK_PDM_ROOT>, > > + <&clk IMX8MM_CLK_SDMA3_ROOT>, > > + <&clk IMX8MM_AUDIO_PLL1_OUT>, > > + <&clk IMX8MM_AUDIO_PLL2_OUT>; > > + clock-names =3D "ipg", "mclk", "dma", "pll8k", "pll11k"; > > + }; > > + > > +... > > -- > > 2.25.1 > > > >