From patchwork Tue Oct 4 22:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 12998740 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 2325EC43219 for ; Tue, 4 Oct 2022 22:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbiJDWML (ORCPT ); Tue, 4 Oct 2022 18:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbiJDWLq (ORCPT ); Tue, 4 Oct 2022 18:11:46 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 057E96C772; Tue, 4 Oct 2022 15:11:38 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id s16so607162ioa.6; Tue, 04 Oct 2022 15:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=EOo8HdH8IP8ZOXIsePOyIBWhQpE8sortZBelaauv01Q=; b=kIvRqLeeh4qv0Q1WEy1e2bKVmV1GRD5ibYx3KsZwS/3oF4CHAOJVqCBSxEEnAOxcFT kXPvJ2GLlLb3E8c0WK0atVKmnAl/pffoT8mHgjhtqs0Mgc7K8UWE6S0ftG0155ejf+oG MeK3TbWi/OUJATS0ZNqovgKs3Ozd44G+Kz/4ps5Ba9H1/Y4OCieBbR4fWNf14N/PEYfC kGyklvaFItpL6tvYUJxzL4EqrZohtnapSutrw8YYo5jE1vg1M+hZ44ypZ7j2chNYO/j2 U7LoWn8NcCraFohYkU4n41zTpJE0qkXAblMdPWcj8LQqC8F4jzTeGJMA1VTX0J1e0mPr H9cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=EOo8HdH8IP8ZOXIsePOyIBWhQpE8sortZBelaauv01Q=; b=txoRHhnjdFkX4r7zy8HcddEfWnr6is4FT3W55zRYzorG0Q8XQdkGuJuCEP5usRfW9c vcIWYnmOngrMHjZy9z9edhZ6cVyF/E/haNDEceYaVNdBqioFDqz7chLfyqVfrFB9tANj eLXmkcx7BU3DhzkFov1EZUYS90/hUjZa2nVzcjWdGY8Qx3zK1Yfo7P+LbZuvzNmqyUVC x8c7hPYPMXF001uO0/p/Nt8rGo2qGOhHhhRFygqeXDoHgyzRi/iqei9SOfZmFvSQ85ln JiLoNbwK/Mr7m6/k3bMxE/hFjl2w2AbVhBTo476foH/z3vk9935xMfnBegiR112Bo0z9 qtEg== X-Gm-Message-State: ACrzQf3O6ccSweeLLEreVVDW59Gu8kHpDCyKg7x4zRtxNePC3nXgLduD j5/NYqkT1I0f/Zv1eDKkhLZ+RFm/taCXtg== X-Google-Smtp-Source: AMsMyM7Uphq6mn6GeURqrKfRHUh/0L+T5PiSgodcfY7gV2RERjAjQDfAZ5FtXEivDs12SFoJlPu2uQ== X-Received: by 2002:a05:6638:3791:b0:35a:22c3:4cc9 with SMTP id w17-20020a056638379100b0035a22c34cc9mr14839549jal.114.1664921497068; Tue, 04 Oct 2022 15:11:37 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::1eda]) by smtp.gmail.com with UTF8SMTPSA id w15-20020a056602034f00b0068a235db030sm6281855iou.27.2022.10.04.15.11.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Oct 2022 15:11:36 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: power: rpmpd: add sdm670 power domains Date: Tue, 4 Oct 2022 18:11:29 -0400 Message-Id: <20221004221130.14076-2-mailingradian@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221004221130.14076-1-mailingradian@gmail.com> References: <20221004221130.14076-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the RPMh power domain IDs and compatible string for Snapdragon 670 to make SDM670 power domains accessible to the device trees. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml index 5b4eda919911..2ca98bad2d35 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -34,6 +34,7 @@ properties: - qcom,sc7280-rpmhpd - qcom,sc8180x-rpmhpd - qcom,sc8280xp-rpmhpd + - qcom,sdm670-rpmhpd - qcom,sdm845-rpmhpd - qcom,sdx55-rpmhpd - qcom,sdx65-rpmhpd diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index f5f82dde7399..578e060890dd 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -4,6 +4,16 @@ #ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H #define _DT_BINDINGS_POWER_QCOM_RPMPD_H +/* SDM670 Power Domain Indexes */ +#define SDM670_MX 0 +#define SDM670_MX_AO 1 +#define SDM670_CX 2 +#define SDM670_CX_AO 3 +#define SDM670_LMX 4 +#define SDM670_LCX 5 +#define SDM670_GFX 6 +#define SDM670_MSS 7 + /* SDM845 Power Domain Indexes */ #define SDM845_EBI 0 #define SDM845_MX 1 From patchwork Tue Oct 4 22:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 12998741 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 39E67C433F5 for ; Tue, 4 Oct 2022 22:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230405AbiJDWMM (ORCPT ); Tue, 4 Oct 2022 18:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbiJDWLq (ORCPT ); Tue, 4 Oct 2022 18:11:46 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14D76C11A; Tue, 4 Oct 2022 15:11:39 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id y189so9757158iof.5; Tue, 04 Oct 2022 15:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=SLVJWF/SFU6Jeg5dmHMSsd0bq9GxMVu9YOSAYsOVoMM=; b=NV3Rjp4/6NPSQqASzvbYFnsJIzBQ0ReVaJ0L3eHFhFakzf2OgOoAvYIcdZCgmUTfPZ g7cdgdSyDEKFADAl/Y2yJnlq1mIpuG6bf9FWyimfOSM3S3WbtUdKcbUs9vaJIe84S6GU Y7qqyW88AxKbNETdKDkmT3eJoKMIZPl8SmEnJM6gYpWx/Ew+XGUjfV9X1C9tEAY/rT5m ZVK32FNK5o6qDysdsO0y2ab95rT8sR018MNRHqH3UbqJ7D1DbBKfc/cr1iO9lb/Rs2TC KOj5ZMEi+UyC4IYcZ6sWbEUgB/oktUZrGZkuLAaM2/H4WuS6MA2Fi4wlOB//+41u9/ON NgvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=SLVJWF/SFU6Jeg5dmHMSsd0bq9GxMVu9YOSAYsOVoMM=; b=8EBNlKmTEp7QDChr44qA2wqn0cW3MrXBzrGO+ONCwa7NZ6Lsv9HLPRzt0ev/hS7SxP Matx6n3u+4cmCB88pNnZyR/R/bZbMEUCUDHSnTwsijFkMK8BcBDk9P6qR3IadfadUE2F HCdcAkHgZWwR0xa9Rhtr8ab94Iu8SD3q20Q5eC/QP1GcldeqpeymV5JFzNGGWfJcpyla 2Tx8YuzYTqeSF+PsBZR9wffyQQkx1mibQ+DAJhJFWjR4u4pjNuTS+A517dkiWhoy/fsY VwxzF152c9JaCO4Hxjng3uMAaCXDmBb2JuRAqS+fdtumFaHBa+/LY1Lk65qChdaJ/dpl 9Qaw== X-Gm-Message-State: ACrzQf0mjfg7Qbmd5RywTLWSLChxuXrl2P8avpvAOmH1gnrnKaoJ79ek n9Rm6J+SpcPg2fyd0dU4yoBEoNG8dk9JPA== X-Google-Smtp-Source: AMsMyM7BKIlN5WndQVQte0MHLWElsOCo02CJSGr7RkbMp1ALnPtcalWcG/x/taPuH1+Ahg4X1Gry3g== X-Received: by 2002:a05:6602:13c8:b0:669:c3de:776f with SMTP id o8-20020a05660213c800b00669c3de776fmr11158533iov.124.1664921499177; Tue, 04 Oct 2022 15:11:39 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::1eda]) by smtp.gmail.com with UTF8SMTPSA id k3-20020a023343000000b0035b2e0864ebsm5742581jak.160.2022.10.04.15.11.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Oct 2022 15:11:38 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: [PATCH v2 2/2] soc: qcom: rpmhpd: add sdm670 power domains Date: Tue, 4 Oct 2022 18:11:30 -0400 Message-Id: <20221004221130.14076-3-mailingradian@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221004221130.14076-1-mailingradian@gmail.com> References: <20221004221130.14076-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Snapdragon 670 has similar power domains to SDM845 but no EBI power domain. Add a new array for them to avoid requesting a power domain which is unsupported by the hardware. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio --- drivers/soc/qcom/rpmhpd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 092f6ab09acf..319a2cf7e694 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -210,6 +210,23 @@ static const struct rpmhpd_desc sa8540p_desc = { .num_pds = ARRAY_SIZE(sa8540p_rpmhpds), }; +/* SDM670 RPMH powerdomains */ +static struct rpmhpd *sdm670_rpmhpds[] = { + [SDM670_CX] = &cx_w_mx_parent, + [SDM670_CX_AO] = &cx_ao_w_mx_parent, + [SDM670_GFX] = &gfx, + [SDM670_LCX] = &lcx, + [SDM670_LMX] = &lmx, + [SDM670_MSS] = &mss, + [SDM670_MX] = &mx, + [SDM670_MX_AO] = &mx_ao, +}; + +static const struct rpmhpd_desc sdm670_desc = { + .rpmhpds = sdm670_rpmhpds, + .num_pds = ARRAY_SIZE(sdm670_rpmhpds), +}; + /* SDM845 RPMH powerdomains */ static struct rpmhpd *sdm845_rpmhpds[] = { [SDM845_CX] = &cx_w_mx_parent, @@ -435,6 +452,7 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc }, { .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc }, { .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc }, + { .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc }, { .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc }, { .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc}, { .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},