From patchwork Wed May 8 07:04:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 13658173 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2138.outbound.protection.partner.outlook.cn [139.219.146.138]) (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 D45073B798; Wed, 8 May 2024 07:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.146.138 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153915; cv=fail; b=hRK8Aql/KJ4eMrbVaEJsXespIUW5ELGqz676jOmY1ig/HrIBKfpUFsX719KmtM4Ul3kbnEUjnYFo3k4MfASTdWu+ANk92r/SWleiijKPQWybaRBW2vOxChbpQxDBh0IKmk7p+6RrBnjWlwJ1D/AlYbSatq/i+IKZBa+P+Yzm5WA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153915; c=relaxed/simple; bh=Gu0CI08elGj0ImgAkfj91Xam8JKIeFrGOVF7drRLhs0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BaNsdaJhINvVZz1cFq8rVzKklGdUUURvDlUT7SveeLF7oPDTto6NnwMKciHNrH1iM0lXBu5G/vuoEKiP8zJEJJ2UW/7dkm+TI/DJQT3/AUFC5MfPADQaNbot0w7KEfjN52WjoqYlc3ea2F4C1tk8l4b1ajocxqWCqFtbKeuzVTk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.146.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nnpEgwkQy8lKqh0lSx4aoxJQwVnUxkuSEwE0XxvlXqa8i/hTrZccNFnO141LnF/KRmYEB0Zil/Ar19hDz2Ll+olcN3zEv2L0dFdH1IurlemPbLq+FDozerVCmTwKphmyJWf9Te4lOFw2vvhIZwO4/Ia7IvXW7eICxjMoMt1ITvM1xPaR3FJluMMAneKaKmOnmdugqko8Zk9+9E6xu2EfbPcXnIiIrXwjHXyMnoXrn7B39CRsGRHH9vqwi0R5lNXmi6ebuFHxKvzQ/SvFpX50Ibee3z1j4G4ZCAlrub/auV+urYTChjUCLT0xmGgFkThFJmOAq7Y+xkI51ybT8BXBTQ== 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=QrTJrhwncdjERrb7Sj+9vU3YqE+Od88PV0ZY1Uazd6Q=; b=HRlEnLXYAtP4v/qcxuZNxkT1k19/1540jQuvCHW6sLifvXizh4QRvrY6VjUIA66SMV9JRMHp8G42WQ02EhaFWsa9Gmo8UQcNaEcC7E189cfQv9MSPRDpzQNhgVQ0pjAdSeh7SEHr2CAL30/EgMH6KRQ1oNdeNU7RLW4+OB1FHYr8sLemuXJXqaG+9NWTdlVBoYUV6nW2S3/iOT9fir3CD1Ni+FT8FuM/KCugLUr+K4O7qEzkyWHOkLvE1EtNh1NLHBMLSoMOaGbGsQePXhSJUlmQ5iGJ88WEaUCzbuz5elDnVVtwuFVy9ekCMzuaUjbRj2FGkJXRgwupzlFVUjolrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:8::10) by NTZPR01MB1050.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.43; Wed, 8 May 2024 07:04:15 +0000 Received: from NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn ([fe80::e903:99a6:10b7:304d]) by NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn ([fe80::e903:99a6:10b7:304d%6]) with mapi id 15.20.7472.044; Wed, 8 May 2024 07:04:15 +0000 From: Xingyu Wu To: Liam Girdwood , Mark Brown , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Xingyu Wu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH v3 1/2] ASoC: dt-bindings: Add bindings for Cadence I2S-MC controller Date: Wed, 8 May 2024 15:04:05 +0800 Message-Id: <20240508070406.286159-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240508070406.286159-1-xingyu.wu@starfivetech.com> References: <20240508070406.286159-1-xingyu.wu@starfivetech.com> X-ClientProxiedBy: BJSPR01CA0003.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:c::15) To NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:8::10) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: NTZPR01MB0956:EE_|NTZPR01MB1050:EE_ X-MS-Office365-Filtering-Correlation-Id: 68868c55-acb7-4114-5930-08dc6f2d1258 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rLrFxrfHBbvdH/TPJm7jKS7QlT8Yb4DdOnEGkjrMenCwGx4cDb7aA6qMe4mJgeJdTtTKyCd5eZ36l5MHVpipHgFrGCuEpHWviu5EnhikAi3imiNXK0nj1bpyeyhUuVuTuGR53lgIbL1P6Ai1p9CbXbWZ7tUUMSG1zn8XhOod3VRdPbtgpNsrtRfyp2Vf5iHTxb7PFHLCMYPHVUekVdZVLwmQcHNY4Ci2cqjDbXRYaRsDxaxcgKGk07jjWIGkEOd6TeVVPR0lgzJSlwnUV6NeQKMcuqQjj3uYvnSI8cPaWe3poloqjjOfgRtUhLn/3MxADvWP+CKxAYQOVxDxgS0/+QfINkQhFtPto0LpVFzuJF9bP8zHgXC/xwQvhNDX5xvgZin4k7HJSSZsgUPEgkTcd0CanPaHZRJfbdoaFOp+Bdv2xfXVF/GcrJIHYph3gjvpuyd4x2EPp8LFMzXS8P4gbOM+6J18LE3evrbYLFxYKbSDaZwTZ4hYlWYeb5yFv5xv9+SHLXYIxly6WRx4fcS9E6BuNRsQ40aBc77Zl23iNxsuNn0fPV1N7cG4Kqbox8Wz2t9F6OErqUQwZdk1YCd0J2FkpYnPdgMalQpxlTJf2eyXS0swJpQcjkhLeEtEh68F X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(52116005)(41320700004)(366007)(7416005)(1800799015)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bjzmyas6rdWELXnz+bpxhGjuO5ugXTmkf9BpI1PenHwpC7mp2hOAiQUkupHEFPbW/PM96COq1AeY3cQnUuy4AjsIX0QgGr5tFkFp9b4Dh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r2h/6B6TpSoxz+LkYyuSAx+z1FnO2VIxAkdws46hx+lwkUuq0yJ4bZSpUHW+mocPJdPoLy2PM4NmFRq4cn9HOsuSDU+TPi8G+Nbi0OBNiJjQe24j8/z2jNXBcEITJPKIDhYIhTBkwaH1M60xbICFfu176cbbkCYmzP1zEhxcpnsmg8Q7AT3WC8XjuLA3hU+dOklSegi+LrLKnuSSnezNPEYtgBXNpIQunbgnLdhBDQ0ZfI+tR6xsFggj94u47ITi4gJ9qp5UnX0iMi9YDSeeWVk9yNNrugrv5pisgSUC6YgHzvZ/FdNGHc+0f4Tl3seIrnbtlEZx6Qz3bx3mF1c+LVy2Wo7uOjuIcKlwEh5w5pRLPHyc3AwCVsgj9ZB0UIVYYBH79y+ayau1MfIAS39+dCvZPtS2Oyem8rRP99eFYxkdmonxTRJpNpwwMHUw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68868c55-acb7-4114-5930-08dc6f2d1258 X-MS-Exchange-CrossTenant-AuthSource: NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 07:04:15.3057 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gIJEPzTj8L2k0WkQfQk4dxGxt/NFJ3afMwGJLFKha2wCe0vQOwGAvXkGTgVNV7ZbdInPiDNboQSGkzqradBWkKT+C7eIG8uCU27Us7k7viI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: NTZPR01MB1050 Add bindings for the Multi-Channel I2S controller of Cadence. The Multi-Channel I2S (I2S-MC) implements a function of the 8-channel I2S bus interfasce. Each channel can become receiver or transmitter. Four I2S instances are used on the StarFive JH8100 SoC. One instance of them is limited to 2 channels, two instance are limited to 4 channels, and the other one can use most 8 channels. Add a unique property about 'starfive,i2s-max-channels' to distinguish each instance. Signed-off-by: Xingyu Wu Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/cdns,i2s-mc.yaml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cdns,i2s-mc.yaml diff --git a/Documentation/devicetree/bindings/sound/cdns,i2s-mc.yaml b/Documentation/devicetree/bindings/sound/cdns,i2s-mc.yaml new file mode 100644 index 000000000000..94ebce7fd5e4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cdns,i2s-mc.yaml @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cdns,i2s-mc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cadence multi-channel I2S controller + +description: + The Cadence I2S Controller implements a function of the multi-channel + (up to 8-channel) bus. It combines functions of a transmitter and a receiver. + +maintainers: + - Xingyu Wu + +properties: + compatible: + items: + - enum: + - starfive,jh8100-i2s + - const: cdns,i2s-mc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Bit clock + - description: Main ICG clock + - description: Inner master clock + + clock-names: + items: + - const: bclk + - const: icg + - const: mclk_inner + + resets: + maxItems: 1 + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + minItems: 1 + + dma-names: + items: + - const: tx + - const: rx + minItems: 1 + + "#sound-dai-cells": + const: 0 + + starfive,i2s-max-channels: + description: + Number of I2S max stereo channels supported on the StarFive + JH8100 SoC. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [2, 4, 8] + +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + contains: + const: starfive,jh8100-i2s + then: + required: + - starfive,i2s-max-channels + else: + properties: + starfive,i2s-max-channels: false + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - dmas + - dma-names + - interrupts + - "#sound-dai-cells" + +unevaluatedProperties: false + +examples: + - | + i2s@122b0000 { + compatible = "starfive,jh8100-i2s", "cdns,i2s-mc"; + reg = <0x122b0000 0x1000>; + clocks = <&syscrg_ne 133>, + <&syscrg_ne 170>, + <&syscrg 50>; + clock-names = "bclk", "icg", + "mclk_inner"; + resets = <&syscrg_ne 43>; + dmas = <&dma 7>, <&dma 6>; + dma-names = "tx", "rx"; + interrupts = <59>; + #sound-dai-cells = <0>; + starfive,i2s-max-channels = <4>; + };