From patchwork Wed Oct 6 16:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 12539793 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AED7AC433F5 for ; Wed, 6 Oct 2021 16:47:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97D676113E for ; Wed, 6 Oct 2021 16:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229548AbhJFQtM (ORCPT ); Wed, 6 Oct 2021 12:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbhJFQtL (ORCPT ); Wed, 6 Oct 2021 12:49:11 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF5AC061753 for ; Wed, 6 Oct 2021 09:47:19 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id m22so10829700wrb.0 for ; Wed, 06 Oct 2021 09:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Su+mMhgdtQyUzMfFC/RU+YIiNnpBILw1YMYPYhSpL7k=; b=OhCP2qS3X4FkzAMQNjhZ3dozKq9ovyQR0HSWcIaV6c1L7aSf+dIv0SpM7q6mBQ7KmP nC2WBqD0u/nErPwz6eQwqx2ItLPYsua0puB1nJT/bRB8VUrn3ORA/dQtKlkjSOv6J6e6 eYzhE+aBFURjEBM8YvJ4fbUX6HpPfxUfU8fhS+2Y6nj8ZCnS5LUtFT59cuMNpYONneNJ Eqe/pzluTs0x3RNa0Emtp6qO5TLfhyxHvc7PpMkvEyBbRqt8kqp33yQt8EsEYA58vB9Z 6LqbY+2JMRouVSBSb0fctybWAw4AO3NEGpXM7wjBVVwyB7VOHda/KsQgsjQJmXXkFcvz RCWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Su+mMhgdtQyUzMfFC/RU+YIiNnpBILw1YMYPYhSpL7k=; b=2s27Hcuw0AqpLxjOj6BcprDtGoN0uPPlD4xqhAwMBAbW/7+yshVq2DIA/O9cEmpWls q4Hek4a9bWk1A9xUBu1MPBPQpoMzxxL7ph40SkNKYsuxAdk6V841mEQ156EQhJ5uuLwL JEN3CSL86+Zh/FNBBd0xf9XJhnz0qwPGwl5VZWtvqe9CXZkhCNbsIEB91SSVq3NpjAyG SqWq29gh1IF3t+CjXfJEDbIkxPTd/twGbLviWSvGZdlHx209cJiWVetL5k2r/Cb+vl61 gJ4hFevCAxZPwpf+3a5fqp6No4kEIQha07xNRdv80nLkeaZLPCMf4DtZ7RucsQ0/kodx VHuA== X-Gm-Message-State: AOAM533aJXCY3Xjmzc9LssiW+JK5FDPci+Wg2XKS2tTw9OI3Y1niIXlb TTK0zgrT/bM5mtDFrHwSvxxE/A== X-Google-Smtp-Source: ABdhPJxD0jCUad9aP9ROiOCECoHpgWPCimR41iu7jGDQVb38D/EVi7M/XwSY7FczQ5MNydkFehlgXA== X-Received: by 2002:adf:ba0d:: with SMTP id o13mr11922632wrg.339.1633538837488; Wed, 06 Oct 2021 09:47:17 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id l21sm6785165wmg.18.2021.10.06.09.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:47:17 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/4] arm64: dts: qcom: sm8250: Add nodes for tx and rx macros with soundwire masters Date: Wed, 6 Oct 2021 17:47:09 +0100 Message-Id: <20211006164712.16078-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> References: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM8250 has TX and RX macros with SoundWire Controllers to attach with codecs like WCD938x. Add these nodes for sm8250 mtp audio use case. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 157 +++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 8c15d9fed08f..356b530f067b 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -1839,6 +1839,101 @@ #sound-dai-cells = <1>; }; + rxmacro: rxmacro@3200000 { + pinctrl-names = "default"; + pinctrl-0 = <&rx_swr_active>; + compatible = "qcom,sm8250-lpass-rx-macro"; + reg = <0 0x3200000 0 0x1000>; + + clocks = <&q6afecc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + #clock-cells = <0>; + clock-frequency = <9600000>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + swr1: soundwire-controller@3210000 { + reg = <0 0x3210000 0 0x2000>; + compatible = "qcom,soundwire-v1.5.1"; + interrupts = ; + clocks = <&rxmacro>; + clock-names = "iface"; + label = "RX"; + qcom,din-ports = <0>; + qcom,dout-ports = <5>; + + qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>; + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>; + qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>; + + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + txmacro: txmacro@3220000 { + pinctrl-names = "default"; + pinctrl-0 = <&tx_swr_active>; + compatible = "qcom,sm8250-lpass-tx-macro"; + reg = <0 0x3220000 0 0x1000>; + + clocks = <&q6afecc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + #clock-cells = <0>; + clock-frequency = <9600000>; + clock-output-names = "mclk"; + #address-cells = <2>; + #size-cells = <2>; + #sound-dai-cells = <1>; + }; + + /* tx macro */ + swr2: soundwire-controller@3230000 { + reg = <0 0x3230000 0 0x2000>; + compatible = "qcom,soundwire-v1.5.1"; + interrupts-extended = <&intc GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "core"; + + clocks = <&txmacro>; + clock-names = "iface"; + label = "TX"; + + qcom,din-ports = <5>; + qcom,dout-ports = <0>; + qcom,ports-sinterval-low = /bits/ 8 <0xFF 0x01 0x01 0x03 0x03>; + qcom,ports-offset1 = /bits/ 8 <0xFF 0x01 0x00 0x02 0x00>; + qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x00 0x00 0x00>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0xFF 0x00 0x01 0x00 0x01>; + qcom,port-offset = <1>; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + aoncc: clock-controller@3380000 { compatible = "qcom,sm8250-lpass-aoncc"; reg = <0 0x03380000 0 0x40000>; @@ -1931,6 +2026,68 @@ input-enable; }; }; + + rx_swr_active: rx_swr-active-pins { + clk { + pins = "gpio3"; + function = "swr_rx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio4", "gpio5"; + function = "swr_rx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + tx_swr_active: tx_swr-active-pins { + clk { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio1", "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + tx_swr_sleep: tx_swr-sleep-pins { + clk { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + input-enable; + bias-pull-down; + }; + + data1 { + pins = "gpio1"; + function = "swr_tx_data"; + drive-strength = <2>; + input-enable; + bias-bus-hold; + }; + + data2 { + pins = "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + input-enable; + bias-pull-down; + }; + }; }; gpu: gpu@3d00000 { From patchwork Wed Oct 6 16:47:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 12539795 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F509C433EF for ; Wed, 6 Oct 2021 16:47:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 238ED61183 for ; Wed, 6 Oct 2021 16:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231987AbhJFQtR (ORCPT ); Wed, 6 Oct 2021 12:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232324AbhJFQtO (ORCPT ); Wed, 6 Oct 2021 12:49:14 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD789C061762 for ; Wed, 6 Oct 2021 09:47:21 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id m22so10830044wrb.0 for ; Wed, 06 Oct 2021 09:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4MC6Dq3hSSrrCvIGYmhIEb5gmex0dtBKq/NthmbPj00=; b=YIPYXwsfzvwCnGktsZKn0WsNYGO+vKiunpVgV3e4LAYiULOdlPBC5Cyd5Pu4ia58EE rQpNj5w7cLG+rnbfn2bGVMLW2b6iXHB5IGkvglAnmxawYzTQ8yn5rdhEovDS0LezzZSW bwwf+gONq36heHbePGrUkqjG74ztKE0GWgApBTY2hAW39QLrxUt404+WqUwFbbT22ZJu KV5sDP3GcXeag3kL8r4rqtMZowGONORJFfOZ3Qg8N+p3ZtRSiTkAy1p29BMOReYQSMNW tqJdZX2VFoQ+T9XZnFGf0SInQBKsocyYrLlmy7XecpetywhW2b+yvOuh41d9F8IujKyW +Vlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4MC6Dq3hSSrrCvIGYmhIEb5gmex0dtBKq/NthmbPj00=; b=qKgZkGqUguT+uyNSTKyTkK1xgfZlR8ee5IvrQw+IgUPumBmtdYk2NEbq9sDFWqFBDF lGDBnqzOazIpW7ICoVV7oxOR+caAnMSeycZTRnzKnRu+vb3HMSR8Pmsf8qpPm4x2wz+y qoPPXb76ANu6b0C9kLkqUIdKS0SEXz7YPYBB6861Hg1wrVH8vPRG1kAEcpPGKVSWbZjS IJJXrLjDhV+PSdiFchwGO85K88Efx6nJNEXDAQe4VCeY4nux2aQaCBUgKoGUrTDhg0eZ JO4pqq5OK1Ge8pHH+YlNzwsggNsxYKJeqgC4e11wnx3KVZCPNOMl2vWjMDH2fBHXeLtd 7AoQ== X-Gm-Message-State: AOAM5333IdUgLvf49D6g+46g0xTjwfqB8I536wVT2HcP83tlAHvAgwv7 9R4wW75wRBFmkW3HP+9qV+Brzg== X-Google-Smtp-Source: ABdhPJw7/aVm7zhD+H6BJbaS0fP0cQxHUQY0IPeUW/Bsx/i+wsO0cJgz0DNZFkm4tI2R5iOZ847xvg== X-Received: by 2002:a5d:670e:: with SMTP id o14mr8431282wru.417.1633538838477; Wed, 06 Oct 2021 09:47:18 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id l21sm6785165wmg.18.2021.10.06.09.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:47:18 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/4] arm64: dts: qcom: sm8250-mtp: Add wcd9380 audio codec node Date: Wed, 6 Oct 2021 17:47:10 +0100 Message-Id: <20211006164712.16078-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> References: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM8250-MTP has WCD9380 codec for headset playback and capture via rx and tx macro respectively. Add node for this device to be able to use it for sound card device. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index 062b944be91d..9f6cc2fff39b 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -6,6 +6,9 @@ /dts-v1/; #include +#include +#include +#include #include "sm8250.dtsi" #include "pm8150.dtsi" #include "pm8150b.dtsi" @@ -624,8 +627,72 @@ firmware-name = "qcom/sm8250/slpi.mbn"; }; +&soc { + wcd938x: codec { + compatible = "qcom,wcd9380-codec"; + #sound-dai-cells = <1>; + reset-gpios = <&tlmm 32 0>; + vdd-buck-supply = <&vreg_s4a_1p8>; + vdd-rxtx-supply = <&vreg_s4a_1p8>; + vdd-io-supply = <&vreg_s4a_1p8>; + vdd-mic-bias-supply = <&vreg_bob>; + 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>; + }; +}; + +&swr1 { + wcd_rx: wcd9380-rx@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5>; + }; +}; + +&swr2 { + wcd_tx: wcd9380-tx@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,tx-port-mapping = <2 3 4 5>; + }; +}; + &tlmm { gpio-reserved-ranges = <28 4>, <40 4>; + + wcd938x_reset_default: wcd938x_reset_default { + mux { + pins = "gpio32"; + function = "gpio"; + }; + + config { + pins = "gpio32"; + drive-strength = <16>; + output-high; + }; + }; + + wcd938x_reset_sleep: wcd938x_reset_sleep { + mux { + pins = "gpio32"; + function = "gpio"; + }; + + config { + pins = "gpio32"; + drive-strength = <16>; + bias-disable; + output-low; + }; + }; }; &uart12 { From patchwork Wed Oct 6 16:47:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 12539827 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AA24C433FE for ; Wed, 6 Oct 2021 16:49:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4713C61186 for ; Wed, 6 Oct 2021 16:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbhJFQvJ (ORCPT ); Wed, 6 Oct 2021 12:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238245AbhJFQtP (ORCPT ); Wed, 6 Oct 2021 12:49:15 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D445C061753 for ; Wed, 6 Oct 2021 09:47:22 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id r18so10751739wrg.6 for ; Wed, 06 Oct 2021 09:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LKWPbxLo6mAAF4ujncUu3mf+YPEjPv0VvIo6LHi52tk=; b=b0cFkEOTbeIZOXNHB19twXRj6Uy6BxxE8D8nV4mXZNqf/Wd+KUJe3aoc6uBBXMBgEa Iso74BsMoYynmpwCliKFodKy8w2/eoknnGdgQf0WIUa3MUB25+vIgEjDbaxW41O0dOKE JHY/IzmXd5s2Q4IidHRF3UsNJoVA5aB504GYJMXhigYh62UpGXsHqZOLjv7evvig09DU 6A08RJbNS5z/XkyKF3SGBH+rhq8Ctv2EL7n00AJvKYENMiffvDNc5eWpAabZX7tUVcpa PiyeM+nFdkyTayGwLqVrzz6vDe1bghb5r7PcWWNpztjdKL4hNF5xhH3hPbpncmdvsdEk ojcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LKWPbxLo6mAAF4ujncUu3mf+YPEjPv0VvIo6LHi52tk=; b=XRTr9p8IP+2pBT8MCLNWNh325V+X6NPkPE96iIPN6hT62gE5QZsiIQprI4S5oCcb/5 0BuBI7gUTdUu2GOEDFg2JUAz51v9D0mjxEc0LHitc9zUB2HZf4G29oSCU6xEV0kRNy0N tQS9fkusoJcgsiXqwQP2loRo1DChITBPbb8bix18dGBgYTzLc9kNniykMKON6XDKG+ns u666YO/LGr2G1FNvKmFS47JB42K18PUpxreWncGHgTTntiea/8uzc3qCf+QkexEczm1m s3yWBarXYmO0TEXu7K7RXJOB38AUDE63ApzXriUwaIAUG7IbKV5u8XcGbV414ljkU6yg N2fw== X-Gm-Message-State: AOAM533YzHqShgOjK2x7DeABxcPHGExzRa0i9+X0BfLA1S1Qb3zG3zEM q3Zw+Ojzp4thG5tqGbAt2IxQgQ== X-Google-Smtp-Source: ABdhPJwGToLVuGBE9PY+PQTmWcG8RKCHuCuEcbfobRrJm2SCV9pqxUqu5yvmSPbYT3UGSfhBSNMJow== X-Received: by 2002:adf:f946:: with SMTP id q6mr29798036wrr.437.1633538840952; Wed, 06 Oct 2021 09:47:20 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id l21sm6785165wmg.18.2021.10.06.09.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:47:20 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 3/4] arm64: dts: qcom: sm8250-mtp: Add wsa8810 audio codec node Date: Wed, 6 Oct 2021 17:47:11 +0100 Message-Id: <20211006164712.16078-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> References: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM8250-MTP has WSA8810 via wsa macro for Speaker playback use case. Add node for this device to be able to use it for sound card device. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index 9f6cc2fff39b..9b27053ca3af 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -648,6 +648,26 @@ }; }; +&swr0 { + left_spkr: wsa8810-right@0,3{ + compatible = "sdw10217211000"; + reg = <0 3>; + powerdown-gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrLeft"; + #sound-dai-cells = <0>; + }; + + right_spkr: wsa8810-left@0,4{ + compatible = "sdw10217211000"; + reg = <0 4>; + powerdown-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrRight"; + #sound-dai-cells = <0>; + }; +}; + &swr1 { wcd_rx: wcd9380-rx@0,4 { compatible = "sdw20217010d00"; From patchwork Wed Oct 6 16:47:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 12539829 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7835CC4332F for ; Wed, 6 Oct 2021 16:49:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6144B6113A for ; Wed, 6 Oct 2021 16:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232082AbhJFQvJ (ORCPT ); Wed, 6 Oct 2021 12:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235305AbhJFQtP (ORCPT ); Wed, 6 Oct 2021 12:49:15 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA49C061755 for ; Wed, 6 Oct 2021 09:47:23 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id o20so10711326wro.3 for ; Wed, 06 Oct 2021 09:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ouCcvRhvwfDjDdqR2Ag/OHVwx6Zmnh+mSBZ9TgkL1Gw=; b=pz4OtzCzz13mMNwHvEydOd2llMX0EY3kvJvOhhTgZERSPZsaIlDcx+SC5eO2rCrA0a rKuw0mlXHMEAcPbv/zlu5Zi9EmoQg9s3alk7qflr+bysbthM6tPWZfDq3YqUezmv8urx ROIxXtw+Zn+rrlqLv86ohQkU5qn5Cb8JWnHL9jguUlniesxRV185tQS+LLoN//fIHTK6 Siq6niuuVnBmW7Hk7pufhXJoY+IZ1gSgDVQ3AMFRcjqUzzwYpsw6BYGekVldFTRlDxJb 8cBgk3f6vv5NXOu5D6dioGldSVs0WYwDEG7SFVoWojxuC+Co7Tdn+B2H0PRtuLrt7L25 GlWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ouCcvRhvwfDjDdqR2Ag/OHVwx6Zmnh+mSBZ9TgkL1Gw=; b=t1ZslyoKezhqH1dRoUNz7CXendVyj2rKdtwsW194TD9FGVhewJgEjmIWXbLJ086TVZ MRXgNwaUVdvLv7T3LNrWHdEcmz66bc6vRp0Q6NT7S0X4vPdOSrw8c5RCk/JaK97DOMaq VLSh+T4EXvUNzf3JtDPuZpJ9njD01GTkKXdkTxH7YXJdR0ITRO962eH9b+NNQODVpkf9 cU6TjpsBO7RaEHppHgHyiNE/nt5rY3onB9qEhfK6v+yu/T7JZ6PFxiawHVpVo7rb5G/D B8LP4mqMQ6FedCul1Aqi9g7Fbl2mgwrZqwS01YkZgD4qCWN9Ng+GjfL12Dbda+LC/+0n STuA== X-Gm-Message-State: AOAM5322d96Iz6NtkVxkzwqCuyD+RTpvT8W5GsTj9S8XFbhoUGi1JUxr uT+HV1kVn4Vf1gR9GjDb0+QDXQ== X-Google-Smtp-Source: ABdhPJyG2f83tI2dMUPlm2nJR68nYh8Tx8aj634/MqcyODxjz+7j0FsHzjYmc4VsCxif9SZ1oxdowg== X-Received: by 2002:a05:6000:188d:: with SMTP id a13mr25071311wri.243.1633538842094; Wed, 06 Oct 2021 09:47:22 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id l21sm6785165wmg.18.2021.10.06.09.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:47:21 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 4/4] arm64: dts: qcom: sm8250-mtp: add sound card support Date: Wed, 6 Oct 2021 17:47:12 +0100 Message-Id: <20211006164712.16078-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> References: <20211006164712.16078-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This patch adds sound card support for MTP using WCD938x headset playback, capture, WSA8810 Speaker Playback and DMICs via VA macro. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 104 ++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index 9b27053ca3af..1df64a744607 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -648,6 +648,110 @@ }; }; +&sound { + compatible = "qcom,sm8250-sndcard"; + model = "SM8250-MTP-WCD9380-WSA8810-VA-DMIC"; + 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", + "TX SWR_ADC0", "ADC1_OUTPUT", + "TX SWR_ADC1", "ADC2_OUTPUT", + "TX SWR_ADC2", "ADC3_OUTPUT", + "TX SWR_ADC3", "ADC4_OUTPUT", + "TX SWR_DMIC0", "DMIC1_OUTPUT", + "TX SWR_DMIC1", "DMIC2_OUTPUT", + "TX SWR_DMIC2", "DMIC3_OUTPUT", + "TX SWR_DMIC3", "DMIC4_OUTPUT", + "TX SWR_DMIC4", "DMIC5_OUTPUT", + "TX SWR_DMIC5", "DMIC6_OUTPUT", + "TX SWR_DMIC6", "DMIC7_OUTPUT", + "TX SWR_DMIC7", "DMIC8_OUTPUT"; + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + mm2-dai-link { + link-name = "MultiMedia2"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; + }; + }; + + mm3-dai-link { + link-name = "MultiMedia3"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + wcd-playback-dai-link { + link-name = "WCD Playback"; + cpu { + sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>; + }; + codec { + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>; + }; + platform { + sound-dai = <&q6routing>; + }; + }; + + wcd-capture-dai-link { + link-name = "WCD Capture"; + cpu { + sound-dai = <&q6afedai TX_CODEC_DMA_TX_3>; + }; + + codec { + sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>; + }; + platform { + sound-dai = <&q6routing>; + }; + }; + + wsa-dai-link { + link-name = "WSA Playback"; + cpu { + sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>; + }; + platform { + sound-dai = <&q6routing>; + }; + }; + + va-dai-link { + link-name = "VA Capture"; + cpu { + sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&vamacro 0>; + }; + }; +}; + &swr0 { left_spkr: wsa8810-right@0,3{ compatible = "sdw10217211000";