From patchwork Thu Mar 30 11:34:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 668668 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 E639CC761A6 for ; Thu, 30 Mar 2023 11:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbjC3LeN (ORCPT ); Thu, 30 Mar 2023 07:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbjC3LeM (ORCPT ); Thu, 30 Mar 2023 07:34:12 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ECE119A9 for ; Thu, 30 Mar 2023 04:34:10 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id q16so24076580lfe.10 for ; Thu, 30 Mar 2023 04:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680176049; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cYbYycdmup7ooDPSWSxlw+wfKu3e5N7WtJR3yxq44lc=; b=m5vCBuGJqx23A5v6T6OBZyfULIxy1bEKyorWAYsxthAaAh8Ux79BG67VzvWO2dAw0v HzpXSAVyZlV2PXHkKaI9klWO20uBj9Y5D9PiqlGESLiioNu4mewtsVuUhmj6rC47FDMQ 9R2Fcwg1NptgNmfG2JthKxOnyGHykCR9X0F0eTCJCL7SaUWDTYJPwIokZKQpvuriFr2K z45zgkJGpZZrkMTfsNjmatrlCjCt0MYqw/kQVZeh9hDAQi5mrHJAj9RnJ8DgE2Leke+E 1bppdiJVzOtkLqBNWEd+L3Vz+45u3whZeUa9Kr5aL82S5GIEBheMp2UQw1QbOocBzLcx NQmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680176049; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cYbYycdmup7ooDPSWSxlw+wfKu3e5N7WtJR3yxq44lc=; b=7dAjYoN6UtOJI3gDi4IsWWV14xQAdS5StdZ7ZhTrKYK9+JPN7bqAKWCwVJhqz9mPOj rid+QUluvz6luDHjzGQbpAvm71YXsF83JGk948iw2Q6uDd30btxuY0KMwh5ukWV7k7cu B8jnze8a2vbMzJAcbR1XJeRsPuOvT9dSv7uK85MLFCcQ/S2rgO3rMqMsrcH/OX0WworV CwIEl2WyNT8un4KSQIy2A3rt9Rl8qhhFq3fdgXO+ctpt2x8+qi6LXW/x+PD9JyPb0fhW TvtBsiM04OHPVg7IoB8sIDOaJefEnGXzaxuOwMS0sPOyVNsbnxBfNWIDmtKxm7pWx58f XDzg== X-Gm-Message-State: AAQBX9eYCUjHdImWwV9s2X0Kc8aoeNAcWFW4SKyZgfnLV7HThY3bIYhl sQ3IUkJStQrDmzgXPwx7e1Q2hw== X-Google-Smtp-Source: AKy350a2EDWQYZVhflo+GOFEPA/WWu3pQ/gL6jWPerrjJR9OygRe+bysk5u936muBYaB+ATgDKZ6jQ== X-Received: by 2002:ac2:5623:0:b0:4eb:c24:205b with SMTP id b3-20020ac25623000000b004eb0c24205bmr4787726lff.69.1680176048706; Thu, 30 Mar 2023 04:34:08 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id 21-20020ac24855000000b004d5a720e689sm5877690lfy.126.2023.03.30.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 04:34:08 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v5] ASoC: dt-bindings: qcom,lpass-va-macro: Add missing NPL clock Date: Thu, 30 Mar 2023 13:34:05 +0200 Message-Id: <20230330113405.55722-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Several devices (e.g. SC8280XP and SM8450) expect a NPL (Near Pad Logic) clock. Add the clock and customize allowed clocks per each variant. The clocks are also required by ADSP in all variants. Signed-off-by: Krzysztof Kozlowski --- Changes since v4: 1. Rebased on: git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-6.4 Changes since v3: 1. Only rebase. Other patches from this set were applied: https://lore.kernel.org/all/168010864198.3244592.2114017565664183933.b4-ty@kernel.org/ Changes since v1: 1. New patch. --- .../bindings/sound/qcom,lpass-va-macro.yaml | 68 ++++++++++++++++--- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml index 4cf778e3afdd..4a56108c444b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml @@ -9,9 +9,6 @@ title: LPASS(Low Power Audio Subsystem) VA Macro audio codec maintainers: - Srinivas Kandagatla -allOf: - - $ref: dai-common.yaml# - properties: compatible: enum: @@ -31,16 +28,12 @@ properties: const: 0 clocks: - maxItems: 3 + minItems: 1 + maxItems: 4 clock-names: - oneOf: - - items: #for ADSP based platforms - - const: mclk - - const: macro - - const: dcodec - - items: #for ADSP bypass based platforms - - const: mclk + minItems: 1 + maxItems: 4 clock-output-names: maxItems: 1 @@ -64,6 +57,59 @@ required: - compatible - reg - "#sound-dai-cells" + - clock-names + - clocks + +allOf: + - $ref: dai-common.yaml# + + - if: + properties: + compatible: + contains: + const: qcom,sc7280-lpass-va-macro + then: + properties: + clocks: + maxItems: 1 + clock-names: + items: + - const: mclk + + - if: + properties: + compatible: + contains: + const: qcom,sm8250-lpass-va-macro + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-lpass-va-macro + - qcom,sm8450-lpass-va-macro + then: + properties: + clocks: + minItems: 4 + maxItems: 4 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + - const: npl - if: properties: