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: 29291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1435929wrr; Sat, 3 Dec 2022 08:21:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf5KCmrcEQGs1zp72te8ko26NWwlY33gBSScP/bLb28Y1TAEAdHL37rsExmCr5GTTp+MRf3k X-Received: by 2002:a17:902:7898:b0:188:584d:b6d4 with SMTP id q24-20020a170902789800b00188584db6d4mr58142483pll.170.1670084486838; Sat, 03 Dec 2022 08:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670084486; cv=none; d=google.com; s=arc-20160816; b=PPS6zSp0r8h4mLhqvKxehJCIvSHOQOPpamrpCkKJRXIHDDw7insd0zBbbzeaNPi2kd tEchddpTdJ1lJXjOPULJtTwB2v2XT0AKJFVJixUDi10pBB6fIYCJdP9SW6821s/slWiX aFdAOvi4XHAdjpk9+aYQ44+OgpqNpo2Jq7PQs27awFk9Xo9BkUzW+RTEcAPnugl/qKBG um+wLnYPmb7KsJr1sqQ8W8ePRFHyyaE5wiy44DoiEUoWxvrha+EXYit1E4Oy4cdugppz h/pMaBNLtY72thNr8+kx8+cd1GRKTLx77POGjZYctgD8BskaOjtVK42Udk6qk93VSqLm w+dA== 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=xQQgA2B6JuQCl9Sn47gIOr5BLct1XCSVPgZ5wpqRd04=; b=wT+UCjQIHc4MnKOoS7yuJdYbvvfqavPEEXULuLGaNWXvVCe+qtbe/q8pd3gtJX5YQ7 8s/g9hK+DJcaMd3ZOXPU+d56EUUpwfQQc3tYPBueXokJDjeLqxBSmpzaZChHL1PjLXCl PtOtoPDCQgJ8BEbyMec0wHjX0QUL77qzxp0BmSAbHvzf3vRK8viiqca+Ai0Yl+4BPfLN cLq3xW2kKasuQsqlWemcPEn6o2susrvnC1SZpflj4oNRg/6kMJaYNn/snT/R8fse174o UYz6KmqZc5pD9GnL1KWeLZ8tFGBZ82BwXDy+b8kZ0TV56FaNK0VsUe4XAYTuNhNIKeJt HJgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kj4DNPgs; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a63e216000000b00476bfca3909si9915927pgh.792.2022.12.03.08.21.12; Sat, 03 Dec 2022 08:21:26 -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=@linaro.org header.s=google header.b=Kj4DNPgs; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbiLCQF0 (ORCPT + 99 others); Sat, 3 Dec 2022 11:05:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbiLCQFW (ORCPT ); Sat, 3 Dec 2022 11:05:22 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 053E91F2F0 for ; Sat, 3 Dec 2022 08:05:11 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id p36so7590216lfa.12 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=0h9utFUby7uAngVn8D8hesh7lYo2N6PkKkFrnjFdw/My2rtqgKum9m9jVYTh6nSkit yWDNXijSxd/2yd4aJ1cDcmBfqbfaZajlP9jyRdJAjx3KICAvy9CY4kwSeA3ll7sBFxth i8DGWIuzc/TB8kUSpCiGcr8WSVT/hmwRnDMjPjp2CU2VJaKTzvdY//rJoRM7xhbKLhZE /9Ie8hpoxVUnVceihFmVKfgwIv7pLm8eAAnuxw3GPjw9hs535+2ebLoD64ireefTR4jl NRypESGZa+QCgQ61QJBtmgnBnXYIbKEqmZQB2S2J+4M8rGlRWMRpM0GfxIup1xVSY0R7 wJeA== X-Gm-Message-State: ANoB5pkBW8OFp4QfO9Pe2NcwUOlxnw03CVWEMPZezezmdezxzoc7NcI/ FnscBm83uUFZq6Obk9gm5m5fPQ== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1751210510812907577?= X-GMAIL-MSGID: =?utf-8?q?1751210510812907577?= 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>; + };