From patchwork Tue Jul 11 12:18:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 1806267 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VonMOp0i; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4R0fzb0zRNz20bm for ; Tue, 11 Jul 2023 22:18:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231676AbjGKMSc (ORCPT ); Tue, 11 Jul 2023 08:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjGKMSb (ORCPT ); Tue, 11 Jul 2023 08:18:31 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADC0AE6F for ; Tue, 11 Jul 2023 05:18:28 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b6a084a34cso85734441fa.1 for ; Tue, 11 Jul 2023 05:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689077907; x=1691669907; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gXcfnAFG0ALqJ5wchl9zMk96ke46h0gdnZo33aXqC6o=; b=VonMOp0i5+expziTeWEBTHMUNC7qXDeGRqyBPoJ1wkAUuR3RhU2Ey3IYC+JawK9rh6 bHI9uJjJTWpyxc+pRRnma1cuAF16RAAcxjDTqfJT6s4+9D2lvb1crKrbG6E4T7E3j3JE 7MBA0ngRqYrmXBTmKhP8l+hs9rWnbXQSPVyMw7DbtLvV9/KjkIbn9stCTJCLeYJ8Siq5 7i6lnvVM71Lo1lZSupzYng3WE+l4ju3i2NfEvdXOdYzXzUSKWLTohxXt0Q13+Y0mjbSM kXXdY0gVkT+n4/u+ipmWfAu03x0bq1UG9/bal13n2vWRq52X43EVZGTNJNQro/YhG8uU ocRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689077907; x=1691669907; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gXcfnAFG0ALqJ5wchl9zMk96ke46h0gdnZo33aXqC6o=; b=HxgVSg2CyPzd+8M4NMahW6lJoQqIHEBjCO/wYW070uCXGR8zB+uF3DJ9pFI5693y0P 0H5k+41eOmwOYTeJvPQg9GfLs8Yk8kfYFv+3SwBX5ybLvlifn1UCy1LNUY1L/wGAkNW3 cwnatOO3HF7F2Uxr17RZX7SIE0AvhC4iiDDhipYajf1k3j8dMYEuqvjyUS02f8GWyusI RfHx9txjmyCpHoujqmJx7zqybiEZC9Mj8WF8P4WebAJa6mBAX0suLQEgfeCrmr4SM7mh 3mqNuF8Nk8Vh7hWO8MziEv6N9sSOYTvHA+K4ZCoMVL9cRbivBI2qRRVd/KvyJozfMg8f VCjA== X-Gm-Message-State: ABy/qLY/qM9kjwghI4ocYODr8lo8vgJiylrMgN5CqbB0xhMuaArs3GYP dla/NPtGvHVpaMmtbS3wYnG8Fg== X-Google-Smtp-Source: APBJJlHATZyGrxjvNQ4UHts/OGjmEwK4EuBMFcRIRxrV1Y/bvqWGJbi81Vw/Tydk5ULRpDptO1qfDQ== X-Received: by 2002:a2e:91d7:0:b0:2b6:e0b8:946e with SMTP id u23-20020a2e91d7000000b002b6e0b8946emr13108332ljg.51.1689077907043; Tue, 11 Jul 2023 05:18:27 -0700 (PDT) Received: from [192.168.1.101] (abyl96.neoplus.adsl.tpnet.pl. [83.9.31.96]) by smtp.gmail.com with ESMTPSA id d18-20020a2e96d2000000b002b708450951sm435563ljj.88.2023.07.11.05.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 05:18:26 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Jul 2023 14:18:00 +0200 Subject: [PATCH 01/53] dt-bindings: interconnect: qcom,icc: Introduce fixed BCM voter indices MIME-Version: 1.0 Message-Id: <20230708-topic-rpmh_icc_rsc-v1-1-b223bd2ac8dd@linaro.org> References: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> In-Reply-To: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689077904; l=1189; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=9/TmGzQ1xk3CQ8ToyRcpOQBYP1VhR10l+JU+aSmEvI0=; b=N1JxOuvEYm4h/wsNdORtSNFT8AF68EXhuMFZexG+clfwKvtG5+uxA4rn/Z4fouP9EkKmuRWz+ 7R/htFQncM5BE7iN2tU0kXbvvV7s3St2Rs+MKybBnVpLAaPzAPW+821 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org It makes zero (or less) sense to consume BCM voters per interconnect provider. They are shared throughout the entire system and it's enough to keep a single reference to each of them. Storing them in a shared array at fixed indices will let us improve both the representation of the RPMh architecture (every RSC can hold a resource vote on any bus, they're not limited in that regard) and save as much as kilobytes worth of RAM. Signed-off-by: Konrad Dybcio --- include/dt-bindings/interconnect/qcom,icc.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/dt-bindings/interconnect/qcom,icc.h b/include/dt-bindings/interconnect/qcom,icc.h index cd34f36daaaa..9c13ef8a044e 100644 --- a/include/dt-bindings/interconnect/qcom,icc.h +++ b/include/dt-bindings/interconnect/qcom,icc.h @@ -23,4 +23,12 @@ #define QCOM_ICC_TAG_ALWAYS (QCOM_ICC_TAG_AMC | QCOM_ICC_TAG_WAKE |\ QCOM_ICC_TAG_SLEEP) +#define ICC_BCM_VOTER_APPS 0 +#define ICC_BCM_VOTER_DISP 1 +#define ICC_BCM_VOTER_CAM0 2 +#define ICC_BCM_VOTER_CAM1 3 +#define ICC_BCM_VOTER_CAM2 4 + +#define ICC_BCM_VOTER_MAX 64 + #endif From patchwork Tue Jul 11 12:18:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 1806268 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WKIt9VI7; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4R0fzb3yKwz20WT for ; Tue, 11 Jul 2023 22:18:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbjGKMSd (ORCPT ); Tue, 11 Jul 2023 08:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjGKMSb (ORCPT ); Tue, 11 Jul 2023 08:18:31 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155FBE5C for ; Tue, 11 Jul 2023 05:18:30 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b6afc1ceffso92295621fa.0 for ; Tue, 11 Jul 2023 05:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689077908; x=1691669908; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+wKqZuebC0/DNlU3YArXv0CU05fgiLNPi4ZrsgdcBCw=; b=WKIt9VI7VJ3uXfTMs1BXr+QomiovZ7rSHNtwxKGNAK3FIQdok2JfMO1I7E+ZueunP5 CkJaXnjOvT+Ln3G8eLhAghX4R+wvEBRMbfW/7al/oHjA50IrXBNdY2F0tOFX16rcRJGq KmHi9fSz1G2Ho1uPijA4gQ3wUPBoGR/vsSIif9vYrvnJ+V8rI2FpRfSkgyG0yB2JLp6y g1lwIGmDPNtyphI+qKGqbiMmP5w0qAyKBomC5K4TewkEs93laxZmkPhMLnFzHNA3r6TU ojuJ60L0sWrXaBvwoFj7n0SubltRpRjnVfONXK2Ok2uWrpd+taxvpMN5D/ixeQtiUmEZ jTIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689077908; x=1691669908; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+wKqZuebC0/DNlU3YArXv0CU05fgiLNPi4ZrsgdcBCw=; b=CWAd0IiKwmaww/XRvuOT3RmxPvObLuPJxd5z3OO9bFh7YK//tEh9pzpeqfPLNxK1k6 6Yh1VPP59MDgKkgPOsDlugCJje+Ro0fTi3IJ8MXuvqeMUGZOMi6zGOPfyreH+8riOPs+ TEeyVPw5nQl71WSG7fhNcxe6mmDBuiwyeAOT7iIpCM3eHIQ6Av1pq87XJPqI+pjGtxR/ x9iWF0gHJJ4/1VF0O2l9Hm4Od5LJbCTiCcBAPK7MxLqu2KuY4nNFm/OybjSskoXOzOke iLycjaldikfPN0p11tXT48B8L7d3yLcwxfPat7kgHti2DRrIiPJKIQWiD4tXPz0cTG0e m0fw== X-Gm-Message-State: ABy/qLa72R6J8NZtd4vdYZA2utxgxSltYsUSM1ZrCmRAqvIqP43+KlmD ByZKJvFIdsiqo8v66yqefYM51Q== X-Google-Smtp-Source: APBJJlGFkoNLOi418Dus0WqQX99QCX3C7IKzXbumFFa8qic1h0VzMt3LwPo6s6NWOhxVmAEzfz6uDg== X-Received: by 2002:a2e:700b:0:b0:2b6:e780:97c9 with SMTP id l11-20020a2e700b000000b002b6e78097c9mr12619568ljc.18.1689077908368; Tue, 11 Jul 2023 05:18:28 -0700 (PDT) Received: from [192.168.1.101] (abyl96.neoplus.adsl.tpnet.pl. [83.9.31.96]) by smtp.gmail.com with ESMTPSA id d18-20020a2e96d2000000b002b708450951sm435563ljj.88.2023.07.11.05.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 05:18:28 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Jul 2023 14:18:01 +0200 Subject: [PATCH 02/53] dt-bindings: interconnect: qcom,bcm-voter: Add qcom,bcm-voter-idx MIME-Version: 1.0 Message-Id: <20230708-topic-rpmh_icc_rsc-v1-2-b223bd2ac8dd@linaro.org> References: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> In-Reply-To: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689077904; l=1777; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=1YdtkjCpwqfCeGyrzm5y0lnW6+XAD6b/nL964j7XiAc=; b=xos5lY2485rsc/Fk8rtrxCyUPIzjqnRyhiyLpKu+58DpQKwGajPucJDjZBVy9wi9zJJ9gfdh6 VLXTFNZnq0gAaPF4VFj/7ocVEN6NJ6MYG26wIQmS+2QDKR9YXajYKvP X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to (at least partially) untangle the global BCM voter lookup (as again, they are shared throughout the entire system and not bound to individual buses/providers), introduce a new required property to assign a unique identifier to each BCM voter. Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/interconnect/qcom,bcm-voter.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.yaml b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.yaml index eec987640b37..09321c1918bf 100644 --- a/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.yaml +++ b/Documentation/devicetree/bindings/interconnect/qcom,bcm-voter.yaml @@ -38,8 +38,14 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 + qcom,bcm-voter-idx: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + A globally unique predefined discrimnator, identifying each BCM voter. + required: - compatible + - qcom,bcm-voter-idx additionalProperties: false @@ -48,8 +54,11 @@ examples: # as defined in Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml - | + #include + apps_bcm_voter: bcm-voter { compatible = "qcom,bcm-voter"; + qcom,bcm-voter-idx = ; }; # Example 2: disp bcm_voter on SDM845 should be defined inside &disp_rsc node @@ -61,5 +70,6 @@ examples: disp_bcm_voter: bcm-voter { compatible = "qcom,bcm-voter"; qcom,tcs-wait = ; + qcom,bcm-voter-idx = ; }; ...