From patchwork Wed Dec 2 18:07:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 336086 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 88ECFC83013 for ; Wed, 2 Dec 2020 18:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 524B12227F for ; Wed, 2 Dec 2020 18:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389342AbgLBSKB (ORCPT ); Wed, 2 Dec 2020 13:10:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389249AbgLBSKB (ORCPT ); Wed, 2 Dec 2020 13:10:01 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8886C061A56 for ; Wed, 2 Dec 2020 10:08:00 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id p8so5051375wrx.5 for ; Wed, 02 Dec 2020 10:08:00 -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=KNwBh5Oi//J2Be7LIJjV0b/+HNUbYnjVRXKUnYFcgws=; b=M23B4Idvf4R9I2mTXqkuRiffExFxPJzSnsO0ztMVTMwuIgumwn6JLkI9Bz6PRa6e86 QSyVdAOME43qSqmlEl3PQ7LQrbz1h/fJujoTvAWCdYgRE/lpcg+7Z6eJ7WipseTZy0Bd gnNiD33grSx6CG2XxpKH12aLwE/bmjXCTimXwc4mlHgwflfpHoN29NdoAyaCO3T6gCtS nCRpncL6fnO3PAvFZhLJS9KEnPmzaOIkjeJ/oFUe1DKWXDjkj6Uoe7dbVtlWmsA/1Et2 FwRFzfF+A5lnLQGyjD4NAD31GCPrNdSOApShhCcZIVy82v2FOzJbBUsy6L74KbQlh0t2 PJEQ== 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=KNwBh5Oi//J2Be7LIJjV0b/+HNUbYnjVRXKUnYFcgws=; b=JMFy4pjIn4IsJC7Xo3Lpghvm59ZLmbnpI3Nm/7xeaDEsOV6M7PzzDxAs/ZQFMdEMNF j2Y88CH+BtlZH+Y/Yf3Uu0jA4crrbqKBD0XSyvs9KqnuzMJuoYLoRTmc9VS2j1sqS/M7 kIkfIFn5nBExNkxTHcyTYDGr3pc6tixkyZjIuCK/7d1MFuANAe4guGIOwJMWEifgzSef b4rpfwd8r3mOtVzjRQ9GbMFP/uHDzQa0lI20EQ82DsUH9wrL+gUdDPoKcYIN8BcIQMPr XoWlpv+/wMpw/q0/4B2kEgLBcrsrEE6p6l3ZhR6uK6WwWN0OlayDfV5kRrl1ChudurPI fCZQ== X-Gm-Message-State: AOAM5307W4oNHQVF+YJoO4KUZtq0ycy2pm7EJdf394lcplzRuR51R3eU W5vpBFeQxp7Pt9/Z4uHKJxishQ== X-Google-Smtp-Source: ABdhPJxW7ACqll1VfNJl6wS8dgps8ICPjpYYUy8BXaGNxAPi73N8yjZTjHdceTIKtiO8Jt+l8pBAUQ== X-Received: by 2002:adf:916e:: with SMTP id j101mr4842869wrj.55.1606932479522; Wed, 02 Dec 2020 10:07:59 -0800 (PST) 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 a18sm3004404wrr.20.2020.12.02.10.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 10:07:58 -0800 (PST) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, agross@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla , Dmitry Baryshkov Subject: [PATCH v2 6/6] arm64: dts: qcom: qrb5165-rb5: Add Audio support Date: Wed, 2 Dec 2020 18:07:41 +0000 Message-Id: <20201202180741.16386-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20201202180741.16386-1-srinivas.kandagatla@linaro.org> References: <20201202180741.16386-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch add support for two WSA881X smart speakers attached via Soundwire and a DMIC0 on the main board. Signed-off-by: Srinivas Kandagatla Tested-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 121 +++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 3 + 2 files changed, 124 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index ce22d4fa383e..475542afecea 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -7,6 +7,8 @@ #include #include +#include +#include #include "sm8250.dtsi" #include "pm8150.dtsi" #include "pm8150b.dtsi" @@ -120,6 +122,11 @@ }; }; +&adsp { + status = "okay"; + firmware-name = "qcom/sm8250/adsp.mbn"; +}; + &apps_rsc { pm8009-rpmh-regulators { compatible = "qcom,pm8009-rpmh-regulators"; @@ -483,6 +490,35 @@ status = "okay"; }; +&q6afedai { + qi2s@16 { + reg = <16>; + qcom,sd-lines = <0 1 2 3>; + }; +}; + +/* TERT I2S Uses 1 I2S SD Lines for audio on LT9611 HDMI Bridge */ +&q6afedai { + qi2s@20 { + reg = <20>; + qcom,sd-lines = <0>; + }; +}; + +&q6asmdai { + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + }; + + dai@2 { + reg = <2>; + }; +}; + &sdhc_2 { status = "okay"; pinctrl-names = "default"; @@ -497,6 +533,84 @@ no-emmc; }; +&swr0 { + left_spkr: wsa8810-left{ + compatible = "sdw10217211000"; + reg = <0 3>; + powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrLeft"; + #sound-dai-cells = <0>; + }; + + right_spkr: wsa8810-right{ + compatible = "sdw10217211000"; + reg = <0 4>; + powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrRight"; + #sound-dai-cells = <0>; + }; +}; + +&sound { + compatible = "qcom,qrb5165-rb5-sndcard"; + pinctrl-0 = <&tert_mi2s_active>; + pinctrl-names = "default"; + model = "Qualcomm-RB5-WSA8815-Speakers-DMIC0"; + audio-routing = + "SpkrLeft IN", "WSA_SPK1 OUT", + "SpkrRight IN", "WSA_SPK2 OUT", + "VA DMIC0", "vdd-micb", + "VA DMIC1", "vdd-micb", + "MM_DL1", "MultiMedia1 Playback", + "MultiMedia3 Capture", "MM_UL3"; + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + mm3-dai-link { + link-name = "MultiMedia3"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + dma-dai-link { + link-name = "WSA Playback"; + cpu { + sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>; + }; + }; + + 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>; + }; + }; +}; + /* CAN */ &spi0 { status = "okay"; @@ -792,3 +906,10 @@ vdda-phy-supply = <&vreg_l9a_1p2>; vdda-pll-supply = <&vreg_l18a_0p92>; }; + +&vamacro { + pinctrl-0 = <&dmic01_active>; + pinctrl-names = "default"; + vdd-micb-supply = <&vreg_s4a_1p8>; + qcom,dmic-sample-rate = <600000>; +}; diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 51cffdae631c..336a4efab0b4 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -1561,6 +1561,9 @@ }; }; + sound: sound { + }; + usb_1_hsphy: phy@88e3000 { compatible = "qcom,sm8250-usb-hs-phy", "qcom,usb-snps-hs-7nm-phy";