From patchwork Sun Jan 15 12:16:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Lu X-Patchwork-Id: 13102221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 686C5C46467 for ; Sun, 15 Jan 2023 12:17:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A2A199F2A; Sun, 15 Jan 2023 13:16:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A2A199F2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673785058; bh=Rr4wFE8+o2Dr30WQsw7WljTzTPYoi/KgCKkLDQSLcWY=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=P9EI4CjIfkbm0qj+/lAk69bzWrWPO8lmIvFc+yauRXrhxR5QJEOFKFXuAgbBsKjX+ AuaOjDBrWFRdDZISELb/Oof1xGuOLMIwqnO4CK+ZECucQ8rM9Q0SB06qLVLQJlTtbw shp/ytQ+RvBWIzUhKwFkf2J7l44NF+iZb7sMAp5g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 44ADCF804BC; Sun, 15 Jan 2023 13:16:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C2D0F804DE; Sun, 15 Jan 2023 13:16:47 +0100 (CET) Received: from n169-111.mail.139.com (n169-111.mail.139.com [120.232.169.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1CA76F804A9 for ; Sun, 15 Jan 2023 13:16:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1CA76F804A9 X-RM-TagInfo: emlType=0 X-RM-SPAM: X-RM-SPAM-FLAG: 00000005 Received: from lml-VirtualBox.. (unknown[183.14.134.10]) by rmsmtp-lg-appmail-13-12002 (RichMail) with SMTP id 2ee263c3ee9ef57-7c0a4; Sun, 15 Jan 2023 20:16:31 +0800 (CST) X-RM-TRANSID: 2ee263c3ee9ef57-7c0a4 From: Kevin Lu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Subject: [PATCH v1] Asoc: dt_bindings: Add tas2781 yaml Date: Sun, 15 Jan 2023 20:16:29 +0800 Message-Id: <20230115121629.2420-1-luminlong@139.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Kevin Lu , linux-kernel@vger.kernel.org, navada@ti.com, kevin-lu@ti.com, shenghao-ding@ti.com, peeyush@ti.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Complete the DTS for tas2781 Signed-off-by: Kevin Lu --- .../devicetree/bindings/sound/ti,tas2781.yaml | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ti,tas2781.yaml diff --git a/Documentation/devicetree/bindings/sound/ti,tas2781.yaml b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml new file mode 100644 index 0000000..7d73f46 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ti,tas2781.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/ti,tas2781.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TAS2781 Smart PA + +maintainers: + - Shenghao Ding + - Kevin Lu + +description: | + The TAS2781 is a mono, digital input Class-D audio amplifier + optimized for efficiently driving high peak power into small + loudspeakers. Integrated an on-chip DSP supports Texas Instruments + Smart Amp speaker protection algorithm. The integrated speaker + voltage and current sense provides for real time + monitoring of loudspeaker behavior. + +properties: + compatible: + enum: + - ti,tas2781 + + reg: + maxItems: 1 + description: | + I2C address of the device can be in range from 0x38 to 0x40. + + ti,audio-slots: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 4 + description: | + This item is used to store the i2c address of the device + for deifferent audio slots. It is not required for Mono case. + + ti,global-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + This item is used to store the generic i2c address of + all the tas2781 devices for I2C broadcast during the multi-device + writes, useless in mono case. + + ti,reset-gpios: + minItems: 1 + maxItems: 4 + description: GPIO specifier for the reset pin. + + ti,irq-gpio: + maxItems: 1 + description: GPIO used to interrupts the device. + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + /* example with mono support */ + #address-cells = <1>; + #size-cells = <0>; + mono: codec@38 { + compatible = "ti,tas2781"; + reg = <0x38>; + #sound-dai-cells = <1>; + ti,reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + ti,irq-gpio = <&gpio1 15 0>; + }; + }; + - | + #include + i2c { + /* Stereo without irq-gpio and global-addr */ + #address-cells = <1>; + #size-cells = <0>; + stereo: codec@38 { + compatible = "ti,tas2781"; + reg = <0x38>; + #sound-dai-cells = <1>; + ti,audio-slots = < 0x38 /* left-channel */ + 0x39 /* right-channel */ + >; + ti,reset-gpios = < &gpio1 10 GPIO_ACTIVE_HIGH + &gpio1 11 GPIO_ACTIVE_HIGH + >; + }; + }; + - | + #include + i2c { + /* example with quad support, such as tablet or pad device */ + #address-cells = <1>; + #size-cells = <0>; + quad: codec@38 { + compatible = "ti,tas2781"; + reg = <0x38>; + #sound-dai-cells = <1>; + ti,audio-slots = < 0x38 /* topleft-channel */ + 0x39 /* topright-channel */ + 0x3a /* bottomleft-channel */ + 0x3b /* bottomright-channel */ + >; + ti,global-addr = <0x40>; + ti,reset-gpios = < &gpio1 10 GPIO_ACTIVE_HIGH + &gpio1 11 GPIO_ACTIVE_HIGH + &gpio1 12 GPIO_ACTIVE_HIGH + &gpio1 13 GPIO_ACTIVE_HIGH + >; + ti,irq-gpio = <&gpio1 15 0>; + }; + }; +...