From nobody Wed Sep 17 09:42:31 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AA47C4167B for ; Tue, 20 Dec 2022 14:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234235AbiLTOwD (ORCPT ); Tue, 20 Dec 2022 09:52:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbiLTOv0 (ORCPT ); Tue, 20 Dec 2022 09:51:26 -0500 X-Greylist: delayed 405 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 20 Dec 2022 06:51:23 PST Received: from n169-112.mail.139.com (n169-112.mail.139.com [120.232.169.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08DFC1AA2B; Tue, 20 Dec 2022 06:51:22 -0800 (PST) X-RM-TagInfo: emlType=0 X-RM-SPAM: X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[61.152.193.32]) by rmsmtp-lg-appmail-25-12028 (RichMail) with SMTP id 2efc63a1c993073-87152; Tue, 20 Dec 2022 22:41:24 +0800 (CST) X-RM-TRANSID: 2efc63a1c993073-87152 From: Kevin Lu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, shenghao-ding@ti.com, kevin-lu@ti.com, navada@ti.com, peeyush@ti.com, Kevin Lu Subject: [PATCH] New yaml file: tas2781 Date: Tue, 20 Dec 2022 22:41:14 +0800 Message-Id: <20221220144114.2137-1-luminlong@139.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add DTS discription for tas2781 driver code Signed-off-by: Kevin Lu --- .../devicetree/bindings/sound/tas2781.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tas2781.yaml diff --git a/Documentation/devicetree/bindings/sound/tas2781.yaml b/Documen= tation/devicetree/bindings/sound/tas2781.yaml new file mode 100644 index 000000000..96fa45bf6 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/tas2781.yaml @@ -0,0 +1,90 @@ +# 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/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 + - ti,audev + description: | + ti,audev will disable the irq of tas2781. + reg: + maxItems: 1 + description: | + I2C address of the device can be between 0x38 to 0x40. + + reset-gpioN: + maxItems: 4 + description: GPIO used to reset the device. + + ti,topleft-channel: + maxItems: 1 + description: I2C Address for each specific device. + + ti,topright-channel: + maxItems: 1 + + ti,bottomleft-channel: + maxItems: 1 + + ti,bottomright-channel: + maxItems: 1 + + ti,global-address: + maxItems: 1 + description: This item is not mandatory. if the device support gloabel= mode, this item should be active. + + ti,irq-gpio: + maxItems: 1 + description: GPIO used to interrupt the device. + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c0 { + #address-cells =3D <1>; + #size-cells =3D <0>; + codec: codec@38 { + compatible =3D "ti,tas2781"; + reg =3D <0x38>; + #sound-dai-cells =3D <1>; + ti,topleft-channel =3D <0x38>; + ti,topright-channel =3D <0x39>; + ti,bottomright-channel =3D <0x3a>; + ti,bottomright-channel =3D <0x3b>; + ti,global-address =3D <0x40>; + ti,reset-gpio0 =3D <&gpio1 10 GPIO_ACTIVE_HIGH>; + ti,reset-gpio1 =3D <&gpio1 11 GPIO_ACTIVE_HIGH>; + ti,reset-gpio2 =3D <&gpio1 12 GPIO_ACTIVE_HIGH>; + ti,reset-gpio3 =3D <&gpio1 13 GPIO_ACTIVE_HIGH>; + ti,irq-gpio =3D <&gpio1 15 0>; + }; + }; +... --=20 2.17.1