From patchwork Fri Nov 1 17:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 840124 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A00D81CC896 for ; Fri, 1 Nov 2024 17:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730481571; cv=none; b=AzKZNsgYwid869/2uFaKXXPDQHZsqfmlGKG6JwqU5CbOlQXSujDzXL4d4ZQTCqTqqVWoT06YkCHeUXAR5sIJuuXUjp+9bXm5CAHF/XvanZXSEDTXu5MOE9/WmlWV8ZAvRY0hEVhqdLhqsTP5KtOOL9phead2I74ZxkxCMkENRu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730481571; c=relaxed/simple; bh=v8N/E1MOA6ZgOQNnGcaGJb2KY2m9e/2WC35Ddu9CIss=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T0qyfMgB2OTI62oc7ymz9c/iOZnKyNG3gWtYm8UtP3LA2wctrqmkBdd1wJrF3YSzcTqYBM70rIUHrkrRSgnuI3JDb8YqMzayrE7Sgv+I4LOxjb+NnWmajLfSPakCdfo5yQ3YwX2FFhQEBln4r57P53fanuDN2k+/PfcPr1wTqA8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dxkHXJ+m; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dxkHXJ+m" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4315855ec58so2959515e9.2 for ; Fri, 01 Nov 2024 10:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730481567; x=1731086367; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5047GXOPUlRyEN+Y7vsFc+ins8nvvnhbv/k90jvWcUQ=; b=dxkHXJ+mSLOZk1A3YovTZXPHW0AxHR6Rc+r1KAxsCKykiG9HSGdxN4m+pVq4Fi7iAb 0BVeEnjxBtrV27mDuykicEh2NPbRzyVrjfR1FQqY/PNDXQTCk3ifWd7ZAFQUu32qNMVe 3CqII8neEh46SD7v68yNkFslLycZCqZr2ipslNf6sdxfKEoTQUdQWjRSMbUQv/tHPDKp 9EDdortarR0tScusMXYY/ubJ4DBtDWP0qyuW1oDPHg3OLwMjCQ4+TR/dp2ci0zZ16FNd br0iVwyEFqX6K6HD4FIRAWMhOpU/bUjt093zrDcscY28IyydQGDkqjXltFz+zEMrAfZR 2XJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730481567; x=1731086367; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5047GXOPUlRyEN+Y7vsFc+ins8nvvnhbv/k90jvWcUQ=; b=niROjDMFWul79ZPXucjnDpZdDCIHeisV35q23CoIb7RJxjbi9RpgNEm7e/Ks0dmnL7 10CPIY4cTDS7a5Z/qy/9StoIn5cF+z9jf+VSln1kkamv97upbJLAcSQr1SQpZOeKYKD+ 4B06+G+cnU/SFxMdn6bOAbBannyMX3kCKdvO6C8AqEi2pfBCEM0FZLqrkrRQ+KybBZBm cQjGvx357ZY2i7n5JJMXlcrobTeV6eCQdKiF8dmT7n7HAXaffehDeRnW7tChC7QeO4X8 x60Q+zC8DbIGuqKB3uOQNjK87OMNwHbHg8/w8CoApZ2IdYGrDyxCWn5E1oNIPPxqLZR+ zhtQ== X-Gm-Message-State: AOJu0YxlkY0GDXkyXrRnflUmX3kniaAr8dcNnGTvEFASdmhLlGkJaPma ngMh4I+4S+ZjTa06Vm/3izs+AB3I9Wf8F5N0JJge9MU7fTXVgnDH3hVrVdAQhD6ITUISo1ltHDS P X-Google-Smtp-Source: AGHT+IEmz/e+EDuFop18Q5J7a2eLOLeVIqT1ED2JYM5LkHYavnL8agtUmKCbFc2LNZO9lhkCs1cUlA== X-Received: by 2002:a05:600c:5494:b0:431:4a7e:a121 with SMTP id 5b1f17b1804b1-4319ad4ee8emr90252365e9.9.1730481567477; Fri, 01 Nov 2024 10:19:27 -0700 (PDT) Received: from [127.0.1.1] ([178.197.211.167]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5ab305sm68536785e9.7.2024.11.01.10.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 10:19:27 -0700 (PDT) From: Krzysztof Kozlowski Date: Fri, 01 Nov 2024 18:19:12 +0100 Subject: [PATCH 2/4] arm64: dts: qcom: sm8750: Add LPASS macro codecs and pinctrl Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241101-sm8750-audio-v1-2-730aec176459@linaro.org> References: <20241101-sm8750-audio-v1-0-730aec176459@linaro.org> In-Reply-To: <20241101-sm8750-audio-v1-0-730aec176459@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Melody Olvera , Satya Durga Srinivasu Prabhala , Srinivas Kandagatla , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6665; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=v8N/E1MOA6ZgOQNnGcaGJb2KY2m9e/2WC35Ddu9CIss=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBnJQ2XbzaVa70MV0ZU9sgf1qyjMHSL9Zzi1RUop JjykjFlXU+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZyUNlwAKCRDBN2bmhouD 1xVUD/9Elk6ZjE43TFLfGTx/red5EcCr+xW53kwc2qW8sDgCPnyXBrhuDn2rPNSg+6x78AUqYcF 36XxiPp1l0kU/Sz/uvrbRpQKlmVLxuj1d1xSRl4v/C4Hth5q3oxWEtlNhaekpaEiCZPjBbAlEO8 x6kV8mST3SkMBz1v3Ri2nM71ljFPcf3ruBY4q0nq3LNJcd+ybCSS9f5BCikw1xNPjiuKDY/GJQD SxZUwQtz+MN8a7vhvw3llB1j+b2YmhsrGk5TrT1G9IPGWwBfIx85/rq2Co0EWI2QI6SPzEmCYMv oJeR8IqCXBCigut9jTpjs2IbSvnknGWF3sLimYXaneYlz3qvCVtT1xopKzJmTnmkl4Wva+t8VKE M5kCGS7P1TXE8JoH8xhqR2p8AVw4b/UHIbSerLPZSeD0t3mP/bxdiEJ983Oj/sEinXk6a4Nx/UJ TmKAzlh7Dl3NXzYE95oTHyDwXDBXZvp0rqaIuI3GEMfNhDPYGwUvVTKp+MrsaoQezyHSE3w4LyF 5deyCk57IWeTGbp9enTVclLASO+9OxsucWV7x4FlPmu7upBcf3agFAG+pdmBWL1T80HlpFeVpDG QVmQnTOu5oCPbHUyOj72WogEZnXzb1Il02LFXBbJBE1O+VFoE1YirmPzaWWRLQowEY8bl0qlz49 gKyoiAdl19h5I9g== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Add LPASS macro codecs and LPASS TLMM pin controller on Qualcomm SM8750 for proper sound support. These are fully compatible with earlier SM8550. Signed-off-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/sm8750.dtsi | 202 +++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qcom/sm8750.dtsi index eb826b154dcb2d8165426ba2225548efd7547da8..bd50a78534a3182d102385f2cc43a2688dd782cd 100644 --- a/arch/arm64/boot/dts/qcom/sm8750.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi @@ -15,6 +15,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -2002,6 +2003,207 @@ lpass_lpicx_noc: interconnect@7420000 { #interconnect-cells = <2>; }; + lpass_wsa2macro: codec@6aa0000 { + compatible = "qcom,sm8750-lpass-wsa-macro", "qcom,sm8550-lpass-wsa-macro"; + reg = <0 0x06aa0000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_WSA2_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&lpass_vamacro>; + clock-names = "mclk", + "macro", + "dcodec", + "fsgen"; + + #clock-cells = <0>; + clock-output-names = "wsa2-mclk"; + #sound-dai-cells = <1>; + }; + + lpass_rxmacro: codec@6ac0000 { + compatible = "qcom,sm8750-lpass-rx-macro", "qcom,sm8550-lpass-rx-macro"; + reg = <0 0x06ac0000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&lpass_vamacro>; + clock-names = "mclk", + "macro", + "dcodec", + "fsgen"; + + #clock-cells = <0>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + lpass_txmacro: codec@6ae0000 { + compatible = "qcom,sm8750-lpass-tx-macro", "qcom,sm8550-lpass-tx-macro"; + reg = <0 0x06ae0000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&lpass_vamacro>; + clock-names = "mclk", + "macro", + "dcodec", + "fsgen"; + + #clock-cells = <0>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + lpass_wsamacro: codec@6b00000 { + compatible = "qcom,sm8750-lpass-wsa-macro", "qcom,sm8550-lpass-wsa-macro"; + reg = <0 0x06b00000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&lpass_vamacro>; + clock-names = "mclk", + "macro", + "dcodec", + "fsgen"; + + #clock-cells = <0>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + lpass_vamacro: codec@7660000 { + compatible = "qcom,sm8750-lpass-va-macro", "qcom,sm8550-lpass-va-macro"; + reg = <0 0x07660000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "mclk", + "macro", + "dcodec"; + + #clock-cells = <0>; + clock-output-names = "fsgen"; + #sound-dai-cells = <1>; + }; + + lpass_tlmm: pinctrl@7760000 { + compatible = "qcom,sm8750-lpass-lpi-pinctrl", + "qcom,sm8650-lpass-lpi-pinctrl"; + reg = <0 0x07760000 0 0x20000>; + + clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "core", "audio"; + + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lpass_tlmm 0 0 23>; + + tx_swr_active: tx-swr-active-state { + clk-pins { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio1", "gpio2", "gpio14"; + function = "swr_tx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + rx_swr_active: rx-swr-active-state { + clk-pins { + pins = "gpio3"; + function = "swr_rx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio4", "gpio5"; + function = "swr_rx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + dmic01_default: dmic01-default-state { + clk-pins { + pins = "gpio6"; + function = "dmic1_clk"; + drive-strength = <8>; + output-high; + }; + + data-pins { + pins = "gpio7"; + function = "dmic1_data"; + drive-strength = <8>; + input-enable; + }; + }; + + dmic23_default: dmic23-default-state { + clk-pins { + pins = "gpio8"; + function = "dmic2_clk"; + drive-strength = <8>; + output-high; + }; + + data-pins { + pins = "gpio9"; + function = "dmic2_data"; + drive-strength = <8>; + input-enable; + }; + }; + + wsa_swr_active: wsa-swr-active-state { + clk-pins { + pins = "gpio10"; + function = "wsa_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio11"; + function = "wsa_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + wsa2_swr_active: wsa2-swr-active-state { + clk-pins { + pins = "gpio15"; + function = "wsa2_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio16"; + function = "wsa2_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + }; + pdc: interrupt-controller@b220000 { compatible = "qcom,sm8750-pdc", "qcom,pdc"; reg = <0x0 0x0b220000 0x0 0x10000>, <0x0 0x164400f0 0x0 0x64>;