From patchwork Thu Jun 8 07:10:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 691471 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 8356CC7EE2E for ; Thu, 8 Jun 2023 07:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235283AbjFHHLR (ORCPT ); Thu, 8 Jun 2023 03:11:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234897AbjFHHLQ (ORCPT ); Thu, 8 Jun 2023 03:11:16 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2A41BE4; Thu, 8 Jun 2023 00:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208271; cv=none; d=strato.com; s=strato-dkim-0002; b=JfzrTN3jjW7ZrfuwFaz+gKLBQg4XKZVVYBtregthYkc7xihIpIA9ucQTg+nnJRDAGC NYy3nlTDLHcc5m4R81hxnL99VYRYN/0j3bjVTsr/FoQu6CEih8Tkm4DdMHS1MmNG68hU e1WLL67M/W6rIjt2RAeuxSn7t6fShQAGwJDQfBn3KyYm41YB2U5t+l0nNCvOa1wLZY+U Nin12b8og9IXr1AQDONuPToC4DSA05R51V1KyrR+dfe3mjGFxiBFpI7tHoQcZ+iUzahA Euj8dFt+4mn+lJ4oa2j3Cw+a82L9QByNVWa7CrtmJUdrYh38+NniVWYRI0CyoaHsZgOc P+EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208271; 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=oE3ou2mgJ08zgiqHPDSR6aNlOJa/SmAfuDKO8qDHnb8=; b=cosQvJKDkdkrDrAnZ39pL7eZCSrRqIWrq2ImIHTmE8imnFkbHEdFPIji3YJcovwYpK GVWc10IvZyIkmnqTXE07wgVDUIIVye7Ker9exIKiFVeftLajLKGgbTGoBXtSJQe/7s6a YXUrV6eCmxbhEsW4HRRy2YawP8KoFofBrP1vXFslwoGg6Od+nGXptuNrwBOORju3ynA5 M+GaaPK5f8baj9TnhhoXTyOxhZbJpF88I1F16JfbzNRLoApUxj0QP4IrvfHHpc8eegjC aSX3upPWDLwXnZLvyxNX8F2zb5cmvwrQSBINv2iCs+cnpgreUO6N3MCw8j+oh9RCAX6m o8+w== 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=1686208271; 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=oE3ou2mgJ08zgiqHPDSR6aNlOJa/SmAfuDKO8qDHnb8=; b=OlVaVGarKokY0C/zxiTpglpS/Y/Sf5b5id7jFoZtQAx6oq2GkKFyfye/GLabo5NA20 IMtJSeTsG56fFblk0Qr4YvUJOqukGbQLkc2vz+m6Fo6MLGtprPT+2rZBR9/2zVYm2drO rR/qORY33n05vRYhXLdyJLC3/YRqaMmzE1So5D6eSHjbhNfAWBuhus7KOyLIG+KeW3vd Yn40H8xYG/SsjOZTNW0M69jD/b2Hmfdbguz+7R+FBdUWma7VLyodJQJBSGDBn7PoTdUb fGMWP/Q21QbIuZdLYhUVWuv5jQCtoXAXA3lhxRrStVa2l29N05XAhZ1NYlYSjEr6iXnN W1Ew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208271; 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=oE3ou2mgJ08zgiqHPDSR6aNlOJa/SmAfuDKO8qDHnb8=; b=7raMcyWZFG/PHwY3zFgQOzjYtUWBqw4EUNciDv+x1eb5Zr+z7To0sR4/c3AzG9oaXZ ywB8uw0VC1C5I+JzsTDg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BBKHu (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:11 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:21 +0200 Subject: [PATCH v2 01/12] dt-bindings soc: qcom: smd-rpm: Fix sort order MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-1-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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 , Krzysztof Kozlowski X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some of the enum entries are not properly ordered, fix that. Acked-by: Krzysztof Kozlowski Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml index 65c02a7fef80..fe814b991559 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml @@ -44,12 +44,12 @@ properties: - qcom,rpm-msm8994 - qcom,rpm-msm8996 - qcom,rpm-msm8998 + - qcom,rpm-qcm2290 + - qcom,rpm-qcs404 - qcom,rpm-sdm660 - qcom,rpm-sm6115 - qcom,rpm-sm6125 - qcom,rpm-sm6375 - - qcom,rpm-qcm2290 - - qcom,rpm-qcs404 clock-controller: $ref: /schemas/clock/qcom,rpmcc.yaml# @@ -84,9 +84,9 @@ if: - qcom,rpm-msm8226 - qcom,rpm-msm8916 - qcom,rpm-msm8936 + - qcom,rpm-msm8953 - qcom,rpm-msm8974 - qcom,rpm-msm8976 - - qcom,rpm-msm8953 - qcom,rpm-msm8994 then: properties: From patchwork Thu Jun 8 07:10:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 691470 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 549E3C87FDC for ; Thu, 8 Jun 2023 07:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235311AbjFHHLT (ORCPT ); Thu, 8 Jun 2023 03:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235284AbjFHHLR (ORCPT ); Thu, 8 Jun 2023 03:11:17 -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 2F2021FDC; Thu, 8 Jun 2023 00:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208272; cv=none; d=strato.com; s=strato-dkim-0002; b=lg6Om4QDsNWs7+FmoQcziCTJNt5U599S2HuIu4zJaLFlBnfQdQT/955Z+4mKmBt5kh oYqvsSumL8qmZb+/NbJoJfug2LM05H13kfEfghOFulheg6tA1ol9iYmceq4RQ2sFdDuV B5lED/7td6WComqqIaIsQu/YrrIkmdrwZE1NxD/Xy22mhUPayO++N9NoghDiSeqNXzD/ pP3IE8UPur6dSKUsYWmgvGacz/vJ/9CQtFUsswv0OInoLbntV3pwmLRw5Lm64M8HYj5w eybQ3NXj4ILey3ty3Pbew1l5WBk+OyLg1w67DZabdwgrWD+nTMyLI4X3W7aSGbaBlsIP bXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208272; 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=zIP6Ad+n6GtTcdAN99toMZU1nMdvUwM/xKmNfiwoI/o=; b=H8oP07qbE+mBJJJzVh0Rn4FRDOviNnuVfxLLPpMpJ/Zi389aZE/fY/RKAA5i6pnp/b /5ypSCInaII7caP0n3zh6WeGjU4BN5Ka/rsIlK6AwpEMqzC0Jx3ocB41nrZLCRQyUKGj Os8LRbi+FfXsHTL06Za9Otj+bepHa7Q+DI283UgpdW8I765Nj1LbwvDRfU3favy9yGfj EfShtXWeyH3IhU8ozRrnRilTke3Bq+Z3cC/Ylkv40Pc/F388ifjy+vVr3jZItMrKoqSy nDMq/Hj0emDAtrUllaJ+vpQfPUYeRzEs5X6ECPGR0BoJn9tG1K3iqBJHj0M5t7s28Sg6 N4qQ== 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=1686208272; 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=zIP6Ad+n6GtTcdAN99toMZU1nMdvUwM/xKmNfiwoI/o=; b=EbfbsfgV0Sv8mh6sgknLefjtuDEzgECz/O3uhsscBRmgGtHCVpQ0lpD61FpoExMkKO YHeWU1N2pPbxZf9ZiwCREBP7FJIvq77QLDsK5E035CYCUmFfCnUB324KrHJeM0/zUVMp Vm+/dePHnwlP+CxvyJn2nX90Q617Ns6CVuRgoXrP29zlUhMF6psN6IhyNm5lPH4ykZAY nGKFN21wR0IzjOA/x2ZtkidHlHMbw6V/2Wqvia3nTLlYdiXHKTOrNOcvl0cwJaTbR9o3 vxjlSqKtZDgBte/ZZ8AhES4M//zOp5u8oaqdPetCr688qD5vQg0IvoKyy4RcKDYjxwAP 2Feg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208272; 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=zIP6Ad+n6GtTcdAN99toMZU1nMdvUwM/xKmNfiwoI/o=; b=n+dmEAkCytzWFOoiLThsrzpfCUlIjJePl3kJDrdrrHW/AvQiA9EcOGawv6Sk0YTLRU rebnGBOOUmwQnbXPv3Cg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BBKHv (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:11 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:22 +0200 Subject: [PATCH v2 02/12] dt-bindings: soc: qcom: smd-rpm: Add MSM8909 to qcom,smd-channels MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-2-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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 , Krzysztof Kozlowski X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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") Reviewed-by: Krzysztof Kozlowski 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 Thu Jun 8 07:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 690626 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 C0BF7C87FDE for ; Thu, 8 Jun 2023 07:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235328AbjFHHLU (ORCPT ); Thu, 8 Jun 2023 03:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbjFHHLR (ORCPT ); Thu, 8 Jun 2023 03:11:17 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C0912694; Thu, 8 Jun 2023 00:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208272; cv=none; d=strato.com; s=strato-dkim-0002; b=XJR0jd71F+rWenXJM/58px9IFU+DcItyBaqRkBfnzIhiceDI0Y9m7OYqsPn1+Ord4m vBpbwPIggKYmbcwTgWsMCt7yf0Wjjnum1PBDCbKzmcfcol0lbcdGsqa1YgZ2W+QG3u/J fer1SQg1NZqTXSboe4WWSmbnkQjgFGJuv3h/zDVApyXK4FqjiCiota2Fa52HtkhekRTa t35e7KRgNS4UyQNfDpqnMw4/79TZT3PSv6nhtEx+G49UNUXm+1wG4RXL/tLVzYFUhjoO zT7mJSB3j04biE0ZX3xEUWeqMERY8L8rfJFxFtbQZ+dqVMIaNhA8LGgzUzT1Xoooo0Fw FsaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208272; 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=nRkyocmmJe+ZT+D2mB6MkX0aB75RjEJdyVVI5mxHOIk=; b=oAyQgkFBtXgvxRlo6CvoNcxbbtn60cGDHIyEcK0Vr79nVvhr3CT51WLucPuJ06U65h 1nL8U+lzrz0SZoqgir4I8Wdqv/69/nh//O/iAuS7b5vYBgYsxZTvn4L3Nkti6XdDkjvD YEfSpRQqZjQv0vyaLJ1rtDcjo2XjTTwQpZlawlckdo9M+us27kdzTwRG3L5AcjhaBfjI Dy5ZaJ/9WRNfO7fFhpRdVwWx1h8SKbYFJiHPyuay5/A2roUT5PjDt5zr0izu6Snd+vVO ZJQ+hoKT3y3yG44yR/RbNuJEhwTFQz3S/ApQ7xr+E1GFMVObJkcsC1RH8inrInV/Q79B JuHw== 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=1686208272; 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=nRkyocmmJe+ZT+D2mB6MkX0aB75RjEJdyVVI5mxHOIk=; b=p6AP9J1+JEO43kscmbckDGWYjBgA/2NRUtWRlYB8TORWIL4A2v0y3sYVbjPWUn4FVM XpNGrV5jpi9pCm7qVtHBT6an7OCjYc8NyCUmHd2i1rJ/1cTGGtgs8aJiQC/fI8S2p9dT e/lx57Kys91WDQeMQgVooCJe64sODSd48Eji8eWXwp2AkXyecsywlfV5wxDo4LD3TSOe PfNzGFjj1cgmmTbuRsddmkA06qNEQG6MnrMLKaSuzjNgskNcErihhGsKwAp7bxuVGs30 jok47WQDePvrrvbFB+6zE10U7cojvFJubO8ddKHsWrMC0BCtVwlh9/fNY3OMiJMoGDhr zsfA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208272; 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=nRkyocmmJe+ZT+D2mB6MkX0aB75RjEJdyVVI5mxHOIk=; b=Ec6fOHaSbQq7awNDZCZfZYq2wYFk+XwkoWK/B4K32amDtAJdS+AKLPAicDCzrxNfXU BC4vt5dlycHx2929ipCQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BCKHw (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:12 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:23 +0200 Subject: [PATCH v2 03/12] dt-bindings: soc: qcom: smd-rpm: Add some more compatibles MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-3-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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 , Krzysztof Kozlowski X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org To avoid several more small patches adding new RPM compatibles in the future, add MDM9607, MSM8610, MSM8917, MSM8937 and MSM8952 at once. All of these have been worked on over the time by some people and are definitely compatible as-is with the smd-rpm driver. Acked-by: Krzysztof Kozlowski Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml index 78822315edeb..c6930706bfa9 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml @@ -34,10 +34,15 @@ properties: - qcom,rpm-apq8084 - qcom,rpm-ipq6018 - qcom,rpm-ipq9574 + - qcom,rpm-mdm9607 - qcom,rpm-msm8226 + - qcom,rpm-msm8610 - qcom,rpm-msm8909 - qcom,rpm-msm8916 + - qcom,rpm-msm8917 - qcom,rpm-msm8936 + - qcom,rpm-msm8937 + - qcom,rpm-msm8952 - qcom,rpm-msm8953 - qcom,rpm-msm8974 - qcom,rpm-msm8976 @@ -81,10 +86,15 @@ if: contains: enum: - qcom,rpm-apq8084 + - qcom,rpm-mdm9607 - qcom,rpm-msm8226 + - qcom,rpm-msm8610 - qcom,rpm-msm8909 - qcom,rpm-msm8916 + - qcom,rpm-msm8917 - qcom,rpm-msm8936 + - qcom,rpm-msm8937 + - qcom,rpm-msm8952 - qcom,rpm-msm8953 - qcom,rpm-msm8974 - qcom,rpm-msm8976 From patchwork Thu Jun 8 07:10:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 691469 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 9CDC0C87FE7 for ; Thu, 8 Jun 2023 07:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235340AbjFHHLV (ORCPT ); Thu, 8 Jun 2023 03:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbjFHHLS (ORCPT ); Thu, 8 Jun 2023 03:11:18 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C78C2697; Thu, 8 Jun 2023 00:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208272; cv=none; d=strato.com; s=strato-dkim-0002; b=dDkGWjl/OgKj0iDer7YYdAhKZnc68vcU7w9l1qdF95NPqSlzmx7U2IqIkl2vSfx3Uv wxuuwY9uEjgpT5E2NOIycZ3dnvCaxwFaOWwYS1QdYHLqNAfEcuRlvFhcRlL4xUQKGBvQ vN0sj4kLE8W9L7hSd1EehrKRZYM5OGUR5bTD7JdQcutuoUCquEeM9oGHXtIiHdBqDLK5 5Ig0rzqCqPwwjuzVis0dGVbywDtmX0sPZZaP7M+SYLiqwxit7LGqgMZIwRmKBHVDer7+ yA+hl1rH4e6GUKKzLAYqx3A94iP9XoesJ/zesmD8FaDprWdWY+MFXd+dLYecD1Iug0U2 5Ewg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208272; 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=HwHhKZChtnT5QeLJ51MFqhGAkBh98wtO5B8+zILKtRo=; b=fvlwfZXddTpUMtqNQPyJQ0kh8AWiQapy4RnkEhmNSJ/A89rkMBsTwdHKRLmW2aHSp0 M4ESf+m02Z9uADnHh13oX7eP4iK3mR1Mv30qKLaBomYNPsdR0MK3mgt8EUuGCo6zrvkz dVxcupKwotcQJKtxrCFncyEPxtdalhfDiIwkmZJ8/ZpHs5Tt9LobeE4ry8UgqQpU+8AI tx6EdzynVNqwOHwmRCWyUAbohAb62pQZxFHdZREf0TNkTMu/OKxIq2Sqp5V5dl8dUrYS cK4D7hUFtbc8X9av3WjvLHLVCv4AeGoS8EKgoKyq5bAA/zFpKKbNmTCl6bMOqOLv4jAN 9MuA== 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=1686208272; 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=HwHhKZChtnT5QeLJ51MFqhGAkBh98wtO5B8+zILKtRo=; b=qPuHVuRriBQexNdIhsWYCNBPUAMBbsGip5bAy9p3z4X5AEuIozcFlRHMFpgexgAOmL fca9TCLv5JDJZhJ/XWiqubuovBj8jqjRCn7y0C2j5gxqgCGa9qtW92/0DgpRZR0gW8L7 3QVAxNPh6R6oPaGiRliqXg522wOJl+xsszB6DroiS2N/ioJ6cn1QnUpPZp707dOo3q/V D5w0f5SW6/JEn5NuYnxeATVwsILjTEqLvPyyjvc5Lsh7K9KBt1Iye1pGyOjlu6HfVlAE cZHLysx2Av56yrNRchqWQC4R/vPhp51WSetXyO0q5uTrm5OOXAWk6bOhbtCdI2fNdCZI ycCg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208272; 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=HwHhKZChtnT5QeLJ51MFqhGAkBh98wtO5B8+zILKtRo=; b=48tiO+qbK8G37MhzS8C5IXH0adTU00oUpQjY0cdzXtL8QU83EekKc4dAPfRMrNbu0+ X1gGPiQbex5k1wCmDSDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BCKHx (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:12 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:24 +0200 Subject: [PATCH v2 04/12] soc: qcom: smd-rpm: Match rpmsg channel instead of compatible MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-4-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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. Tested-by: Konrad Dybcio # SM6375 (G-Link) Reviewed-by: Konrad Dybcio 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 Thu Jun 8 07:10: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: 691468 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 DB255C83003 for ; Thu, 8 Jun 2023 07:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234665AbjFHHLW (ORCPT ); Thu, 8 Jun 2023 03:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235315AbjFHHLT (ORCPT ); Thu, 8 Jun 2023 03:11:19 -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 E542F9E; Thu, 8 Jun 2023 00:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208273; cv=none; d=strato.com; s=strato-dkim-0002; b=cShnzyr+xo93DYVADPTTBpEgr/xh8ajJt2vyX6pq9tK38YF4iuvXqZMPY+NDMEvRSM JZwOIwjQH2dY39xi09PXXYb7sm0LcNnVxqCZUm5wIULZRQfHGHWBFBXIt23ZFPZQhbvn bDmqjbpl3NrDeT7nhrQuskHH9oNm0K4mW/ZC1Hawbzr+jOguCk6oGqhfEEX3FpZ6zSGT fFDJWYfKV0m3CpxOnlGpi8xGrM9ocTbu4SETAALFkpdIUnKvuI1sl7zhrmRFXTZpU+UV 1VK9wRJREARrJqg0i3hQ8tuLTMPioLXoqEvh3Yxt2TnxshPvE9XhjJSi+g2qG1ZU++/x 2YwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208273; 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=mnN9AJ7c4MNAxnOtohIPDe15eBC7MaKxqrM10BJfMNA=; b=FzWA2iDDVY3dxjn1SAdit07XETuPqM9k86HLN7I7CeokOfhDY2KGehDZsjA0y41TWY LjDfjL9qv4c9tiG6hxU2PYOp+sKQv6xp9hDh5luNKa6jkSTYi5Kppls5Dm1Nv+xr+ih9 VYMqUNYdLudvDjbeYOitQbEopLud1IvkEXFNDdGncZpmyGKCBVUFO7na3hmxpkpCFHld /3RNzw+noOALBfAEXMs3tt8M0sJ6cLD476MKhqubUZcaUZjstW/xqY6TntWHZBUufQwc pEmjOj1RYz1cJuVWsRrRWMteI5Gd7skMWjmxPXXDIudrlEs7BCn/52dXg7uGaZ1x1cB7 qugA== 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=1686208273; 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=mnN9AJ7c4MNAxnOtohIPDe15eBC7MaKxqrM10BJfMNA=; b=JZn9ojDbJoSd/+w5h/sVzaT0TvDUWsFulmOS+wX5FWALDkYpEspa1oWFE8kZOLA7hg ACeDESlykvwlRoQSVja++RHLsRABtBTtY4I5MeZ/VTbOO+QQJqa83/M3eh75PG+KVqtE yuC3R8YggRZHZh8RPfoh4W0FDD3p7dIJt6L8uLD/iH6TOMfdzuWuyq1tmkOjDNn3NBlr lAfJww29BZjNBnhqGYYt9ulQdLcwHKqc3Exl0lbaPzR341aLcEUHwz1txpPkeUCDb9jj a4NmMKiNYVVTf1RdG0USMMu3SBNhzBT7i930CmJ0kwtsf9m6UQK/byoUdSjls8vBZ6DS LeHQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208273; 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=mnN9AJ7c4MNAxnOtohIPDe15eBC7MaKxqrM10BJfMNA=; b=WKTix72sytdGHHf2EevuC+NNvJ+3g9K9FnRuE+Yqa60TayX8yveF/GQ8JZJLGZhKkr akuUpAx2p/QtTIYkWFAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BCKHy (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:12 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:25 +0200 Subject: [PATCH v2 05/12] dt-bindings: remoteproc: Add Qualcomm RPM processor/subsystem MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-5-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@vger.kernel.org On Qualcomm platforms, most subsystems (e.g. audio/modem DSP) are described as remote processors in the device tree, with a dedicated node where properties and services related to them can be described. The Resource Power Manager (RPM) is also such a subsystem, with a remote processor that is running a special firmware. Unfortunately, the RPM never got a dedicated node representing it properly in the device tree. Most of the RPM services are described below a top-level /smd or /rpm-glink node. However, SMD/GLINK is just one of the communication channels to the RPM firmware. For example, the MPM interrupt functionality provided by the RPM does not use SMD/GLINK but writes directly to a special memory region allocated by the RPM firmware in combination with a mailbox. Currently there is no good place in the device tree to describe this functionality. It doesn't belong below SMD/GLINK but it's not an independent top-level device either. Introduce a new "qcom,rpm-proc" compatible that allows describing the RPM as a remote processor/subsystem like all others. The SMD/GLINK node is moved to a "smd-edge"/"glink-edge" subnode consistent with other existing bindings. Additional subnodes (e.g. interrupt-controller for MPM, rpm-master-stats) can be also added there. Deprecate using the old top-level /smd node since all SMD edges are now specified as subnodes of the remote processor. Signed-off-by: Stephan Gerhold --- This patch is based on qcom/for-next, since it needs the new qcom,rpm-master-stats.yaml schema that is only applied there. --- .../bindings/remoteproc/qcom,rpm-proc.yaml | 171 +++++++++++++++++++++ .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 6 +- .../devicetree/bindings/soc/qcom/qcom,smd.yaml | 7 + 3 files changed, 181 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,rpm-proc.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,rpm-proc.yaml new file mode 100644 index 000000000000..9c016613463f --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,rpm-proc.yaml @@ -0,0 +1,171 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/remoteproc/qcom,rpm-proc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Resource Power Manager (RPM) Processor/Subsystem + +maintainers: + - Bjorn Andersson + - Konrad Dybcio + - Stephan Gerhold + +description: | + Resource Power Manager (RPM) subsystem found in various Qualcomm platforms: + + +--------------------------------------------+ + | RPM subsystem (qcom,rpm-proc) | + | | + reset | +---------------+ +-----+ +-----+ | + --------->| | | MPM | | CPR | ... | + IPC interrupts | | ARM Cortex-M3 |--- +-----+ +-----+ | + ----------------->| | | | | | + | +---------------+ |---------------------- | + | +---------------+ | | + | | Code RAM |--| +------------------+ | + | +---------------+ | | | | + | +---------------+ |--| Message RAM | | + | | Data RAM |--| | | | + | +---------------+ | +------------------+ | + +--------------------|-----------------------+ + v + NoC + + The firmware running on the processor inside the RPM subsystem allows each + component in the system to vote for state of the system resources, such as + clocks, regulators and bus frequencies. It implements multiple separate + communication interfaces that are described in subnodes, e.g. SMD and MPM: + + +------------------------------+ + | ARM Cortex-M3 | + | | +------------------------------+ + | +--------------------------+ | | Message RAM | + | | RPM firmware | | | | + IPC IRQ 0 | | +----------------------+ | | | +--------------------------+ | + -------------->| SMD server |<------->| SMD data structures | | + | | | +--------------+ | | | | | +--------------+ | | + | | | | rpm_requests | ... | | | | | | rpm_requests | ... | | + | | | +--------------+ | | | | | +--------------+ | | + IPC IRQ 1 | | +----------------------+ | | | +--------------------------+ | + -------------->| MPM virtualization |<--------| MPM register copy (vMPM) | | + | | +----------------------+ | | | +--------------------------+ | + | | ... | | | | ... | + | +--------------------|-----+ | +------------------------------+ + +----------------------|-------+ + v + +--------------+ + | MPM Hardware | + +--------------+ + + The services provided by the firmware are only available after the firmware + has been loaded and the processor has been released from reset. Usually this + happens early in the boot process before the operating system is started. + +properties: + compatible: + items: + - enum: + - qcom,apq8084-rpm-proc + - qcom,ipq6018-rpm-proc + - qcom,ipq9574-rpm-proc + - qcom,mdm9607-rpm-proc + - qcom,msm8226-rpm-proc + - qcom,msm8610-rpm-proc + - qcom,msm8909-rpm-proc + - qcom,msm8916-rpm-proc + - qcom,msm8917-rpm-proc + - qcom,msm8936-rpm-proc + - qcom,msm8937-rpm-proc + - qcom,msm8952-rpm-proc + - qcom,msm8953-rpm-proc + - qcom,msm8974-rpm-proc + - qcom,msm8976-rpm-proc + - qcom,msm8994-rpm-proc + - qcom,msm8996-rpm-proc + - qcom,msm8998-rpm-proc + - qcom,qcm2290-rpm-proc + - qcom,qcs404-rpm-proc + - qcom,sdm660-rpm-proc + - qcom,sm6115-rpm-proc + - qcom,sm6125-rpm-proc + - qcom,sm6375-rpm-proc + - const: qcom,rpm-proc + + smd-edge: + $ref: /schemas/remoteproc/qcom,smd-edge.yaml# + description: + Qualcomm Shared Memory subnode which represents communication edge, + channels and devices related to the RPM subsystem. + + glink-rpm: + $ref: /schemas/remoteproc/qcom,glink-rpm-edge.yaml# + description: + Qualcomm G-Link subnode which represents communication edge, + channels and devices related to the RPM subsystem. + + interrupt-controller: + type: object + $ref: /schemas/interrupt-controller/qcom,mpm.yaml# + description: + MSM Power Manager (MPM) interrupt controller that monitors interrupts + when the system is asleep. + + master-stats: + $ref: /schemas/soc/qcom/qcom,rpm-master-stats.yaml# + description: + Subsystem-level low-power mode statistics provided by RPM. + +required: + - compatible + +oneOf: + - required: + - smd-edge + - required: + - glink-rpm + +additionalProperties: false + +examples: + # SMD + - | + #include + #include + + remoteproc { + compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc"; + + smd-edge { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm-requests { + compatible = "qcom,rpm-msm8916"; + qcom,smd-channels = "rpm_requests"; + /* ... */ + }; + }; + }; + # GLINK + - | + #include + #include + + remoteproc { + 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 { + compatible = "qcom,rpm-qcm2290"; + qcom,glink-channels = "rpm_requests"; + /* ... */ + }; + }; + }; diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml index c6930706bfa9..2fa725b8af5d 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml @@ -120,10 +120,10 @@ examples: #include #include - smd { - compatible = "qcom,smd"; + remoteproc { + compatible = "qcom,msm8916-rpm-proc", "qcom,rpm-proc"; - rpm { + smd-edge { interrupts = ; qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml index 063e595c12f7..4819ce90d206 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.yaml @@ -15,6 +15,12 @@ description: The Qualcomm Shared Memory Driver is a FIFO based communication channel for sending data between the various subsystems in Qualcomm platforms. + Using the top-level SMD node is deprecated. Instead, the SMD edges are defined + directly below the device node representing the respective remote subsystem + or remote processor. + +deprecated: true + properties: compatible: const: qcom,smd @@ -37,6 +43,7 @@ examples: # The following example represents a smd node, with one edge representing the # "rpm" subsystem. For the "rpm" subsystem we have a device tied to the # "rpm_request" channel. + # NOTE: This is deprecated, represent the RPM using "qcom,rpm-proc" instead. - | #include From patchwork Thu Jun 8 07:10: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: 690623 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 ACBFFC7EE45 for ; Thu, 8 Jun 2023 07:11:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235392AbjFHHLm (ORCPT ); Thu, 8 Jun 2023 03:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234860AbjFHHLX (ORCPT ); Thu, 8 Jun 2023 03:11:23 -0400 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 CE4091BF7; Thu, 8 Jun 2023 00:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208273; cv=none; d=strato.com; s=strato-dkim-0002; b=cHyUcK6Q2piv2uaBXSqbjUXNHJvIKxOfYT2p6T0nyS9t5UtgOG+C0d1ggv6IHGrDng dKmuwCBEQc/DNFFwhBJL9FV3K+kMCq+NYWr81bWgZgMf3C2pG6qfxEyNIL85VBlsaj3L JsoiJMK/dF1T9S6V/6xJBouKy1pxf9a8L4xlryxqSPyLZDWwvfuCWUGQlIuCF0HPwsaD BO/0Q1h6iSV4P6LxiRUwLMSsl2kTHyVGMum7Zlw6bYWiyzgtMA2QRaJyv5wnYRHA7rFv 77Y1WuVzB/FX7NOtFRMrqpjtFaWWIEtZ4FYsjDwbHWdlSA3DPXWDUAmZfHPzYhZnNLSm OQrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208273; 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=K48pbbaDvIU0qCx1fn2eZU+dBmyCQ+5LoqGBbasUvkc=; b=CzIK6SuqxcNyL0uaG3pGGQby2vw10zcWivynrDCtzErjBSjL7ybCy0qxai7QTOiYJW O9mUknOhHo0hcQ9R64/rq6X8E/XUE0oxuZX3/LV7XI+KBIU7OY+57XH7AMn1BOiaGIfz D+HClwzmRI53CSlpSmOlvVxIG6Qy2v4uIsfJWAI0/3kgAYJx7QSUPVGO8UxO4AVFhAlx Nk/x3NCYKKyUp7mmfctBjJbQGgxABs2UFvCpRyEbglESKrABia/y4W5AFXNUbNDpS0KB 0UKo+n7AlGXezBMxNYIPpFLBEGI4y4uZTzqStEDIAOzGslc0rL2EJLnAxWgczsG3E5AK FdOg== 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=1686208273; 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=K48pbbaDvIU0qCx1fn2eZU+dBmyCQ+5LoqGBbasUvkc=; b=MHAoi2GR04BgvERD04BLA2SQeze+OCH1wnhsCMomEXGFqNWOXCPmweqHqICXWg4Z6L IutTEOXmA+WSFFRE4GeTkwKuGSR9mqIx053lpZ2Hk7Sk1Vj8XhWZ0aOcK8aDt90jiKDe tFMADLuF7CtKJnlgmxgdCmf3+eKc/MLhcrFwSdrzAix1S9UrODABmg7FhB5dbaKY4w2c F3JOxhkEse6frv4JkZmPxjZ3ECtZ0MNywvPTk9Z5EEhzFAK04VvhAM7/ETzUmlqz8knv VCUP6z8HNRz9q0sgIiUdiX0IhYb9CQNWYVj2gfHdExb/sEV3S7211g/EDNkJTgLKClto qbpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208273; 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=K48pbbaDvIU0qCx1fn2eZU+dBmyCQ+5LoqGBbasUvkc=; b=rj4Df+27RvIvziV5MOheWc4T9gT8uYZSVMKJsYQACDNQBYHuSuo0/gYVvu9c7pJwj4 R043Uth+CoSbZKhsa1CQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BDKHz (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:13 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:26 +0200 Subject: [PATCH v2 06/12] soc: qcom: smem: Add qcom_smem_is_available() MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-6-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@vger.kernel.org Avoid having to look up a dummy item from SMEM to detect if it is already available or if we need to defer probing. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- drivers/soc/qcom/smem.c | 11 +++++++++++ include/linux/soc/qcom/smem.h | 1 + 2 files changed, 12 insertions(+) diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index b0d59e815c3b..29193151cf4c 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -359,6 +359,17 @@ static struct qcom_smem *__smem; /* Timeout (ms) for the trylock of remote spinlocks */ #define HWSPINLOCK_TIMEOUT 1000 +/** + * qcom_smem_is_available() - Check if SMEM is available + * + * Return: true if SMEM is available, false otherwise. + */ +bool qcom_smem_is_available(void) +{ + return !!__smem; +} +EXPORT_SYMBOL(qcom_smem_is_available); + static int qcom_smem_alloc_private(struct qcom_smem *smem, struct smem_partition *part, unsigned item, diff --git a/include/linux/soc/qcom/smem.h b/include/linux/soc/qcom/smem.h index 223db6a9c733..a36a3b9d4929 100644 --- a/include/linux/soc/qcom/smem.h +++ b/include/linux/soc/qcom/smem.h @@ -4,6 +4,7 @@ #define QCOM_SMEM_HOST_ANY -1 +bool qcom_smem_is_available(void); int qcom_smem_alloc(unsigned host, unsigned item, size_t size); void *qcom_smem_get(unsigned host, unsigned item, size_t *size); From patchwork Thu Jun 8 07:10: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: 690625 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 B0BEAC88C83 for ; Thu, 8 Jun 2023 07:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234421AbjFHHLX (ORCPT ); Thu, 8 Jun 2023 03:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235330AbjFHHLU (ORCPT ); Thu, 8 Jun 2023 03:11:20 -0400 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 4E794137; Thu, 8 Jun 2023 00:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208273; cv=none; d=strato.com; s=strato-dkim-0002; b=eBCb6uIPvhCwp7IvX1cC2QbipNEm7rAW6z+DvCUVeVphOt8yPEvY6hX5HmQwrALvne FwNVdUJUKduQbOxYMYsWq2JMfEUi5S9TtVKqgkeWCsEISy8ScS+wEkSMaElqBkRlH1lY NqF1UExPjfDo6HvG/utnxGbKSKCdpiO3wDDqZ7hpacCgATa2R7p/Nu17dcgagvk1uN3z jG3R+RhCaUdO4XTDSNOSHAyDF+ZGUQyFplGh1mqDJPoLKaDEQTmDVLfWPpsP5Lt0t25T f7uBUWCz/wzy8Ya6aDSaIu41/PrdQCffZH0cE2E8sROM/md2RSxS3D43Mm2+78ubE7jZ a3rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208273; 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=phH3AWtJ2yGumbEmd0U593q8AEeTR644uoRx/kFLLHg6lwXLyccwdiCkRyIPzlWyON WuHjbB32Es9z0BaEOGFNbMB7SSi03xG/WUj0HxfCo2T6q0O2knyWfgZl04/R1I3N/RAu AXh6prQty3bJaF1A3Y+hjV8UUQmE/D/A9b0wAchBS5yxONsjhBZU7kuIbDJnRyMrWxz8 ugRJrofVa0CIPVPdNRGD0hnA+d6tzMn3i9UoBhPsOHaj2Xz2oiD/up6v9SKNKYcjWXps bMgY43g5+meidmqg2RY2hVkbvM0vaBY6wHpSzauVoyM3/rK0oGZCgWdYKjXIKGY3+tZY PKaw== 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=1686208273; 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=bMrOq4xLkJx+oSfulwUCsG3+7+Lv/LOREI91TbvqT/6NHt0knavDlQ5UU6b2IUl/3z Is3/pXx8y5cKIn26i4zqm+AjIZJlk8Wwf1XTAJGk1vqF1OR2CxMPk5bsnWoxPq30nG7Z 5BM2mX2Twfs6lcximlEtFG9i9KLIzLc82MH/eGx1ilbIjkoPbrA7rE1znsicy1OaW1FG AhWFPq/x/7hTcKwb5MI5Lp4bb8FWMxJoahQg8fFS1OFaDcuRSud9BzrvuY06p/Uolhua 27dP15qOKajfWmGDksr/oageWtdDX7T/+wXqxTaGXhkUhCrRuR2x8Bi/klf2lL/YbKuE I1sw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208273; 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=s+BJ/B/yjlV5tA8tl4etHV9WY7g3nIkMSmlrJBbPNxJj0Dqq1NhzrLm9aEh3W2fokQ qikH2sO4WE4fBBDOwEAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BDKI0 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:13 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:27 +0200 Subject: [PATCH v2 07/12] rpmsg: qcom_smd: Use qcom_smem_is_available() MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-7-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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 Reviewed-by: Konrad Dybcio --- 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 Thu Jun 8 07:10: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: 690624 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 D7649C8300C for ; Thu, 8 Jun 2023 07:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234843AbjFHHLc (ORCPT ); Thu, 8 Jun 2023 03:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234650AbjFHHLV (ORCPT ); Thu, 8 Jun 2023 03:11:21 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8FC31BE4; Thu, 8 Jun 2023 00:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208274; cv=none; d=strato.com; s=strato-dkim-0002; b=hzngWKxO5bsAn0CoGZZJfWQX5mChq4W5T3Dcn80+qY4j+uc2H5GlQE48tugvucENJ6 uVDDH3P5a3FUjFK+CbPkE+6WVTPMMBmg5Eq10Pt7W43uXs0zC3J5Z0/9a3e1ntUkAmEP u29Liq+DRcxWLgi4XRJoDnm1vcsV056p0i0pS/FiloHiKWNbfMHBd+oXodepZiZrEcL6 wtD2fs+jEz/aiqo/jL+zICwEBudYEgbPxKQVRaUPntZ8l66C3AXMFNGnMaBpFHAadbey goID78mAOw6jhZ6yegZaYTJCuiqTj1DsmdhZMZv/9b3E15Rtqn5YYfpEqPPY2zyevW7L VxPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208274; 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=dGXPc4c33p441Ugh4Y0rgBXLzemaPqz7jwQRolXy1RQ=; b=bdZVL36KsuuTgz0xN6vuZYk46HlkjAkzegaFDPUxD2cC779yxBwQXZtB+iMywSmhsS KXIwvUHfsasNBKbHEaUBFId49GnVdg9/QxeN+GR0GfQlUrqtkCoqaGaF0syDqMwXMrD2 OjgQIdnWhSU4wBY4AqdSmg1keg2MgzLz6I8QyUKIB3cT7/XfCUHnsRgZLms8aUZCohUw F1vKwGupuI5y+YrFhXh1vwyrKp29giluhdPKlWU6V/7Xj2JNj4CFVUHLpTRcgZAabsAx g2hzHvMxUOB7p4GQNSbey1y83pZIMiCKDIVZ8imsNmAFL4pgi7lCch5a3Ef7PHUbuLtc IsRA== 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=1686208274; 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=dGXPc4c33p441Ugh4Y0rgBXLzemaPqz7jwQRolXy1RQ=; b=Fc+NKpGUvZ9X3CoQ22lPJ6xsc+rbeIYz+FvY439z8h5sxe7sEtcuWS1wDgJGHx1UQ/ 0ZTMTPGZVEOH8gJtYuxNOZhMJtB4RlypcCyX89A4dx5Uhn9ExcEX3ueLp1KCFy2W1IeI oT6/GFcjIzg3zsdnek2+qWo409HXLZu11acmEBdz+YkKmK2dAUlP7LM4XseRl08/BRDy C3Hsfui2YKv6bh1u1X7m5IAHWdKLf4jPDAZ9sxF6Tst8kFxtMHl4Oqcq1p4W/MhFNE3K ROb40Qvl1Fjf6zo5KPR8txNtJyTioLhJA/F0dcXL71C1AhDuZQF8QAOB1F2t0IsYOi/e l3Nw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208274; 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=dGXPc4c33p441Ugh4Y0rgBXLzemaPqz7jwQRolXy1RQ=; b=qzPDNISNoPq/GHvNmMOjk3h2muNGqTr5vJzncUw7376TUUbRoYUk4wcSDxFCXurKrD QOIX2QPRgWiiSYT33TBA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BDKI1 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:13 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:28 +0200 Subject: [PATCH v2 08/12] soc: qcom: Add RPM processor/subsystem driver MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-8-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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. To avoid build errors CONFIG_RPMSG_QCOM_SMD must be also built-in if rpm-proc is. Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio --- drivers/soc/qcom/Kconfig | 1 + drivers/soc/qcom/Makefile | 2 +- drivers/soc/qcom/rpm-proc.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index e597799e8121..715348869d04 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -191,6 +191,7 @@ config QCOM_SMD_RPM tristate "Qualcomm Resource Power Manager (RPM) over SMD" depends on ARCH_QCOM || COMPILE_TEST depends on RPMSG + depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n help If you say yes to this option, support will be included for the Resource Power Manager system found in the Qualcomm 8974 based 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..2995d9b90190 --- /dev/null +++ b/drivers/soc/qcom/rpm-proc.c @@ -0,0 +1,77 @@ +// 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); + of_node_put(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 child 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 Thu Jun 8 07:10: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: 691466 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 A95A5C8300C for ; Thu, 8 Jun 2023 07:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234540AbjFHHLo (ORCPT ); Thu, 8 Jun 2023 03:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235352AbjFHHLX (ORCPT ); Thu, 8 Jun 2023 03:11:23 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C6371FDA; Thu, 8 Jun 2023 00:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208274; cv=none; d=strato.com; s=strato-dkim-0002; b=jFxSWS4yvD+4hQrGzIfda+cq9vuzRBHvzke2SDtM62/Lmj1W8y/3DyxI4VxRzMQ42j Rtml9+DsO+D93WiwVhthq0K7hEZI819OY1zuV0QnFE8YOkGZKOg5QUfVmOqTCMGdnyKB HNuRddOH5gD3JoXEYV8rqQJD0VOR6Bi45jNyhOkfBYfZDXdcYIu1D2y2UWKBZDhKDWbh m8oF8Oco6k9ITCmJpwi43/ZdR4Bl52ekb7R+8wHBuCXwfaje4OJ/14NvWNt0kUfTiOIe YcAsYbzC38rm8EZgIVBmC44UJhXK3nDhi9G8Dbv4MefzZ/NdYYM5ImKuP/9W8t7J+fBK EjjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208274; 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=TAJtDST/boxOR+FPwAwQzdxSm63Zx6Bn96pj3yBKZvQ=; b=me1cNmgDgVh8O11zgGEBzxRSWXtUWSKUuAC8gaB8rbW93mR2Ecf4Wn6I93BXZJFiwl +0woNmCj1fwTZcSYUpgOcOKFQnLvRKB/EakPiKlEOftwhNRQM/cNVzaOCg3+MymMoGcl aCBRxOUl/G0vfx52A35pLRocROBqWA8nVy9h5KI9J2pie8r5bVmDfKZOAEDL9dNEKrEN bo/9+9yB27Ax1uJx/gOpN5R1Ew2wWKpPqnjbabd6jUS4CMiKX/LGCm1IZ0TnhDWPLA3d fuhBg4vKzYq+NtQYF3JqLC97CKVT2xIgS4t/D6WC0e7UJZ59ftyh8fOaEOFelZydPnDD vgSQ== 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=1686208274; 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=TAJtDST/boxOR+FPwAwQzdxSm63Zx6Bn96pj3yBKZvQ=; b=RQevX07CrUbJUE1OL+6lMSWpRTLv96E8bOf25dnSrak+ZoPWh6QUxWCa28+KmrqgVh EUnTMz7wTEoaFdTqFGf5qk/TN4uPD+JVk44buUc9YOPl696ZNT5xGpT8j/fHK4pedHuB kmDJ8kra6u/I01whjPk/bkp6OweqtXHiMyV8vJoyU5+lDrdjBMbptM6Io6tgKzGLveY9 Q6d9Mi03kv3r/RmvVgToxCkSuk6cNVj7Wf23pjeZZidddpYG58bxbrSlWMowPSabmBRv 4gfLbRG0lefnFnOwf+9M4syOTyxaQ6LaN+Squ2lzMrUtcwFnp4cB109849RuAXOD/KKc X52w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208274; 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=TAJtDST/boxOR+FPwAwQzdxSm63Zx6Bn96pj3yBKZvQ=; b=QuRL4ivcM8oVLCpfwch6o3GW+qJ4D9fVn5aF+uzuV+e7p99Q+FkGyQBRqbo1NpVbMg vNsI7SoXdK4aLpH7B+DQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BEKI2 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:14 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:29 +0200 Subject: [PATCH v2 09/12] arm64: dts: qcom: Add rpm-proc node for SMD platforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-9-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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. Reviewed-by: Konrad Dybcio 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..a597890a37d6 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 { + 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..d9fd48f5b506 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 { + 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..9c44697aeff5 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 { + 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..ab76806317a7 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 { + 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..c374fba5d8f9 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 { + 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 Thu Jun 8 07:10:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 691465 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 C623EC7EE2E for ; Thu, 8 Jun 2023 07:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234344AbjFHHML (ORCPT ); Thu, 8 Jun 2023 03:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234916AbjFHHLl (ORCPT ); Thu, 8 Jun 2023 03:11:41 -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 2CADF269A; Thu, 8 Jun 2023 00:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208275; cv=none; d=strato.com; s=strato-dkim-0002; b=bazISjUxLjHNDz7uqFECTrL/svIdUTFBfjIcOrfMFjj2rK4chPS2S4NHX2YkbmY/Cz G1/CC8oyBo0F8c/sjeQOMOo9G/ckvfSGW1ClOe97Ci3T6SfPZy0ghCKqJLNswAEdzHyQ XVR+xlwr7BmIUO+Y+D6G8ImbK0WOEX4HcVCNlKY4jmAJchSr4bgK4CzLwM/juhpthZ1v tYvTGhg0MvRhX5WcE4iU9feh+VYjVVGVfVIFI8pCB5asXbHlOVZJgzq9ABnWlUMjyc0p EKkmw4iCvWDvoWjQwHLE70Fu3XiZdY5rnvy6HByiuEa7TVtfk3vuMFkFo+e+5FcJLRRK MzTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208275; 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=R2BI6ZK/v/S/nMz/1Lep2trbdPb1Dk0DBBre0V6nyVU=; b=kYVYLOjEdNnofBW7W9HhEtV3NK525Hv+ZLTYwMCdgMLfvjN+aFTH3u/4kE3ZOmdLVp kOkZJPqfuV6owinfPsiEnljoRmFYEi+7JLogk8F3+SX+3j6EvT8DNAdxi2ZGvxMnMVmu gJlLmPFvFtB3doGixjaXq+zdVHzLdHHtkuZOFNbnvvYIUuetGg6SVpztngdGDT0Z7zBI Qf0Jb55GfXnGrh4pfEwYJ47me3W2ov0UKrSys+vt+9o2QG3jABImiEXnpYyoN8JGCLFY X0iOj1Vbx2DyXegM0F19fT/K4WxmaMW09zfuwnTpDlIbyVDNCyNjWKvyudARWiFVDm3K K0HQ== 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=1686208275; 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=R2BI6ZK/v/S/nMz/1Lep2trbdPb1Dk0DBBre0V6nyVU=; b=OZwnjp2dKmhev/7ZOMTXPWuw3ycmDuHKYQDt2wZfyf4NIc3KpXvu2x/JpThgaQWH2j 5GEtrTw0qkg9QGt3Dw8LyNbaXx9756iwEDJVBb7r4tRehyu/hba16Z6n/5O+QmAftyTP CEgpGHrgdwYR6lTSvCBpSc4PIdNR5ekBEEi6vGJB3rtf5h3IyZ3/2R7ey7N+a4IEv2HY qZBz9bXsgwiCrRgJrx+CkgdbLyQqKG4YWaAIN1zTcLXQPwesSPpIiSNZ/fCN8YJBb7y2 AVfr/p4NhQqrBVpftdxgD4tmmdNiC6xUrT7FbVyXKq+O5IvhRfW1QPbQCe6ToojAjllL l6qQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208275; 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=R2BI6ZK/v/S/nMz/1Lep2trbdPb1Dk0DBBre0V6nyVU=; b=r47OwXAy+IJeTgdVQ00NaI/qwFbkpSfcfT557npWVHyDvsDSOfQ/rYXNT1Pv7SsRY1 7mRrQRZ3PROsUlLzaoDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BEKI3 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:14 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:30 +0200 Subject: [PATCH v2 10/12] arm64: dts: qcom: Add rpm-proc node for GLINK gplatforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-10-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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. Tested-by: Konrad Dybcio # SM6375 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..8e7634154176 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 { + 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..a9ec1198cb57 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 { + 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..b856703e825c 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 { + 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..16ac31048ae9 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 { + 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..4d642aabe5dc 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 { + 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..3b78c0f988c2 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 { + 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..1427ea956294 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 { + 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..13f03104e7a4 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 { + 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..72bc5afa8112 100644 --- a/arch/arm64/boot/dts/qcom/sm6125.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi @@ -181,6 +181,78 @@ psci { method = "smc"; }; + rpm: remoteproc { + 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..a6247fd62709 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 = ; + rpm: remoteproc { + 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 Thu Jun 8 07:10:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 691467 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 11A82C7EE23 for ; Thu, 8 Jun 2023 07:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235367AbjFHHLb (ORCPT ); Thu, 8 Jun 2023 03:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235341AbjFHHLV (ORCPT ); Thu, 8 Jun 2023 03:11:21 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C9D51FDC; Thu, 8 Jun 2023 00:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208275; cv=none; d=strato.com; s=strato-dkim-0002; b=HJarbOsS9Ip6JYmwc0l7ea03uO8IHL01KhIkVOJHjMTQUUCT6HZvR4yzVQDErR8s4h bMtvJqMwK389uDXF2NNBNbfcyNuiuul4MMc4Jo/yEfTf7qt7Ge6qNZT5V9Z1+qExLY8E jlrIT8qvpQMvPe/dFa2cjwJRyqbszWoKczPogRzEt7KAsFm6qEMNhQy2mtrEJ7HqiIvA q4zDbAfOVec1vD+Nd/8QejXiFSVnMmCOss8gny6jf9qD0GQxw6UaqnkEl9Vi48HPzoPr w+xyX8Qbkrcwxa7NkfgDvZD0FroTjH9h3oVa9R76X6lj8X9OaPjbcGWVMjKeOAuEmla5 sukA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208275; 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=atGFNVhcudPWSzunIu6o4jd6PdOH+kV92QmDJh1lvok=; b=oK0fPSX+YC0WrFm4pv3QwmBTAo+kuXhOtgZadaLXlFwgnPMfijYiBxqznorrc6/AXW OGp/nJIPtK1Wv5vAJn3IXS/v0H+j5RxntBMHG7lA3qNU9yRBz9BfeBCzDS9+Tmw0MOqI sgCLT0fNkQ+IhwHNXf1dtiykjEYjekD8Ljjxt9wNig6k0Ad5aQLQZlsiT2vmpE1OdtwI M7PQbs0APwESKGBWyJu5oUAm9ncHtQuv5x8eMqeKmfSwGBNivqw5M1AQ1843hzHlJey8 LFD6S7oIhcewp8zBPSSB37rXszXxDb+OXTc/iNAbLu+s7TbWBVbUcjk+G7TmqrWlslPr Sx3g== 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=1686208275; 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=atGFNVhcudPWSzunIu6o4jd6PdOH+kV92QmDJh1lvok=; b=nv1UkSknAxnxEsLVepCvHxr8ERddZaPSBl8tVexLbSAPetQnNVfzzwjHmjLxqk1G6j UP69LNSyR9OFRMFNsptoT+NtJB46HlYPVIRMMt50vsXKoPomg9mBa/W3G/BUXWhPZWP3 CUyfcWYqNVnLWF1RNjRLLLkWo0LvOKJ74yv0xXKsEE72tr6EMQjz4hBD1lCWMmdqazBY /Wf3IgteBRSyIBfKhqsGhACvpv2m4mMFziOwMtD5eNkFYvGeGDYgNVAOnfzlhByxu1Px iL6WcL2WXyi0zhX9TbV1pFjKhNLJEKKPJpQOddfcJiGfVYU8f7mD+aEdkcbKNQ9q3Exh PBJQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208275; 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=atGFNVhcudPWSzunIu6o4jd6PdOH+kV92QmDJh1lvok=; b=YzBrDpgrDg6dpqB8kmUHVuaZkweBLAyhLl76YO0GffO8lLwk+UZBktOQtjQyQbok/w 0Kp6VHmtn7M1bDwgMnDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BFKI4 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:15 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:31 +0200 Subject: [PATCH v2 11/12] ARM: dts: qcom: Add rpm-proc node for SMD platforms MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-11-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@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..2b1f9d0fb510 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 { + 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..a3e8d023d0e6 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 { + 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..0a5b5ecb5dfa 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 { + 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>; From patchwork Thu Jun 8 07:10:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 690622 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 7BFF1C87FDC for ; Thu, 8 Jun 2023 07:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235399AbjFHHLp (ORCPT ); Thu, 8 Jun 2023 03:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235284AbjFHHLa (ORCPT ); Thu, 8 Jun 2023 03:11:30 -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 3014E2694; Thu, 8 Jun 2023 00:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686208275; cv=none; d=strato.com; s=strato-dkim-0002; b=AcDMLQgJrf928xP1VMewakE7nlCxK5jYcbbzUUPpomm4zxtq0mH3S6VrBajHy52DXS IYb0JcKzArcNJgVz3OWsgfmtyOi/ekzbMTI/iw22+EiE/TpeqbTcUhaYBT3xJeLsq0q8 uwbudcydiikSIs4Xrj6OpQC5ecD0vn8lxXhGmOhVnyyYpiDrTx4qEtQMkd7n0oizsVYq pJa7yIB7MuYIlj4Rj2ffmeGVJgTg6GvbXp38cE7jQMMebuLr1TPSgDj0M56J+IrT8qQB R0ZN9XufK7Leqz5P6U6svUS6Ne9aDwcuhcrX4WiIILJ7lBgtLE5BChmr1bNZTT4BQzTR swpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686208275; 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=HZV9aVwyvKPAu680AA1+pBj60E1yrRK6tgCJfx+g4+I=; b=ahAKDrPg5wZfzX93wrwW3bQIuTGiN+loR8hNa2C02smNl9T8dYa6ZNxQbLTffqor2q NpuzmvLbQSGMKhC3squCyY+3UxzZzA2KAvUk8iGm02scfd55WnXWWi02D/U10YmA8MVg t2eGerKqCvu4WwbGT7YX+4cOtsNtIM8Vx3hsCzlb+NJUW/AeSXZ+RNxoJaRDvURMWwF8 NNj2VgRK5PjTb8VPRdMQkFj6gY2xg5Zxtvgq4Q5l6e9BNv9us54uopZ6IUk1oxMpMZeF oRNqwxAj5l0uQz0+TVLtJGnu0h3lPMxVM0Ae4SlkoVWHtkRE3sZtXC4ML41OW/N7hNIW GBGw== 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=1686208275; 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=HZV9aVwyvKPAu680AA1+pBj60E1yrRK6tgCJfx+g4+I=; b=SrymmMk1wFsWcBzbETLYZzA5qdTaHHEiVqDKU6cQJx3xQd4xpuQdt5WbgnPARZykSy UsGi0YjsZFIiVbpUAToCVGIsrNw0tyoqxE1T9uXmGyyhNEAMwMTuICoLS0tLm+baaFwp jaGVpZSx/PKxw7v6o1cGk0RH9p68Ec03PH7GDdJv7JfAAyl4MIV6m+qXW/b2Wfnjg7w1 2SBD5yvGNylcnfMY4M46jG3tvDfCs/hBQjGFY2OCwXAWT8sHc2p+y84dCGCriIPM4ilD LTYkBm4ziN44nIBJsgb5+I6DXFLub3WMycHM2uED18Bj/31u9O6LS+seLQCOuKG91UYD ZHdg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1686208275; 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=HZV9aVwyvKPAu680AA1+pBj60E1yrRK6tgCJfx+g4+I=; b=v5ey92iIJCO/+NL+GNQsUuqvQwHNpXT5yRg24wRnXANkZgRoaz5zPXcI/1wiXsf035 eLFXALlDUYxM4BKxgDDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.5.3 DYNA|AUTH) with ESMTPSA id Z82ec2z587BFKI5 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 8 Jun 2023 09:11:15 +0200 (CEST) From: Stephan Gerhold Date: Thu, 08 Jun 2023 09:10:32 +0200 Subject: [PATCH v2 12/12] ARM: dts: qcom: apq8064: Drop redundant /smd node MIME-Version: 1.0 Message-Id: <20230531-rpm-rproc-v2-12-56a4a00c8260@gerhold.net> References: <20230531-rpm-rproc-v2-0-56a4a00c8260@gerhold.net> In-Reply-To: <20230531-rpm-rproc-v2-0-56a4a00c8260@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: linux-arm-msm@vger.kernel.org The "smd-edge"s for remote processors are typically specified below the remoteproc nodes. For some reason apq8064 also has them all listed in a top-level /smd node, disabled by default. None of the boards enable them. Right now apq8064 only has support for WCNSS/riva, but there the smd-edge is already defined with the same interrupt etc below the riva-pil node. Drop these redundant definitions since the /smd top-level node is now deprecated. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- arch/arm/boot/dts/qcom-apq8064.dtsi | 40 ------------------------------------- 1 file changed, 40 deletions(-) diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi index d2289205ff81..e0adf237fc5c 100644 --- a/arch/arm/boot/dts/qcom-apq8064.dtsi +++ b/arch/arm/boot/dts/qcom-apq8064.dtsi @@ -226,46 +226,6 @@ smem { hwlocks = <&sfpb_mutex 3>; }; - smd { - compatible = "qcom,smd"; - - modem-edge { - interrupts = <0 37 IRQ_TYPE_EDGE_RISING>; - - qcom,ipc = <&l2cc 8 3>; - qcom,smd-edge = <0>; - - status = "disabled"; - }; - - q6-edge { - interrupts = <0 90 IRQ_TYPE_EDGE_RISING>; - - qcom,ipc = <&l2cc 8 15>; - qcom,smd-edge = <1>; - - status = "disabled"; - }; - - dsps-edge { - interrupts = <0 138 IRQ_TYPE_EDGE_RISING>; - - qcom,ipc = <&sps_sic_non_secure 0x4080 0>; - qcom,smd-edge = <3>; - - status = "disabled"; - }; - - riva-edge { - interrupts = <0 198 IRQ_TYPE_EDGE_RISING>; - - qcom,ipc = <&l2cc 8 25>; - qcom,smd-edge = <6>; - - status = "disabled"; - }; - }; - smsm { compatible = "qcom,smsm";