From patchwork Thu Jan 19 12:27:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivasa Rao Mandadapu X-Patchwork-Id: 45727 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp298685wrn; Thu, 19 Jan 2023 04:30:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXsMoEBfjE6ln3ltLGHE/7G2x4Q5qsjimzY4XQnZWfbaCU627FB2RhlEUjUNjo9XFX7BSlrq X-Received: by 2002:a17:90b:2681:b0:229:8aeb:b258 with SMTP id pl1-20020a17090b268100b002298aebb258mr10615279pjb.39.1674131449833; Thu, 19 Jan 2023 04:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674131449; cv=none; d=google.com; s=arc-20160816; b=vDmzMi6Amh1S1c6LQk7MGAfkPi0WwQ66nomPhS5oxUsz8frR9d5vbEDgpNQJwWbuh2 tqqGAVkGfUB+8lC5khindH3iYGWzQt0Hm3lWgTJtUD9DZxdexvNlk5kyBVL+HipXb0kR YVygK4sAACpRbnltx6FTKi/Ih2hKti/jjdmRaxgww1EyseTwEEFSd8WTlxoKQz7tKY8j mpN3fMFY7glA5zgy/2T3cU0Og906LKFeRr7gk9gIx/KKi/8iqXE+ccNhWfRf+bjRa5Wg fx7Y4hy+pirMdpIpIoC+49BHWIQ0z8VUBeLDDsFMAW2jLSYA48EVoA9aXipqhgBZmRXG M/tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AptEpdq4hDR7KLA1E5UXJ2oe3KpGWibCmDOztEgsGpY=; b=AgiylB5olDEH06s9pX+N8lhA1ViMJQWayFURihA7GD+YoVENSbhFp40vASghk9ff3w i1Z1L104EXK/9fUrkj8CCw8trUvcaQVz+I9lHtIATvRuAdTPCFCdSxNPDMBTrW6PkwIx N3DDxrbwnYxtsJLix7OJMEGt7Q5tfoXVusMcYvldv5mpLZ75An9qdcRHVnS3eGO5VgxO LnDbwMD3Pq4Gc8fPIU8oJ50bmAMgBkb0UdZVAtsYZdGuUtqo67w9Ba5tKwVtZvo5pt7r z24MBhSDLFaVKGT4nCEC7BXW+SPOBdaFcF6DyM6JemdgsMf8Bc2DSUzJVfr7/uIsrTCH gRdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OBWNfh91; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo10-20020a17090b1c8a00b00229c1a4a338si5291952pjb.106.2023.01.19.04.30.37; Thu, 19 Jan 2023 04:30:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OBWNfh91; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbjASM3V (ORCPT + 99 others); Thu, 19 Jan 2023 07:29:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjASM16 (ORCPT ); Thu, 19 Jan 2023 07:27:58 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E42993F5; Thu, 19 Jan 2023 04:27:53 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JBkIRO024584; Thu, 19 Jan 2023 12:27:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=AptEpdq4hDR7KLA1E5UXJ2oe3KpGWibCmDOztEgsGpY=; b=OBWNfh91DjdExQnALPumXL7ypiymdNU7Rh2Q6EpDdYV1NDfGOrFBSObaXyhnY5ZLG5rA GAoiwQxibN0BD7R9j+bfbH0oM0ckkwmJekMozagJvbZIuyNn8/agNaCWRlYAhlz6AT8N pjcGJ9ONxVp6y6uZGr8+NEYreFVp/5Au1bg7M2veFvQB08KOfHc6WPva/cEveH/PjBkt //NS2kL6KIUvnDhbroa3vs6+N74yv39CX9gk3iyCHSopMRl5oYaLWeskU3rW3UI7KFF1 oQYd4lTyB7xbhuhBjRLEmmL0finSeZ595YOFzmtJWkStBTosD0Etp4ZvGk8Kt2acGnr+ Ow== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n7593r35t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 12:27:43 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30JCRgKl002379 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 12:27:42 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 04:27:36 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v3 2/7] arm64: dts: qcom: sc7280: Add sound node Date: Thu, 19 Jan 2023 17:57:02 +0530 Message-ID: <1674131227-26456-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1674131227-26456-1-git-send-email-quic_srivasam@quicinc.com> References: <1674131227-26456-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: BS-4_BTz0xv6yLfWzelcB22wYZ3Keuj8 X-Proofpoint-ORIG-GUID: BS-4_BTz0xv6yLfWzelcB22wYZ3Keuj8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190098 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755454059123597241?= X-GMAIL-MSGID: =?utf-8?q?1755454059123597241?= Add sound node for sc7280 based audioreach platforms. Include audioreach dtsi into crd-rev3 platform specific dts file. Also remove phandle to sound node, as audio routing is same as audioreach specific dtsi file. Signed-off-by: Srinivasa Rao Mandadapu Tested-by: Mohammad Rafi Shaik --- arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts | 25 +---- .../qcom/sc7280-herobrine-audioreach-wcd9385.dtsi | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+), 24 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts index b024626..aea8cbd 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts @@ -8,7 +8,7 @@ /dts-v1/; #include "sc7280-idp.dtsi" -#include "sc7280-audio-idp.dtsi" +#include "sc7280-herobrine-audioreach-wcd9385.dtsi" #include "sc7280-idp-ec-h1.dtsi" / { @@ -88,29 +88,6 @@ ap_ts_pen_1v8: &i2c13 { pins = "gpio51"; }; -&sound { - audio-routing = - "IN1_HPHL", "HPHL_OUT", - "IN2_HPHR", "HPHR_OUT", - "AMIC1", "MIC BIAS1", - "AMIC2", "MIC BIAS2", - "VA DMIC0", "MIC BIAS1", - "VA DMIC1", "MIC BIAS1", - "VA DMIC2", "MIC BIAS3", - "VA DMIC3", "MIC BIAS3", - "TX SWR_ADC0", "ADC1_OUTPUT", - "TX SWR_ADC1", "ADC2_OUTPUT", - "TX SWR_ADC2", "ADC3_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"; -}; - &wcd9385 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>; diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi new file mode 100644 index 0000000..7b3f7ee --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * sc7280 device tree source for boards using Max98360 and wcd9385 codec + * along with ADSP + * + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +#include + +/{ + /* BOARD-SPECIFIC TOP LEVEL NODES */ + sound: sound { + compatible = "google,sc7280-herobrine"; + model = "SC7280-AUDIOREACH"; + audio-routing = + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC1", "MIC BIAS1", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS1", + "VA DMIC1", "MIC BIAS1", + "VA DMIC2", "MIC BIAS3", + "VA DMIC3", "MIC BIAS3", + "TX SWR_ADC0", "ADC1_OUTPUT", + "TX SWR_ADC1", "ADC2_OUTPUT", + "TX SWR_ADC2", "ADC3_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"; + + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <0>; + + dai-link@0 { + link-name = "WCD9385 Playback"; + reg = <0>; + + cpu { + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai = <&wcd9385 0>, <&swr0 0>, <&lpass_rx_macro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + dai-link@1 { + link-name = "WCD9385 Capture"; + reg = <1>; + + cpu { + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + codec { + sound-dai = <&wcd9385 1>, <&swr1 0>, <&lpass_tx_macro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + dai-link@2 { + link-name = "Amplifier Playback"; + reg = <2>; + + cpu { + sound-dai = <&q6apmbedai SECONDARY_MI2S_RX>; + }; + + codec { + sound-dai = <&max98360a>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + dai-link@3 { + link-name = "DMIC"; + reg = <3>; + + cpu { + sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>; + }; + + codec { + sound-dai = <&lpass_va_macro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + }; +};