From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sm8450-hdk: add sound support
Date: Mon, 14 Nov 2022 16:39:56 +0100 [thread overview]
Message-ID: <f52157c7-d198-9c26-089a-c5227a1c1f4f@linaro.org> (raw)
In-Reply-To: <20221114152130.385871-4-krzysztof.kozlowski@linaro.org>
On 14/11/2022 16:21, Krzysztof Kozlowski wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> Add sound support to SM8450 HDK board. Tested setup so far is only two
> speakers (working) and head-phones (only one channel working).
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 161 ++++++++++++++++++++++++
> 1 file changed, 161 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> index 4d75f9db08c2..c177283b6764 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts
> @@ -6,6 +6,8 @@
> /dts-v1/;
>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/sound/qcom,q6afe.h>
> +#include <dt-bindings/sound/qcom,q6asm.h>
> #include "sm8450.dtsi"
>
> / {
> @@ -421,6 +423,147 @@ &uart7 {
> status = "okay";
> };
>
> +&soc {
soc should go before uart alphabetically.
Other than that:
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> + wcd938x: codec {
> + compatible = "qcom,wcd9380-codec";
> +
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> + qcom,micbias4-microvolt = <1800000>;
> + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
> + qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
> + qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
> + qcom,rx-device = <&wcd_rx>;
> + qcom,tx-device = <&wcd_tx>;
> +
> + reset-gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
> + #sound-dai-cells = <1>;
> +
> + vdd-buck-supply = <&vreg_s10b_1p8>;
> + vdd-rxtx-supply = <&vreg_s10b_1p8>;
> + vdd-io-supply = <&vreg_s10b_1p8>;
> + vdd-mic-bias-supply = <&vreg_bob>;
> + };
> +};
> +
> +&sound {
> + compatible = "qcom,sm8450-sndcard";
> + model = "SM8450-HDK";
> + audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
> + "SpkrRight IN", "WSA_SPK2 OUT",
> + "IN1_HPHL", "HPHL_OUT",
> + "IN2_HPHR", "HPHR_OUT",
> + "AMIC1", "MIC BIAS1",
> + "AMIC2", "MIC BIAS2",
> + "AMIC3", "MIC BIAS3",
> + "AMIC4", "MIC BIAS3",
> + "AMIC5", "MIC BIAS4";
> +
> + wcd-playback-dai-link {
> + link-name = "WCD Playback";
> + cpu {
> + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
> + };
> +
> + codec {
> + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + wcd-playback-dai-link {
> + link-name = "WCD Playback";
> + cpu {
> + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
> + };
> +
> + codec {
> + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + wsa-dai-link {
> + link-name = "WSA Playback";
> + cpu {
> + sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
> + };
> +
> + codec {
> + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + va-dai-link {
> + link-name = "VA Capture";
> + cpu {
> + sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +};
> +
> +&swr0 {
> + right_spkr: speaker@0,1{
> + compatible = "sdw10217020200";
> + reg = <0 1>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_1_sd_n_active>;
> + powerdown-gpios = <&tlmm 1 GPIO_ACTIVE_LOW>;
> + #sound-dai-cells = <0>;
> + sound-name-prefix = "SpkrRight";
> + #thermal-sensor-cells = <0>;
> + vdd-supply = <&vreg_s10b_1p8>;
> + };
> +
> + left_spkr: speaker@0,2{
> + compatible = "sdw10217020200";
> + reg = <0 2>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&spkr_2_sd_n_active>;
> + powerdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
> + #sound-dai-cells = <0>;
> + sound-name-prefix = "SpkrLeft";
> + #thermal-sensor-cells = <0>;
> + vdd-supply = <&vreg_s10b_1p8>;
> + };
> +};
> +
> +&swr1 {
> + status = "okay";
> +
> + wcd_rx: codec@0,4 {
> + compatible = "sdw20217010d00";
> + reg = <0 4>;
> + qcom,rx-port-mapping = <1 2 3 4 5>;
> + };
> +};
> +
> +&swr2 {
> + status = "okay";
> +
> + wcd_tx: codec@0,3 {
> + compatible = "sdw20217010d00";
> + reg = <0 3>;
> + /* ports: adc1_2, adc3_4, dmic0_3_mbhc, dmic4_7 */
> + qcom,tx-port-mapping = <1 1 2 3>;
> + };
> +};
> +
> &ufs_mem_hc {
> status = "okay";
>
> @@ -461,3 +604,21 @@ &usb_1_qmpphy {
> vdda-phy-supply = <&vreg_l6b_1p2>;
> vdda-pll-supply = <&vreg_l1b_0p91>;
> };
> +
> +&tlmm {
> + spkr_1_sd_n_active: spkr-1-sd-n-active-state {
> + pins = "gpio1";
> + function = "gpio";
> + drive-strength = <4>;
> + bias-disable;
> + output-low;
> + };
> +
> + spkr_2_sd_n_active: spkr-2-sd-n-active-state {
> + pins = "gpio89";
> + function = "gpio";
> + drive-strength = <4>;
> + bias-disable;
> + output-low;
> + };
> +};
next prev parent reply other threads:[~2022-11-14 15:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 15:21 [PATCH 0/3] arm64: dts: qcom: sm8450-hdk: add sound support Krzysztof Kozlowski
2022-11-14 15:21 ` [PATCH 1/3] arm64: dts: qcom: sm8450: add GPR node Krzysztof Kozlowski
2022-11-14 15:21 ` [PATCH 2/3] arm64: dts: qcom: sm8450: add Soundwire and LPASS Krzysztof Kozlowski
2022-11-14 15:37 ` Konrad Dybcio
2022-11-15 10:15 ` Krzysztof Kozlowski
2022-11-15 10:19 ` Konrad Dybcio
2022-11-14 15:21 ` [PATCH 3/3] arm64: dts: qcom: sm8450-hdk: add sound support Krzysztof Kozlowski
2022-11-14 15:39 ` Konrad Dybcio [this message]
2022-11-15 10:16 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f52157c7-d198-9c26-089a-c5227a1c1f4f@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).