Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1027321ybv; Fri, 7 Feb 2020 13:00:09 -0800 (PST) X-Google-Smtp-Source: APXvYqypUxglqJOxoXBNwUSBk8EJogrbZeyzCstoo6O+IxMD1Bvk1ALO6MJxFg3QSwCr4FOxahW9 X-Received: by 2002:a05:6830:1498:: with SMTP id s24mr1062159otq.79.1581109209684; Fri, 07 Feb 2020 13:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581109209; cv=none; d=google.com; s=arc-20160816; b=J6XgGPsUcWnfHP4WCzYWEaZ4TXmFmFRp0t5VYQmDU6Nlww157UBjwOjH0RBz8aluG1 eiL+5oPRC/aBkHGxed1eWQ+v61v5l/TuWKnMqf0yTW4HC/CDnfX97TJ7fWKy9YiNqjMD iwUVWd7h7w44Eb+7kl7yCyKS3+xcBJIdwXiWxSf7QzvDpkdXKtafdjHMu0QAJIkR88rB UK5az6phZIARyZl9JFtWAl95h1Ol9mPPC69d2zDT4J3wchhWI0riADVLHGXoZjWVoEve 2hgW37urngcZb9jrnmJXU+2IoPEC1y9mZIOvQ3A8UAJazE/PioiCCgfvmLGGUGTUak+d xmqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=RK5IpRYsxcPRYlaYj86ZYdu7gWBdBOr0c1FyuH6bqVI=; b=a1iIGxITCVepuIC/JK/yQZ5WPWbsK//ITLw7Az/vmQeRxGbdVo2YiT8cTNa2fABgpr V8in+Ovh7g/kAPanjo66g5myCN/va6NL7yR+/gUCYXV37hLkbm7dbZ12Hk2yoPCTDvP/ iiD01BkRaebquO5oVDx8tcyOovgUmKjqOTx/dHreRmW72kUxrx/zIlDF8m8fl2NwsGNn 6wsE4xS6NG/q5t7lvj8WsTZqG8y7YbSoTq0sEsdLT5OzsLEBTmIpW04AS4YNA4Jq3Bmd rhrdayXTx/B4al6pMX4SICvNfxY0bTXaH0nQJXR7YYD2AbpRftbAxPzx4nXAD3zi6qCO SJaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b=pnJapL0n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13si296811otg.56.2020.02.07.12.59.56; Fri, 07 Feb 2020 13:00:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b=pnJapL0n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727602AbgBGU6v (ORCPT + 99 others); Fri, 7 Feb 2020 15:58:51 -0500 Received: from mail.serbinski.com ([162.218.126.2]:46990 "EHLO mail.serbinski.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727234AbgBGU6q (ORCPT ); Fri, 7 Feb 2020 15:58:46 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.serbinski.com (Postfix) with ESMTP id 4D8AAD0072F; Fri, 7 Feb 2020 20:50:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at serbinski.com Received: from mail.serbinski.com ([127.0.0.1]) by localhost (mail.serbinski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7OH4Fn6roD_i; Fri, 7 Feb 2020 15:50:48 -0500 (EST) Received: from anet (ipagstaticip-7ac5353e-e7de-3a0d-ff65-4540e9bc137f.sdsl.bell.ca [142.112.15.192]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serbinski.com (Postfix) with ESMTPSA id 80A6FD0071A; Fri, 7 Feb 2020 15:50:29 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.serbinski.com 80A6FD0071A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serbinski.com; s=default; t=1581108629; bh=RK5IpRYsxcPRYlaYj86ZYdu7gWBdBOr0c1FyuH6bqVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnJapL0nbYR4JbCUWxS4auCjvytY3NrnsR4Iki0y9nEhVNABk+YEE6wc6rcVLUJbg +xceFnUUFDGk1GiTaOqu0oZU8QyekmRzkylDkdTbok2sF/3ilTYaPiq2kX+fNgprca CictpRsbeW3YPswoPqXJ2pzFFSGQdpudmGnOjOxM= From: Adam Serbinski To: Mark Brown , Srini Kandagatla , Rob Herring , Bjorn Andersson Cc: Adam Serbinski , Andy Gross , Mark Rutland , Liam Girdwood , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] dts: msm8996/db820c: enable primary pcm and quaternary i2s Date: Fri, 7 Feb 2020 15:50:12 -0500 Message-Id: <20200207205013.12274-8-adam@serbinski.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200207205013.12274-1-adam@serbinski.com> References: <20200207205013.12274-1-adam@serbinski.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds support to primary pcm and quaternary i2s ports. Signed-off-by: Adam Serbinski CC: Andy Gross CC: Mark Rutland CC: Liam Girdwood CC: Patrick Lai CC: Banajit Goswami CC: Jaroslav Kysela CC: Takashi Iwai CC: alsa-devel@alsa-project.org CC: linux-arm-msm@vger.kernel.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org --- arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 113 +++++++++++++ arch/arm64/boot/dts/qcom/msm8996-pins.dtsi | 162 +++++++++++++++++++ 2 files changed, 275 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi index dba3488492f1..4149ac4147a0 100644 --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi @@ -683,8 +683,31 @@ }; }; +/* PRI I2S on QCA6174 and QUAT I2S on LS each uses 2 I2S SD Lines for audio */ +&q6afedai { + pi2s@16 { + reg = <16>; + qcom,sd-lines = <1>; + }; + pi2s@17 { + reg = <17>; + qcom,sd-lines = <0>; + }; + qi2s@22 { + reg = <22>; + qcom,sd-lines = <0>; + }; + qi2s@23 { + reg = <23>; + qcom,sd-lines = <1>; + }; +}; + &sound { compatible = "qcom,apq8096-sndcard"; + pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active &pri_mi2s_active &pri_mi2s_sd0_active &pri_mi2s_sd1_active>; + pinctrl-names = "default"; + model = "DB820c"; audio-routing = "RX_BIAS", "MCLK"; @@ -709,6 +732,41 @@ }; }; + mm4-dai-link { + link-name = "MultiMedia4"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>; + }; + }; + + mm5-dai-link { + link-name = "MultiMedia5"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>; + }; + }; + + mm6-dai-link { + link-name = "MultiMedia6"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>; + }; + }; + + mm7-dai-link { + link-name = "MultiMedia7"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA7>; + }; + }; + + mm8-dai-link { + link-name = "MultiMedia8"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA8>; + }; + }; + hdmi-dai-link { link-name = "HDMI"; cpu { @@ -753,4 +811,59 @@ sound-dai = <&wcd9335 1>; }; }; + + scoplay-dai-link { + link-name = "SCO-PCM-Playback"; + cpu { + sound-dai = <&q6afedai PRIMARY_PCM_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + }; + + scocap-dai-link { + link-name = "SCO-PCM-Capture"; + cpu { + sound-dai = <&q6afedai PRIMARY_PCM_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + }; + + mi2splay-dai-link { + link-name = "QUAT-MI2S-Playback"; + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + +// EXAMPLE: For adding real codecs +// codec { +// sound-dai = <&pcm5142_4c>, <&pcm5142_4d>; +// }; + + }; + + mi2scap-dai-link { + link-name = "QUAT-MI2S-Capture"; + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + +// EXAMPLE: For adding real codecs +// codec { +// sound-dai = <&pcm1865>; +// }; + }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi index ac1ede579361..e8221c4d05f7 100644 --- a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi @@ -288,6 +288,168 @@ }; }; + pri_mi2s_active: pri_mi2s_active { + mux { + pins = "gpio65", "gpio66"; + function = "pri_mi2s"; + }; + config { + pins = "gpio65", "gpio66"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + output-high; + }; + }; + + pri_mi2s_sleep: pri_mi2s_sleep { + mux { + pins = "gpio65", "gpio66"; + function = "gpio"; + }; + + config { + pins = "gpio65", "gpio66"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + pri_mi2s_sd0_sleep: pri_mi2s_sd0_sleep { + mux { + pins = "gpio67"; + function = "gpio"; + }; + + config { + pins = "gpio67"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + pri_mi2s_sd0_active: pri_mi2s_sd0_active { + mux { + pins = "gpio67"; + function = "pri_mi2s"; + }; + + config { + pins = "gpio67"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + }; + }; + + pri_mi2s_sd1_sleep: pri_mi2s_sd1_sleep { + mux { + pins = "gpio68"; + function = "gpio"; + }; + + config { + pins = "gpio68"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + pri_mi2s_sd1_active: pri_mi2s_sd1_active { + mux { + pins = "gpio68"; + function = "pri_mi2s"; + }; + + config { + pins = "gpio68"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + }; + }; + + quat_mi2s_active: quat_mi2s_active { + mux { + pins = "gpio58", "gpio59"; + function = "qua_mi2s"; + }; + config { + pins = "gpio58", "gpio59"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + output-high; + }; + }; + + quat_mi2s_sleep: quat_mi2s_sleep { + mux { + pins = "gpio58", "gpio59"; + function = "gpio"; + }; + + config { + pins = "gpio58", "gpio59"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + quat_mi2s_sd0_sleep: quat_mi2s_sd0_sleep { + mux { + pins = "gpio60"; + function = "gpio"; + }; + + config { + pins = "gpio60"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + quat_mi2s_sd0_active: quat_mi2s_sd0_active { + mux { + pins = "gpio60"; + function = "qua_mi2s"; + }; + + config { + pins = "gpio60"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + }; + }; + + quat_mi2s_sd1_sleep: quat_mi2s_sd1_sleep { + mux { + pins = "gpio61"; + function = "gpio"; + }; + + config { + pins = "gpio61"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + input-enable; + }; + }; + + quat_mi2s_sd1_active: quat_mi2s_sd1_active { + mux { + pins = "gpio61"; + function = "qua_mi2s"; + }; + + config { + pins = "gpio61"; + drive-strength = <8>; /* 8 mA */ + bias-disable; /* NO PULL */ + }; + }; + sdc2_clk_on: sdc2_clk_on { config { pins = "sdc2_clk"; -- 2.21.1