From patchwork Thu Feb 16 13:42:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 58081 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp307697wrn; Thu, 16 Feb 2023 05:46:15 -0800 (PST) X-Google-Smtp-Source: AK7set+uOFiwkiwZJpe//Lg9Kq2IBYuqNMAieZRd9CnCK5cOIhdxdGuJAhtXXJsRdhwAVUlJ2UEM X-Received: by 2002:a05:6a20:4285:b0:bf:8ee2:2009 with SMTP id o5-20020a056a20428500b000bf8ee22009mr7608095pzj.26.1676555175519; Thu, 16 Feb 2023 05:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676555175; cv=none; d=google.com; s=arc-20160816; b=oQHabytJTADIPQ4tXGqSWJYPS+WhgZ7rycMkZyc/MP3dErrPP3BlT/zLaS+G3NCvgH /ClZ7yWZbJMGr/eYTpzLs/LwKX4/JFtT02kTZHmFetWDNEd5BHKKBei2NCxsGMvtcmAd 2jtmgUOB7Rv7k7nyHjlMKsM6kYD6Qk8tXy6KdFX09ByrZDTPtY6pisPFCJCCO18jf47W CGaF98dC+4wPz4nOUwmTeRUIgdBJ3RxjMoz8sSGPOjugJ/oRdgFxPGoCIpUafqGNbWR3 Anhbii2fmdp/M0Foyrff0nXSN3OX3v2yDc/0vt9/O6815rM6MG0tblub4aixvtA00p7R wE/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Oul0jsc2DenRyA+fgPib1b2q+MbmEghK/BzvhARWAgE=; b=bFR/qwrMhl5emV8Cv0v1ho9k81V6pxIOMFlbYdlyTd+vmc+iJJHSrCIk3Iqa4RSj3G eAGrBJ/Uem2rykzIl2rKloPmOGjTjCFC0hf4D9B9X6NwVrviwgEP68WIOx0ivy1sVwib IaUN3Ryz6TRGzwfx+HowE1MY/OJTaI3GxPNfMCQXQhTXBbVP5T9YIdNf0Lij4ZaZYa+1 50YhXYYi+8uCvArWm1/ncToeO1Rb5GbUIPtvQaWwEcDD51i6ir3AGvFHxCGrkUU2kqrW x2QYLZ/aWJz26dw48Lq803tmJB7fIDYfHvtqlnrEnHLNF/U20XEEWvU8apUzx0BgoESO Ul/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=U1bOqWqB; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kp12-20020a170903280c00b0019a96d3b45fsi1287340plb.490.2023.02.16.05.46.03; Thu, 16 Feb 2023 05:46:15 -0800 (PST) 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=@bootlin.com header.s=gm1 header.b=U1bOqWqB; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjBPNn0 (ORCPT + 99 others); Thu, 16 Feb 2023 08:43:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbjBPNnK (ORCPT ); Thu, 16 Feb 2023 08:43:10 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86324CC23; Thu, 16 Feb 2023 05:43:02 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id C794F20009; Thu, 16 Feb 2023 13:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676554980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Oul0jsc2DenRyA+fgPib1b2q+MbmEghK/BzvhARWAgE=; b=U1bOqWqB1pqCy7Rr6itz0dQcB+DY+JdXYw3JCB77P63DROQNBtAn2jqC4e0zdDzZ8lbUFk CcgQVi+sgn9fmxrZkVL3GY9OihZuStKOpnkMKS9xsT+11n6pEPW+C/9XEfHFb+D1bXcx2W HhlLYM1c2BDA8CF+acCgvowELETNlpxkugLVvDdgrKHnohvP20e+PtzybQ3hP0T4ZCt0qk J8ZDXmQW8NsuafGhw4Mfd5D/RV3/gWfVxYh0evwS32fCBCuiWo4Vh+k+mu2GwszerU9/IC X9hd8SzFu3NXC+U0gcflRAvE3L7fx582UYxLLL76DL8G9Qf3rDzo4wTkpNUHlw== From: Herve Codina To: Herve Codina , Li Yang , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Qiang Zhao , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Thomas Petazzoni , Krzysztof Kozlowski Subject: [PATCH v5 08/10] dt-bindings: sound: Add support for QMC audio Date: Thu, 16 Feb 2023 14:42:24 +0100 Message-Id: <20230216134226.1692107-9-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230216134226.1692107-1-herve.codina@bootlin.com> References: <20230216134226.1692107-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757995520127909136?= X-GMAIL-MSGID: =?utf-8?q?1757995520127909136?= The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC audio is an ASoC component that uses the QMC controller to transfer the audio data. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/fsl,qmc-audio.yaml | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml diff --git a/Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml b/Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml new file mode 100644 index 000000000000..ff5cd9241941 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,qmc-audio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QMC audio + +maintainers: + - Herve Codina + +description: | + The QMC audio is an ASoC component which uses QMC (QUICC Multichannel + Controller) channels to transfer the audio data. + It provides as many DAI as the number of QMC channel used. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: fsl,qmc-audio + + '#address-cells': + const: 1 + '#size-cells': + const: 0 + '#sound-dai-cells': + const: 1 + +patternProperties: + '^dai@([0-9]|[1-5][0-9]|6[0-3])$': + description: + A DAI managed by this controller + type: object + + properties: + reg: + minimum: 0 + maximum: 63 + description: + The DAI number + + fsl,qmc-chan: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to QMC node + - description: Channel number + description: + Should be a phandle/number pair. The phandle to QMC node and the QMC + channel to use for this DAI. + + required: + - reg + - fsl,qmc-chan + +required: + - compatible + - '#address-cells' + - '#size-cells' + - '#sound-dai-cells' + +additionalProperties: false + +examples: + - | + audio_controller: audio-controller { + compatible = "fsl,qmc-audio"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + dai@16 { + reg = <16>; + fsl,qmc-chan = <&qmc 16>; + }; + dai@17 { + reg = <17>; + fsl,qmc-chan = <&qmc 17>; + }; + }; + + sound { + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + simple-audio-card,dai-link@0 { + reg = <0>; + format = "dsp_b"; + cpu { + sound-dai = <&audio_controller 16>; + }; + codec { + sound-dai = <&codec1>; + dai-tdm-slot-num = <4>; + dai-tdm-slot-width = <8>; + /* TS 3, 5, 7, 9 */ + dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>; + dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>; + }; + }; + simple-audio-card,dai-link@1 { + reg = <1>; + format = "dsp_b"; + cpu { + sound-dai = <&audio_controller 17>; + }; + codec { + sound-dai = <&codec2>; + dai-tdm-slot-num = <4>; + dai-tdm-slot-width = <8>; + /* TS 2, 4, 6, 8 */ + dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>; + dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>; + }; + }; + };