From patchwork Thu Aug 18 13:46:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598588 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 2C17CC32772 for ; Thu, 18 Aug 2022 13:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244911AbiHRNqs (ORCPT ); Thu, 18 Aug 2022 09:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242423AbiHRNqr (ORCPT ); Thu, 18 Aug 2022 09:46:47 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34115B56DE for ; Thu, 18 Aug 2022 06:46:46 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id m10-20020a05600c3b0a00b003a603fc3f81so976360wms.0 for ; Thu, 18 Aug 2022 06:46:46 -0700 (PDT) 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; bh=7UEaK75XddAzmeSUUviQ6zd7mwl28xNsOo/h1M2gdWg=; b=R3MeH3MPjWTZ8yZNP5rkWd1EAOC+J3UnYKnmXkE7zJo6j8BFvIyR/8vHQBIKVnICc6 WAfMtDxnpim7p2UvFjPaQBK6R4Dye1jZelXxJYlSJvD8XhD5eLlssZTDNaVfoYKxIT4k 8EjYXJLiSqOchMQH5hRyGXSS4HrHuuET01qrJ7U6y9Ok9QgM/G8GCxb7A6xjgrerlqZf aQpPjE+HcQ39RmfR84OJqGrdVZJWYR6iP2vC1pGy5A7IpD939s1E13eyLeaRKEPX8a1x H8lCgAnrVo1lvhAJDfmjHUVciin2kHyDBhYn+QW1DjDOpJ4lpNmmjpflqljieREN9SAa Ktow== 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; bh=7UEaK75XddAzmeSUUviQ6zd7mwl28xNsOo/h1M2gdWg=; b=7vZ1QKI+QGOryyPp9aY11UIPZlJ5ynnXh+WVRtbOf1drDnmQDTPC13abhH2ulryHyr 4LVnYMXFX5dplVY4pPMtX9pQmzB3hAQxHe5MgWhglNRBqD9bp5e/PV/N5+BXUF8zqqol QROCOVb0+Mxzeb7XnU9rR0uw8hgbNGqwCNQVCndgX8/zS5v8OZg72f18PUQwqbQ3PdBm 6fZNd6gF9g/52jTdtkUclMtDt4K2zn9/Hzfpmk5EUZHs1DjDCRF3lheAp5Vnb7ZzzSJ4 TbcrqR3iJeWXVwV1I1TrfzJjzro+ZOIlD/EPweNKqay2h+4R8dF+HDYdMXQ7OJ6sffQb sEMg== X-Gm-Message-State: ACgBeo1XSMw2RViqWOv2XfaOgTfkUusAANJ2SRLVWvDxiywlpXML5USV 7o0CP7X39MG1muQyTwEN4J029l+Sf/sVbA== X-Google-Smtp-Source: AA6agR7RPL+SW4zi+OqxoNudlkRplCeu1snCGdqEB6q/D+y5IlgI2cclSEcKFDMCWUpd8FX0VziOEA== X-Received: by 2002:a05:600c:1552:b0:3a5:b933:b629 with SMTP id f18-20020a05600c155200b003a5b933b629mr5122024wmg.200.1660830404663; Thu, 18 Aug 2022 06:46:44 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:44 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/6] ASoC: qcom: dt-bindings: add sm8450 and sc8280xp compatibles Date: Thu, 18 Aug 2022 14:46:14 +0100 Message-Id: <20220818134619.3432-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This patch adds SM8450 and SC8280XP compatible entry for LPASS TX, RX, WSA and VA codec macros. Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 2 ++ .../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 2 ++ .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 2 ++ .../devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml index a6905bcf89d2..1de11e7f33bb 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml @@ -14,6 +14,8 @@ properties: enum: - qcom,sc7280-lpass-rx-macro - qcom,sm8250-lpass-rx-macro + - qcom,sm8450-lpass-rx-macro + - qcom,sc8280xp-lpass-rx-macro reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml index 324595a62ae8..de8297b358e8 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml @@ -14,6 +14,8 @@ properties: enum: - qcom,sc7280-lpass-tx-macro - qcom,sm8250-lpass-tx-macro + - qcom,sm8450-lpass-tx-macro + - qcom,sc8280xp-lpass-tx-macro reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml index 7b4cc84eda8c..9f473c08cb2e 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml @@ -14,6 +14,8 @@ properties: enum: - qcom,sc7280-lpass-va-macro - qcom,sm8250-lpass-va-macro + - qcom,sm8450-lpass-va-macro + - qcom,sc8280xp-lpass-va-macro reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml index 13cdb8a10687..4959ad658eac 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml @@ -14,6 +14,8 @@ properties: enum: - qcom,sc7280-lpass-wsa-macro - qcom,sm8250-lpass-wsa-macro + - qcom,sm8450-lpass-wsa-macro + - qcom,sc8280xp-lpass-wsa-macro reg: maxItems: 1 From patchwork Thu Aug 18 13:46:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598162 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 61963C00140 for ; Thu, 18 Aug 2022 13:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245073AbiHRNqt (ORCPT ); Thu, 18 Aug 2022 09:46:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244831AbiHRNqs (ORCPT ); Thu, 18 Aug 2022 09:46:48 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64477B56C1 for ; Thu, 18 Aug 2022 06:46:47 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id d5so848096wms.5 for ; Thu, 18 Aug 2022 06:46:47 -0700 (PDT) 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; bh=eiRe1B0ZIFE4lVaNWcauD4DXUe5vQu4l80JAQTe/0g8=; b=QNTHiKcTznLn5qHU+rcEotfKidl83Mg8wMWxGKO8WxsTHmnt3LhAxLdEJexf993ii0 8axKucOALczyy8nPbONFTDwIhO3qVILywk9nBkOwkCVnZGjoKIwnvKIxjQWH6c3bbuOe 9ds0fN2oI/zLNMZnqQ2LyByEg1iOpgMqzfvIaMPMnobCOs70h7vkAq3ULJasWqEgdmIU CVTrdQt5P/87pJ7WxRmrOWW5+V3cPvKYsKChN9XLTJenTelFq006k1lye2AR7UrL1p2w ZDOhjHeiv8XttTAmt5UxG/DgZVvRKnom8SuF7v4/T8A3JEzE8rZmOx187tmuxLycVR4+ Dm8Q== 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; bh=eiRe1B0ZIFE4lVaNWcauD4DXUe5vQu4l80JAQTe/0g8=; b=i//7Q7WFjSoEULYgwrq+gElDsz5Hb4S7n8a9Cze0O2K8NR/wL4IHmvxpYvFXTIToy1 7+7dnW80qaRieTfyD7AzYeptMYOnTc47C3jxkoocRhdNnuBCl56Z0koAu4sbO0nYKCj4 7KmbUjujrrThLOuWTYXO7FHLCkIauntfP8DweY096zxh40zcDc8IsDz++a2HC/89h+Up VDjN9gSkM0/acDwK0N4JKHbMsSGid8L69f5TkNezJDlJTztOucg7vy7gGMq/6ue/yCyr 1jC5Sgb3eZ3rO56tctjDXIqY2eQZ++MODUKnIz0iNz64yH6prg2KNwqp/1ONUpBMMWYB M87A== X-Gm-Message-State: ACgBeo1H+pzIUtfThJaSHdI4u1C3jhlj+0Z/8Qnwcl8DKRszxbFVnwpi vBikDwOcS1XRm6pMSVYSpSIc6w== X-Google-Smtp-Source: AA6agR4Hop5Tuz+rKxdk6PKo3fj6arTtQUxSSOpAbsY3XJaCi5KcdZUkwgP/RmX2m7zqJCsUf2VjYA== X-Received: by 2002:a1c:2783:0:b0:3a2:fd82:bf46 with SMTP id n125-20020a1c2783000000b003a2fd82bf46mr5152932wmn.29.1660830405973; Thu, 18 Aug 2022 06:46:45 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:45 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/6] ASoC: codecs: wsa-macro: add support for sm8450 and sc8280xp Date: Thu, 18 Aug 2022 14:46:15 +0100 Message-Id: <20220818134619.3432-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/lpass-wsa-macro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 27da6c6c3c5a..f82c297ea3ab 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2561,6 +2561,8 @@ static const struct dev_pm_ops wsa_macro_pm_ops = { static const struct of_device_id wsa_macro_dt_match[] = { {.compatible = "qcom,sc7280-lpass-wsa-macro"}, {.compatible = "qcom,sm8250-lpass-wsa-macro"}, + {.compatible = "qcom,sm8450-lpass-wsa-macro"}, + {.compatible = "qcom,sc8280xp-lpass-wsa-macro" }, {} }; MODULE_DEVICE_TABLE(of, wsa_macro_dt_match); From patchwork Thu Aug 18 13:46:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598587 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 288F7C32789 for ; Thu, 18 Aug 2022 13:46:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245177AbiHRNqu (ORCPT ); Thu, 18 Aug 2022 09:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245165AbiHRNqt (ORCPT ); Thu, 18 Aug 2022 09:46:49 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 806E4B56E0 for ; Thu, 18 Aug 2022 06:46:48 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id h5so995616wru.7 for ; Thu, 18 Aug 2022 06:46:48 -0700 (PDT) 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; bh=3+p1RU9Ekkat1LJvUzvA3of/Y+G9mmoh8xJKlE/HMlk=; b=UskYjoNdcSqoK6rr8xlCC/hvPPRwqGyeMjYq6y+TF6YJ+X8iPUTMmBM6maVK2N/ta6 WhTgRWw6OhRs6Rz6ALUf6AHhtuOcynjmaInTzTFhkgvOHAOhHZJG3AjuXSlglWTCOuQL Vafgi9VI/2wWAFjs/vLGQRTgbnsgKtWqAr81hB+q66XlU/eelaschaJYXIvDhdAa75yz wf9E+w2qPPzkXQUmsVoTtLOxWMmqTMxBfh1agpx8spVjjSRKEfSN1/WXItQgS9f4NrrV ACOdCkEm1fDNctoIKKjdkJxYr1g5Fj26SPEgLrn9axDVXzg1HtjJXWiEwqCNmqcMHY4n X2kw== 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; bh=3+p1RU9Ekkat1LJvUzvA3of/Y+G9mmoh8xJKlE/HMlk=; b=728grwAr0v6K5zEVrO4F+DvFtYmu/vFvjMM8kBCIjzZpTo0YebdXt8fXENxOyQzcsz pjzDZq/MVjxGNRkmAre/bmeHdHiuOFYDp7/um6nIb2HQnQ7yCH3Uc6iMuQ0323SaiHH3 RY5GeK7vd8hzeQamuBtEihJJCHxGgzD5sVysjcX5IzeYyfbmWa1eSHALk/NaX9FJzP96 VBnVybkSvn7mFDqzyd2KfA7tr7UXhlQrFTVgM+PVEOuydSRkh4EVbT50yt/58fXlhGWi z0bnGpISb/BqBK3x/BaaJ4ucIgWfB5aMMR2XTYK9JSJi3iinEqR3LKau12NFtiGSjYvJ i8Rw== X-Gm-Message-State: ACgBeo11kao/KIbvhtWGIRpb6PiEMYdldw/Fs0gIcmU1d5cRuRUtH7YY ZSMs4M13Ulxsap28VqFsgCPb3g== X-Google-Smtp-Source: AA6agR7Pq5Rnsp1gu2xJq+iWh5Mc1TQ3eMrM0e7OaEqO4LqUJqBbOYq3wSCx1+y8WarrIk0ZtVGImA== X-Received: by 2002:a05:6000:1561:b0:225:337b:454b with SMTP id 1-20020a056000156100b00225337b454bmr410757wrz.660.1660830407083; Thu, 18 Aug 2022 06:46:47 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:46 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 3/6] ASoC: codecs: tx-macro: add support for sm8450 and sc8280xp Date: Thu, 18 Aug 2022 14:46:16 +0100 Message-Id: <20220818134619.3432-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/lpass-tx-macro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index 55503ba480bb..4384266847ad 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -1988,6 +1988,8 @@ static const struct dev_pm_ops tx_macro_pm_ops = { static const struct of_device_id tx_macro_dt_match[] = { { .compatible = "qcom,sc7280-lpass-tx-macro" }, { .compatible = "qcom,sm8250-lpass-tx-macro" }, + { .compatible = "qcom,sm8450-lpass-tx-macro" }, + { .compatible = "qcom,sc8280xp-lpass-tx-macro" }, { } }; MODULE_DEVICE_TABLE(of, tx_macro_dt_match); From patchwork Thu Aug 18 13:46:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598161 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 35243C32772 for ; Thu, 18 Aug 2022 13:46:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245190AbiHRNqw (ORCPT ); Thu, 18 Aug 2022 09:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245181AbiHRNqv (ORCPT ); Thu, 18 Aug 2022 09:46:51 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD4E4B56DB for ; Thu, 18 Aug 2022 06:46:49 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id r16so1801270wrm.6 for ; Thu, 18 Aug 2022 06:46:49 -0700 (PDT) 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; bh=pm1xUFE92YkVKDTJvx9M7ZRTfenlhIEpPrzTXw0dBmU=; b=FRPtHFtEQMFDYkm9zWB+sRZd4LDzYcg9DTqbKkGNU0b4auFyL0kIkekOHeFJJun8sF RFhcYKOoH8gJv+QYGWJftcKr1q4UdWYZz9Nldm6E3/diLsDc08FI53gZkmuJPvHYz9/Y K5bktp6W3JdaEua4zRBff7rPdsvNftE7SZKhE94oEXcU9s2H9fGmq3qG60XPXrf6YZC7 JoRwt1jN7mgv4J5P1etit3Ako+lHsXJBfp9ePuehwam0+CpBpJJ9FTLbjszdVIu/cEY0 xVPfusFo079QyvKAOSQDi5vpEqj1Nw7p+gx9I/oSPPaSK6zRPMDF+Zq2WzK0G5UBLCOj 0zzw== 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; bh=pm1xUFE92YkVKDTJvx9M7ZRTfenlhIEpPrzTXw0dBmU=; b=2qV4V3RnjyzQU+1Zdsgx1+quo5CCi3WUwRwb+JacCQT0Cu3Aa9XG1lKXg/F7xxJZSn fDa+FCvzpTJm1exT3EE2S3STP+8GpTCxZ3t3dAalak2nZg8o3e2mG1gwGKavqdB3RnO2 IQz0ynIz+wPcH0PPZGZuM/zro9CdWJVSqTmuDwC+6DVNCdfD/AEij9FNhtLej5QIFKQn yQXCFKNK1S5zLFv/TuRCFAbg+wZjPEnYaG0frnURs2SEJCAlBxWHQepAHOOHnBfRntzi hbm0JrIh3G/+OO/wD2q7VFHF45mN8ykmnisrnuSNH0rZp4Vpg+Wdz/yWaLAswAMOV5/C tZPA== X-Gm-Message-State: ACgBeo14WictXfPviD9OfFMqWiJWdpisFNWWJv2eq+DZD9VrZDFvZm18 sYUkBjxyNGHsXleNV45rgAqsRA== X-Google-Smtp-Source: AA6agR7FKPqQnWzhAQx/K94hRrogeUHNRn696ul+WTtCZ12rYD4X5lPuuDq6bj4Kl+K6uGsGVef2uw== X-Received: by 2002:a5d:6789:0:b0:225:2787:d44f with SMTP id v9-20020a5d6789000000b002252787d44fmr1606748wru.343.1660830408315; Thu, 18 Aug 2022 06:46:48 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:47 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 4/6] ASoC: codecs: rx-macro: add support for sm8450 and sc8280xp Date: Thu, 18 Aug 2022 14:46:17 +0100 Message-Id: <20220818134619.3432-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/lpass-rx-macro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 3143f9cd7277..fa8a174ba7c0 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3659,6 +3659,8 @@ static int rx_macro_remove(struct platform_device *pdev) static const struct of_device_id rx_macro_dt_match[] = { { .compatible = "qcom,sc7280-lpass-rx-macro" }, { .compatible = "qcom,sm8250-lpass-rx-macro" }, + { .compatible = "qcom,sm8450-lpass-rx-macro" }, + { .compatible = "qcom,sc8280xp-lpass-rx-macro" }, { } }; MODULE_DEVICE_TABLE(of, rx_macro_dt_match); From patchwork Thu Aug 18 13:46:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598586 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 337D1C32774 for ; Thu, 18 Aug 2022 13:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245183AbiHRNqz (ORCPT ); Thu, 18 Aug 2022 09:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242238AbiHRNqw (ORCPT ); Thu, 18 Aug 2022 09:46:52 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E7D6B56E0 for ; Thu, 18 Aug 2022 06:46:51 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id n4so1785099wrp.10 for ; Thu, 18 Aug 2022 06:46:51 -0700 (PDT) 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; bh=6rZZaOHOvolmccYyL5qbkZM57p/vVPxvzfbkv6kGURE=; b=st0tuLfjyZg4OwhWSH6GgD154EBVCs8begrdGXw66Y1wqcN6jG6vXa+K8NfbEtYg3I cHMjVPOLJKyvx+O0D/84ISQ2yukD3qKOuE74+kLVOC64t9RnIhNEoBMcpxMtwRX4JzGY RgNCqCYO8QYohBdJn2ZKNkg01259d9rfRkbKteUgMD+2F3lse3oF4uMV889ZVXG66QvZ QwxTyNwRxY/hcFqwZsQK0jKA9+aAX6U8g8Qt+s3G3j4d6LVBFHJZmakmXaNFyF2YQMlx WEnK9npc0xRahj/rWdMDKWHTw454VWiAvILMkxVkgmgjhJ7dGdAYFNjO+6wyr/uSCO/a zFzg== 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; bh=6rZZaOHOvolmccYyL5qbkZM57p/vVPxvzfbkv6kGURE=; b=O5sw6RPqzF0+P4tKA/9hdVPAL8WB0IGseDbjbH+2dfdpK553UiXEiR6dLdX92TO0A7 P5pF82fxk16tcZjF0hr1y8TdZ9MkfysslbH7Lsh1iO/33Ebz/7erPs/1FWmij6tTPFim Z2Jh3dhowHniD1Q98laSkJP7LbfaY3M7ZV9EYHVUKZ2czIXjgCN8DyuZ+u7/Vu41fu/U 2KauNEos5oozbiUXuMARbn5K1HLfFq1Pimq6loxhEBwC49MOKeKtVZBXZL5zlFzI8FPs XJl7yi35di/TRHhvhC0vRmcemFuAfcyzwGQY6Yz0588V0BfU8z6Ol9iGVbM75uycUyFV fsUg== X-Gm-Message-State: ACgBeo2wOHPiSd1oPnACE6DTZxH/V/jJlc1tuhPjKnWafap/EX0WElaM D5us2bvN1PeKJjskaviN66fOiw== X-Google-Smtp-Source: AA6agR4xmEGJW0LUvkQoK3lSqIY/p6u2vP1m7hMR0AVYvVbe1XxwyKkiRlTRVtKQx5SY6c6WkmMJGQ== X-Received: by 2002:a5d:5a9a:0:b0:220:6309:5c87 with SMTP id bp26-20020a5d5a9a000000b0022063095c87mr1600521wrb.107.1660830410046; Thu, 18 Aug 2022 06:46:50 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:49 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 5/6] ASoC: codecs: va-macro: clear the frame sync counter before enabling Date: Thu, 18 Aug 2022 14:46:18 +0100 Message-Id: <20220818134619.3432-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Clear the frame sync counter before enabling it. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/lpass-va-macro.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index 1ea10dc70748..a35f684053d2 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -23,6 +23,7 @@ #define CDC_VA_MCLK_CONTROL_EN BIT(0) #define CDC_VA_CLK_RST_CTRL_FS_CNT_CONTROL (0x0004) #define CDC_VA_FS_CONTROL_EN BIT(0) +#define CDC_VA_FS_COUNTER_CLR BIT(1) #define CDC_VA_CLK_RST_CTRL_SWR_CONTROL (0x0008) #define CDC_VA_TOP_CSR_TOP_CFG0 (0x0080) #define CDC_VA_FS_BROADCAST_EN BIT(1) @@ -423,9 +424,12 @@ static int va_clk_rsc_fs_gen_request(struct va_macro *va, bool enable) regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_MCLK_CONTROL, CDC_VA_MCLK_CONTROL_EN, CDC_VA_MCLK_CONTROL_EN); - + /* clear the fs counter */ + regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_FS_CNT_CONTROL, + CDC_VA_FS_CONTROL_EN | CDC_VA_FS_COUNTER_CLR, + CDC_VA_FS_CONTROL_EN | CDC_VA_FS_COUNTER_CLR); regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_FS_CNT_CONTROL, - CDC_VA_FS_CONTROL_EN, + CDC_VA_FS_CONTROL_EN | CDC_VA_FS_COUNTER_CLR, CDC_VA_FS_CONTROL_EN); regmap_update_bits(regmap, CDC_VA_TOP_CSR_TOP_CFG0, From patchwork Thu Aug 18 13:46:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 598160 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 D3EEEC32792 for ; Thu, 18 Aug 2022 13:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244945AbiHRNqz (ORCPT ); Thu, 18 Aug 2022 09:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245192AbiHRNqy (ORCPT ); Thu, 18 Aug 2022 09:46:54 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A283CB56D0 for ; Thu, 18 Aug 2022 06:46:52 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id k16so1785625wrx.11 for ; Thu, 18 Aug 2022 06:46:52 -0700 (PDT) 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; bh=b/Pll9h/rbDTnlPdrKXDdRGbrsm2wbSDn1R8q7pzFwE=; b=osYG1JQUdqi39hrW3UKdYZot/b5GlS/WZkL0ijBh6UDSC0Oq+LT9Cnf3Tt+yMAHSiu aS6p3Fpkm82ZPV8/qXtYxaIhoe0Injs/0v8w4hoCJpAmJJd4xoP+WymRELxMtUJqRHTX vMEaiaFsb7ZLpEyadyzxW+Pr4H2NzPmGALeOPMfuMHaJVoVix8F09syzRU4or01aUzB2 Xm6aocxQ4lTTdy8X5Z4kOU4TFBRMfcwXuKEjrKpC+ac8TdVlgioK9CuFWkJOQ8/HAUAy UdbFcX1EDQRu5VF7a4FH7K1eseDLlie6YagG0hIy1jXfOWz7yb70Z/9dS9W4bI8Z6Cf1 ZEyQ== 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; bh=b/Pll9h/rbDTnlPdrKXDdRGbrsm2wbSDn1R8q7pzFwE=; b=EDrAzmbsD+Thya4C2NG9sjfsTOlDHQmvbhSGy9+kD9xQjsrtjwW5q/aoBtCmkR46LP iNZDkSJoMKvG/9Q0NQVrpR3iEzr8QDEWc6VQdt7IvxWxQYMxXbX+YMpzSfo3GmxEK+K0 eY/rvzVrWdPFMhZyYZwqC0nrFtpVbCDiifuucBRaUIQLGaoIjZymq7K7zTODg1BUDf/8 qGO2cUvxPWoRGZ6YiYJbAXR7bph+8TnFvuFN+7jD8VaHWiipqdz0t1Hux+NncziUG2jF KOszB5N0mbc1glYPW+jFBTuBhpgCLdpX2iVViFFjocbIY4/1tF48KhrdtI5wqmdr+LL3 +YBg== X-Gm-Message-State: ACgBeo24CFY0gG6pEqjPXRs2HyYdrCxLC5k1jV2skwilqX54sFptlJFS Ok1ev0nIbCa3v6fKYoJhCztdcA== X-Google-Smtp-Source: AA6agR4mKTbWNOxvNypUWCDM67c7OHImiNtBWKxHr0p0b+Nsifd/4YaR4BXj65tEQEZlybqS1+TBLQ== X-Received: by 2002:a05:6000:1548:b0:223:141:8a06 with SMTP id 8-20020a056000154800b0022301418a06mr1694399wry.153.1660830411206; Thu, 18 Aug 2022 06:46:51 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id v5-20020a5d6785000000b0021e47fb24a2sm1454549wru.19.2022.08.18.06.46.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 06:46:50 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 6/6] ASoC: codecs: tx-macro: add support for sm8450 and sc8280xp Date: Thu, 18 Aug 2022 14:46:19 +0100 Message-Id: <20220818134619.3432-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> References: <20220818134619.3432-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org LPASS VA Macro now has soundwire master to deal with access to analog mic in low power island use cases. This is added after sc8280xp, add support for this. Along with this also add compatibles for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/lpass-va-macro.c | 64 ++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index a35f684053d2..f8b0c8caa1db 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -25,6 +25,10 @@ #define CDC_VA_FS_CONTROL_EN BIT(0) #define CDC_VA_FS_COUNTER_CLR BIT(1) #define CDC_VA_CLK_RST_CTRL_SWR_CONTROL (0x0008) +#define CDC_VA_SWR_RESET_MASK BIT(1) +#define CDC_VA_SWR_RESET_ENABLE BIT(1) +#define CDC_VA_SWR_CLK_EN_MASK BIT(0) +#define CDC_VA_SWR_CLK_ENABLE BIT(0) #define CDC_VA_TOP_CSR_TOP_CFG0 (0x0080) #define CDC_VA_FS_BROADCAST_EN BIT(1) #define CDC_VA_TOP_CSR_DMIC0_CTL (0x0084) @@ -66,6 +70,8 @@ #define CDC_VA_TOP_CSR_SWR_MIC_CTL0 (0x00D0) #define CDC_VA_TOP_CSR_SWR_MIC_CTL1 (0x00D4) #define CDC_VA_TOP_CSR_SWR_MIC_CTL2 (0x00D8) +#define CDC_VA_SWR_MIC_CLK_SEL_0_1_MASK (0xEE) +#define CDC_VA_SWR_MIC_CLK_SEL_0_1_DIV1 (0xCC) #define CDC_VA_TOP_CSR_SWR_CTRL (0x00DC) #define CDC_VA_INP_MUX_ADC_MUX0_CFG0 (0x0100) #define CDC_VA_INP_MUX_ADC_MUX0_CFG1 (0x0104) @@ -194,6 +200,8 @@ struct va_macro { unsigned long active_ch_mask[VA_MACRO_MAX_DAIS]; unsigned long active_ch_cnt[VA_MACRO_MAX_DAIS]; u16 dmic_clk_div; + bool has_swr_master; + bool reset_swr; int dec_mode[VA_MACRO_NUM_DECIMATORS]; struct regmap *regmap; @@ -325,6 +333,9 @@ static bool va_is_rw_register(struct device *dev, unsigned int reg) case CDC_VA_TOP_CSR_DMIC2_CTL: case CDC_VA_TOP_CSR_DMIC3_CTL: case CDC_VA_TOP_CSR_DMIC_CFG: + case CDC_VA_TOP_CSR_SWR_MIC_CTL0: + case CDC_VA_TOP_CSR_SWR_MIC_CTL1: + case CDC_VA_TOP_CSR_SWR_MIC_CTL2: case CDC_VA_TOP_CSR_DEBUG_BUS: case CDC_VA_TOP_CSR_DEBUG_EN: case CDC_VA_TOP_CSR_TX_I2S_CTL: @@ -1306,12 +1317,40 @@ static const struct snd_soc_component_driver va_macro_component_drv = { static int fsgen_gate_enable(struct clk_hw *hw) { - return va_macro_mclk_enable(to_va_macro(hw), true); + struct va_macro *va = to_va_macro(hw); + struct regmap *regmap = va->regmap; + int ret; + + ret = va_macro_mclk_enable(va, true); + if (!va->has_swr_master) + return ret; + + if (va->reset_swr) + regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_SWR_CONTROL, + CDC_VA_SWR_RESET_MASK, + CDC_VA_SWR_RESET_ENABLE); + + regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_SWR_CONTROL, + CDC_VA_SWR_CLK_EN_MASK, + CDC_VA_SWR_CLK_ENABLE); + if (va->reset_swr) + regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_SWR_CONTROL, + CDC_VA_SWR_RESET_MASK, 0x0); + va->reset_swr = false; + + return ret; } static void fsgen_gate_disable(struct clk_hw *hw) { - va_macro_mclk_enable(to_va_macro(hw), false); + struct va_macro *va = to_va_macro(hw); + struct regmap *regmap = va->regmap; + + if (va->has_swr_master) + regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_SWR_CONTROL, + CDC_VA_SWR_CLK_EN_MASK, 0x0); + + va_macro_mclk_enable(va, false); } static int fsgen_gate_is_enabled(struct clk_hw *hw) @@ -1459,6 +1498,11 @@ static int va_macro_probe(struct platform_device *pdev) dev_set_drvdata(dev, va); + if (of_device_is_compatible(dev->of_node, "qcom,sm8450-lpass-va-macro") || + of_device_is_compatible(dev->of_node, "qcom,sc8280xp-lpass-va-macro")) { + va->has_swr_master = true; + va->reset_swr = true; + } /* mclk rate */ clk_set_rate(va->mclk, 2 * VA_MACRO_MCLK_FREQ); @@ -1484,6 +1528,20 @@ static int va_macro_probe(struct platform_device *pdev) goto err_clkout; } + if (va->has_swr_master) { + /* Set default CLK div to 1 */ + regmap_update_bits(va->regmap, CDC_VA_TOP_CSR_SWR_MIC_CTL0, + CDC_VA_SWR_MIC_CLK_SEL_0_1_MASK, + CDC_VA_SWR_MIC_CLK_SEL_0_1_DIV1); + regmap_update_bits(va->regmap, CDC_VA_TOP_CSR_SWR_MIC_CTL1, + CDC_VA_SWR_MIC_CLK_SEL_0_1_MASK, + CDC_VA_SWR_MIC_CLK_SEL_0_1_DIV1); + regmap_update_bits(va->regmap, CDC_VA_TOP_CSR_SWR_MIC_CTL2, + CDC_VA_SWR_MIC_CLK_SEL_0_1_MASK, + CDC_VA_SWR_MIC_CLK_SEL_0_1_DIV1); + + } + ret = devm_snd_soc_register_component(dev, &va_macro_component_drv, va_macro_dais, ARRAY_SIZE(va_macro_dais)); @@ -1560,6 +1618,8 @@ static const struct dev_pm_ops va_macro_pm_ops = { static const struct of_device_id va_macro_dt_match[] = { { .compatible = "qcom,sc7280-lpass-va-macro" }, { .compatible = "qcom,sm8250-lpass-va-macro" }, + { .compatible = "qcom,sm8450-lpass-va-macro" }, + { .compatible = "qcom,sc8280xp-lpass-va-macro" }, {} }; MODULE_DEVICE_TABLE(of, va_macro_dt_match);