From patchwork Tue Sep 26 16:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 145039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2192135vqu; Tue, 26 Sep 2023 14:05:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGV7e8TeXjONTWn8ftvQ+q0DocgR8iKOg5WlY7V1+29IDlFF4ASqZwy0e/4+WgCJbwvBgzL X-Received: by 2002:a05:6358:9328:b0:13a:cb52:4832 with SMTP id x40-20020a056358932800b0013acb524832mr257107rwa.23.1695762322578; Tue, 26 Sep 2023 14:05:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695762322; cv=pass; d=google.com; s=arc-20160816; b=0kdpqWP54sZzvWbIC/W32XNhIohrLHZ4M1n9S84crIL9DDo3elTNMkIyL9Mv+TzTDH j7AyA8qa0WsnYvuc4OeBAhjDQ+W+km1Z+VeZxojo6tRvRs2jCxSVeJMcfWbbpcdNWXr3 WX9z7/5bi4vEJo4hzM3DUAKkDVnqqeIvCDXCNXpiEPUYsrulbyIFrHI/PMf5m2JLy+iL tUtV5Y8My0cac27K6dCTCI4FB5mSwLMXUPPtMTmRX63/6lyn7xd5PKjBgZrWd5bIugGS DG7raNhkkmoAdVknNY2zlj+8dzoA0/rnvf84gKl6hXnvJzQQRu/j1vyo4zUPHrOCkdrm 7jhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=qFtKSiZynUSedTLMAKU165/f1jdDEGvPsLRJR3qqVJc=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=wEb5Oz4+6BtqgYqUVaZq/Cw2CXV1En+wOoUs+O/bRDTKcyWTBDtI34+GTsA6NRid4n M0zuVbjUQjEIMj4m0DIi03s4cqfVirho/gl2MlHDZIwHXAxjph3qFGXXDTn6vspNBGmi 999+mUw4/sFW8bqC9r5bKb28hTKGAA2oXxi3wvXTokfeu9xJ83/j67MSu9/EsESdrTB2 6o1JvPaN3nx6Q5tQst/xZCrR7+6VO+wyOP65MSKKr/7m7vh+qK01/lKuSqM2W+birwaw ftIgpIOYBUZg+dz4I9dDZk/96yTZ/8g91cUDM/pSJzm0N5S6nXG5O1QC87BxDA8RdNw/ 9FRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ntYXhbqp; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id n5-20020a63f805000000b00577bf1de778si13557536pgh.585.2023.09.26.14.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 14:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ntYXhbqp; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id EA70B804910C; Tue, 26 Sep 2023 09:51:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235359AbjIZQv7 (ORCPT + 28 others); Tue, 26 Sep 2023 12:51:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjIZQv6 (ORCPT ); Tue, 26 Sep 2023 12:51:58 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA68F136; Tue, 26 Sep 2023 09:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747098; cv=none; d=strato.com; s=strato-dkim-0002; b=Xk4+uFMuPXrdK9kPdhFIG7bwBV9I7VU3dM2KHFwJgqken2GuFWmLxgk/U8BftlubPV j8jtiMHv/wmOViqIt/sgD+hmyxtBMCGIciTsarIWb4HWQ6M89JTaDsosdo9RBKZWmF6v 1MGmUQ/gilxgfougNFcPJDF/UsGQ2+v/nW88YzOPFSFV1ZrcAHKCE9/tUTviweyTL2U0 mrRJJIHXXsYNTsXsf6q6CcYT0NTkXR4HlbiS67SjtwBSG1QaVcU31Lta6VPc3zhD8Lp/ wW4Tpcu6ep+8RRPmJgCZcr6zQc7qgvfaFhURB15lWuNyLXeBPVGq0AtJSN7UOvuBX6Yx 9DKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=qFtKSiZynUSedTLMAKU165/f1jdDEGvPsLRJR3qqVJc=; b=bGvmX4/6Sfh+xTGv6JUa63KTUX/isKepvGc3Fzzeo1PsqQVufj9SToL6b3MHoAX2AH GzpYfbP3ndtnw4gyT6HlvshR/BvBF8A7qcwzs3cD1p3PN8Z/JmtENL3oxkk6dfyWAMXr h69RzkzU8t543jjd68cisiyaCwHISXFv03s0PaD9Oqc64943yo/7arVHmiqODlCaDWX8 ngBXHg58YVZ+uI6DrnPhBMCiQnkWqvOZ0pRDWjo2qz4EdWxauQtj4edx3RKu9/YlooEQ 2Jt6G6pMTCnbSAtUKff2svvstRDsojesBOQZdCp5AM5pXbM2Wywsk6N06alDtGBomYX0 NhNw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=qFtKSiZynUSedTLMAKU165/f1jdDEGvPsLRJR3qqVJc=; b=ntYXhbqp4cMmiQJr3YNfbQ/ATtcq81KqovYUhjDTIrSq0sX5gvsW73IKLPPCJjPn/A yWfuqkn7d7TszNUMyS0wXQtV/ChS0ZeSUlF5SJ7EqbGonXoJSQHJAI4MCBeiFCe+job2 5OgQ93gjLXzSsLqmq3kBNdwnCfjkf7AaitsCwUsN4qpABcg0LM51U38tH6HymNYnuIKM MsEJLsvMiB9NQNWOeihBOP06UI1efh4yryq+D9j386y922NcLz6ZpDjkUOA7aM63OuYo 7tuF4zMefEX3YAiI3wFtHpVpiHWupZz1mMUeNvlN2AEWP5UWUub18mm3SVXCi/G5evW/ iT1g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695747098; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=qFtKSiZynUSedTLMAKU165/f1jdDEGvPsLRJR3qqVJc=; b=Tw/Mj7fBTyaddFKP74FCIr/0BgmSaN7FhnOreVAwQIAu67ZyTxj/5/7oyFxglu0CPd MXH0k1kJKXO0oIqV6WAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOH+nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QGpbg5Z (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 18:51:37 +0200 (CEST) From: Stephan Gerhold Date: Tue, 26 Sep 2023 18:51:16 +0200 Subject: [PATCH 02/13] arm64: dts: qcom: msm8916/39: Add QDSP6 MIME-Version: 1.0 Message-Id: <20230926-msm8916-modem-v1-2-398eec74bac9@gerhold.net> References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> In-Reply-To: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 09:52:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778130779120319762 X-GMAIL-MSGID: 1778135673355958123 MSM8916 and MSM8939 do not have a dedicated ADSP. Instead, the audio services via APR are also implemented by the modem DSP. Audio can be either routed via the modem DSP (necessary for voice call audio etc) or directly sent to the LPASS hardware (currently used by DB410c). Bypassing QDSP6 audio is only possible with special firmware (on DB410c) or when the modem DSP is completely disabled. Add the typical nodes for QDSP6 audio to msm8916.dtsi and msm8939.dtsi. The apr node is disabled by default to avoid changing behavior for devices like DB410c that use the bypassed audio path. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 49 +++++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8939.dtsi | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 4f799b536a92..e8a14dd7e7c2 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include / { @@ -1989,6 +1990,54 @@ smd-edge { label = "hexagon"; + apr: apr { + compatible = "qcom,apr-v2"; + qcom,smd-channels = "apr_audio_svc"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + q6core: service@3 { + compatible = "qcom,q6core"; + reg = ; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + + q6afedai: dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + + q6asmdai: dais { + compatible = "qcom,q6asm-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + + q6routing: routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + }; + fastrpc { compatible = "qcom,fastrpc"; qcom,smd-channels = "fastrpcsmd-apps-dsp"; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 65c68e0e88d5..95610a32750a 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include / { @@ -1615,6 +1616,54 @@ smd-edge { qcom,remote-pid = <1>; label = "hexagon"; + + apr: apr { + compatible = "qcom,apr-v2"; + qcom,smd-channels = "apr_audio_svc"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + q6core: service@3 { + compatible = "qcom,q6core"; + reg = ; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + + q6afedai: dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + + q6asmdai: dais { + compatible = "qcom,q6asm-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + + q6routing: routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + }; }; };