From patchwork Fri Feb 17 14:56:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 58642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp930656wrn; Fri, 17 Feb 2023 06:59:16 -0800 (PST) X-Google-Smtp-Source: AK7set88wKIF6CSL1jp1ck/Um7uKGrsTA0e41HH5dUEiaRGQzeJTYYS6topOZ+y4ONGo/zATVeuy X-Received: by 2002:a17:902:c3c3:b0:196:2ade:6e21 with SMTP id j3-20020a170902c3c300b001962ade6e21mr338312plj.14.1676645956260; Fri, 17 Feb 2023 06:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676645956; cv=none; d=google.com; s=arc-20160816; b=N3DHMOgossWIKlGnRGMUgdLkiUJP1lpfZCI0N3F0PngVqTk77VmWyddUvKETZkaAH+ a9fiZmPGf9hf9cQmuVCbtn+Jv9mlZQCmc2tYNYIswUIzsbAiIQYCRgHe5dLGojhMNfIw sYl95LWd+dOkp5iKs+Q45/NuX2Yd7Jmn3RfVGlKwgoieU5Uk/nRqAUNXVSP+jcX2XOPW yBozpLOfc6Efu0K1n6IsJBPQtc+mm+V0v6He0d8C95ndxq5mli44TyhxzmB+EC6FznI1 moIhKMVEFcoXrqzgAFHMQweuVFP1a90Ic70OgA4nTYVGP1+jND4jiTOTA7mPYr+3Nv6h G2xg== 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=Gh9Cowy8NmR+xk37thVWdO23Xvoj0qnLZMtVNcvbJ0BFWOqlrDW7bpx/nXkodZrtrw 5USFFEXF0rxcR2pNzAmcYqkCZeT4ynFKXh48KACP14Jgp8HJJqanpu/OEuMpXm9BqyRa Jxu0gi7gdJvLpQS0t8oB76t1aYASIzd09nOe1fIit2FppRsJEC5lap2dL6/gJmahiAGZ nqx1uoNkzSLAj2skRkl4XGxmgWtuV/Ugzr8WP9ghjzJMhj1pI+bY6WLtjE0sCG5ke3XE tD1n3I0HxwTuNbJSFYp/4wnun+jfd0iaL5UBYaVhqLX0sTn4Vo2QaqoP0+N7FW2emHN0 wybA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lKrImua2; 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 x3-20020a170902ec8300b0019a5ba2d25esi5892755plg.321.2023.02.17.06.59.03; Fri, 17 Feb 2023 06:59:16 -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=lKrImua2; 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 S230321AbjBQO6m (ORCPT + 99 others); Fri, 17 Feb 2023 09:58:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjBQO6N (ORCPT ); Fri, 17 Feb 2023 09:58:13 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880766F7C6; Fri, 17 Feb 2023 06:57:44 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 195AF1BF208; Fri, 17 Feb 2023 14:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676645838; 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=lKrImua2SWgv23HcLQR5QYzFefeawmB1pgc3fhepEgZ2X4ZANAzneVabHZTqdjy5LxYXYQ fnz4m4soBND1McBMowFPxo44afn2vHlkQ4IfpuZ+bnCvehUMioDXsOjew6u2TfiHj+UF3i jhLmr/wc8HfYS/frBd/Dsd5rUrUmWDAgycSbMts4mVy7hWT+VxcY/t+lTLbXPDHKbVf9+k m97xss3UMl8JzEPPFnPsqmZLeSCnJ0QaoJQCWQcqR8wLxq357eydxFn6D+7pUfysuqtIu9 I4syv4DSkuj3Sl4ecvFczx5IDTGQFZJWWKkLTlL1nYRtLgCLjjv1jbvcfZkQnA== 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 v6 08/10] dt-bindings: sound: Add support for QMC audio Date: Fri, 17 Feb 2023 15:56:43 +0100 Message-Id: <20230217145645.1768659-9-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230217145645.1768659-1-herve.codina@bootlin.com> References: <20230217145645.1768659-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?1758090710520023801?= X-GMAIL-MSGID: =?utf-8?q?1758090710520023801?= 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 Reviewed-by: Christophe Leroy --- .../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>; + }; + }; + };