Message ID | 20240227-asrc_8qxp-v2-3-521bcc7eb1c0@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-84001-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2959644dyb; Tue, 27 Feb 2024 12:56:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXA7OO3E9oXQvmf0MVZPS8zCs9CN5EOHYLNl1jJshqg34dzF1sf8sKSEThW5B6xnjl1toPjvi4VgrAZMrt23azF336k/g== X-Google-Smtp-Source: AGHT+IFbpCzIHZ3QQjew67zuURMlAsN7QopkeQCMfYh5xEEniXUL7Oi2rHTbZHQMs8nRXhM05N5p X-Received: by 2002:ac8:5dcc:0:b0:42e:7f27:16fc with SMTP id e12-20020ac85dcc000000b0042e7f2716fcmr9460385qtx.62.1709067364058; Tue, 27 Feb 2024 12:56:04 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l11-20020ac8724b000000b0042dfd627880si7947478qtp.16.2024.02.27.12.56.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 12:56:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84001-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CtNVoj2L; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-84001-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84001-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B89641C2528F for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 20:56:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB91714E2CD; Tue, 27 Feb 2024 20:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="CtNVoj2L" Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2052.outbound.protection.outlook.com [40.107.7.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65E8E14F987; Tue, 27 Feb 2024 20:54:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067293; cv=fail; b=Wxmh1GJosXB5/ICaPDktR7zyWOkStTJDSy+YrQJR1kKrqbQyFjG9z3bkWPEOWCff616ga6yKFOeM22i52y9XXXHP+nogwYKga4nevC+vBEIIKC/e5V4dyvfH27Hscj0xiLUHhb/ia9luF8gfH3uDYXLD5MlB12U2PJ8lxcL9zs4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067293; c=relaxed/simple; bh=Zr5TShgZiJta89p9a8K0vtH/7bUq8E+U8vmOaScyf2Y=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=YphTQEIf+69NJ8JBkmkGGZMU05DYXb5IGOVy8qJ9S7i6CZvZNYAFjUvriuj3ie+N0oQelaz4td6ZH5u49OJy+9EDgRqucNSk55T9aFZ/Zxph27wYbb6HNuJgxRHkiF18dupv9eqoT6JSI+dwGLStFhr6BjX0pKokmmT0okQRkpg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=CtNVoj2L; arc=fail smtp.client-ip=40.107.7.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CijGUOuSLBQMHcrutdLp+zZ3FgrJ3GO5wmsA6A6qC3YqAJHscqQghjRNAfCWXdHZ5UuWCwEUJmBe8zFMaICiRMTtvGr/GBEhNw8SkDVipWDZawp/Ps0XInmnzRYDWxDHvvTELqcwNTFuBoLS4sLO3+PJydAjRhh9Kz82+fzzvNneNn4cgtWSUuTFcONj4Vc5M0teipUbjWBZe5pX9tAWcJJfEVv8WCdWbeXLxS/P1xc2a5jzA3wj5/cgWV0tJqQyvAFAEPxsVbR5v+s3EkcViwMSclJvvYrMRvyxnehNk/iNXQWnoVCB5GVGMUVVk+RPBrWkEgH739MQWbIfTG46/A== 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=Skl6lRl14Qap8DvLKPAl02WhkmMYsRwEI7aKW/j1Zs0=; b=CkU51d83z+fjJK1AYSGgzHsmFzk0pQ7gHd0pqdv7mgwuXXKmHduBHo4aELahyKbURpOC4O04iauO0LkvPV/v4MYTOH2OJdwmNAEhW81SgAxbyx9VhgA9hkMK11bSlHdAEQWGnaonFg6naWM7vZmBqBxqip+M3R2Nw/YstGpLaILokmg8aXvAs+wjXLN3B/VlmlQekfGKlsqcqqyv5hP2AP/lieK0+iL1nN/mH19c0TLJj6FG+mANanZGFrC+9FPCZoK04TBV0u8/76tGt8NmLlSYi90CGTXk3J1mOFMhIlr8t72Mrjqw+QdHgVWsmatG24xWmeLDl/7/t/X01wW/dQ== 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=Skl6lRl14Qap8DvLKPAl02WhkmMYsRwEI7aKW/j1Zs0=; b=CtNVoj2L5i1jswdph1PxBcKz2jl0l4bCq9jlob5f/5ZzDEvMyibwplS4lV+7bAhGNuCFZ1uKiB2uj6TnofoJyErkL4cwltI7BDI6xoNRYqUXPEgQZmIcwYJIZ/MY4LjZACUc4JYC0aDa8c+bDiyzVdajTlEZT3qxgDY8Ov/he0M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GV1PR04MB9200.eurprd04.prod.outlook.com (2603:10a6:150:2b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 20:54:49 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 20:54:49 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Tue, 27 Feb 2024 15:54:11 -0500 Subject: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240227-asrc_8qxp-v2-3-521bcc7eb1c0@nxp.com> References: <20240227-asrc_8qxp-v2-0-521bcc7eb1c0@nxp.com> In-Reply-To: <20240227-asrc_8qxp-v2-0-521bcc7eb1c0@nxp.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Shengjiu Wang <shengjiu.wang@nxp.com> Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709067274; l=938; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Zr5TShgZiJta89p9a8K0vtH/7bUq8E+U8vmOaScyf2Y=; b=qIXIkvEEJLjFUSIph/s/46TFmrsyD/KLjyWjM4PJmRf2Vyl289vaOgNzHPiuBHbmfTg0qGcDj e7H9niyHM6BD09znC+9Uh4hdkE57zYwDhJAjntmyg3Zh5CGA4K5kf0B X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ2PR07CA0001.namprd07.prod.outlook.com (2603:10b6:a03:505::11) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GV1PR04MB9200:EE_ X-MS-Office365-Filtering-Correlation-Id: f33a30f6-16a2-47b1-61d6-08dc37d65661 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OzGT6JBfV9yAgaExqBQdvC4JtoRJqOsKKEPC+/tdXgeTjGOk6A5Ekf8o9zmVtosdF9Md0qvZArnWMiIenD7yjyae2MbDysCKRWI5R14xNhqZXhLfHHcR98YOufmYj3+HqOqGrY0vLg5L0GovQiwz8L+TGqJDE2QIFwjWcabMKqe/lOqd9HDx9ZbDsf1rQ+vPpSrle3t+4TSwpfAtbFIhAakEjniqkPjJQpWSN/tC59jzydtJORkTObYGSnL66H/+LioH7wfGiQB0UpJFy+N3U/PEFPEXDKjwt0utn+WbgUkDjxxuuBr05kmPkxEpxdRai0S7VCueXvxJt/qFIvADpcTlOqh5AsAQmSJI6Ct8XxPjgoJtaqVbI098/y7CRRnEB+hiJdvW6sKqqdCZIDrF7D1xSNjDXbytma4wTzqf3efT9ki5UTWEjWQtl5i+pR6+VlvYn4gBYKyUDGhNFeTXNpImuKwCrofaVt1tUbueGR270n7GRaB9lTVURaOnlYEp8LqYGmAxtFL6mW7KQjerOA3s0TAwCrBNCv6Bka5GazXmd3b+eFBOFA1KhwJNrEJ7NB6ym+JeGOaNun5s4haVVWdyXrY95kSt/322a7FVeMLAfnJuiTdjSutnWF80zectENq2x4uEtBWb6mHvIlgb2GTXFapJ6Nuz/flG2/8ALKBYBWsvKpma/axw6JICzOyQpQ2H2nOMGMbasp8spYfr+l4urIWMfZkk2e1SirFp3ec= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MDxovEglcsPanPSJREMtydjD3Osw?= =?utf-8?q?dB1OHedopP4kekQTKAHFHGz22wmul3LCbz0hJ+/qQzhDHKNMO2MU5xMSqKG7eIEt0?= =?utf-8?q?cmgQsIiBnOsU8cNZatK8bsLYC6iUb08xxmPjK5K3EnzlM3ltQn6RD3o9VamqNt19+?= =?utf-8?q?hOrqME88Q0Bfm/4jsds69sgFdhhb2txOIg3SYh/j36lJk+8c3EoLkreax7qb9F31y?= =?utf-8?q?J7mKzS4xCVZ0pQL/rZHSjDX+C03C/ZIL/gCsfC/T5Ubd4AguFiKaqMGAo0QHPN3fA?= =?utf-8?q?XPu4UiB14eQa0L4Oypch7WeVVuQRO80x5fOEun49aR8jGeODGQ9IP4CDLQRlEwSj4?= =?utf-8?q?kmoq/HT/jztK4WX2gsRh+wVC2RdG939wv4127bP1flut4LIEExnnx1u9LkzwQqpfp?= =?utf-8?q?PKV0AQYdNdbRGvmm63mUZ/WU2MzAei9WGDOQVfU7/Vvf1nt1eE8cFJjNQ+m9FNwPY?= =?utf-8?q?rcDZ6WF8F+9Pb+MyGAvOIHuxVVvwofy9RuowP7c1ic1u1neDZSN/2tOJbNQeSKhMT?= =?utf-8?q?vBMy9CuNfFuiepPvN2NlOHWZi1+m9nG3UbNs4rS+uOsjyyqdcpmNt5fhFHcgDpLYm?= =?utf-8?q?9T64GkGb6Jbr7qN/dz4JRrjrh1lzw10qS4K2je4fQ2Pbh6bNrxtMm4U6bZB2dX7VA?= =?utf-8?q?VBI2rgFfe7184IuM2Rr9QuJQH2KY0XiVW9lRgn7x4rqBk9MdxGP/RbnojAkWRQDqL?= =?utf-8?q?YxySr/AWpKqeqtGKw3ZgoTyPTEF69rsPdPGTZNZVJYcEwpRIiEAIZXZHiHlZaVlKk?= =?utf-8?q?GS9aVmw6Tdgu4kyhzRMsx2xmwok+r/XMYEbn7ScfLlFL/ISi3GgjT4M4eKK9RKlJW?= =?utf-8?q?ywtvQQxj3MlVkAjljD7TQzYmvqvqMfY+dVKQ4EQoEFQSCTq8mKZG4Mvp5yz1zw3Ha?= =?utf-8?q?md/fMfq4fWVRiGN+J5aXxAYOqzgBl938n5eV0n8htEW8CwG4z2GdTl9mXAALBUi46?= =?utf-8?q?h5T6DR/Q/X7izN7wQSuydrf6hDMWuKBh49VpgaW53IpTFo/wS1WwnLOSD4Qi5GhVA?= =?utf-8?q?tMfRa6fC087xa6UD1q/PuTexau0JBuBMCyGoR8Za9Ya1eTA5ZTC1OeaP78uuihW4n?= =?utf-8?q?6QWBsOAcJcpiN0Tp9fPJ/Zoev+gxCH7IDwBH9Au5yndLhfFoye0NPVpIKFkYkDWgw?= =?utf-8?q?c32n0auR0llPRu6fzbb5InAXXrTHi7NZaLNqqU4i3IiUwoqrYUBfec0O76dY3xCOH?= =?utf-8?q?rVcA4JkyAIVTN7zJVHIewq1vuclrqnRJaPJbwhk8596Fd6YSfrf70jxjz8M+0cH9p?= =?utf-8?q?0+C29Up8GRQXynEPTWtPOzeXj2/95XzMiMb1VjmKev42NFRyRA2udgpo7fOuRGrTg?= =?utf-8?q?xVORmB1Nk3riFVZVrrMX9rIeCu4N5u0XnYzr7FJCT2S6QJ5QHywuvoAl7ed1vphzU?= =?utf-8?q?wrB3g3C9xlBG/m3POoaF5j3nQ9p/MeLMIymb0qnRC2pBhfkUty5wAmuBRVKs7Bxac?= =?utf-8?q?Xe/GuBKfv7Z5YqRtvLbLYmUhfR6ajwvzIJ4t4m+QRvfJ5BhW2A3AhL9+BXpKjtcUS?= =?utf-8?q?8Qv2vUNcuKjd?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f33a30f6-16a2-47b1-61d6-08dc37d65661 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 20:54:49.2450 (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: gpAZjjRLW1LUMRYnRNQ4BhRDIQWhJbmBJhENQg8DWaThtX0ErGJjMKUTLSVx7fJVQOqeuX5EurhbvvpOrzztMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9200 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792087020326949228 X-GMAIL-MSGID: 1792087020326949228 |
Series |
arm64: dts: imx8qxp add asrc and sai
|
|
Commit Message
Frank Li
Feb. 27, 2024, 8:54 p.m. UTC
Some sai only connect one direction. So allow only "rx" or "tx" for
dma-names.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
Comments
On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > Some sai only connect one direction. So allow only "rx" or "tx" for > dma-names. Which sai? Can you restrict this per compatible please, so that someone cannot add 2 dmas for ones where only the tx is supported. | dmas: | minItems: 1 | items: | - description: DMA controller phandle and request line for RX | - description: DMA controller phandle and request line for TX The binding already allows only one, but it documents that the first dma is always the RX dma, and that doesn't change with this patch.. Cheers, Conor. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > index 2456d958adeef..0302752d58a2b 100644 > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > @@ -86,10 +86,14 @@ properties: > - description: DMA controller phandle and request line for TX > > dma-names: > - minItems: 1 > - items: > - - const: rx > - - const: tx > + oneOf: > + - items: > + - const: rx > + - const: tx > + - items: > + - enum: > + - rx > + - tx > > interrupts: > items: > > -- > 2.34.1 >
On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > Some sai only connect one direction. So allow only "rx" or "tx" for > > dma-names. > > Which sai? Can you restrict this per compatible please, so that someone > cannot add 2 dmas for ones where only the tx is supported. > > | dmas: > | minItems: 1 > | items: > | - description: DMA controller phandle and request line for RX > | - description: DMA controller phandle and request line for TX > > The binding already allows only one, but it documents that the first dma > is always the RX dma, and that doesn't change with this patch.. I said "doesn't change" - but I don't think you can change this trivially, as something could rely on the first dma being the rx one. You'd have to check that there is nothing using these using indices rather than names before making any changes here. > > Cheers, > Conor. > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > --- > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > index 2456d958adeef..0302752d58a2b 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > @@ -86,10 +86,14 @@ properties: > > - description: DMA controller phandle and request line for TX > > > > dma-names: > > - minItems: 1 > > - items: > > - - const: rx > > - - const: tx > > + oneOf: > > + - items: > > + - const: rx > > + - const: tx > > + - items: > > + - enum: > > + - rx > > + - tx > > > > interrupts: > > items: > > > > -- > > 2.34.1 > >
On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > Some sai only connect one direction. So allow only "rx" or "tx" for > > dma-names. > > Which sai? Can you restrict this per compatible please, so that someone > cannot add 2 dmas for ones where only the tx is supported. SAI is exact the same. Only external connect one dma channel. > > | dmas: > | minItems: 1 > | items: > | - description: DMA controller phandle and request line for RX > | - description: DMA controller phandle and request line for TX > > The binding already allows only one, but it documents that the first dma > is always the RX dma, and that doesn't change with this patch.. Does below logic work? anyOf - enum - description: ---rx - description: ---tx > > Cheers, > Conor. > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > --- > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > index 2456d958adeef..0302752d58a2b 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > @@ -86,10 +86,14 @@ properties: > > - description: DMA controller phandle and request line for TX > > > > dma-names: > > - minItems: 1 > > - items: > > - - const: rx > > - - const: tx > > + oneOf: > > + - items: > > + - const: rx > > + - const: tx > > + - items: > > + - enum: > > + - rx > > + - tx > > > > interrupts: > > items: > > > > -- > > 2.34.1 > >
On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > dma-names. > > > > Which sai? Can you restrict this per compatible please, so that someone > > cannot add 2 dmas for ones where only the tx is supported. > > > > | dmas: > > | minItems: 1 > > | items: > > | - description: DMA controller phandle and request line for RX > > | - description: DMA controller phandle and request line for TX > > > > The binding already allows only one, but it documents that the first dma > > is always the RX dma, and that doesn't change with this patch.. > > I said "doesn't change" - but I don't think you can change this > trivially, as something could rely on the first dma being the rx one. > You'd have to check that there is nothing using these using indices > rather than names before making any changes here. Linux driver and dts with tx only work well. Only issue is dtb_check will report error. I want to eliminate these DTB_CHECK warning. And it also reasonable, only rx or tx for a special SAI. Can we remove 'description'? dmas should already descripted at common place and 'RX' and 'TX' are listed at 'dma-names' Frank > > > > > Cheers, > > Conor. > > > > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > > --- > > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > index 2456d958adeef..0302752d58a2b 100644 > > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > @@ -86,10 +86,14 @@ properties: > > > - description: DMA controller phandle and request line for TX > > > > > > dma-names: > > > - minItems: 1 > > > - items: > > > - - const: rx > > > - - const: tx > > > + oneOf: > > > + - items: > > > + - const: rx > > > + - const: tx > > > + - items: > > > + - enum: > > > + - rx > > > + - tx > > > > > > interrupts: > > > items: > > > > > > -- > > > 2.34.1 > > > > >
On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > dma-names. > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > | dmas: > > > | minItems: 1 > > > | items: > > > | - description: DMA controller phandle and request line for RX > > > | - description: DMA controller phandle and request line for TX > > > > > > The binding already allows only one, but it documents that the first dma > > > is always the RX dma, and that doesn't change with this patch.. > > > > I said "doesn't change" - but I don't think you can change this > > trivially, as something could rely on the first dma being the rx one. > > You'd have to check that there is nothing using these using indices > > rather than names before making any changes here. > > Linux driver and dts with tx only work well. Only issue is dtb_check will > report error. I want to eliminate these DTB_CHECK warning. Linux is not the only user of these bindings, citing linux as your evidence here is only sufficient if no other users exist. Do they? > And it also reasonable, only rx or tx for a special SAI. > > Can we remove 'description'? dmas should already descripted at common place > and 'RX' and 'TX' are listed at 'dma-names' Removing the description has the same problem. The existing binding has set a fixed order that you now want to make flexible. Thanks, Conor.
On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote: > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > dma-names. > > > > Which sai? Can you restrict this per compatible please, so that someone > > cannot add 2 dmas for ones where only the tx is supported. > > SAI is exact the same. Only external connect one dma channel. Right. The wording made it sound like some SAIs were capable of this and some were not, but what you actually mean is that all SAIs can sometimes be connected in only one direction.
On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > dma-names. > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > | dmas: > > > > | minItems: 1 > > > > | items: > > > > | - description: DMA controller phandle and request line for RX > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > I said "doesn't change" - but I don't think you can change this > > > trivially, as something could rely on the first dma being the rx one. > > > You'd have to check that there is nothing using these using indices > > > rather than names before making any changes here. > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > report error. I want to eliminate these DTB_CHECK warning. > > Linux is not the only user of these bindings, citing linux as your > evidence here is only sufficient if no other users exist. Do they? But, 'dmas' should be common property for all these bindings? I don't think they use 'descriptions:' property, which should guide dts writer to write dts file. actually words 'DMA controller phandle and request line' just nonsense words. let 'regs', it'd better descript at 'reg-names' instead of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which already show at "dma-names". > > > And it also reasonable, only rx or tx for a special SAI. > > > > Can we remove 'description'? dmas should already descripted at common place > > and 'RX' and 'TX' are listed at 'dma-names' > > Removing the description has the same problem. The existing binding has > set a fixed order that you now want to make flexible. Actually original set minItems: is 1, which means allow 1 channel. but set items to force two channel. Does it work oneOf: items: - description: TX - description: RX items: - description: TX items: - description: RX > > Thanks, > Conor.
On Fri, Mar 01, 2024 at 04:06:35PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote: > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > dma-names. > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > cannot add 2 dmas for ones where only the tx is supported. > > > > SAI is exact the same. Only external connect one dma channel. > > Right. The wording made it sound like some SAIs were capable of this and > some were not, but what you actually mean is that all SAIs can sometimes > be connected in only one direction. IP is the same, just some instance only connect one direction dma. for example there are 6 sai instance in SOC. sai0, ... sai4 have both rx and tx. sai5 only connect tx.
On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote: > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > > dma-names. > > > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > > > | dmas: > > > > > | minItems: 1 > > > > > | items: > > > > > | - description: DMA controller phandle and request line for RX > > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > > > I said "doesn't change" - but I don't think you can change this > > > > trivially, as something could rely on the first dma being the rx one. > > > > You'd have to check that there is nothing using these using indices > > > > rather than names before making any changes here. > > > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > > report error. I want to eliminate these DTB_CHECK warning. > > > > Linux is not the only user of these bindings, citing linux as your > > evidence here is only sufficient if no other users exist. Do they? > > But, 'dmas' should be common property for all these bindings? I don't think > they use 'descriptions:' property, which should guide dts writer to write > dts file. actually words 'DMA controller phandle and request line' just > nonsense words. let 'regs', it'd better descript at 'reg-names' instead > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which > already show at "dma-names". None of this matters. If there's a documented order for these, which there is, software is not obligated to use the names and can rely on the order alone. You need to check that there are no other users which will be broken by your proposed change. > > > And it also reasonable, only rx or tx for a special SAI. > > > > > > Can we remove 'description'? dmas should already descripted at common place > > > and 'RX' and 'TX' are listed at 'dma-names' > > > > Removing the description has the same problem. The existing binding has > > set a fixed order that you now want to make flexible. > > Actually original set minItems: is 1, which means allow 1 channel. but > set items to force two channel. > > Does it work > > oneOf: > items: > - description: TX > - description: RX > items: > - description: TX > items: > - description: RX > > > > > Thanks, > > Conor. > >
On Fri, Mar 01, 2024 at 05:07:07PM +0000, Conor Dooley wrote: > On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote: > > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > > > dma-names. > > > > > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > > > > > | dmas: > > > > > > | minItems: 1 > > > > > > | items: > > > > > > | - description: DMA controller phandle and request line for RX > > > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > > > > > I said "doesn't change" - but I don't think you can change this > > > > > trivially, as something could rely on the first dma being the rx one. > > > > > You'd have to check that there is nothing using these using indices > > > > > rather than names before making any changes here. > > > > > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > > > report error. I want to eliminate these DTB_CHECK warning. > > > > > > Linux is not the only user of these bindings, citing linux as your > > > evidence here is only sufficient if no other users exist. Do they? > > > > But, 'dmas' should be common property for all these bindings? I don't think > > they use 'descriptions:' property, which should guide dts writer to write > > dts file. actually words 'DMA controller phandle and request line' just > > nonsense words. let 'regs', it'd better descript at 'reg-names' instead > > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which > > already show at "dma-names". > > None of this matters. If there's a documented order for these, which > there is, software is not obligated to use the names and can rely on the > order alone. You need to check that there are no other users which will > be broken by your proposed change. As my best knowledge, only linux use this binding. Frank > > > > > And it also reasonable, only rx or tx for a special SAI. > > > > > > > > Can we remove 'description'? dmas should already descripted at common place > > > > and 'RX' and 'TX' are listed at 'dma-names' > > > > > > Removing the description has the same problem. The existing binding has > > > set a fixed order that you now want to make flexible. > > > > Actually original set minItems: is 1, which means allow 1 channel. but > > set items to force two channel. > > > > Does it work > > > > oneOf: > > items: > > - description: TX > > - description: RX > > items: > > - description: TX > > items: > > - description: RX > > > > > > > > Thanks, > > > Conor. > > > >
diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml index 2456d958adeef..0302752d58a2b 100644 --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml @@ -86,10 +86,14 @@ properties: - description: DMA controller phandle and request line for TX dma-names: - minItems: 1 - items: - - const: rx - - const: tx + oneOf: + - items: + - const: rx + - const: tx + - items: + - enum: + - rx + - tx interrupts: items: