From patchwork Fri Jul 9 17:02:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 472010 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.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS autolearn=ham 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 D82B7C07E99 for ; Fri, 9 Jul 2021 17:03:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEA9061176 for ; Fri, 9 Jul 2021 17:03:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbhGIRFy (ORCPT ); Fri, 9 Jul 2021 13:05:54 -0400 Received: from mail-40140.protonmail.ch ([185.70.40.140]:44985 "EHLO mail-40140.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbhGIRFy (ORCPT ); Fri, 9 Jul 2021 13:05:54 -0400 Date: Fri, 09 Jul 2021 17:02:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1625850189; bh=pM2PKT/PbaxmWjmMxhZ5VF+n4/9qOl4fVvs8JqcxLNI=; h=Date:To:From:Cc:Reply-To:Subject:From; b=MQeEbcX7XlqdZ9F6IklejNXtZ/LvUmo2seCu2c5O2Ur/k2QvgeCyFpjmK/lvyP4Ko qr7SJERyJbmaHg+U+RBiDZnxKY78dSUi1JwIfVgY/iA8jhnSznMgVOhrdy5awtWHKI PaJ7gBrzCVSXBDnHr28dyXtq8/Te/g/BB67cXex0= To: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org From: Yassine Oudjana Cc: "Dr. Git" , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Manivannan Sadhasivam , Konrad Dybcio , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yassine Oudjana Reply-To: Yassine Oudjana Subject: [PATCH 3/5] arm64: dts: qcom: msm8996: Add modem remoteproc Message-ID: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: "Dr. Git" [Yassine: Change label from modem to mss_pil, change smp2p and reserved mem handles, and change smd-edge label to mpss.] Original patch: https://gitlab.com/msm8996-mainline/linux-msm8996/-/commit/ac73ebff6b74a75d1f3237342c2af8e0dc642353 Signed-off-by: Yassine Oudjana --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 559612a3ddeb..bb6bfd24256f 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -1285,6 +1285,63 @@ lpass_q6_smmu: iommu@1600000 { clock-names = "iface", "bus"; }; + mss_pil: remoteproc@2080000 { + compatible = "qcom,msm8996-mss-pil"; + + reg = <0x02080000 0x100>, + <0x02180000 0x040>; + reg-names = "qdsp6", "rmb"; + + interrupts-extended = <&intc 0 448 IRQ_TYPE_EDGE_RISING>, + <&mpss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&mpss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&mpss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&mpss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + clocks = <&xo_board>, + <&gcc GCC_MSS_CFG_AHB_CLK>, + <&rpmcc RPM_SMD_PCNOC_CLK>, + <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>, + <&gcc GCC_BOOT_ROM_AHB_CLK>, + <&gcc GCC_MSS_GPLL0_DIV_CLK>, + <&gcc GCC_MSS_SNOC_AXI_CLK>, + <&gcc GCC_MSS_MNOC_BIMC_AXI_CLK>, + <&rpmcc RPM_SMD_QDSS_CLK>; + + clock-names = "xo", "iface", "pnoc", "bus", + "mem", "gpll0_mss", "snoc_axi", + "mnoc_axi", "qdss"; + + resets = <&gcc GCC_MSS_RESTART>; + reset-names = "mss_restart"; + + qcom,halt-regs = <&tcsr_mutex_regs 0x23000 0x25000 0x24000>; + + qcom,smem-states = <&mpss_smp2p_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + mba { + memory-region = <&mba_mem>; + }; + + mpss { + memory-region = <&mpss_mem>; + }; + + smd-edge { + interrupts = <0 449 IRQ_TYPE_EDGE_RISING>; + + label = "mpss"; + mboxes = <&apcs_glb 12>; + qcom,smd-edge = <0>; + qcom,remote-pid = <1>; + }; + }; + stm@3002000 { compatible = "arm,coresight-stm", "arm,primecell"; reg = <0x3002000 0x1000>, From patchwork Fri Jul 9 17:03:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 472009 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=-10.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY 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 EC9CCC07E99 for ; Fri, 9 Jul 2021 17:03:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6C86613BF for ; Fri, 9 Jul 2021 17:03:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbhGIRGm (ORCPT ); Fri, 9 Jul 2021 13:06:42 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:35522 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbhGIRGm (ORCPT ); Fri, 9 Jul 2021 13:06:42 -0400 Date: Fri, 09 Jul 2021 17:03:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1625850205; bh=p3KeN6Ovv4Z8TpSQ+6KBlTBtLTfzq3KeNEJzsQY+/7M=; h=Date:To:From:Cc:Reply-To:Subject:From; b=HeBG96N1fbWjhmBPAa3b4Ii+tUrmDQLz0ebLnLFsYoGB71RQwpZXRORVyKYarkz/v py1S8cYsjCTXFDKQUUNVWaBPys5ig/ged3AINpde/NK3dFvl8mCu2/wSF0xVjIaKdD NlTrOe8sLyuaqtvTkUeiALrNpJPTyu2yOAa6o13I= To: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org From: Yassine Oudjana Cc: Yassine Oudjana , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Manivannan Sadhasivam , Konrad Dybcio , "Dr. Git" , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Yassine Oudjana Subject: [PATCH 4/5] remoteproc: qcom: pas: Use the same init resources for MSM8996 and MSM8998 Message-ID: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The resources for MSM8996 are missing power domains, and adding them makes the resources identical to the MSM8998 ones. Rename msm8998_adsp_resource to msm8996_adsp_resource then use it for both chips. Also add power domains to slpi_resource_init and use it for both chips. Signed-off-by: Yassine Oudjana --- drivers/remoteproc/qcom_q6v5_pas.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index a79bee901e9b..7e72d5f0150e 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -585,7 +585,7 @@ static const struct adsp_data sm8350_adsp_resource = { .ssctl_id = 0x14, }; -static const struct adsp_data msm8998_adsp_resource = { +static const struct adsp_data msm8996_adsp_resource = { .crash_reason_smem = 423, .firmware_name = "adsp.mdt", .pas_id = 1, @@ -714,6 +714,10 @@ static const struct adsp_data slpi_resource_init = { .pas_id = 12, .has_aggre2_clk = true, .auto_boot = true, + .proxy_pd_names = (char*[]){ + "ssc_cx", + NULL + }, .ssr_name = "dsps", .sysmon_name = "slpi", .ssctl_id = 0x16, @@ -779,21 +783,6 @@ static const struct adsp_data sm8350_slpi_resource = { .ssctl_id = 0x16, }; -static const struct adsp_data msm8998_slpi_resource = { - .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", - .pas_id = 12, - .has_aggre2_clk = true, - .auto_boot = true, - .proxy_pd_names = (char*[]){ - "ssc_cx", - NULL - }, - .ssr_name = "dsps", - .sysmon_name = "slpi", - .ssctl_id = 0x16, -}; - static const struct adsp_data wcss_resource_init = { .crash_reason_smem = 421, .firmware_name = "wcnss.mdt", @@ -822,10 +811,10 @@ static const struct adsp_data sdx55_mpss_resource = { static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init}, - { .compatible = "qcom,msm8996-adsp-pil", .data = &adsp_resource_init}, + { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource}, { .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init}, - { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8998_adsp_resource}, - { .compatible = "qcom,msm8998-slpi-pas", .data = &msm8998_slpi_resource}, + { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource}, + { .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init}, { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init }, { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init }, { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },