From patchwork Mon Jun 5 07:08:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39498C7EE39 for ; Mon, 5 Jun 2023 07:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbjFEHKv (ORCPT ); Mon, 5 Jun 2023 03:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231848AbjFEHK0 (ORCPT ); Mon, 5 Jun 2023 03:10:26 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8FEBE62; Mon, 5 Jun 2023 00:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948952; cv=none; d=strato.com; s=strato-dkim-0002; b=LsCD8fmnGUxD9W+CxO54j1Ryb7SxFPu890xEj+IR+Dlz+9vJD9UPWbQzmtkrrd2+hx ugGQY6IEKPSZE0e7fYo7/8+is563JNFDiuJgypnRPjEpuJB32InlukJoBNpg48ogcn8i kv0NPBh5F4Fir4nJ4Cf6rXZw+SRwJSG9s4zKuOSkSYTpyJm7we5CE2IpMUTAdh5FUWzw cLvBB3V1TiVtl4maLJJlbZt8FvubKZTI+l1C2V7/1UlJkfV9gOIrANbf8zds4+xbpjgu YGqKXk/aLXPQqyVMkXeHqr0oRoZGHq+qX4btUp1jmYRFph9a5PFpmXWmKJdSpuw0oBe1 CUBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948952; 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=k1/3Z0rEwHpxiC8G+AzBtlaWelViTxGcX3M5pSfKxIw=; b=NPHaIfJ9PY8YyLdc9DVoGXgNSfp+H4M+qKtoBbK86DEJc+gmSsbjM0xPPnSu4z459N dNcWiRDw0AF/aBCPNwMD9+uwOePSD2GwDBsDtOwosIpTxDwAstMKC+QnHl4KcGBImA1B zbVj9ANYFKqFoquy/U2TD9Cci4b6gMeX+Q22ajspQn7xsYeFmpxEfDXks4Xf5gYyZeCj J6loZb2KJFbSC/OjWA6154aOvssyKIjjZhbIIZE4BPj+uS0Z3rqMQzMP2tDAWqkcysnB Z35VbGybBW9MAOZwzHXSAP1PaXIHKH8e84+R2ECf1XjKSIJpaXjB3mupVqyyR36nwazQ 9qMw== 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=1685948952; 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=k1/3Z0rEwHpxiC8G+AzBtlaWelViTxGcX3M5pSfKxIw=; b=TUCVbwDOMeNqcADgalx/KhtBNe23oL1J+5C3kDCxKtRqXno5BUYkjnXzfgll6rF5JG 0hWnANQQ3yhgyk6Z4ody2IPVO++WL1lmGql68ECXuZj7vQSAuangSYOKYnqsI0zH9Wyr /WkfPTtl9+FijYTmsFsr7Iv7s6sBckTt6UU2CD+V9V9CB58klxYYB1sguJ5r6x21bxHh SejDvPAhsJA+Nefji9ZKh4wXp/nvNcCaHrL55BF8MAVr0wxPv3bciUK90CN48cE5XiX9 nrkf7XfEmxcSNeD5l3mvNBXSx82fc8mQjJY6wAYF3Ut/uar+bqsnLlU3AaSyDUKxHjzk uvrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948952; 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=k1/3Z0rEwHpxiC8G+AzBtlaWelViTxGcX3M5pSfKxIw=; b=HXvHRHr7uPcFCEHCOipufQq81mF5gXmyXMJYLUKUQGVKI5wI9wgLF60zsRDuKExCrE OM79QJY+XFskrdcbHGBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579C8a0 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:12 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:18 +0200 Subject: [PATCH 02/14] dt-bindings: soc: qcom: smd-rpm: Add MSM8909 to qcom,smd-channels MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-2-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org MSM8909 is using qcom,smd-channels but is missing in the list, add it there as well. Fixes: 709d473dd5e1 ("dt-bindings: soc: qcom: smd-rpm: Add MSM8909") Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml index fe814b991559..78822315edeb 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml @@ -82,6 +82,7 @@ if: enum: - qcom,rpm-apq8084 - qcom,rpm-msm8226 + - qcom,rpm-msm8909 - qcom,rpm-msm8916 - qcom,rpm-msm8936 - qcom,rpm-msm8953 From patchwork Mon Jun 5 07:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689544 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E16E5C7EE2E for ; Mon, 5 Jun 2023 07:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230428AbjFEHKp (ORCPT ); Mon, 5 Jun 2023 03:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231937AbjFEHKa (ORCPT ); Mon, 5 Jun 2023 03:10:30 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3183FE6B; Mon, 5 Jun 2023 00:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948953; cv=none; d=strato.com; s=strato-dkim-0002; b=LyzN4cit/ESC5mhHOfF1am1m+XQXZOlC8gQNPfSE5qsXk20/XfgAK1aJxh4s+o6BBo RvfJ46sE0SQjXMfU3NoKkYLXhxxTgX0I9kxF5OSlHJSzcVyLVnqzYELRNtFVbiMGiikr hUcuwSgwNt7PSIfCc5OfkQFCInv7/HgqZeDjL3sKgl00iUCXocaV7SkHcB0oZlX03ur9 NHIuCTnGdnkF5h4zp6L0+4JwDWkU80yaC17m0H2hlWxsAGb0Wn1Jh/eeiT2MhrgJz5f9 x/RFxAN29YBZujXTkl36ABWiZ+Nu8Cohzq7X2GQJFAl+u7fAEghhvYtWHfkPqQHXqT+3 +eGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948953; 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=KzxZEXfP9riG5jeIPNdghbmL1RM9PKS5UHG6gZHagac=; b=gtssXm+AaYYeYvfwjTYLCbgLb9G2RQB8HVtd9XVFP4Q4xt9yRAvLnlzwI03nANAUIb ely6s0rSjyxSKCss4FHqANLZJ2B/5I/p+YRvCS6O6JMHTGEnuZq7uHmXGpxY++h11Dmy Xevq1VSD6qTMvkJgsqxFlu6Nv2QtfoU3LEjHkMeyX2n6IajZyAIFcX7NvcAPusDWkXri GJ51YyUE8fztonfEg4ZSNf5eNdhCcCzBZZz+29o7RcbH0YUtMQbRJmLJz3DsJsUt5wkn JOzFv70JrmxN3Lw4C6HPHNoyDhqA4E5omOuq33MeGTdpJCnr9Th8jOiC3cSE7Xpm6trq 3gWA== 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=1685948953; 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=KzxZEXfP9riG5jeIPNdghbmL1RM9PKS5UHG6gZHagac=; b=pT6e12j3XBct9r2CN3tTiCnk9+mM6ULwxnlMNHmLw/JOVL1KGHEZAdEyNSbKp2k0jw nmUcR8Cb6uJcoUi/MNeL6fqQp+phBvad4WxINden0tYCtioUVTBOSknqDfnU8qVmkroL sH3t07wJWoguTbt7eE8omOMCuI6T/MVpCe6xeVPHA2Pi1QsBCsEBCx9vNWFYNRuNYF3q vkznZmAjlDQu7sPMch6Xpmq7boRHAHkOt4tyNoyxRwM4M2g9xjWjHymxoKScIOXG6gDQ jaNEyzzYmmEbb6LXxejYilRkE5kMmM6Fr1CXj1AXV29DsngopTNLaTA5A/Mfgp+cKFhC oZgg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948953; 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=KzxZEXfP9riG5jeIPNdghbmL1RM9PKS5UHG6gZHagac=; b=xwx/cpb5xsGzssCM75AmSI9639zVKaa3Fro7ijoNWr7DfZ73kkOXHh6i9w/E80XYbl vAF2cVX8lq1XfCChsVDA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579D8a3 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:13 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:20 +0200 Subject: [PATCH 04/14] soc: qcom: smd-rpm: Match rpmsg channel instead of compatible MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-4-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org There is an ever growing list of compatibles in the smd-rpm.c driver. A fallback compatible would help here but would still require keeping the current list around for backwards compatibility. As an alternative, let's switch the driver to match the rpmsg_device_id instead, which is always "rpm_requests" on all platforms. Add a check to ensure that there is a device tree node defined for the device since otherwise the of_platform_populate() call will operate on the root node (/). Similar approaches with matching rpmsg_device_id are already used in qcom_sysmon, qcom_glink_ssr, qrtr, and rpmsg_wwan_ctrl. Signed-off-by: Stephan Gerhold --- drivers/soc/qcom/smd-rpm.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c index 0c1aa809cc4e..13d8c52330d0 100644 --- a/drivers/soc/qcom/smd-rpm.c +++ b/drivers/soc/qcom/smd-rpm.c @@ -199,6 +199,9 @@ static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev) struct qcom_smd_rpm *rpm; int ret; + if (!rpdev->dev.of_node) + return -EINVAL; + rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL); if (!rpm) return -ENOMEM; @@ -230,38 +233,18 @@ static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev) of_platform_depopulate(&rpdev->dev); } -static const struct of_device_id qcom_smd_rpm_of_match[] = { - { .compatible = "qcom,rpm-apq8084" }, - { .compatible = "qcom,rpm-ipq6018" }, - { .compatible = "qcom,rpm-ipq9574" }, - { .compatible = "qcom,rpm-msm8226" }, - { .compatible = "qcom,rpm-msm8909" }, - { .compatible = "qcom,rpm-msm8916" }, - { .compatible = "qcom,rpm-msm8936" }, - { .compatible = "qcom,rpm-msm8953" }, - { .compatible = "qcom,rpm-msm8974" }, - { .compatible = "qcom,rpm-msm8976" }, - { .compatible = "qcom,rpm-msm8994" }, - { .compatible = "qcom,rpm-msm8996" }, - { .compatible = "qcom,rpm-msm8998" }, - { .compatible = "qcom,rpm-sdm660" }, - { .compatible = "qcom,rpm-sm6115" }, - { .compatible = "qcom,rpm-sm6125" }, - { .compatible = "qcom,rpm-sm6375" }, - { .compatible = "qcom,rpm-qcm2290" }, - { .compatible = "qcom,rpm-qcs404" }, - {} +static const struct rpmsg_device_id qcom_smd_rpm_id_table[] = { + { .name = "rpm_requests", }, + { /* sentinel */ } }; -MODULE_DEVICE_TABLE(of, qcom_smd_rpm_of_match); +MODULE_DEVICE_TABLE(rpmsg, qcom_smd_rpm_id_table); static struct rpmsg_driver qcom_smd_rpm_driver = { .probe = qcom_smd_rpm_probe, .remove = qcom_smd_rpm_remove, .callback = qcom_smd_rpm_callback, - .drv = { - .name = "qcom_smd_rpm", - .of_match_table = qcom_smd_rpm_of_match, - }, + .id_table = qcom_smd_rpm_id_table, + .drv.name = "qcom_smd_rpm", }; static int __init qcom_smd_rpm_init(void) From patchwork Mon Jun 5 07:08:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E352C7EE23 for ; Mon, 5 Jun 2023 07:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbjFEHNp (ORCPT ); Mon, 5 Jun 2023 03:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjFEHNj (ORCPT ); Mon, 5 Jun 2023 03:13:39 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FAA2F0; Mon, 5 Jun 2023 00:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948955; cv=none; d=strato.com; s=strato-dkim-0002; b=cwqBvPNM+VvqUjLiWgVckJS195JahM1GQX9x3EycAlVQp9XQimx387YIzTVNi/YCPw VKBv5yhD1UuHwXH8gx27bC4r+bgzsyoHoM22Bm/QVrsDgET0VTaRtSCScCPME6ckh/vS LQYRixDFrCrf0MOT5zrE6pM2Rp6mGsHUcXu5R0aQlYGVSOR2k3EDQzQMfsc/bHvY+cdP 1f91eMmkb1BaRULdRXMJYbI2oN53wGxDx6heWCyvSVvJD+3pKJTChS9PX7zkc2EuEBW8 N4mSo4AM1w95WET1sjqV6fFdBkJAP2S4hbjego2OHmG8B4xJo7Zj3bWgs2tHRj0HxXGK WbwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948955; 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=l/8mcRN+TlGYtBCi00HTVZhrkyxZgFaeeP1BtcLCr2U=; b=Kgk43ALbbJRRB/4dAMVCA27IfUzmALJO580LB/2wK9CnvP1iQjip3KTRSJ4xuL9/Ff uaxTwPOts8fcgWX42J4ZrZaGbzYYD1XKv43IiBQsHxVR6/SFs9vPMl/cg63CtjmLlsfX ks/2dAOtPJ//lNvjGmWdd01zQxwPZYojpZ2B/gkdvcGYsrjg3GWgf/PytfywE82GrkUm 9Yg7QbgQFalkIA5AD+hid/9fOY+PeP6Rop6+0NKQifN+uAoZypGZLmLMLkijIOd1ncqW //LQiTwoWF0Qm0BEBR42e8tX3n0e5KgPFNiwegNWqJBXLVzFHY1J9DhVOhcjCjwkpkp2 WY2A== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948955; 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=l/8mcRN+TlGYtBCi00HTVZhrkyxZgFaeeP1BtcLCr2U=; b=OS1qsySklIX77dE17tXfnCaHnboXobLaTvon+gR49pqZv5DbmEHwREeK//sG7VIROd UfiOXE95Q7umwnnIwt5q1tKJa1SkuswTukAfIuQxz6yOmrJPdgTAX8KfJdszB28C3LHZ phS8h9zEjyiapZXWo0tVfK0PmCSoL8UXOAGQmLjaejsMUCcSHYuAHgpWNMXisVQR1kLQ LipXj/ncsuyt/Xgi74klTcc9SrCq9PgzJ+QVJ3HeJT5/wPFSHO8ZWZNTU/O1ht/YUerF nfao0Y1QaHLhFbNV+AFdgOcFcRz6aY5scsce58EZ/wwXIkfxI6DP+o8ix9QSYZS3/Qa4 o8LQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948955; 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=l/8mcRN+TlGYtBCi00HTVZhrkyxZgFaeeP1BtcLCr2U=; b=uil1PyV8cxT/FRkWdYTQBkGVZO4FN77Ojzp/pl8jFjdIRsLcHnpiJiVRGlf4IfFHJJ 8HaSurreoGfQQD+lNHAg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579F8a8 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:15 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:25 +0200 Subject: [PATCH 09/14] rpmsg: qcom_smd: Use qcom_smem_is_available() MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-9-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Rather than looking up a dummy item from SMEM, use the new qcom_smem_is_available() function to make the code more clear (and reduce the overhead slightly). Add the same check to qcom_smd_register_edge() as well to ensure that it only succeeds if SMEM is already available - if a driver calls the function and SMEM is not available yet then the initial state will be read incorrectly and the RPMSG devices might never become available. Signed-off-by: Stephan Gerhold --- drivers/rpmsg/qcom_smd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 7b9c298aa491..43f601c84b4f 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1479,6 +1479,9 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, struct qcom_smd_edge *edge; int ret; + if (!qcom_smem_is_available()) + return ERR_PTR(-EPROBE_DEFER); + edge = kzalloc(sizeof(*edge), GFP_KERNEL); if (!edge) return ERR_PTR(-ENOMEM); @@ -1553,12 +1556,9 @@ EXPORT_SYMBOL(qcom_smd_unregister_edge); static int qcom_smd_probe(struct platform_device *pdev) { struct device_node *node; - void *p; - /* Wait for smem */ - p = qcom_smem_get(QCOM_SMEM_HOST_ANY, smem_items[0].alloc_tbl_id, NULL); - if (PTR_ERR(p) == -EPROBE_DEFER) - return PTR_ERR(p); + if (!qcom_smem_is_available()) + return -EPROBE_DEFER; for_each_available_child_of_node(pdev->dev.of_node, node) qcom_smd_register_edge(&pdev->dev, node); From patchwork Mon Jun 5 07:08:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FA6EC7EE45 for ; Mon, 5 Jun 2023 07:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230412AbjFEHKx (ORCPT ); Mon, 5 Jun 2023 03:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjFEHKV (ORCPT ); Mon, 5 Jun 2023 03:10:21 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF62E49; Mon, 5 Jun 2023 00:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948956; cv=none; d=strato.com; s=strato-dkim-0002; b=tEseBMuPiyHNkdf3PJVTdgcri1s7a/qwOZ4iHULrsTwXURbFpBHrAwtUVwkjnUdITH DJ8QKFpKujtdfD+SsQtcfQVeBlAftQ51zRO2+sMYrQPGzddpZu8QEzQPZksjSc6lWPmE tuswhqTx2ZOGo14qF81z6Yh64srURVGHjF56hcMZG7tu1aWsXZ74izG8miL3AmQ50m5F g4r/8Sit8awpzb2MJzHw4tqbeCc2gfZOMTyHawoTgIGuaBK/NnxuKMLcBeF8SsG7z7le g8Hty7caITEHcaygOZnmTAoHhblGQRw4WY7y2QBW65MJLowNqLQGDElfBDtwbObv6C8k XpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948956; 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=HXm1VPTXAHe9VxfUC/BDKK9cTt+IOrtmh6/3aJodKcc=; b=M+4XqxZYCdp6Yctru+wnT/xOTwkNyA7HTDChDXWXr41Xj6Mw05EqD/tVK7CmOEOCS8 s5utTkbyK9RHv2UMBkTfqyr5GfH7zsNKXOTDd+OsWB1sEUxqO+JtFBk6R1DeFvuBXDIA qFZGWkwWHd33yjo2hUcRoWUwIzxjdbM8yB0yavICkZEhYWvAbbUQzOcVnebz5hytCthB 7PIfv9Yf3s4xW9zqGTH1v5rTHESY4ND37XE5mOxKM9b4qzyReva9xu+Gh9yGqCZDuVQK FKNYrYvppMc/ZfZ2FrN7Ph7yyzpwT11n4ouGwjT+saxUXRw5alUHPIMzIKwG8vbVL84w jqzw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948956; 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=HXm1VPTXAHe9VxfUC/BDKK9cTt+IOrtmh6/3aJodKcc=; b=i2xM3Mvkukrx6fAcPtbzSw8iMYg/lRfWBtU089P4toggKVpFl+NnTjaUmcgVaKU654 S3OcMkSOUXNIV0HjBaBqEUFKdQ1b8eUjK//2ZglCwIk538CbOFNeiy9bO4gVeyex/55e /VpfNS9eQWDfDM9/2OdhTm5yNpC5zouF5SP1liJ1Zqr1I65km22/YXclC2KH8YW0SPWb QuC+U5oaJ0yLuMJqrs77aGaZ2OolaWsvKj+nTycQ4QonfujMhtcXDPfkklv7rm4NXYpX H67kwEL2x6TedLFvZy1CGy2OxC12NPuWtrZtE6xFLEYjgQr0qC5AZqmY0UjAWHNVIeAH wmbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948956; 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=HXm1VPTXAHe9VxfUC/BDKK9cTt+IOrtmh6/3aJodKcc=; b=vRpSUz2N6xDNY4VgbmBeVOdliW8t6pv1YcqVpCdV1VN3fihJg9j8wgbvSTeLDih2OB DPb6s2wDBUWMZziRzmAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579F8a9 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:15 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:26 +0200 Subject: [PATCH 10/14] soc: qcom: Add RPM processor/subsystem driver MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-10-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a simple driver for the qcom,rpm-proc compatible that registers the "smd-edge" and populates other children defined in the device tree. Note that the DT schema belongs to the remoteproc subsystem while this driver is added inside soc/qcom. I argue that the RPM *is* a remoteproc, but as an implementation detail in Linux it can currently not benefit from anything provided by the remoteproc subsystem. The RPM firmware is usually already loaded and started by earlier components in the boot chain and is not meant to be ever restarted. To avoid breaking existing kernel configurations the driver is always built when smd-rpm.c is also built. They belong closely together anyway. Signed-off-by: Stephan Gerhold --- drivers/soc/qcom/Makefile | 2 +- drivers/soc/qcom/rpm-proc.c | 76 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index 99114c71092b..113b9ff2ad43 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_QCOM_RPM_MASTER_STATS) += rpm_master_stats.o obj-$(CONFIG_QCOM_RPMH) += qcom_rpmh.o qcom_rpmh-y += rpmh-rsc.o qcom_rpmh-y += rpmh.o -obj-$(CONFIG_QCOM_SMD_RPM) += smd-rpm.o +obj-$(CONFIG_QCOM_SMD_RPM) += rpm-proc.o smd-rpm.o obj-$(CONFIG_QCOM_SMEM) += smem.o obj-$(CONFIG_QCOM_SMEM_STATE) += smem_state.o obj-$(CONFIG_QCOM_SMP2P) += smp2p.o diff --git a/drivers/soc/qcom/rpm-proc.c b/drivers/soc/qcom/rpm-proc.c new file mode 100644 index 000000000000..0652be7f7895 --- /dev/null +++ b/drivers/soc/qcom/rpm-proc.c @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (c) 2021-2023, Stephan Gerhold */ + +#include +#include +#include +#include +#include + +static int rpm_proc_probe(struct platform_device *pdev) +{ + struct qcom_smd_edge *edge = NULL; + struct device *dev = &pdev->dev; + struct device_node *edge_node; + int ret; + + edge_node = of_get_child_by_name(dev->of_node, "smd-edge"); + if (edge_node) { + edge = qcom_smd_register_edge(dev, edge_node); + if (IS_ERR(edge)) + return dev_err_probe(dev, PTR_ERR(edge), + "Failed to register smd-edge\n"); + } + + ret = devm_of_platform_populate(dev); + if (ret) { + dev_err(dev, "Failed to populate children devices: %d\n", ret); + goto err; + } + + platform_set_drvdata(pdev, edge); + return 0; +err: + if (edge) + qcom_smd_unregister_edge(edge); + return ret; +} + +static void rpm_proc_remove(struct platform_device *pdev) +{ + struct qcom_smd_edge *edge = platform_get_drvdata(pdev); + + if (edge) + qcom_smd_unregister_edge(edge); +} + +static const struct of_device_id rpm_proc_of_match[] = { + { .compatible = "qcom,rpm-proc", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, rpm_proc_of_match); + +static struct platform_driver rpm_proc_driver = { + .probe = rpm_proc_probe, + .remove_new = rpm_proc_remove, + .driver = { + .name = "qcom-rpm-proc", + .of_match_table = rpm_proc_of_match, + }, +}; + +static int __init rpm_proc_init(void) +{ + return platform_driver_register(&rpm_proc_driver); +} +arch_initcall(rpm_proc_init); + +static void __exit rpm_proc_exit(void) +{ + platform_driver_unregister(&rpm_proc_driver); +} +module_exit(rpm_proc_exit); + +MODULE_DESCRIPTION("Qualcomm RPM processor/subsystem driver"); +MODULE_AUTHOR("Stephan Gerhold "); +MODULE_LICENSE("GPL"); From patchwork Mon Jun 5 07:08:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689542 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1099CC7EE2F for ; Mon, 5 Jun 2023 07:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbjFEHKu (ORCPT ); Mon, 5 Jun 2023 03:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231789AbjFEHKX (ORCPT ); Mon, 5 Jun 2023 03:10:23 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74A15E54; Mon, 5 Jun 2023 00:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948956; cv=none; d=strato.com; s=strato-dkim-0002; b=bX50qapSRFTtaoSTIA7GQZA2db0fJtJvo2IS0sSLovGDjiNmdpu9/lJB4jAWVAWZ4A 652rm5K1R663bTzUXf5FYqR88fJhwpUybsmMmcmMV5kp47Op7qFckjBCcRWE5tL7HcwM /joaf+XeCHJoFzliuMpgpTuhqlEiD5ZG0oopmpM/R9Zsg0hvsXcmKqp39ieANAh3G42i 828W6l/LKcQZk94xYWe7zOoUMoxqMUnI7Zl+YJA86z6QG/550dspJP2wtskbOintGwIV fsXS0i+ez3C1giSUmQZsarZhwYYftqh/njOA5oHbbxrElGAZ65pKHmH3DgkjmBYsvag0 m03g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948956; 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=j/qOxaWwVTu/WS0NkZyfHQtgU7h2MbqoNvZMGU5tI7E=; b=Te+Hwp90BnuWHdSzZdSQXkawYtIPSzDn7rbwwMwb3c8ObUxJwCYBSguLIzn9wDcZ7c I/BfFq5HOhCK0brWREJKorsQvW/6iFmzvvP3ukSf+Dl80KRfGQPubNMIDmZ6t9ZJQmz2 aav3ssOTeawAm06XUg+9v9irTc7L0mCkZ7o3xjds2SGBdm1W5sdCSgyONZuMp7d7NE/4 8Ukb333p30P44SfcQskWVZ+RvVxxiJPAuM0NuF4ICsISzNTNt9Eh0b1ylzYEQEHjLJ90 +Sx3Qj3NWbv20zLxxP2yzdmVy0rbFocz4g+A3LcRbxvienyoB4r6greEFB4Q/rZJUqhf DNFA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948956; 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=j/qOxaWwVTu/WS0NkZyfHQtgU7h2MbqoNvZMGU5tI7E=; b=pUON0w80j6/nNEso+mRkgAYP8hUQVX30OnAo4R3boDY/Suk60vMJw8k1M8txrWWe7X ylnQRLX1h9fuHYdtelaMwAMNAPSqGlmKQ9dZdTY7LX2xjKhIzZkxI33ejgLoSJkrKuk3 ngw8LGJQiGTvZ+Dr+LTQKoSQ4TFDBPObIt75KWAOPZLjg/CLwXc7PNgc9T9c18zez2q3 lFya1NtJ3GCIY6Dl9INATglf70q7CE/kf/aP5njLp8mJY9LBgoOjbuQCjePSLuZYtu4c kuZAzCwm13h/a/g4FDfuVegjSHVA/4MpTmcjS8CPrpF7bUj1TixHCIfYb2eDvXXvdraT Io/Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948956; 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=j/qOxaWwVTu/WS0NkZyfHQtgU7h2MbqoNvZMGU5tI7E=; b=+kaqo2W6u9y/zJjKahoc6Puzp9Nm7kKA/5NTxSRVAOohNlxVes4pJH0hday5yATKOi VNU+ScJr/TgJCp8ul7AQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579G8aA (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:16 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:27 +0200 Subject: [PATCH 11/14] arm64: dts: qcom: Add rpm-proc node for SMD platforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-11-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Rather than having the RPM SMD channels as the only child of a dummy SMD node, switch to representing the RPM as remoteproc like all the other remoteprocs (WCNSS, modem DSP). This allows assigning additional subdevices to it like the MPM interrupt-controller or rpm-master-stats. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 6 +- arch/arm64/boot/dts/qcom/msm8939.dtsi | 112 ++++++++++++------------- arch/arm64/boot/dts/qcom/msm8953.dtsi | 136 +++++++++++++++--------------- arch/arm64/boot/dts/qcom/msm8976.dtsi | 152 +++++++++++++++++----------------- arch/arm64/boot/dts/qcom/msm8994.dtsi | 99 +++++++++++----------- 5 files changed, 253 insertions(+), 252 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 9494b6512d87..667748612d3e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -282,10 +282,10 @@ CLUSTER_PD: power-domain-cluster { }; }; - smd { - compatible = "qcom,smd"; + rpm: remoteproc-rpm { + compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc"; - rpm { + smd-edge { interrupts = ; qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 0d9f8b951b66..f11d522586eb 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -240,6 +240,62 @@ pmu { interrupts = ; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8936-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs1_mbox 8 0>; + qcom,smd-edge = <15>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8936"; + qcom,smd-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8936", "qcom,rpmcc"; + #clock-cells = <1>; + clock-names = "xo"; + clocks = <&xo_board>; + }; + + rpmpd: power-controller { + compatible = "qcom,msm8939-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = <1>; + }; + + rpmpd_opp_svs_krait: opp2 { + opp-level = <2>; + }; + + rpmpd_opp_svs_soc: opp3 { + opp-level = <3>; + }; + + rpmpd_opp_nom: opp4 { + opp-level = <4>; + }; + + rpmpd_opp_turbo: opp5 { + opp-level = <5>; + }; + + rpmpd_opp_super_turbo: opp6 { + opp-level = <6>; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -308,62 +364,6 @@ mba_mem: mba@8cb00000 { }; }; - smd { - compatible = "qcom,smd"; - - rpm { - interrupts = ; - qcom,ipc = <&apcs1_mbox 8 0>; - qcom,smd-edge = <15>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8936"; - qcom,smd-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8936", "qcom,rpmcc"; - #clock-cells = <1>; - clock-names = "xo"; - clocks = <&xo_board>; - }; - - rpmpd: power-controller { - compatible = "qcom,msm8939-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = <1>; - }; - - rpmpd_opp_svs_krait: opp2 { - opp-level = <2>; - }; - - rpmpd_opp_svs_soc: opp3 { - opp-level = <3>; - }; - - rpmpd_opp_nom: opp4 { - opp-level = <4>; - }; - - rpmpd_opp_turbo: opp5 { - opp-level = <5>; - }; - - rpmpd_opp_super_turbo: opp6 { - opp-level = <6>; - }; - }; - }; - }; - }; - }; - smp2p-hexagon { compatible = "qcom,smp2p"; qcom,smem = <435>, <428>; diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi index 7d193a467819..4b2f02850a10 100644 --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi @@ -190,6 +190,74 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8953-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8953"; + qcom,smd-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8953", "qcom,rpmcc"; + clocks = <&xo_board>; + clock-names = "xo"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,msm8953-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -263,74 +331,6 @@ rmtfs@f2d00000 { }; }; - smd { - compatible = "qcom,smd"; - - rpm { - interrupts = ; - qcom,ipc = <&apcs 8 0>; - qcom,smd-edge = <15>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8953"; - qcom,smd-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8953", "qcom,rpmcc"; - clocks = <&xo_board>; - clock-names = "xo"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,msm8953-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = ; - }; - - rpmpd_opp_ret_plus: opp2 { - opp-level = ; - }; - - rpmpd_opp_min_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp4 { - opp-level = ; - }; - - rpmpd_opp_svs: opp5 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_nom: opp7 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp8 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp9 { - opp-level = ; - }; - }; - }; - }; - }; - }; - smp2p-adsp { compatible = "qcom,smp2p"; qcom,smem = <443>, <429>; diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi index 753b9a2105ed..6f856562923f 100644 --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi @@ -232,6 +232,82 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8976-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8976"; + qcom,smd-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc"; + clocks = <&xo_board>; + clock-names = "xo"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,msm8976-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + + rpmpd_opp_turbo_no_cpr: opp10 { + opp-level = ; + }; + + rpmpd_opp_turbo_high: opp111 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -346,82 +422,6 @@ wcnss_smp2p_in: slave-kernel { }; }; - smd { - compatible = "qcom,smd"; - - rpm { - interrupts = ; - qcom,ipc = <&apcs 8 0>; - qcom,smd-edge = <15>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8976"; - qcom,smd-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8976", "qcom,rpmcc"; - clocks = <&xo_board>; - clock-names = "xo"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,msm8976-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = ; - }; - - rpmpd_opp_ret_plus: opp2 { - opp-level = ; - }; - - rpmpd_opp_min_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp4 { - opp-level = ; - }; - - rpmpd_opp_svs: opp5 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_nom: opp7 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp8 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp9 { - opp-level = ; - }; - - rpmpd_opp_turbo_no_cpr: opp10 { - opp-level = ; - }; - - rpmpd_opp_turbo_high: opp111 { - opp-level = ; - }; - }; - }; - }; - }; - }; - smsm { compatible = "qcom,smsm"; diff --git a/arch/arm64/boot/dts/qcom/msm8994.dtsi b/arch/arm64/boot/dts/qcom/msm8994.dtsi index 5a7923d7c62a..6168d0aeff57 100644 --- a/arch/arm64/boot/dts/qcom/msm8994.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8994.dtsi @@ -178,6 +178,56 @@ psci { method = "hvc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8994-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + qcom,remote-pid = <6>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8994"; + qcom,smd-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8994", "qcom,rpmcc"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,msm8994-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = <1>; + }; + rpmpd_opp_svs_krait: opp2 { + opp-level = <2>; + }; + rpmpd_opp_svs_soc: opp3 { + opp-level = <3>; + }; + rpmpd_opp_nom: opp4 { + opp-level = <4>; + }; + rpmpd_opp_turbo: opp5 { + opp-level = <5>; + }; + rpmpd_opp_super_turbo: opp6 { + opp-level = <6>; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -237,55 +287,6 @@ reserved@6c00000 { }; }; - smd { - compatible = "qcom,smd"; - rpm { - interrupts = ; - qcom,ipc = <&apcs 8 0>; - qcom,smd-edge = <15>; - qcom,remote-pid = <6>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8994"; - qcom,smd-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8994", "qcom,rpmcc"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,msm8994-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = <1>; - }; - rpmpd_opp_svs_krait: opp2 { - opp-level = <2>; - }; - rpmpd_opp_svs_soc: opp3 { - opp-level = <3>; - }; - rpmpd_opp_nom: opp4 { - opp-level = <4>; - }; - rpmpd_opp_turbo: opp5 { - opp-level = <5>; - }; - rpmpd_opp_super_turbo: opp6 { - opp-level = <6>; - }; - }; - }; - }; - }; - }; - smem { compatible = "qcom,smem"; memory-region = <&smem_mem>; From patchwork Mon Jun 5 07:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689538 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A25CEC7EE23 for ; Mon, 5 Jun 2023 07:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbjFEHNv (ORCPT ); Mon, 5 Jun 2023 03:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbjFEHNo (ORCPT ); Mon, 5 Jun 2023 03:13:44 -0400 X-Greylist: delayed 198 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 05 Jun 2023 00:13:18 PDT Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7354FE9; Mon, 5 Jun 2023 00:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948957; cv=none; d=strato.com; s=strato-dkim-0002; b=b657zrQqvPu4za85frUd2bltInPx1f84OGTuKvRgOdn44+/2zL3nxlZhTE4F/K/LRC AmYZrFn+WpoeKR6n+B+2iowDutTJZARDBKVWwj24TD6sQB+4A0+PgMtyPP/pseFS58oY JYSnrtQ4GSW5XrLUD3CFmQsN1nKBfGrxug76Yr2gGYTXhWGNmUy2OQLJobio8BgcYwNF bY0g9Z4oER/oVMKACmDMrN83oHLEv0ddPFTSwZLZOkCKsOBHNcRGi7ijqjWe4R/E2ViD v2aontARBU3VY+pDKhGvhFDqrNT3Md50FjS5Ph4wX5FwX09mypDE8OELdrZJ3gsx5+z8 yGZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948957; 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=KHSGog7wb9BukbetVuAx+Zk3mLU2H0MIZP8+cwkTIy0=; b=sdrmJrL05iKYQzSGOy9k8bqzSOaWMDmNEgPC+XFMpQJKnDpECGnw3CsURc/Ys4O8WT 0Krpbkg7S2dIXYbfA/PVK2+3wOF6mKsRJEk2FuhT7Nf7yPBIrZcRHqcu6g3WGH2duwRF WuIY6mHBYIO8+k4er6vIM2UNleh+nzstXb5WTk7fncGhul73680Jn2ksNFu0tq1OXSxn DBcke03PWIl72pJks5Z4VMccN65J1mM2qmzu8K6zqZ/E5XOdoviya6FY/SdNsW5yUASo 3o4bVlKX1IadtpYW8eT8TeP7BCvxs6XJ7Gr+zfcFW/g0cW0E5S+yTK+BFNaB0lUnhy4g 2XCQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948957; 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=KHSGog7wb9BukbetVuAx+Zk3mLU2H0MIZP8+cwkTIy0=; b=J1k4wPrxp134VPaGN6KiUljygNY4jOS7PLI8SBA63fdvJJzNNUfydDvEEPKnhDR7zu oouVRVc//Ctng3Hy8tRn6yFZKRt3KxtKaIENdbi9BlpTVlqoaSuR8mssV3gCD+y4ZzEq gUMf1WbH6hJQYXBRUpR3DowN7rhp2Asj20zdcvdFxxxn0OXn1uJ7RUgcw5r2wmEiSuKy Bvzi3e6Tuc3hvoNmQ3KBZmoHVBsWB9S+Fw7A/tjL/v1GVMT2OrSIADDuN889LXib7wKV HYPm7yLwmb1FFfeVXnEY3R9P+qb+07FEYh1ydfm3VR5WLZ3LYTmV54INwPh09VNRHqdH 7AfA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948957; 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=KHSGog7wb9BukbetVuAx+Zk3mLU2H0MIZP8+cwkTIy0=; b=ok83rOxtlq7pnkWA540QNgTZw5DiCjSL2sAtNKUUWZOXY191lz+ufXRU9zOJWcgPct 5EnZLNYuxxb5vkTIPEAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579G8aC (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:16 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:28 +0200 Subject: [PATCH 12/14] arm64: dts: qcom: Add rpm-proc node for GLINK gplatforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-12-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Rather than having the RPM GLINK channels as the only child of a dummy top-level rpm-glink node, switch to representing the RPM as remoteproc like all the other remoteprocs (modem DSP, ...). This allows assigning additional subdevices to it like the MPM interrupt-controller or rpm-master-stats. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 48 ++++++----- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 28 ++++--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 113 ++++++++++++------------- arch/arm64/boot/dts/qcom/msm8998.dtsi | 98 +++++++++++----------- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 126 ++++++++++++++-------------- arch/arm64/boot/dts/qcom/qcs404.dtsi | 152 +++++++++++++++++----------------- arch/arm64/boot/dts/qcom/sdm630.dtsi | 132 +++++++++++++++-------------- arch/arm64/boot/dts/qcom/sm6115.dtsi | 128 ++++++++++++++-------------- arch/arm64/boot/dts/qcom/sm6125.dtsi | 140 ++++++++++++++++--------------- arch/arm64/boot/dts/qcom/sm6375.dtsi | 126 ++++++++++++++-------------- 10 files changed, 564 insertions(+), 527 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 7355f266742a..fff4a4014bd8 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -146,6 +146,32 @@ psci: psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,ipq6018-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-ipq6018"; + qcom,glink-channels = "rpm_requests"; + + regulators { + compatible = "qcom,rpm-mp5496-regulators"; + + ipq6018_s2: s2 { + regulator-min-microvolt = <725000>; + regulator-max-microvolt = <1062500>; + regulator-always-on; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -182,28 +208,6 @@ q6_region: memory@4ab00000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-ipq6018"; - qcom,glink-channels = "rpm_requests"; - - regulators { - compatible = "qcom,rpm-mp5496-regulators"; - - ipq6018_s2: s2 { - regulator-min-microvolt = <725000>; - regulator-max-microvolt = <1062500>; - regulator-always-on; - }; - }; - }; - }; - smem { compatible = "qcom,smem"; memory-region = <&smem_region>; diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 0baeb10bbdae..3222568ac4cf 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -151,6 +151,22 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,ipq9574-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-ipq9574"; + qcom,glink-channels = "rpm_requests"; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -169,18 +185,6 @@ smem@4aa00000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-ipq9574"; - qcom,glink-channels = "rpm_requests"; - }; - }; - soc: soc@0 { compatible = "simple-bus"; #address-cells = <1>; diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index f75932cc2a30..50ede09d6368 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -398,6 +398,63 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8996-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8996"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8996", "qcom,rpmcc"; + #clock-cells = <1>; + clocks = <&xo_board>; + clock-names = "xo"; + }; + + rpmpd: power-controller { + compatible = "qcom,msm8996-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp1: opp1 { + opp-level = <1>; + }; + + rpmpd_opp2: opp2 { + opp-level = <2>; + }; + + rpmpd_opp3: opp3 { + opp-level = <3>; + }; + + rpmpd_opp4: opp4 { + opp-level = <4>; + }; + + rpmpd_opp5: opp5 { + opp-level = <5>; + }; + + rpmpd_opp6: opp6 { + opp-level = <6>; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -472,62 +529,6 @@ mdata_mem: mpss-metadata { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - - interrupts = ; - - qcom,rpm-msg-ram = <&rpm_msg_ram>; - - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8996"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8996", "qcom,rpmcc"; - #clock-cells = <1>; - clocks = <&xo_board>; - clock-names = "xo"; - }; - - rpmpd: power-controller { - compatible = "qcom,msm8996-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp1: opp1 { - opp-level = <1>; - }; - - rpmpd_opp2: opp2 { - opp-level = <2>; - }; - - rpmpd_opp3: opp3 { - opp-level = <3>; - }; - - rpmpd_opp4: opp4 { - opp-level = <4>; - }; - - rpmpd_opp5: opp5 { - opp-level = <5>; - }; - - rpmpd_opp6: opp6 { - opp-level = <6>; - }; - }; - }; - }; - }; - smem { compatible = "qcom,smem"; memory-region = <&smem_mem>; diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index f0e943ff0046..bc51fa6a18aa 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -321,68 +321,72 @@ psci { method = "smc"; }; - rpm-glink { - compatible = "qcom,glink-rpm"; + rpm: remoteproc-rpm { + compatible = "qcom,msm8998-rpm-proc", "qcom,rpm-proc"; - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; + glink-rpm { + compatible = "qcom,glink-rpm"; - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8998"; - qcom,glink-channels = "rpm_requests"; + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8998", "qcom,rpmcc"; - #clock-cells = <1>; - }; + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8998"; + qcom,glink-channels = "rpm_requests"; - rpmpd: power-controller { - compatible = "qcom,msm8998-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8998", "qcom,rpmcc"; + #clock-cells = <1>; + }; - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; + rpmpd: power-controller { + compatible = "qcom,msm8998-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; - rpmpd_opp_ret: opp1 { - opp-level = ; - }; + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; - rpmpd_opp_ret_plus: opp2 { - opp-level = ; - }; + rpmpd_opp_ret: opp1 { + opp-level = ; + }; - rpmpd_opp_min_svs: opp3 { - opp-level = ; - }; + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; - rpmpd_opp_low_svs: opp4 { - opp-level = ; - }; + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; - rpmpd_opp_svs: opp5 { - opp-level = ; - }; + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; - rpmpd_opp_svs_plus: opp6 { - opp-level = ; - }; + rpmpd_opp_svs: opp5 { + opp-level = ; + }; - rpmpd_opp_nom: opp7 { - opp-level = ; - }; + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; - rpmpd_opp_nom_plus: opp8 { - opp-level = ; - }; + rpmpd_opp_nom: opp7 { + opp-level = ; + }; - rpmpd_opp_turbo: opp9 { - opp-level = ; - }; + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; - rpmpd_opp_turbo_plus: opp10 { - opp-level = ; + rpmpd_opp_turbo_plus: opp10 { + opp-level = ; + }; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index b29bc4e4b837..ad1b721d1e1e 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -137,6 +137,71 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,qcm2290-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-qcm2290"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-qcm2290", "qcom,rpmcc"; + clocks = <&xo_board>; + clock-names = "xo"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,qcm2290-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_min_svs: opp1 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp2 { + opp-level = ; + }; + + rpmpd_opp_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp4 { + opp-level = ; + }; + + rpmpd_opp_nom: opp5 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp7 { + opp-level = ; + }; + + rpmpd_opp_turbo_plus: opp8 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -227,67 +292,6 @@ rmtfs_mem: memory@89b01000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-qcm2290"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-qcm2290", "qcom,rpmcc"; - clocks = <&xo_board>; - clock-names = "xo"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,qcm2290-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_min_svs: opp1 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp2 { - opp-level = ; - }; - - rpmpd_opp_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp4 { - opp-level = ; - }; - - rpmpd_opp_nom: opp5 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp7 { - opp-level = ; - }; - - rpmpd_opp_turbo_plus: opp8 { - opp-level = ; - }; - }; - }; - }; - }; - smp2p-adsp { compatible = "qcom,smp2p"; qcom,smem = <443>, <429>; diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 972f753847e1..329363cace5a 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -166,6 +166,84 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,qcs404-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-qcs404"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-qcs404", "qcom,rpmcc"; + #clock-cells = <1>; + clocks = <&xo_board>; + clock-names = "xo"; + }; + + rpmpd: power-controller { + compatible = "qcom,qcs404-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = <16>; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = <32>; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = <48>; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = <64>; + }; + + rpmpd_opp_svs: opp5 { + opp-level = <128>; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = <192>; + }; + + rpmpd_opp_nom: opp7 { + opp-level = <256>; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = <320>; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = <384>; + }; + + rpmpd_opp_turbo_no_cpr: opp10 { + opp-level = <416>; + }; + + rpmpd_opp_turbo_plus: opp11 { + opp-level = <512>; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -217,80 +295,6 @@ uefi_mem: memory@9f800000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-qcs404"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-qcs404", "qcom,rpmcc"; - #clock-cells = <1>; - clocks = <&xo_board>; - clock-names = "xo"; - }; - - rpmpd: power-controller { - compatible = "qcom,qcs404-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = <16>; - }; - - rpmpd_opp_ret_plus: opp2 { - opp-level = <32>; - }; - - rpmpd_opp_min_svs: opp3 { - opp-level = <48>; - }; - - rpmpd_opp_low_svs: opp4 { - opp-level = <64>; - }; - - rpmpd_opp_svs: opp5 { - opp-level = <128>; - }; - - rpmpd_opp_svs_plus: opp6 { - opp-level = <192>; - }; - - rpmpd_opp_nom: opp7 { - opp-level = <256>; - }; - - rpmpd_opp_nom_plus: opp8 { - opp-level = <320>; - }; - - rpmpd_opp_turbo: opp9 { - opp-level = <384>; - }; - - rpmpd_opp_turbo_no_cpr: opp10 { - opp-level = <416>; - }; - - rpmpd_opp_turbo_plus: opp11 { - opp-level = <512>; - }; - }; - }; - }; - }; - smem { compatible = "qcom,smem"; diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi index 897f2440c9c8..2dfaec074c24 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -359,6 +359,74 @@ psci { method = "smc"; }; + rpm: remoteproc-rpm { + compatible = "qcom,sdm660-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-sdm660"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-sdm660", "qcom,rpmcc"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,sdm660-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -440,70 +508,6 @@ zap_shader_region: gpu@fed00000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-sdm660"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-sdm660", "qcom,rpmcc"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,sdm660-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = ; - }; - - rpmpd_opp_ret_plus: opp2 { - opp-level = ; - }; - - rpmpd_opp_min_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp4 { - opp-level = ; - }; - - rpmpd_opp_svs: opp5 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_nom: opp7 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp8 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp9 { - opp-level = ; - }; - }; - }; - }; - }; - smem: smem { compatible = "qcom,smem"; memory-region = <&smem_region>; diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 55118577bf92..d3ea67f7563d 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -341,6 +341,72 @@ CLUSTER_1_PD: power-domain-cpu-cluster1 { }; }; + rpm: remoteproc-rpm { + compatible = "qcom,sm6115-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-sm6115"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-sm6115", "qcom,rpmcc"; + clocks = <&xo_board>; + clock-names = "xo"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,sm6115-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_min_svs: opp1 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp2 { + opp-level = ; + }; + + rpmpd_opp_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp4 { + opp-level = ; + }; + + rpmpd_opp_nom: opp5 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp7 { + opp-level = ; + }; + + rpmpd_opp_turbo_plus: opp8 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -440,68 +506,6 @@ rmtfs_mem: memory@89b01000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-sm6115"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-sm6115", "qcom,rpmcc"; - clocks = <&xo_board>; - clock-names = "xo"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,sm6115-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_min_svs: opp1 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp2 { - opp-level = ; - }; - - rpmpd_opp_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp4 { - opp-level = ; - }; - - rpmpd_opp_nom: opp5 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp7 { - opp-level = ; - }; - - rpmpd_opp_turbo_plus: opp8 { - opp-level = ; - }; - }; - }; - }; - }; - smp2p-adsp { compatible = "qcom,smp2p"; qcom,smem = <443>, <429>; diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi index a596baa6ce3e..1d05ddf35e35 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -181,6 +181,78 @@ psci { method = "smc"; }; + remoteproc-rpm { + compatible = "qcom,sm6125-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + + interrupts = ; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-sm6125"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-sm6125", "qcom,rpmcc"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,sm6125-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_ret_plus: opp2 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs: opp5 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom: opp7 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp9 { + opp-level = ; + }; + + rpmpd_opp_turbo_no_cpr: opp10 { + opp-level = ; + }; + }; + }; + }; + }; + }; + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -292,74 +364,6 @@ qseecom_ta_mem: memory@13fc00000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - - interrupts = ; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&apcs_glb 0>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-sm6125"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-sm6125", "qcom,rpmcc"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,sm6125-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = ; - }; - - rpmpd_opp_ret_plus: opp2 { - opp-level = ; - }; - - rpmpd_opp_min_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp4 { - opp-level = ; - }; - - rpmpd_opp_svs: opp5 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp6 { - opp-level = ; - }; - - rpmpd_opp_nom: opp7 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp8 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp9 { - opp-level = ; - }; - - rpmpd_opp_turbo_no_cpr: opp10 { - opp-level = ; - }; - }; - }; - }; - }; - smem: smem { compatible = "qcom,smem"; memory-region = <&smem_mem>; diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi index f8d9c34d3b2f..9834c5089fe8 100644 --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi @@ -493,67 +493,71 @@ cmdline_region: cmdline@ffd00000 { }; }; - rpm-glink { - compatible = "qcom,glink-rpm"; - interrupts-extended = <&ipcc IPCC_CLIENT_AOP - IPCC_MPROC_SIGNAL_GLINK_QMP - IRQ_TYPE_EDGE_RISING>; - qcom,rpm-msg-ram = <&rpm_msg_ram>; - mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-sm6375"; - qcom,glink-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-sm6375", "qcom,rpmcc"; - clocks = <&xo_board_clk>; - clock-names = "xo"; - #clock-cells = <1>; - }; - - rpmpd: power-controller { - compatible = "qcom,sm6375-rpmpd"; - #power-domain-cells = <1>; - operating-points-v2 = <&rpmpd_opp_table>; - - rpmpd_opp_table: opp-table { - compatible = "operating-points-v2"; - - rpmpd_opp_ret: opp1 { - opp-level = ; - }; - - rpmpd_opp_min_svs: opp2 { - opp-level = ; - }; - - rpmpd_opp_low_svs: opp3 { - opp-level = ; - }; - - rpmpd_opp_svs: opp4 { - opp-level = ; - }; - - rpmpd_opp_svs_plus: opp5 { - opp-level = ; - }; - - rpmpd_opp_nom: opp6 { - opp-level = ; - }; - - rpmpd_opp_nom_plus: opp7 { - opp-level = ; - }; - - rpmpd_opp_turbo: opp8 { - opp-level = ; - }; - - rpmpd_opp_turbo_no_cpr: opp9 { - opp-level = ; + remoteproc-rpm { + compatible = "qcom,sm6375-rpm-proc", "qcom,rpm-proc"; + + glink-rpm { + compatible = "qcom,glink-rpm"; + interrupts-extended = <&ipcc IPCC_CLIENT_AOP + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-sm6375"; + qcom,glink-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-sm6375", "qcom,rpmcc"; + clocks = <&xo_board_clk>; + clock-names = "xo"; + #clock-cells = <1>; + }; + + rpmpd: power-controller { + compatible = "qcom,sm6375-rpmpd"; + #power-domain-cells = <1>; + operating-points-v2 = <&rpmpd_opp_table>; + + rpmpd_opp_table: opp-table { + compatible = "operating-points-v2"; + + rpmpd_opp_ret: opp1 { + opp-level = ; + }; + + rpmpd_opp_min_svs: opp2 { + opp-level = ; + }; + + rpmpd_opp_low_svs: opp3 { + opp-level = ; + }; + + rpmpd_opp_svs: opp4 { + opp-level = ; + }; + + rpmpd_opp_svs_plus: opp5 { + opp-level = ; + }; + + rpmpd_opp_nom: opp6 { + opp-level = ; + }; + + rpmpd_opp_nom_plus: opp7 { + opp-level = ; + }; + + rpmpd_opp_turbo: opp8 { + opp-level = ; + }; + + rpmpd_opp_turbo_no_cpr: opp9 { + opp-level = ; + }; }; }; }; From patchwork Mon Jun 5 07:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 689543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A69B7C7EE3A for ; Mon, 5 Jun 2023 07:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjFEHKr (ORCPT ); Mon, 5 Jun 2023 03:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbjFEHKV (ORCPT ); Mon, 5 Jun 2023 03:10:21 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 501D8E53; Mon, 5 Jun 2023 00:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685948957; cv=none; d=strato.com; s=strato-dkim-0002; b=M3vcM1EaSIEuwhPTdmCsBNTsmaK24EJTUjNKNjA0ach/WF1SsMloBGIGBOYFgGH7ll n6Eh4+jWRa98vwPBTrEfYuPeosoyPc1xK4YnIzAzqnk20RRzqxf2RyArKKLcxJmUlirQ blyuVFKzyCZRoW60B/dTKWFU+2xuHd9viM/kKSLY5hnnXe2GofkO7PmRyCY76vgHt34G rpCPVla62U6deoKp3NZdHvs1PnFiQodInqGxCORhSg+V0jb2ZkpSnrjVOMK0mvFX+O4b emgOFnJ1da2oz0VLRc95gPdx+oP1zWu5uGqXJqXsuTDblC9JpHn5niD35a7nXVYoGRjy ZABA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948957; 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=x/WGFJ5dS8IBUV+BspimUaGPpfE9XxQTRhMM/mkoqZU=; b=N9el5c6Dw2OpXsq2kYFq4ieIccprrpikDkUZPasmmnQkgG3IKsdh4eiFTSJaYKQf2A ksmcg6Iw7jMpN1kw4SX4YFjNIzSHroMZ07PrNWL/1AwYx+EL6AxV+VVzzBsnswKp9xuo xcD0S8SYpkAsEJmoCGtkucprEtm8LvfhSjEfOQhoVcyKrop238i75n6WSoSR+P2X13/C KukMl1c7K6T2FBp+tFflHSxaCsmEpRREFk78kBFE96VALMRUA4hb7wTZ4QXWYiHGCHJo sPZLVEQJXCJj4HG6gSNKPFCUJ8db00KkcEYkAp/JEKzCH1Qa/VsuC8QTrJfp+jLEH80a RWew== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1685948957; 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=x/WGFJ5dS8IBUV+BspimUaGPpfE9XxQTRhMM/mkoqZU=; b=aRQ7Vsich/tdPpKsodHnaf0MJKx7gaH8RltukTCixuQoh0Q3DWQaVbkrlHPRhNGPQf HVWnK3XyO3Vy0PLMQ9Zy5H7xGnKdQB95MMaQKrWmSOpSKwQIYQo08UJ9SKyMT+TgIPAc cWUHcn+lcbdo3lNNhKQqJ1Qucr1sc3iA4Q8c69ykz2wKqrQW62orPvUzxw6TqzCXjIWi SOfX4aHdQcFf7jrdwQr8MXh+XuzFhVaB9W3A6jP/dwrjOPPbX0ndeQvqx/WLPRzf5f4Q VuP+AawJlIDNGJ71S7wmHnxcPgq9mp6Uvu2sGWVadk4idSzYOJRXwzBpu60ZmXK7vy9p 70HQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1685948957; 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=x/WGFJ5dS8IBUV+BspimUaGPpfE9XxQTRhMM/mkoqZU=; b=h8pQOuTnvtsh4jDMC+d73UpD7Wrcp3XKtyY2GUIxDuZYvHUeAkbhloqTb6ij+SOMT/ GvZNhCVMhgrqjGIFiMAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL5nz0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z5579H8aD (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 5 Jun 2023 09:09:17 +0200 (CEST) From: Stephan Gerhold Date: Mon, 05 Jun 2023 09:08:29 +0200 Subject: [PATCH 13/14] ARM: dts: qcom: Add rpm-proc node for SMD platforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v1-13-e0a3b6de1f14@gerhold.net> References: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v1-0-e0a3b6de1f14@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mathieu Poirier , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Rather than having the RPM SMD channels as the only child of a dummy SMD node, switch to representing the RPM as remoteproc like all the other remoteprocs (WCNSS, modem DSP). This allows assigning additional subdevices to it like the MPM interrupt-controller or rpm-master-stats. Signed-off-by: Stephan Gerhold --- arch/arm/boot/dts/qcom-apq8084.dtsi | 6 ++--- arch/arm/boot/dts/qcom-msm8226.dtsi | 38 ++++++++++++++++---------------- arch/arm/boot/dts/qcom-msm8974.dtsi | 44 ++++++++++++++++++------------------- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi index 8f178bc87e1d..b24e3bd89ae7 100644 --- a/arch/arm/boot/dts/qcom-apq8084.dtsi +++ b/arch/arm/boot/dts/qcom-apq8084.dtsi @@ -784,10 +784,10 @@ spmi_bus: spmi@fc4cf000 { }; }; - smd { - compatible = "qcom,smd"; + rpm: remoteproc-rpm { + compatible = "qcom,apq8084-rpm-proc", "qcom,rpm-proc"; - rpm { + smd-edge { interrupts = ; qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi index a3a9162e9c28..38867a9e07a0 100644 --- a/arch/arm/boot/dts/qcom-msm8226.dtsi +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi @@ -53,26 +53,10 @@ pmu { IRQ_TYPE_LEVEL_HIGH)>; }; - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - smem_region: smem@3000000 { - reg = <0x3000000 0x100000>; - no-map; - }; - - adsp_region: adsp@dc00000 { - reg = <0x0dc00000 0x1900000>; - no-map; - }; - }; - - smd { - compatible = "qcom,smd"; + rpm: remoteproc-rpm { + compatible = "qcom,msm8226-rpm-proc", "qcom,rpm-proc"; - rpm { + smd-edge { interrupts = ; qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; @@ -120,6 +104,22 @@ rpmpd_opp_super_turbo: opp6 { }; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + smem_region: smem@3000000 { + reg = <0x3000000 0x100000>; + no-map; + }; + + adsp_region: adsp@dc00000 { + reg = <0x0dc00000 0x1900000>; + no-map; + }; + }; + smem { compatible = "qcom,smem"; diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 58e144957c5d..edffd3afec2a 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -113,6 +113,28 @@ pmu { interrupts = ; }; + rpm: remoteproc-rpm { + compatible = "qcom,msm8974-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-msm8974"; + qcom,smd-channels = "rpm_requests"; + + rpmcc: clock-controller { + compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc"; + #clock-cells = <1>; + clocks = <&xo_board>; + clock-names = "xo"; + }; + }; + }; + }; + reserved-memory { #address-cells = <1>; #size-cells = <1>; @@ -293,28 +315,6 @@ wcnss_smsm: wcnss@7 { }; }; - smd { - compatible = "qcom,smd"; - - rpm { - interrupts = ; - qcom,ipc = <&apcs 8 0>; - qcom,smd-edge = <15>; - - rpm_requests: rpm-requests { - compatible = "qcom,rpm-msm8974"; - qcom,smd-channels = "rpm_requests"; - - rpmcc: clock-controller { - compatible = "qcom,rpmcc-msm8974", "qcom,rpmcc"; - #clock-cells = <1>; - clocks = <&xo_board>; - clock-names = "xo"; - }; - }; - }; - }; - soc: soc { #address-cells = <1>; #size-cells = <1>;