From patchwork Sat Dec 3 16:04:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 630927 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 D58D7C636F8 for ; Sat, 3 Dec 2022 16:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbiLCQFY (ORCPT ); Sat, 3 Dec 2022 11:05:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbiLCQFW (ORCPT ); Sat, 3 Dec 2022 11:05:22 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1ACF1F2E3 for ; Sat, 3 Dec 2022 08:05:11 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id b3so11950251lfv.2 for ; Sat, 03 Dec 2022 08:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xQQgA2B6JuQCl9Sn47gIOr5BLct1XCSVPgZ5wpqRd04=; b=Kj4DNPgsIyL3BIhG4CqIcBbcV1s+qCWiZr8CGSJQs9OvpzKtotQ465N2CNEnsvvZ1A 3QpfbS43IgnSlXlDAYeRa7K+Olx/mZUocnOqdyDFZreb57z32+RvduL2PrG9zQHtbDcu 73pdpp0PHB80Rl1+seCpOf9SYbLR7mNG159IaxkTLXTzFv0jxrgyezAxeLnjtcx5F1dn Hjf1PA4M8aFbQaCLterflhYSLXdvYo0sjQcKB4h4jgHBH+FrTaO+QAaCw4JQ96x0JYNW Wc28txwTUMBoRrciXidG353d4zSfbOpNnvzJODZQMCT+ey5IySIBHDdnwMUbIHqSVzBS Kq5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xQQgA2B6JuQCl9Sn47gIOr5BLct1XCSVPgZ5wpqRd04=; b=UKvdfWCODAqGakd7TD7relrAFVqk3ImJjTsrOJCVpbEJhgytRAhb+hZllg3GTEA1ZG qY4bMb/t6rChXkK5frSHqiKo35y5nJkzp+pUlYYXgJVZU4SvcqX48uBlTDZND2Xo5vhO vR/VSkkW0dMHIW0bnO8SLvG+VxYr7PbmuoK4x6lNYrl+IN2bgmPDdmE6Mt0TuPC5kzUY Za5/vmosB74gFagM50sW3cAGFD2cAcu4H4sB4WZa6jxn+L+/o+bqBXbXStllPrHuWUmc MxouUIjZjhaQoxlk0xL4v5ZUbQGK8oaLuIYlbkxFCAK2FejLD9K13TOEEpphhiQf7GKD nFDw== X-Gm-Message-State: ANoB5plaestCGS08LqDXk/EpctQPDo65Czi0fDla6VxjOf8k83zsRk+K 1KGXK5hMnsPOwCivzxiuFkyEcA== X-Google-Smtp-Source: AA0mqf72BVKnpn+MA5xJGVYlL5SnIsGDKLeZoYK756z5Q92VunWvwd331oN9TV1SKnOL4zeD/GFMxg== X-Received: by 2002:ac2:4310:0:b0:4a2:3e6c:a32b with SMTP id l16-20020ac24310000000b004a23e6ca32bmr24364674lfh.54.1670083510167; Sat, 03 Dec 2022 08:05:10 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id d11-20020ac2544b000000b004946bb30469sm1441320lfn.82.2022.12.03.08.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Dec 2022 08:05:05 -0800 (PST) From: Krzysztof Kozlowski To: Neil Armstrong , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Ban Tao , =?utf-8?q?Martin_Povi=C5=A1er?= , James Schulman , David Rhodes , Lucas Tanure , Richard Fitzgerald , Charles Keepax , Peter Ujfalusi , Cheng-Yi Chiang , Tzung-Bi Shih , Guenter Roeck , Benson Leung , Thierry Reding , Jonathan Hunter , Stephan Gerhold , Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Heiko Stuebner , Sylwester Nawrocki , Fabio Estevam , Kunihiko Hayashi , Masami Hiramatsu , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , Alexandre Belloni , Lars-Peter Clausen , Bogdan Togorean , =?utf-8?q?Nuno_S=C3=A1?= , Vincent Knecht , Kuninori Morimoto , Maxime Ripard , Ricardo Rivera-Matos , - , Jayesh Choudhary , Daniel Drake , Katsuhiro Suzuki , Shengjiu Wang , Paul Cercueil , Jee Heng , Lubomir Rintel , Codrin Ciubotariu , Mohan Kumar , Sameer Pujar , Rohit kumar , Derek Fang , Biju Das , ChiYuan Huang , Jose Abreu , Andrew Davis , Shi Fu , Shenghao Ding , Matt Flax , Ricard Wanderlof , Jaroslav Kysela , Takashi Iwai , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sunxi@lists.linux.dev, asahi@lists.linux.dev, chrome-platform@lists.linux.dev, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Cc: Krzysztof Kozlowski Subject: [PATCH 3/3] ASoC: dt-bindings: maxim,max98357a: Convert to DT schema Date: Sat, 3 Dec 2022 17:04:42 +0100 Message-Id: <20221203160442.69594-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221203160442.69594-1-krzysztof.kozlowski@linaro.org> References: <20221203160442.69594-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the Maxim Integrated MAX98357A/MAX98360A amplifier bindings to DT schema. Add missing properties ('#sound-dai-cells' and 'sound-name-prefix' from common DAI properties). Signed-off-by: Krzysztof Kozlowski --- As a maintainer I added recent contributor to this driver/bindings: Tzung-Bi Shih. Please ack if you agree to keep an eye on the bindings. --- .../devicetree/bindings/sound/max98357a.txt | 28 ---------- .../bindings/sound/maxim,max98357a.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/max98357a.txt create mode 100644 Documentation/devicetree/bindings/sound/maxim,max98357a.yaml diff --git a/Documentation/devicetree/bindings/sound/max98357a.txt b/Documentation/devicetree/bindings/sound/max98357a.txt deleted file mode 100644 index 75db84d06240..000000000000 --- a/Documentation/devicetree/bindings/sound/max98357a.txt +++ /dev/null @@ -1,28 +0,0 @@ -Maxim MAX98357A/MAX98360A audio DAC - -This node models the Maxim MAX98357A/MAX98360A DAC. - -Required properties: -- compatible : "maxim,max98357a" for MAX98357A. - "maxim,max98360a" for MAX98360A. - -Optional properties: -- sdmode-gpios : GPIO specifier for the chip's SD_MODE pin. - If this option is not specified then driver does not manage - the pin state (e.g. chip is always on). -- sdmode-delay : specify delay time for SD_MODE pin. - If this option is specified, which means it's required i2s clocks - ready before SD_MODE is unmuted in order to avoid the speaker pop noise. - It's observed that 5ms is sufficient. - -Example: - -max98357a { - compatible = "maxim,max98357a"; - sdmode-gpios = <&qcom_pinmux 25 0>; -}; - -max98360a { - compatible = "maxim,max98360a"; - sdmode-gpios = <&qcom_pinmux 25 0>; -}; diff --git a/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml b/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml new file mode 100644 index 000000000000..83ba8666fbb4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/maxim,max98357a.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/maxim,max98357a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim Integrated MAX98357A/MAX98360A amplifier + +maintainers: + - Tzung-Bi Shih + +description: + Maxim Integrated MAX98357A/MAX98360A is a digital pulse-code modulation (PCM) + input Class D amplifier. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - maxim,max98357a + - maxim,max98360a + + '#sound-dai-cells': + const: 0 + + sdmode-gpios: + maxItems: 1 + description: + Chip's SD_MODE pin. If missing the chip is always on. + + sdmode-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Delay time for SD_MODE pin changes intended to make I2S clocks ready + before SD_MODE is unmuted in order to avoid the speaker pop noise. + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include + + amplifier { + compatible = "maxim,max98360a"; + #sound-dai-cells = <0>; + sdmode-gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>; + };