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: 13063560 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27ABC33DD for ; Sat, 3 Dec 2022 16:05:12 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id bp15so11912893lfb.13 for ; Sat, 03 Dec 2022 08:05:12 -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=WJ618QHf2Q9AONVGj4wSb1EqCULiq10jJEIpBafIiOuk/ceJZ5E9mIyuQ5sUuEJiJk 4Z6ufzOQgVvEYOMRPQQ3ui92R/mRC46XTnqoJDFPKGuVnQlE1uX4glqtaWbb92d9vbox 5QL+MDmfmH9r3yUpNJX44bwipwuftRAQwFWMor4oTQyP/44/IuTukOOonnpS692CVKKs p8IA9uPRU7EjeLltoWFABuZKj2yWiIJsPh7YnLHuhWxCL79LY3rW5SpCL6AP4GIRRBj+ U5Fx1Z3yGDGj/fgsyAKY4aU0W9BkdFoW6CMZrXz3Ief6bKpFc95aago2lopAkUH1QXuW bBPA== X-Gm-Message-State: ANoB5pmDlLodkmDcrDJo6RCUCo1rxhi43VGgbXdJUpWmUpDhM0LkOq5k QJZ+asHirqh8gHX+0W8FBOzj3Q== 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> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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>; + };