From patchwork Mon Mar 6 16:17:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 64960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1954251wrd; Mon, 6 Mar 2023 09:01:42 -0800 (PST) X-Google-Smtp-Source: AK7set9PsQR64EXXH83P9q4c2eA5MaNKJrEBUo/fcUjeT0k1oAL/Kbj3RZ4D2cHtgsOl3mN1XlXr X-Received: by 2002:a17:907:a0d5:b0:8b1:319c:c29e with SMTP id hw21-20020a170907a0d500b008b1319cc29emr14321095ejc.74.1678122102574; Mon, 06 Mar 2023 09:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678122102; cv=none; d=google.com; s=arc-20160816; b=h3EuRQfIS4HaxehX4dYTKeGHZJcFblKVllimgS8hiMLF782njkkdDD1KPWoq3H6f6t OJmCm6gBcK6n4t5HGkCmBh15V8FoKVibpf7Bmk/befm2zGgBO+gYCs2kVG5kFvzEv8JT IcQ3avf78dZYQ5Q6aFaVj6u3e9vB/7PE23Fnj/oqT7hd6zBj8sD3/CxoV/2IHI28Zq0u tzVZWJOSYMWKz/rBWpDAgik8BcJD8gYZ3mteZImJgVzWa8hHKCFGsXH+G+MfcI5SQftR PEcAc8XXgAcY8T/dWTR8cIiQ4E7MS7w0ApVnEISNoxJMJpbNcIsTfIK+EOk4nGlFKkHN Z2DQ== 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=Pmxfdk+Amg8OCew6Ab5irwB9aXmn1uQJbltzX8EuqpU=; b=XM6H89lrvCQRw3EQtgbXMq1zquCYmN0qYB6qMW1gON5gBvcUV6uCskjBuqOLD/rMtZ iLZhQvUpDysoDI5yrKqSeM3uoZ4EROdD1pQu4h3m2dJhDxWd9a0GZoY/2SQm77RpsmyF 5LALZEOcLsw2D1oU7RQr97IBV85f8F031KsbvAk7gebfv0jJmJw1B0wbCrsEbS17a6C8 2bzFLCJrz/eq+2rKKwRhpVi/QoI/c7+Y257iZCaSEnO9tkIeoUR3TiMnbijp2KBdSqS7 yN+85eBs+7QCTricSgy+kVRAkiJXReUe0Qgs+e04NOw9mzZNauFi8mg3bGUf+9YaJP2y O0Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=o4QKLyU9; 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 sg15-20020a170907a40f00b009159def370dsi643596ejc.46.2023.03.06.09.01.17; Mon, 06 Mar 2023 09:01:42 -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=o4QKLyU9; 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 S229948AbjCFQfa (ORCPT + 99 others); Mon, 6 Mar 2023 11:35:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230328AbjCFQfI (ORCPT ); Mon, 6 Mar 2023 11:35:08 -0500 Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [IPv6:2001:4b98:dc4:8::240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F1638018; Mon, 6 Mar 2023 08:34:35 -0800 (PST) Received: from relay1-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::221]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 86F3CCB4EF; Mon, 6 Mar 2023 16:19:52 +0000 (UTC) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id B9E7124000F; Mon, 6 Mar 2023 16:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678119512; 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=Pmxfdk+Amg8OCew6Ab5irwB9aXmn1uQJbltzX8EuqpU=; b=o4QKLyU95UokIoK0QWwCGgGtV5d+5kzdC2MhV5dM9SHBlcRxJ+NoV2mApSqfxR/EP3CvxT i6UHnNBfyUah5uYTgcWu2Zhgjo/M+XslVxpCrLyY95K8WicWfgswhfGjd4JwUNkGyfM0qR 10C3RKFoTFbUKX42Q4du13fvM21vMzqAaOAmUhXitP23rqswTJ8Z5weKqfcjPQflcezC5M De+Zy5FoSxKjAN7WQDpvlSrw4vE811Mi828Ea9Lhu6MtNf9hzr3TkSEmZ/dEa3eoF/r4uo 0oCgMf7X4FMT877cRRCyEMBIwiTZIqBeiHB4AWm6+TWvuYzrZ+uCF7FtSL5Dfg== 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 v7 08/10] dt-bindings: sound: Add support for QMC audio Date: Mon, 6 Mar 2023 17:17:52 +0100 Message-Id: <20230306161754.89146-9-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306161754.89146-1-herve.codina@bootlin.com> References: <20230306161754.89146-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1759638561928402051?= X-GMAIL-MSGID: =?utf-8?q?1759638561928402051?= 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>; + }; + }; + };