From patchwork Thu Mar 5 14:53:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 203782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15C02C3F2D8 for ; Thu, 5 Mar 2020 14:54:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEC2F208CD for ; Thu, 5 Mar 2020 14:54:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EMkNsNXw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727060AbgCEOx5 (ORCPT ); Thu, 5 Mar 2020 09:53:57 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35291 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgCEOx5 (ORCPT ); Thu, 5 Mar 2020 09:53:57 -0500 Received: by mail-wr1-f68.google.com with SMTP id r7so7406931wro.2 for ; Thu, 05 Mar 2020 06:53:56 -0800 (PST) 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=OmaQCGR2d/jCJOEqDz74ElNR+xHpYD15I1t0df1LVBM=; b=EMkNsNXwSLFK43B5vW8RP9Rz0sCrutRS7eF7B06ftRC4uJWvKCaBQA5orswU9UdcBH KxAaJ9nfxztkzzW7qqZ5jHMXo1rqyf7+wf1CAKIVtjTSzrZM67LBmkj82dmwhgMNhZol EhtPnvgU1FnokVczuAFUcarHCI+dGqOqPF9dKT4L4oQ1gVDnLLjQjr1zWblw4usYNyWS jAPJBXlTpiZa3GdrutFMvirbz3BHciU9gPp2JrXYxlHzpYJnNMCiyrZXLLW51U4QM6XC wbxRAP3nWFBGyRXDWiN0Ufu7lWIsmvJ3QKHq8mELB+ahig3SmwjXuIFTqnW3ZMPHW85a wAng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OmaQCGR2d/jCJOEqDz74ElNR+xHpYD15I1t0df1LVBM=; b=E5+q4LTlaokMZ9j+1rn8nIKxKWzP/wZgu26vlbjTMHvk70ThJk5s6TS3J49PdPSZOS 4bTjK9KtwKzV1SDkwbB+upohEqFpDObgy1uZhDhKGxgADOpr+zNVs5h4KvStxp86F1MF mj+kmoPD5O32eTui9M/hY9xvMYFb+fkCBwkHnaEIPAapZNs+jbwBFfUfWS5VfddXoFh0 uSED+Z2Tq2ETugmj+9GgnSEcEqJokdqWiuxFm1gsc0XuU3+DnZHqHOBcT5aKkkBfto3D XKO7LRLyl6T+qmZokSSs8l07bgRIoeWwofrVfIBr/VT0OchmMK4iraxC8OYS7cPpOJIY BIkg== X-Gm-Message-State: ANhLgQ3rUoOSvD1qXB4sGPR2/mKuE14nNJ+dkW9hxXDCfNxg1WFZqQKM xrAHREO7xqgdnABYbXMAUrIG9A== X-Google-Smtp-Source: ADFU+vtZRDF5yv7ApxoautiIG6WRRPe+gCKcRkTSjflHb6UO4PHJzUZb+PFpIFuRjTSjC0Rbnd+tmg== X-Received: by 2002:a05:6000:ca:: with SMTP id q10mr10452080wrx.78.1583420035477; Thu, 05 Mar 2020 06:53:55 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id f16sm35785985wrx.25.2020.03.05.06.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 06:53:54 -0800 (PST) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org, agross@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 3/4] arm64: dts: qcom: db845c: add analog audio support Date: Thu, 5 Mar 2020 14:53:43 +0000 Message-Id: <20200305145344.14670-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200305145344.14670-1-srinivas.kandagatla@linaro.org> References: <20200305145344.14670-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds support to Analog audio via WSA881x speakers. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index 6e60e81f8db7..350d3ea60235 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include "sdm845.dtsi" #include "pm8998.dtsi" #include "pmi8998.dtsi" @@ -200,6 +202,41 @@ firmware-name = "qcom/sdm845/adsp.mdt"; }; + +&slim_msm { + ngd@1 { + wcd9340: codec@1{ + clock-names = "extclk"; + clocks = <&rpmhcc RPMH_LN_BB_CLK2>; + vdd-buck-supply = <&vreg_s4a_1p8>; + vdd-buck-sido-supply = <&vreg_s4a_1p8>; + vdd-tx-supply = <&vreg_s4a_1p8>; + vdd-rx-supply = <&vreg_s4a_1p8>; + vdd-io-supply = <&vreg_s4a_1p8>; + + swm: swm@c85 { + left_spkr:wsa8810-left{ + compatible = "sdw10217201000"; + reg = <0 1>; + powerdown-gpios = <&wcdpinctrl 2 0>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrLeft"; + #sound-dai-cells = <0>; + }; + + right_spkr:wsa8810-right{ + compatible = "sdw10217201000"; + powerdown-gpios = <&wcdpinctrl 2 0>; + reg = <0 2>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrRight"; + #sound-dai-cells = <0>; + }; + }; + }; + }; +}; + &apps_rsc { pm8998-rpmh-regulators { compatible = "qcom,pm8998-rpmh-regulators"; @@ -674,3 +711,79 @@ bias-pull-up; }; }; + +/* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */ +&q6afedai { + qi2s@22 { + reg = <22>; + qcom,sd-lines = <0 1 2 3>; + }; +}; + +&sound { + compatible = "qcom,db845c-sndcard"; + pinctrl-0 = <&quat_mi2s_active + &quat_mi2s_sd0_active + &quat_mi2s_sd1_active + &quat_mi2s_sd2_active + &quat_mi2s_sd3_active>; + pinctrl-names = "default"; + model = "DB845c"; + audio-routing = + "RX_BIAS", "MCLK", + "AMIC1", "MIC BIAS1", + "AMIC2", "MIC BIAS2", + "DMIC0", "MIC BIAS1", + "DMIC1", "MIC BIAS1", + "DMIC2", "MIC BIAS3", + "DMIC3", "MIC BIAS3", + "SpkrLeft IN", "SPK1 OUT", + "SpkrRight IN", "SPK2 OUT", + "MM_DL1", "MultiMedia1 Playback", + "MM_DL2", "MultiMedia2 Playback", + "MultiMedia3 Capture", "MM_UL3"; + + 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>; + }; + }; + + slim-dai-link { + link-name = "SLIM Playback"; + cpu { + sound-dai = <&q6afedai SLIMBUS_0_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>; + }; + }; + + slimcap-dai-link { + link-name = "SLIM Capture"; + cpu { + sound-dai = <&q6afedai SLIMBUS_0_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 1>; + }; + }; +};