From patchwork Mon Mar 27 13:22:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667424 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3957C7619A for ; Mon, 27 Mar 2023 13:24:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A4C5083A; Mon, 27 Mar 2023 15:23:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A4C5083A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923487; bh=NP7BCGCNL7n4GRCa962Its4zKLmpEpUJ3ppACWRIS20=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DrfzgwegPuQUPdE+GV8BIWBEW7cuLz4494BlefcgguxZ1MTQK1KHdtkpfIU4DIDap UeUVzQs0b5d6+TTo4/fqjKhMnaod5fop9GtUlNKSLui9JxKF708FgoC+L6ByPdIEGe L6QI0a6FBChMIS2A4MqRtEiOe+LBdnmTbtlENTR0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5E329F8052D; Mon, 27 Mar 2023 15:23:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4064DF8053D; Mon, 27 Mar 2023 15:23:22 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A47FFF8052D for ; Mon, 27 Mar 2023 15:23:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A47FFF8052D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=akAiH7pl Received: by mail-ed1-x52b.google.com with SMTP id r11so36175446edd.5 for ; Mon, 27 Mar 2023 06:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923390; 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=e421JpAgtcj35xxGor304AnW+bBd7rGQURUOK2VJ37c=; b=akAiH7pl4TdiU8GfXv8e6OE8VWx0BOmVeSEVMrMxAumMPQaq31ovkNETTy2tbypyte sMAoyr9XqjX6T1UPK3WknPc5cdt0+Dt81i/jnP5qpxc8BlEpFNPsgPi2tozwojytXdVQ n0OjusJ98ZRfe1sFUVwtms334CyF3zcLMapfX3fP5Q7P/jw4e8pV1ukg51yRETyHNAu6 NI02e9SibLwazaIicB6GKOK0p4QEG3JekcDk1wwUd/X5AF4lYbyiB0+3GBbD+GHlCH5b UILB/LpeuJ7CPHL0VbGhRLJ7r1jdH9Wu2vRvyxxTEssqEsRUL6YLrt0C4ajrcuxD9RYk zZyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923390; 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=e421JpAgtcj35xxGor304AnW+bBd7rGQURUOK2VJ37c=; b=tD77ymetSu4xKl1dpbBMUWeZ3BchCMMTpUjnCQSN7y21l768PlfEaxCNoo46eKR4nI 95r7y2PfoZKTZswdXXOZVBbKK1xCCtWLYFZ1jGKTjV9hcRcWaX97e4V/12CH1HZZw0xX NufY+yWS2A5IztcrYk1t94D6YVYYyDK05vMTvFjOXxzWBHaDKBIGpe5Icu7z3Iyz7z9+ GBDE42iuop1usu5SNsqKNqYw951YgbAtWhv3qKW2VovVN69HA4JZpocMLLuIqaHlWewq altoV+s36GctMY6VaUOLZDIw2CTQyUX1lp8ul+wQwclK5V7L/ISNa7suhgDme3eErGSw z71w== X-Gm-Message-State: AAQBX9ekd72jJe4+lJpYUhqsr55xTVY1A+LjU0sKZtntybJ90BEcuMeg T5YjROIbG+mphUuRglVvBiBEWw== X-Google-Smtp-Source: AKy350a6zAoEdc3Kk4j3D/eb33jJfnMnx4zobkxrPu+I0OJc/j5b8+NbvNQDSHYROdnJLVNhzgVkTA== X-Received: by 2002:a17:906:b74f:b0:92d:591f:6586 with SMTP id fx15-20020a170906b74f00b0092d591f6586mr12645246ejb.34.1679923390257; Mon, 27 Mar 2023 06:23:10 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:09 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/10] ASoC: dt-bindings: qcom,lpass-rx-macro: narrow clocks per variants Date: Mon, 27 Mar 2023 15:22:45 +0200 Message-Id: <20230327132254.147975-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: UDLN5B6XFWBL7URV3V26PRZLTCY4VRER X-Message-ID-Hash: UDLN5B6XFWBL7URV3V26PRZLTCY4VRER X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Currently the Qualcomm RX macro codec binding allows two different clock setups - with (for ADSP) and without macro/dcodec entries (for ADSP bypassed). With more devices coming soon, this will keep growing, thus rework the clocks/clock-names to be specific for each binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-rx-macro.yaml | 58 ++++++++++++++----- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml index 009105275368..babf2ac20afb 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml @@ -9,9 +9,6 @@ title: LPASS(Low Power Audio Subsystem) RX Macro audio codec maintainers: - Srinivas Kandagatla -allOf: - - $ref: dai-common.yaml# - properties: compatible: enum: @@ -34,17 +31,8 @@ properties: maxItems: 5 clock-names: - oneOf: - - items: # for ADSP based platforms - - const: mclk - - const: npl - - const: macro - - const: dcodec - - const: fsgen - - items: # for ADSP bypass based platforms - - const: mclk - - const: npl - - const: fsgen + minItems: 3 + maxItems: 5 clock-output-names: maxItems: 1 @@ -62,6 +50,48 @@ required: - reg - "#sound-dai-cells" +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + enum: + - qcom,sc7280-lpass-rx-macro + then: + properties: + clock-names: + oneOf: + - items: # for ADSP based platforms + - const: mclk + - const: npl + - const: macro + - const: dcodec + - const: fsgen + - items: # for ADSP bypass based platforms + - const: mclk + - const: npl + - const: fsgen + + - if: + properties: + compatible: + enum: + - qcom,sc8280xp-lpass-rx-macro + - qcom,sm8250-lpass-rx-macro + - qcom,sm8450-lpass-rx-macro + then: + properties: + clocks: + minItems: 5 + maxItems: 5 + clock-names: + items: + - const: mclk + - const: npl + - const: macro + - const: dcodec + - const: fsgen + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667904 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FED6C761A6 for ; Mon, 27 Mar 2023 13:24:22 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 96A459F6; Mon, 27 Mar 2023 15:23:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 96A459F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923460; bh=kKMyB31bv0rF99zXKaDze44ogQ06pDYf0RyVy+Tb2ek=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bh5JKZ9/mN5QSQsd5UqqKdQ6bPAQl2FvVl5DSX4O+k/cWYlLKPTUqjs2ZzYBNvxs0 Z2Tlk5Hmmeg+zmQtx+yRpwG/9F9EVHacvdQPRqCO0bBP/S1lIijma2D4njFFkGgz5V qXs+sPfj5xq3cl5P58QxIsRL92IXALo81go2GQI8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 71CD8F80542; Mon, 27 Mar 2023 15:23:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E7F8BF8053B; Mon, 27 Mar 2023 15:23:19 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9A240F80482 for ; Mon, 27 Mar 2023 15:23:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9A240F80482 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IiDkvh0e Received: by mail-ed1-x52a.google.com with SMTP id h8so36132847ede.8 for ; Mon, 27 Mar 2023 06:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923391; 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=o4SWFLm+fv3A0ySINaCNR8lIIUv5v6wsF3OLQGhunvA=; b=IiDkvh0ejQBbFpPsdHJyK18wy5TKG0EelJXbBMmzTJ5kaiva8pulY7S24sFjqBGI0U E1TWncUtQipI9yn+Jjcdg1rvFMJLCxDG5F12kk2ktaqDu7s6Ksp174UkdnOGbmyLr0xU xZpuifrtD63hgs7W/3/Lir2QgmsYA/HyHq530eh7l3JdMOmOSkaDJBznEC4JL/UkyV/R vhJf0zVwOjqMiGn/rAUm3jJVaqPg+5VOMr2J9hBZfQ+Vk/41NnKHDulfF4zP+3kHRW1H 0uZXszlwK7VtXqDuApLNz3xy/m33C1SyWXWyYrfnclfK/I60X22bYn7xB80iAPdaDtEw twjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923391; 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=o4SWFLm+fv3A0ySINaCNR8lIIUv5v6wsF3OLQGhunvA=; b=l7JYxp94SLRNdvGwx1RiNDcBt8ofHe/9SR68Y1Zj7JZHRivZEJAPmDBwoCEd3Fa4C6 YUfWlIZpo4d1c2ZBkGYpReaOc1mGPBU9u9BeGn/ntE4/8EXVj4CEAh2OeE8K9/mrAoOA h5ucLl/3eJOqMt2GTQ408NuEjQm8Sw6EhFfuFFYNT5x+8LyJ8WknHhYC19I1Xym/iK6v gqxwdIEhaJG05W1OFRpWqavVAlQasyYGyXL2qovzNFPZnN3MhkI9uMjpel4f438oCWzq Wf7Qw5SVootTDnnKop8SrmH/juMUjRZq7O7WEziUXL70lWgnvuOPbJm8eJDkSBCdb9G0 hw0g== X-Gm-Message-State: AAQBX9cQCiJQcxMx7o57RolFUE4nE/iu/mp2+ChfQ+AIT85VoWZP0xm/ aZz/T1Iz5YiLJ6+rh6NYWB6D28pH3euA86ycEkM= X-Google-Smtp-Source: AKy350Zi4gbqJ8JQAJAptTP29tPI/Ta9y7VGPm750r05GvqYJLrb0dD5M7SIgOgUrq1fGW1LVsGH+Q== X-Received: by 2002:a17:906:5010:b0:92a:77dd:f6f with SMTP id s16-20020a170906501000b0092a77dd0f6fmr13047882ejj.73.1679923391718; Mon, 27 Mar 2023 06:23:11 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:11 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 02/10] ASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8550 RX macro Date: Mon, 27 Mar 2023 15:22:46 +0200 Message-Id: <20230327132254.147975-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: DTJF5NL22XR3WE3TEA534OO7VOZS57ZU X-Message-ID-Hash: DTJF5NL22XR3WE3TEA534OO7VOZS57ZU X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the RX macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-rx-macro.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml index babf2ac20afb..ec4b0ac8ad68 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml @@ -15,6 +15,7 @@ properties: - qcom,sc7280-lpass-rx-macro - qcom,sm8250-lpass-rx-macro - qcom,sm8450-lpass-rx-macro + - qcom,sm8550-lpass-rx-macro - qcom,sc8280xp-lpass-rx-macro reg: @@ -92,6 +93,23 @@ allOf: - const: dcodec - const: fsgen + - if: + properties: + compatible: + enum: + - qcom,sm8550-lpass-rx-macro + then: + properties: + clocks: + minItems: 4 + maxItems: 4 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + - const: fsgen + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667903 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5B8AC7619A for ; Mon, 27 Mar 2023 13:25:04 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8A2F3826; Mon, 27 Mar 2023 15:24:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A2F3826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923502; bh=5xNYzAzP4HSrM4G4a60lL5MIP4dsbp7xYPlbM1E6pxU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=swbNxiC5t3EGh4K42bThKUUYSFIh0e4G9RcVf+46Jjdxb7pzEJiOOGRADiX/k01Dn E169jSmeM91YUnKDige/VtS3Tw36ZNPciavtX1MdIhFtOHL2cqnQ/lBUtiOxokPwiH rUdFFtQ3PwS0jWk13I8Vp1HXRELqvTUonbmjdmOM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6A7ACF80548; Mon, 27 Mar 2023 15:23:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5297F80551; Mon, 27 Mar 2023 15:23:24 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1A1B7F80272 for ; Mon, 27 Mar 2023 15:23:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1A1B7F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Y+QiFOvk Received: by mail-ed1-x52d.google.com with SMTP id b20so36239459edd.1 for ; Mon, 27 Mar 2023 06:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923393; 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=KL1Hi3X0orGZTBrm+1PohiZFQrgy9knLwvGCmFqK1Xc=; b=Y+QiFOvkoqdFUWtBEhtuaG3ENcUwaPQw5O/C1BVM5MnukIWz3KPjKdTbde9AGcCGbr xs4Sai9ih6pqOrwrpRgv4dXEJ9OaUVAvD5PVdyak4uqjeAoEXNJuFu0RxKZA1UYsWA8h Ct8jjVagOr2e8iROSq3X1x0os3hoaAhMOYqO01D+/0X6EOaEJOY/g8ftG+//brU22kkZ DS5H0VlnhvyWpDRjtvYqipy+zk1NlexO7XOkNmOofhGeflF7v2ECsrnWmKktKGe9DI00 zFiT5Jh0xjGOixgjwvyXc3ugZ8vqoPGsY1mOMiY+Sk+En+kFkR3PiV9wWWJYiHzL4Y1K V9fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923393; 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=KL1Hi3X0orGZTBrm+1PohiZFQrgy9knLwvGCmFqK1Xc=; b=QHPWmOL065Jam9QtKn2wo/7CMTKMnvHx0m3mWOvgqaAnMggbZmg2NQh3A+nkthJnpw USIjSVQGtdfuj2pYNCPEKN75nPVxWV7iN2g88pWwqebY2zMxdKiT6JORrJhkv9yyEDW+ Z3ZZzgh9oxDMSOHkh7KYzntRPKMpZO6VfkenW0eE8p5C8Q/rUl15mIzOivvEfrnuMe8N WYLbGgFr3V7mqN4rOIZXojIfKzIZcPYtCwWNxkOCiltOWvlsxeJkFuPHo/AtRw9Mpsd0 jMgSabGUQdHbK9au3kJakXh3TVvsvxuqmk/VaYCfy4qDX8Ax3WxybKgov6OUy80t2Y5n WLZA== X-Gm-Message-State: AAQBX9c4pBMxTw51Qg8nk6lbGFKR8n8Kr/XGHiQ3PiC/saHbUpgDA7Qx EPAb8BVkhKJQxue/3lTnHHlIiQ== X-Google-Smtp-Source: AKy350ZfC8HTAQDloW4dKgWmhG0qTpvb72a26hXxIRE6FS5bAyc7xOdoQoKtpuE6vQm9cU/MZw8NHg== X-Received: by 2002:a17:906:6c91:b0:932:615c:33d4 with SMTP id s17-20020a1709066c9100b00932615c33d4mr12433354ejr.34.1679923393086; Mon, 27 Mar 2023 06:23:13 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:12 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 03/10] ASoC: codecs: lpass-rx-macro: add support for SM8550 Date: Mon, 27 Mar 2023 15:22:47 +0200 Message-Id: <20230327132254.147975-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: BQ7U5LQ5FVL4ADMWVU47JAKWN3SS3L4E X-Message-ID-Hash: BQ7U5LQ5FVL4ADMWVU47JAKWN3SS3L4E X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add support for the RX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla --- Changes since v1: 1. Move the flag define to common header --- sound/soc/codecs/lpass-macro-common.h | 3 +++ sound/soc/codecs/lpass-rx-macro.c | 36 +++++++++++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/lpass-macro-common.h b/sound/soc/codecs/lpass-macro-common.h index f2cbf9fe2c6e..4eb886565ea3 100644 --- a/sound/soc/codecs/lpass-macro-common.h +++ b/sound/soc/codecs/lpass-macro-common.h @@ -6,6 +6,9 @@ #ifndef __LPASS_MACRO_COMMON_H__ #define __LPASS_MACRO_COMMON_H__ +/* NPL clock is expected */ +#define LPASS_MACRO_FLAG_HAS_NPL_CLOCK BIT(0) + struct lpass_macro { struct device *macro_pd; struct device *dcodec_pd; diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 372bea8b3525..685ca95ef4a9 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3491,7 +3491,10 @@ static int rx_macro_register_mclk_output(struct rx_macro *rx) struct clk_init_data init; int ret; - parent_clk_name = __clk_get_name(rx->npl); + if (rx->npl) + parent_clk_name = __clk_get_name(rx->npl); + else + parent_clk_name = __clk_get_name(rx->mclk); init.name = clk_name; init.ops = &swclk_gate_ops; @@ -3521,10 +3524,13 @@ static const struct snd_soc_component_driver rx_macro_component_drv = { static int rx_macro_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + kernel_ulong_t flags; struct rx_macro *rx; void __iomem *base; int ret; + flags = (kernel_ulong_t)device_get_match_data(dev); + rx = devm_kzalloc(dev, sizeof(*rx), GFP_KERNEL); if (!rx) return -ENOMEM; @@ -3541,9 +3547,11 @@ static int rx_macro_probe(struct platform_device *pdev) if (IS_ERR(rx->mclk)) return PTR_ERR(rx->mclk); - rx->npl = devm_clk_get(dev, "npl"); - if (IS_ERR(rx->npl)) - return PTR_ERR(rx->npl); + if (flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) { + rx->npl = devm_clk_get(dev, "npl"); + if (IS_ERR(rx->npl)) + return PTR_ERR(rx->npl); + } rx->fsgen = devm_clk_get(dev, "fsgen"); if (IS_ERR(rx->fsgen)) @@ -3653,10 +3661,22 @@ static void 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" }, + { + .compatible = "qcom,sc7280-lpass-rx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + + }, { + .compatible = "qcom,sm8250-lpass-rx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8450-lpass-rx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8550-lpass-rx-macro", + }, { + .compatible = "qcom,sc8280xp-lpass-rx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { } }; MODULE_DEVICE_TABLE(of, rx_macro_dt_match); From patchwork Mon Mar 27 13:22:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667902 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 294D6C761AF for ; Mon, 27 Mar 2023 13:25:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5D54ADEF; Mon, 27 Mar 2023 15:24:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5D54ADEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923529; bh=lqEvmh6EHwKALU7Jy5f0y6J1+5NjTKwWmRZ8VusSC7w=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XAzp8JtNVC8kYMv4FFm2liilR6mmWZH84yYV62Z2jlz5CbRvJ1Ld58bFZ0wsfzIze qYTZCt26lRy/BjV93v4n042hUuR6lmEQPqvfLrYjy6+i800S6u2QeCSnj0ppC6Zc48 nra/7IDQIVEs6suQ2v6LLvYtawfcQnCxsOHm0ja8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C9CCBF8055B; Mon, 27 Mar 2023 15:23:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A838F80548; Mon, 27 Mar 2023 15:23:26 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3B582F8024E for ; Mon, 27 Mar 2023 15:23:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3B582F8024E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nq3I2u66 Received: by mail-ed1-x52d.google.com with SMTP id cn12so36199260edb.4 for ; Mon, 27 Mar 2023 06:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923394; 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=g5MmJ5LIwdnukpeI8mJdU12Zu69B4U+Xf4C7JlgmOHg=; b=nq3I2u663v6g+hfpctFjctJjj2P2BHhwH3JUz27R8TJHQoyTa8L6ddYJznEnRhnXwZ iHZ3lx0/DGDGJHm2LxoSXJp5KAu3YZ3ndp9iZOYxGm05B/wSVkh18lpp16CC8lojrean eMw0j7qhr5uCLlY7/wRwM/CH18GeS6oDkN1OIHJWat5uSqtMK5hIiMb1MNl7jKx3fuaa nYcL5kvR2Gcl1sjVB/xnFRuG6HUOWNlL2ndxGfhHNCeAMpgcEFvpw8/rEG3fBNQxExGw CZkjzeuvMzjCvKIavgiVRhWDb9rzbsag0JVgSNAyGgH1g9acJOiIvOSPad43WAHRf4Da nr/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923394; 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=g5MmJ5LIwdnukpeI8mJdU12Zu69B4U+Xf4C7JlgmOHg=; b=4aCQewx/50jscMCDrFgWShr900iPbxJNDsNCBe1/jiGGj5e3uLJad8RNwkGGxr6lO/ 62ZmhZgDGj5xGH/lRfRDWpyJhVG8iAya2+DmjFhs96Svt2gdUFo3n+PqQcMRaL93HIXc h5632kMsZAUpzE2yAFp9/PSBImCbuL7JcZu4+u0JetoeCCJIO9GTAkqbR5L5TmzABmBd B598aI5ctyBtRG/Wp2hA0wGsMnVyB8wTfwUresX7JIBnUZb1Df/nZk3vW0hVxNPne4uV 3LN6nkR7+HYotnMUP+9FMGaPemCyV1q/AnWev8Ssb1KQ+2xcg6F+apbwLye9E4tfB9Yc MaLQ== X-Gm-Message-State: AAQBX9deEKgJcSsJUQtKpbt+c9Bvml+zCotp7B5C2qhmR1lat3goQBGv /lzGtzYEC/SBucx6qGw1iJaf0Q== X-Google-Smtp-Source: AKy350al8tfsgucLaBgpfCROmShW0R0tsRa+vgjUucQMyp9m+vXhNpUNNVleYP6iUjqViS3XJbWahw== X-Received: by 2002:a17:907:2099:b0:8b0:ad0b:7ab8 with SMTP id pv25-20020a170907209900b008b0ad0b7ab8mr12658198ejb.14.1679923394166; Mon, 27 Mar 2023 06:23:14 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:13 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 04/10] ASoC: dt-bindings: qcom,lpass-tx-macro: narrow clocks per variants Date: Mon, 27 Mar 2023 15:22:48 +0200 Message-Id: <20230327132254.147975-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: CWLWWH627GLAM7LE63HUX7ADN4GQFBUY X-Message-ID-Hash: CWLWWH627GLAM7LE63HUX7ADN4GQFBUY X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Currently the Qualcomm TX macro codec binding allows two different clock setups - with (for ADSP) and without macro/dcodec entries (for ADSP bypassed). With more devices coming soon, this will keep growing, thus rework the clocks/clock-names to be specific for each binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-tx-macro.yaml | 63 ++++++++++++++----- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml index 6c8751497d36..768757cd077d 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml @@ -9,9 +9,6 @@ title: LPASS(Low Power Audio Subsystem) TX Macro audio codec maintainers: - Srinivas Kandagatla -allOf: - - $ref: dai-common.yaml# - properties: compatible: enum: @@ -30,22 +27,12 @@ properties: const: 0 clocks: - oneOf: - - maxItems: 3 - - maxItems: 5 + minItems: 3 + maxItems: 5 clock-names: - oneOf: - - items: # for ADSP based platforms - - const: mclk - - const: npl - - const: macro - - const: dcodec - - const: fsgen - - items: # for ADSP bypass based platforms - - const: mclk - - const: npl - - const: fsgen + minItems: 3 + maxItems: 5 clock-output-names: maxItems: 1 @@ -67,6 +54,48 @@ required: - reg - "#sound-dai-cells" +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + enum: + - qcom,sc7280-lpass-tx-macro + then: + properties: + clock-names: + oneOf: + - items: # for ADSP based platforms + - const: mclk + - const: npl + - const: macro + - const: dcodec + - const: fsgen + - items: # for ADSP bypass based platforms + - const: mclk + - const: npl + - const: fsgen + + - if: + properties: + compatible: + enum: + - qcom,sc8280xp-lpass-tx-macro + - qcom,sm8250-lpass-tx-macro + - qcom,sm8450-lpass-tx-macro + then: + properties: + clocks: + minItems: 5 + maxItems: 5 + clock-names: + items: + - const: mclk + - const: npl + - const: macro + - const: dcodec + - const: fsgen + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667423 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D2D4C7619A for ; Mon, 27 Mar 2023 13:25:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 50FB9210; Mon, 27 Mar 2023 15:24:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 50FB9210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923511; bh=sx2XkzMuiINxVl/uYCDE4zONXVOIZXGGgJd3KWWStT4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=T3WOw0lkJMriTyNxBMSqrNnEwsC5uGIBbNlbIbAvVBw0GeJcWCrRbakIxs2p6eSh/ TOGzAPOXag7QKhjzucxFOjxH0khw65e6Pz2wu1R5V7LKxWxxCmOejmbn8b9GKG0cjs kunkTuMVKr0uSVqiUVWU9jBWV3e3DB4H6jEXr79U= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3436CF80558; Mon, 27 Mar 2023 15:23:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8EFFEF80549; Mon, 27 Mar 2023 15:23:25 +0200 (CEST) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DDFBDF8032D for ; Mon, 27 Mar 2023 15:23:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DDFBDF8032D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=az4uIKb/ Received: by mail-ed1-x531.google.com with SMTP id x3so36069447edb.10 for ; Mon, 27 Mar 2023 06:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923395; 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=7a67ZOiT2KfjiEjYrFPwDekMeNpv3czyvxhnWd0/zIc=; b=az4uIKb/12yPmBeHcyfAcgIIWW2EHltUAJIhxzSP2LxUgnKxodnLJlMfr08lDXYYBf TIxObZRbbhhYXnvX3rKCkZEVMl/orgmbb2f3ql54+XtIEddlhGAhAMbpKC10jiN6+bFt rGzSiWXy3WjZrYGiyMJ7xEpCc+7w+UzqUiVVYoaxcddwk62VaKeVo8tYjDJsw/ed5RA0 bCmBrCiFMTcIP2KgqIGZvF9AgkPMxEXFTFjhOsG5bRAZx+oItfoVoehCuIc1o2J0VXjm TynKYCmRwN6DET4YN+FBFlt8vOk4bIs4fqPl9NQN0Fcst2itkWWA47ZoeluJDM+n6hK7 gBiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923395; 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=7a67ZOiT2KfjiEjYrFPwDekMeNpv3czyvxhnWd0/zIc=; b=MXbPVBwiLTX/KOKramWaFVbX74EWCNqC4+MN3df8G0S8STfs5SlCEPxoDrySCBAwJ2 0teh+2rzGBPyzr9LYeyHz5yqSYigK/oYMJFdp/1qjW3HP26AOMfEuHorjPad1PDbNaxi iH3uZSbwpF+ZJHXabuxscf76PiM6sqfE8D8TGc61YXIhd5MyrTqRlXT15OEf9BUPppnm /NE2SXGC/po5SYERue9aIuBIrqpaWWqOIxfaj9MGrLFN+FPfdZ99CNzUVrinaPS2kgLT 0qB7VEyYO7ys+cfQe+PQHvTBwNtZZiMq1ARHXoWs519LJ5mKZRn2sjMlzvvDhVkp2W/r g9Xg== X-Gm-Message-State: AAQBX9fnC+cq4IKS6ssDGR8cYfRJgcSefGftx0+PMgyyp77s0sIaj+Zo QqLjP0d6HnIV181UaZgZ+LdliQ== X-Google-Smtp-Source: AKy350YNqlH9FY7SJSed3F0rsVsq/wJy1/Z5BpFQat8+QvN7Il7dBiaXRWwqeI79HqLgfTTJY+ijMg== X-Received: by 2002:a17:906:e0c6:b0:93b:a133:f7e6 with SMTP id gl6-20020a170906e0c600b0093ba133f7e6mr11457539ejb.46.1679923395297; Mon, 27 Mar 2023 06:23:15 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:15 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 05/10] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8550 TX macro Date: Mon, 27 Mar 2023 15:22:49 +0200 Message-Id: <20230327132254.147975-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: G3TTGRXSYLZPDGQMPZV2JRIAHNV476XQ X-Message-ID-Hash: G3TTGRXSYLZPDGQMPZV2JRIAHNV476XQ X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the TX macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-tx-macro.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml index 768757cd077d..4156981fe02b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml @@ -15,6 +15,7 @@ properties: - qcom,sc7280-lpass-tx-macro - qcom,sm8250-lpass-tx-macro - qcom,sm8450-lpass-tx-macro + - qcom,sm8550-lpass-tx-macro - qcom,sc8280xp-lpass-tx-macro reg: @@ -96,6 +97,23 @@ allOf: - const: dcodec - const: fsgen + - if: + properties: + compatible: + enum: + - qcom,sm8550-lpass-tx-macro + then: + properties: + clocks: + minItems: 4 + maxItems: 4 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + - const: fsgen + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667421 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B52DC76195 for ; Mon, 27 Mar 2023 13:26:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CCEDBE75; Mon, 27 Mar 2023 15:25:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CCEDBE75 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923576; bh=HlU1PgOEdiw7/R9mkE3bndEpUfiEwiWnleSZwsQJaRQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UJ6ZSRQgKYFTlgf81jK7Q3LUy524Ue9zVHQwwopP8BtQhrBycp1QJetp+AS8aKYKv RD9TdZrD820WzZ/TuxIkRHxl5BixpWuqzQNFESeO5DHb9ru2+XmZw14NgHxkOYr0gw GbLmHipoV9qV7i5uhS7PVkYk/0Nnm0m+e2q4sd/k= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 86FFDF80580; Mon, 27 Mar 2023 15:23:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DAE99F80548; Mon, 27 Mar 2023 15:23:28 +0200 (CEST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 498BEF80534 for ; Mon, 27 Mar 2023 15:23:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 498BEF80534 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=dNazTIE2 Received: by mail-ed1-x533.google.com with SMTP id i5so36360878eda.0 for ; Mon, 27 Mar 2023 06:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923396; 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=Sh0J+B26RJOLHDFZM1WKkkY18Exu6FcvY99vnXLALOk=; b=dNazTIE2tX83l9EtWuNck7yOwEMvmIl8UG0pToGQ1g14BSFnpHDRo7ocTNrqcVD1sA ULH4O39hXlC0PdLfyt4VSdoSski5GdubXKKKwOp+qVEKnECYtnObsA8mUKbx1GAf4QqC PKs0K8qDjJHfWcGyPbwSy0ELMACalcKyb9qcrbhU+N5sQGdu2gcjNCWlVQIia/iIEANv lf/p4U5V7mbgijAD8FJm/D/RA/5MQnWxnP53AWAbzXZrnpbNaTVBlEHbH7tA7Hw4YMo/ En28cjRoq1SHD/c3ILzmHAePJ5hE09TQCvrC+GLoZ/CLImBd7BXDN88vuF4lrHT7U1SH JG5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923396; 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=Sh0J+B26RJOLHDFZM1WKkkY18Exu6FcvY99vnXLALOk=; b=Bf1wZp+3IDgxQD/cEj/iHHphWpy6i57/ae43j9uQ4fPKTjx7aCizGlXvvGc4CzJjUP CzoF4H0u1ZifDKtx/v37QVcWwoPyWICLqe6UEcMrEKn/DGvmieyAWzAqx9I53cGUFCEl fXRoSV3/Fn3xkNfsQ/5ahTVM3s6pUIF7QuexzZ5kpzpUjlczVLa6ktw6LQmiyR1Dg+Te dvtgoUli51nZjrZbwb8zbYarQDH0MzDED9lXX7lR7CJp2FZc2Gyg65AoujilLl5fnmPb 42XXYHzb3bTh4Fv6XWw+v9bfZkGdpAlLGYPCw3jM6GisaKj5W4gt6Vs/P862hVTr0Wow N+eA== X-Gm-Message-State: AAQBX9ffD7Vm8NTXShHU3TcX/WuyAWNgOl/imDvuCJfGZbm/EcV+q80R AY2oBTOjt0+qQLSXCbkcTqy2LA== X-Google-Smtp-Source: AKy350bCzgGnJ1uAkdKsEm1DHtodkMx+B8sthzcrvQwwUyHaCtt0b7OZInIY8iN/Dw5lguBYB/p/lQ== X-Received: by 2002:a17:906:b4e:b0:92f:2c64:9d43 with SMTP id v14-20020a1709060b4e00b0092f2c649d43mr12372092ejg.68.1679923396503; Mon, 27 Mar 2023 06:23:16 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:16 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 06/10] ASoC: codecs: lpass-tx-macro: add support for SM8550 Date: Mon, 27 Mar 2023 15:22:50 +0200 Message-Id: <20230327132254.147975-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: KK2DHUPUJBG7MJV2R7ZPHKJ56TLFT3XP X-Message-ID-Hash: KK2DHUPUJBG7MJV2R7ZPHKJ56TLFT3XP X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add support for the TX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla --- Changes since v1: 1. Move the flag define to common header --- sound/soc/codecs/lpass-tx-macro.c | 35 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index d9318799f6b7..da6fcf7f0991 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -1915,7 +1915,10 @@ static int tx_macro_register_mclk_output(struct tx_macro *tx) struct clk_init_data init; int ret; - parent_clk_name = __clk_get_name(tx->npl); + if (tx->npl) + parent_clk_name = __clk_get_name(tx->npl); + else + parent_clk_name = __clk_get_name(tx->mclk); init.name = clk_name; init.ops = &swclk_gate_ops; @@ -1946,10 +1949,13 @@ static int tx_macro_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; + kernel_ulong_t flags; struct tx_macro *tx; void __iomem *base; int ret, reg; + flags = (kernel_ulong_t)device_get_match_data(dev); + tx = devm_kzalloc(dev, sizeof(*tx), GFP_KERNEL); if (!tx) return -ENOMEM; @@ -1966,9 +1972,11 @@ static int tx_macro_probe(struct platform_device *pdev) if (IS_ERR(tx->mclk)) return PTR_ERR(tx->mclk); - tx->npl = devm_clk_get(dev, "npl"); - if (IS_ERR(tx->npl)) - return PTR_ERR(tx->npl); + if (flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) { + tx->npl = devm_clk_get(dev, "npl"); + if (IS_ERR(tx->npl)) + return PTR_ERR(tx->npl); + } tx->fsgen = devm_clk_get(dev, "fsgen"); if (IS_ERR(tx->fsgen)) @@ -2143,10 +2151,21 @@ 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" }, + { + .compatible = "qcom,sc7280-lpass-tx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8250-lpass-tx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8450-lpass-tx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8550-lpass-tx-macro", + }, { + .compatible = "qcom,sc8280xp-lpass-tx-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { } }; MODULE_DEVICE_TABLE(of, tx_macro_dt_match); From patchwork Mon Mar 27 13:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667900 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B88DC76195 for ; Mon, 27 Mar 2023 13:26:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8D5FBDFA; Mon, 27 Mar 2023 15:25:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8D5FBDFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923598; bh=8+7ZfJZWDMSZ9hqwvRzhzMklbecv9T5cMsXIdY7TVSc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Td9rQGZQhfOz+L+dggLR4DGX+ThBdGpOpLmZUcdwva4EmW7zZhuULR4e+nxdqyiKU DnMpf3URG7nKhoRejfhPRRMVKfQtPEZ3XJZaKoZbEV2ZkFkvKW2brSl3/WGCLBIow7 ZnhrN/A4S6Xy+g1J+7o8mUQ8atAgSzdpZ3P3wdFM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2F1A1F80588; Mon, 27 Mar 2023 15:23:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1795BF80534; Mon, 27 Mar 2023 15:23:30 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E79A1F80529 for ; Mon, 27 Mar 2023 15:23:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E79A1F80529 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=RZXlVVY9 Received: by mail-ed1-x52d.google.com with SMTP id cn12so36199952edb.4 for ; Mon, 27 Mar 2023 06:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923397; 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=zotVF1vk8cf0n9qfIQsldz0TvwmtvVtz6i/QGqtiNB4=; b=RZXlVVY98CsmmymWEux1eeEzaPJtEOhvQlMjtFdXkZtQ4onrGSqLLbfamI0HRVVgLo v979bUvbkaqVz/L/BQGQZSJYVdziptnr/49Qz6COvrMrnpMJNYmO7oMIjYHaWdlO86Z9 0f301yUxSS2uft4YvFAS48KOqRqhyZHDmivfTgBUFqjwD76pQhFFvTPynSnVv7a+VjHf 24O1KlUGmOaeQJBwrQGZhuG7vhRib6LyQmpIas9P2DwAGy4FNSuiP6mM1L8O75OBEYEI FpRTDPgEwVbWa9pyH2+02TZa/naht7LdL0AHIgQG3qTqGOzqafzNQzW24lubkL1U9UZm VIxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923397; 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=zotVF1vk8cf0n9qfIQsldz0TvwmtvVtz6i/QGqtiNB4=; b=uYekjqXJS7T201jvCvr3ZcRQvHuSSQ/q5+vX9l6PD99H32iD+a2Ntv9aH71bSDbzhC yp6JJGqI4eK1WWnV0Z7LZL8TFgad2jVTMjfATzrpM0CKy0UfcLcV/rTub3ObkL2ACAAy E9LPf0CDa7YREvq9e6uDItU3IWfIYDzbXwdvYor8FHPW+1UhwSuyFSJjJhTgh6+45NL1 0QOHurA27AQv3/dKWrTdZ/S077uVN3rhgU09ie/NMA9+bhIulHCg8mdMYD0sXoRLMOL+ b2gOD/0FsIZPLY7+TPUHcWpTJpcjGB21fwG//TVsojjNKhcaD5MxcvGp+3KXbxrpzooy 3MdQ== X-Gm-Message-State: AAQBX9esLYQbsU1pNRAiIKQczUsPSXlc+KKJtSsylM0QakX/3TpxJFgs P701VFUIYPlFLT7XrFcGL8sjpQ== X-Google-Smtp-Source: AKy350YjtYsJ0rNq+/jhDt2fT6bOmhA22R1GkeWePQSUOJCOZ2R0MJFzEUSA2EvY61UoGqlwzq/UtQ== X-Received: by 2002:a17:906:1c19:b0:92b:f118:ef32 with SMTP id k25-20020a1709061c1900b0092bf118ef32mr12168020ejg.48.1679923397571; Mon, 27 Mar 2023 06:23:17 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:17 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 07/10] ASoC: dt-bindings: qcom, lpass-va-macro: Add missing NPL clock Date: Mon, 27 Mar 2023 15:22:51 +0200 Message-Id: <20230327132254.147975-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: CPBLY7W3Y3NNMU4HCPGKV6E3HFGZZODK X-Message-ID-Hash: CPBLY7W3Y3NNMU4HCPGKV6E3HFGZZODK X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 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 61cdfc265b0f..528b677a439c 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: @@ -30,16 +27,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 @@ -63,6 +56,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 unevaluatedProperties: false From patchwork Mon Mar 27 13:22:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667901 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 232A6C76195 for ; Mon, 27 Mar 2023 13:26:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA37EE0E; Mon, 27 Mar 2023 15:25:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA37EE0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923559; bh=FfoahduL07n3X6HcOBGrU2nWbp1G0mNpDEkwnz9wZT0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XVgR9WK3Ye+73+HvuZIATVboq9KcVoEJmmZKOH/t+37l7rxZQR9BUhIG/6mugi5fn nOa0KRUUKY2SnotyIoOzYAiGp6FK7P2EitbaIwdsktKqGjuBYpzDGMFm9lRyidbtZn 4c770tRUyOu7F+PPcVbISA4YHoPPM2karcNU3fZs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A3616F80579; Mon, 27 Mar 2023 15:23:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FC42F80549; Mon, 27 Mar 2023 15:23:27 +0200 (CEST) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5AF0AF80527 for ; Mon, 27 Mar 2023 15:23:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5AF0AF80527 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=iOLCw3e8 Received: by mail-ed1-x536.google.com with SMTP id i5so36361358eda.0 for ; Mon, 27 Mar 2023 06:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923398; 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=H6C2oehD29mdvVUf/6YW/LF4OD+LurGgZwAXHRNOwNI=; b=iOLCw3e8jcrKj2cxEFSkhEBca6jq+IfluJjdDP8MQu/l33h0IohvFKmIcy9IkOryjG GvJwMwhdbsJmt1HXUj9LhKH0XngcDRYLciRZMfgOA1TvT8l8tjaiTbdsNjlobFB5cJu/ tdI1ikQjZKJZ/2VUjp3nBYb/6eTA3Y0wFR1WmFlc5xkCrLbEDVxP8fn7Y5ap5FWAdIEW MucQZiaKDZKwbWLN8I077nTgcmmhRkTMwRf3/SJNi3V3Td+5aModmPAj1WXiU9zIhZVF Bc8/0L8qNRU3E7dSpbF5T+ch5r7BWwGXwBeaC2LG+pzM8Yxi9ofuA2jBlNp45jLyXgTd sQjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923398; 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=H6C2oehD29mdvVUf/6YW/LF4OD+LurGgZwAXHRNOwNI=; b=gqRyT2uAIu2WD3Fy/HWkqMh/JN13MKFc/p/PYO6g5h5q6W1fGw32q3ydPjwuIoPIqp cLldygRXSEPNqG60feJI1lMBpZZVXRNNHvs9ccIz78mRCcOICprBZbT8M5Fh9eEujbwB VZp8nHw/zxVdlj5lJSm3o02B+PO6IEtfKHcoiCydU6eZVUPjJpGSq6qkHsbsSWBifK5v D4gNlAy+FXq7QQAdbawhjfLxnrRwAFvvDK/c6oFvgK8yv9YsPna+N0n/5M6Qww6km9rW sRZIAT0LCy2VvX+9WG7ROGHjyeTAsh/Ocdwc4nKOfMN8z1vHke/y+h7Bh6met3E2gMkV ORJA== X-Gm-Message-State: AAQBX9cp63NJ35o233L245p8xCOekPDpjFzYiyPppTXECrTu4bm1sigM tXqX2ah6Zn4Ipmq8tjtiXOFYMg== X-Google-Smtp-Source: AKy350bJk9HPKQFGqOqsrsC9SPm+Pem+SwXwgMWcjh2NW7nmdunmuYH86WBqFrDz9P78cDEKgaDkhg== X-Received: by 2002:a17:906:3616:b0:931:19f8:d89c with SMTP id q22-20020a170906361600b0093119f8d89cmr12312627ejb.73.1679923398704; Mon, 27 Mar 2023 06:23:18 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:18 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 08/10] ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8550 VA macro Date: Mon, 27 Mar 2023 15:22:52 +0200 Message-Id: <20230327132254.147975-9-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: EYP4X7DX64KYB4EESTR23PFTIUFQSO3N X-Message-ID-Hash: EYP4X7DX64KYB4EESTR23PFTIUFQSO3N X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the VA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-va-macro.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml index 528b677a439c..4a56108c444b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml @@ -15,6 +15,7 @@ properties: - qcom,sc7280-lpass-va-macro - qcom,sm8250-lpass-va-macro - qcom,sm8450-lpass-va-macro + - qcom,sm8550-lpass-va-macro - qcom,sc8280xp-lpass-va-macro reg: @@ -110,6 +111,23 @@ allOf: - const: dcodec - const: npl + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-lpass-va-macro + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667422 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06833C761A6 for ; Mon, 27 Mar 2023 13:25:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BFF22DF8; Mon, 27 Mar 2023 15:24:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFF22DF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923548; bh=DMDNr5L1HeLn7Eg709LVMRKvOruNj7poKMeRRbKV5fk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=I2/3fasuuI0/3jLB4iglm/HhVwX3nx3KYsF01xLZGjALvvpHnc7a8nReEFMFgSyVA zbGo+x31sZJsBX/fsMLvlNcnvWDhr+v/EJJR2fpmPPUlUJnAn6f/f2pdSA2YrSPDOZ 2QrdazB2YZxpTm+IZJUhnSUZiJRC7hdm6O4OqKdg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 32223F8056F; Mon, 27 Mar 2023 15:23:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB527F80533; Mon, 27 Mar 2023 15:23:26 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4AD8F8052D for ; Mon, 27 Mar 2023 15:23:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4AD8F8052D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=tWrKDhnZ Received: by mail-ed1-x52a.google.com with SMTP id t10so36046415edd.12 for ; Mon, 27 Mar 2023 06:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923400; 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=3h2EW4IkC/IhJho4gz7j5uQBbsCW60DmV4AKGgO8D1Y=; b=tWrKDhnZ6AGETvmeHspz3EI2jNfpXQCcKz6vH7eFhOXGDhPAYJ1Ph39gX1PYLGiAaK ZCY9dcC5NlA1YaM3wcUP6PDbzj3MdHXo0l0jk3oQ4qKk4SbDLREYPdwGNC13x1j9xKQr uWJpKsT25yZNLP95Zv6vU/9kCWKXC6jF+fRtww+yDvO+DF2qeyOhTzADxTO+/zH4TZXQ ZaF8lhZxJXuHr+nEPb4BLTZCzXCY8WnzSySgwN4V1hVRW7w0Dyu/LcGBfn/iiltTD5Xk +F1WZfT1krNOlarDbwsSHAT1yuDUHZ2Oald4vmswgI3nNmAthkpZTCgEPHOi6KRhr+/T of/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923400; 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=3h2EW4IkC/IhJho4gz7j5uQBbsCW60DmV4AKGgO8D1Y=; b=yxSbb5ymw6y7zrX4K5cc5iv4b4zqu1ZYOj/ILiUsoRWewNJoDWPourblFvh3HFwT9d ajfIRWLuqCTDKChMDa3EykgwwdN36FejOJaLqpgDXDqFYJJ/5pTWntRKfjSuxrWNFjQ8 97Yr8uXC+l4U+nwLjp0kxb/aMsX80CWuFkgBLZtjefkAdsWbPf/ozF0qwTdaFbf8jCwI i8KP7YQvYlcHfXUTg5JW11wvbElKCzXOPt5NHAbt08hIJaWBx3qkUKLfxDUWcnjUlP1U M0jFEms99s2jXZWPRrA8BY9a1GhpAbLsrEe5lIoFKoNwR4hg8nOQkn9hSCwRnuReu2xz pP0A== X-Gm-Message-State: AAQBX9e8FYec8F5jQ2EiTFTDj2k+HZ3i4bhCiH3MR9FhWU5wjgrINKg7 FOPzSNNkinP+Lz6CEM09t5x+UQ== X-Google-Smtp-Source: AKy350ZJqDj58+VXAULylaQnvX/jFbNdWA6zLvHxp5BuYYqU7OhYiBa0XnryAcFW+5/p8jwi2hqTVA== X-Received: by 2002:a17:907:d22:b0:932:5b67:6dee with SMTP id gn34-20020a1709070d2200b009325b676deemr13660233ejc.27.1679923399821; Mon, 27 Mar 2023 06:23:19 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:19 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 09/10] ASoC: dt-bindings: qcom, lpass-wsa-macro: Add SM8550 WSA macro Date: Mon, 27 Mar 2023 15:22:53 +0200 Message-Id: <20230327132254.147975-10-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: C6S7N3SKIPOVDO2MYQPTGRG7TACMKKBG X-Message-ID-Hash: C6S7N3SKIPOVDO2MYQPTGRG7TACMKKBG X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski , Rob Herring X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the WSA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- .../bindings/sound/qcom,lpass-wsa-macro.yaml | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml index 66cbb1f5e31a..eea7609d1b33 100644 --- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml @@ -15,6 +15,7 @@ properties: - qcom,sc7280-lpass-wsa-macro - qcom,sm8250-lpass-wsa-macro - qcom,sm8450-lpass-wsa-macro + - qcom,sm8550-lpass-wsa-macro - qcom,sc8280xp-lpass-wsa-macro reg: @@ -27,11 +28,11 @@ properties: const: 0 clocks: - minItems: 5 + minItems: 4 maxItems: 6 clock-names: - minItems: 5 + minItems: 4 maxItems: 6 clock-output-names: @@ -62,6 +63,7 @@ allOf: then: properties: clocks: + minItems: 5 maxItems: 5 clock-names: items: @@ -89,6 +91,23 @@ allOf: - const: va - const: fsgen + - if: + properties: + compatible: + enum: + - qcom,sm8550-lpass-wsa-macro + then: + properties: + clocks: + minItems: 4 + maxItems: 4 + clock-names: + items: + - const: mclk + - const: macro + - const: dcodec + - const: fsgen + unevaluatedProperties: false examples: From patchwork Mon Mar 27 13:22:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 667420 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD5DDC7619A for ; Mon, 27 Mar 2023 13:26:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 69DD6DF9; Mon, 27 Mar 2023 15:26:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69DD6DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679923611; bh=t07sxcXzkpF7bZu1ybuEwzbOfvE1YvDkHqHz1cB33uc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Y4g6HCrD+SSMPHpPhdifhJNksni54zY2ncRvAUo5wtUIMWh3X75w/XExUJbn0OE+K R76b6UCQEUSbdUNnYGMM8xZuJHCvegGNWGoEUiHAz6JJHMmvLYEZYNJheJ8sv/Ah1X PzBPKL9xuUHDqcre5AavKnEZ5E6OYT+nr9rD7aOs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C658DF805AA; Mon, 27 Mar 2023 15:23:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 60408F80529; Mon, 27 Mar 2023 15:23:30 +0200 (CEST) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 527F6F80544 for ; Mon, 27 Mar 2023 15:23:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 527F6F80544 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=f/5TMMjI Received: by mail-ed1-x534.google.com with SMTP id ek18so36171107edb.6 for ; Mon, 27 Mar 2023 06:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679923401; 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=FjQpUfEO0NsE7N3bLT5uR7/QoLqyWyEQKa6IuwI/2/Q=; b=f/5TMMjIfCgndJMlaJ4r71lbXVsNskze6ZnT/CIHAv6BxV9SLh4v8fyC88l8kU85U2 rBuuo9mpNQroSu66yJ+POn8fD3VptqUzEncPkYpeIuk1IEmjjHw+0o1Hh1D3DxAnNoon M4CO6AT+7YDrU0CwU7qbo5QXem3KQ035DCr2lS5QQIZM7RSeD7VwuN2fPgKaD1i84dVz fMug82jTJauGI7kjWHYTHY2qRwDTWT4eE+CwoHSdufk68x530YMC2eAH6+ALuKLziA1Z Na8OVqga5M6b10mcS3g9uttyq31xzK+aaoniJII5oRksHGW3biJbt8MLE19umzxrlDz5 Y1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679923401; 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=FjQpUfEO0NsE7N3bLT5uR7/QoLqyWyEQKa6IuwI/2/Q=; b=ae1FEsrnO58OMEJ0R3Fz5U/PFR7rVlHzUpRF8X2lRkOBOks3EZaB70L1gPa1f3ceW2 mfndQf7q2GbBnZm2gj4IWXRXNEQO27aKopQIBfWvYIDeNdl0EVDLgWtX0JtrooKq80WG WSeoFsKyDphFR9NJFxolADrQ7PHZQ2CRLnNWn7nRwLaRLUTwJk3VAW8pkPtFz5PsRyMg BaTWvbvhliyovuKmsmNceHjDqg2pR2k2NCorhhjzIHx7UFan6GfFTof5TRCo4/zAlNZ1 Aqo21lwFN6ZWJp9e3L59ho+Fq2iI8tYVWe1w4NxsWSTgIOoEFSd9dCCby/3ci4nOmCU2 QyWA== X-Gm-Message-State: AAQBX9da4I1/Zo5Wmq3xNDppQoR9/Oe4wc6pVSU68onifhovc/jvvosn NPgVDZI09WsL9VEEotCU4QDRYQ== X-Google-Smtp-Source: AKy350ZUl+vUbD/HZJiigKbFVDkPZWimDS0mWigAI07cv5eEwg9rsxZejhZUO4wjuY3K/PLlHqV1aw== X-Received: by 2002:a17:907:d402:b0:930:ca4d:f2bf with SMTP id vi2-20020a170907d40200b00930ca4df2bfmr14281716ejc.54.1679923400927; Mon, 27 Mar 2023 06:23:20 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:581e:789c:7616:5ee]) by smtp.gmail.com with ESMTPSA id gy24-20020a170906f25800b00930445428acsm14286814ejb.14.2023.03.27.06.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 06:23:20 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/10] ASoC: codecs: lpass-wsa-macro: add support for SM8550 Date: Mon, 27 Mar 2023 15:22:54 +0200 Message-Id: <20230327132254.147975-11-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> References: <20230327132254.147975-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: APNO5XZEQYS4PUOWCLTRSTEC3ZNY5NMQ X-Message-ID-Hash: APNO5XZEQYS4PUOWCLTRSTEC3ZNY5NMQ X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Patrick Lai , Krzysztof Kozlowski X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add support for the WSA macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla --- Changes since v1: 1. Move the flag define to common header --- sound/soc/codecs/lpass-wsa-macro.c | 37 +++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 6484c335bd5d..8ba7dc89daaa 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -14,6 +14,8 @@ #include #include #include + +#include "lpass-macro-common.h" #include "lpass-wsa-macro.h" #define CDC_WSA_CLK_RST_CTRL_MCLK_CONTROL (0x0000) @@ -2346,7 +2348,10 @@ static int wsa_macro_register_mclk_output(struct wsa_macro *wsa) struct clk_init_data init; int ret; - parent_clk_name = __clk_get_name(wsa->npl); + if (wsa->npl) + parent_clk_name = __clk_get_name(wsa->npl); + else + parent_clk_name = __clk_get_name(wsa->mclk); init.name = "mclk"; of_property_read_string(dev_of_node(dev), "clock-output-names", @@ -2379,9 +2384,12 @@ static int wsa_macro_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct wsa_macro *wsa; + kernel_ulong_t flags; void __iomem *base; int ret; + flags = (kernel_ulong_t)device_get_match_data(dev); + wsa = devm_kzalloc(dev, sizeof(*wsa), GFP_KERNEL); if (!wsa) return -ENOMEM; @@ -2398,9 +2406,11 @@ static int wsa_macro_probe(struct platform_device *pdev) if (IS_ERR(wsa->mclk)) return PTR_ERR(wsa->mclk); - wsa->npl = devm_clk_get(dev, "npl"); - if (IS_ERR(wsa->npl)) - return PTR_ERR(wsa->npl); + if (flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) { + wsa->npl = devm_clk_get(dev, "npl"); + if (IS_ERR(wsa->npl)) + return PTR_ERR(wsa->npl); + } wsa->fsgen = devm_clk_get(dev, "fsgen"); if (IS_ERR(wsa->fsgen)) @@ -2551,10 +2561,21 @@ 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" }, + { + .compatible = "qcom,sc7280-lpass-wsa-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8250-lpass-wsa-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8450-lpass-wsa-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, { + .compatible = "qcom,sm8550-lpass-wsa-macro", + }, { + .compatible = "qcom,sc8280xp-lpass-wsa-macro", + .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK, + }, {} }; MODULE_DEVICE_TABLE(of, wsa_macro_dt_match);