From patchwork Wed Oct 25 07:32:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 738615 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 BCABBC25B6B for ; Wed, 25 Oct 2023 07:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232777AbjJYHci (ORCPT ); Wed, 25 Oct 2023 03:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233273AbjJYHcQ (ORCPT ); Wed, 25 Oct 2023 03:32:16 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A36B510FA for ; Wed, 25 Oct 2023 00:32:13 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so8674754a12.3 for ; Wed, 25 Oct 2023 00:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698219131; x=1698823931; darn=vger.kernel.org; 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=DEl6CeVofgkSmlxhJVVUPe8R9z1EBoEri4+KtLhRxgw=; b=DImA6h1AF6io1ZOH4AVndCw3fdjKP/lURon640gvhNdF7HezOTQiIiZaNUjPcBo6H/ ISFeIz5BUkuyMyk5nU8aUvA75N6bnY4kVnr+boPOOhQ34aggXVmWB165GYx8Ih8AJWF3 14y0XFO7JaMRjSqP7dIO/fnTaYa8Wq7aXgWfWsWU4c8/wROj1VqzvTaJg9VDkVF3726J N0gYZOI8YaFkXYpyieErF25/n72P8JFaxgZg88BTtG5WSrQE9ITZnBQxc6gYIeajfQDG fjvzd8gXi19imiXKpzf0uaVMRwj3zpd6LlCY5r+QqrCXmteJZyaGjwbydCCAkdCejpyD k33g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698219131; x=1698823931; 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=DEl6CeVofgkSmlxhJVVUPe8R9z1EBoEri4+KtLhRxgw=; b=iwu8f8PFpj3SsdpDb+xyzgRrPWmM/SkdsKBaG41V52UUmhnuKThxbf8IIvclo1kq3b V6AvlDHEbyBPgXG2KgKJyio0FxwWe0Oej/GPOPoAy8fE9L2JKIcsFI52u1e2tLq2kl1U lQq0ea1gcmIWC21YVyvf28I4+5axSxzFLkE1+TC34ApyqTz+boV1ACoqan/DTzueK5BW /HbtiTE2Q471XKY774JXtpjMkuVQ/nYhgyLzYnG9Mt1iC3mNB1DFxZ7dAYPMTYtf35jJ 7Vm5qXo7waj7FgiVIDun0hCjofT/drb4JmV0ZNoIs+X9Rh7BLHKi8S3tbLvnKeQSAl5d c6zg== X-Gm-Message-State: AOJu0YzW1b9j+STmozwSoh8qzzZBxKbImw3E0dmskDnP/9HloVNemXga fh/8kN73QfRvE0t0pxBGcRl9EQ== X-Google-Smtp-Source: AGHT+IElI56qjtNbDfhubW0NsRm+A8KF20hs9WE+8zIIXTxBtKHRPgg8lCt/G61OsoBsfC6wkcJecg== X-Received: by 2002:a17:907:2d08:b0:9bf:d65d:dc0f with SMTP id gs8-20020a1709072d0800b009bfd65ddc0fmr10692726ejc.4.1698219131278; Wed, 25 Oct 2023 00:32:11 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id m21-20020a05600c4f5500b0040841e79715sm14036237wmq.27.2023.10.25.00.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 00:32:10 -0700 (PDT) From: Neil Armstrong Date: Wed, 25 Oct 2023 09:32:03 +0200 Subject: [PATCH 2/2] pmdomain: qcom: rpmhpd: Add SM8650 RPMh Power Domains MIME-Version: 1.0 Message-Id: <20231025-topic-sm8650-upstream-rpmpd-v1-2-f25d313104c6@linaro.org> References: <20231025-topic-sm8650-upstream-rpmpd-v1-0-f25d313104c6@linaro.org> In-Reply-To: <20231025-topic-sm8650-upstream-rpmpd-v1-0-f25d313104c6@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1963; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=hAT6chxV+deZaIvy8RroY/kbSzlU1xIefmMxtRfKR3o=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlOMR3RL+P9o31avF2mPaUE2cMVo/LbJq7wbh5e6FX VMGIf76JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZTjEdwAKCRB33NvayMhJ0ZjrD/ 4+eDSbc2bLZplcv3gQehQWjyhBHBFVkYF0zwyKTKVGKC0hyCouIuGxHrMETElQRdemQyB3jBApsHoT HxxL8zSa2NuXADp7KuqCX5HTqQIc7J52grprYWaq3Wo91ZEQYRbYbaljxeudK7oYuUXAoj6PT+LmWa 7jkj20LCorT0g5xHyZFe8IJeUcjtGoxy5Zj1YqY4TTaNvIZStAfgcsNi3lgIQXRRz/qYl42FcRlRjd A1fiRxJsCEQ2VXwjeNTcFx+sMStc/ibpwMQWg3xBcLx7FiMAeX9zD4h2H/gOFVmi+/TS/75cN6lq1U HONnbqnPGWEFYH0yZnL86d/lZbQ3hbWvAP1XOMHlwsLkErzguIPAtr/3OOSUFqe3ZGCC1E88MSxMEI MB1lZtvbRCaSw5KF5SlIqwh45FvUfuhq0Cz+NKEynsv5n87jC0lt3eWAH7Nj9s9MVv7rg6JeM46oaN lc0p/J3kBxczbAn3y9Ax2Bxc3c58u5GRodCLq14pPpaodoCFt/DjNWgMm4PG08FZaiO1bMt5LEjaJw d2ZJeLdsYd2Kj9D5GGesV02qmcNhXmSFY5WTBzcVwJOyskLdI8OwZ1JxppTvpRrtS9XS6JQ5pMg9kv m+9JrF46X0jxeIjWKTsbdB3YuZMccu9csx5KW73tRHHy/K9pdPxivsqorVFg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add RPMh Power Domains support for the SM8650 platform. Signed-off-by: Neil Armstrong --- drivers/pmdomain/qcom/rpmhpd.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c index a631fe1f9a06..cf25ba1cac66 100644 --- a/drivers/pmdomain/qcom/rpmhpd.c +++ b/drivers/pmdomain/qcom/rpmhpd.c @@ -197,6 +197,11 @@ static struct rpmhpd nsp1 = { .res_name = "nsp1.lvl", }; +static struct rpmhpd nsp2 = { + .pd = { .name = "nsp2", }, + .res_name = "nsp2.lvl", +}; + static struct rpmhpd qphy = { .pd = { .name = "qphy", }, .res_name = "qphy.lvl", @@ -475,6 +480,30 @@ static const struct rpmhpd_desc sm8550_desc = { .num_pds = ARRAY_SIZE(sm8550_rpmhpds), }; +/* SM8650 RPMH powerdomains */ +static struct rpmhpd *sm8650_rpmhpds[] = { + [RPMHPD_CX] = &cx, + [RPMHPD_CX_AO] = &cx_ao, + [RPMHPD_EBI] = &ebi, + [RPMHPD_GFX] = &gfx, + [RPMHPD_LCX] = &lcx, + [RPMHPD_LMX] = &lmx, + [RPMHPD_MMCX] = &mmcx_w_cx_parent, + [RPMHPD_MMCX_AO] = &mmcx_ao_w_cx_parent, + [RPMHPD_MSS] = &mss, + [RPMHPD_MX] = &mx, + [RPMHPD_MX_AO] = &mx_ao, + [RPMHPD_MXC] = &mxc, + [RPMHPD_MXC_AO] = &mxc_ao, + [RPMHPD_NSP] = &nsp, + [RPMHPD_NSP2] = &nsp2, +}; + +static const struct rpmhpd_desc sm8650_desc = { + .rpmhpds = sm8650_rpmhpds, + .num_pds = ARRAY_SIZE(sm8650_rpmhpds), +}; + /* QDU1000/QRU1000 RPMH powerdomains */ static struct rpmhpd *qdu1000_rpmhpds[] = { [QDU1000_CX] = &cx, @@ -585,6 +614,7 @@ static const struct of_device_id rpmhpd_match_table[] = { { .compatible = "qcom,sm8350-rpmhpd", .data = &sm8350_desc }, { .compatible = "qcom,sm8450-rpmhpd", .data = &sm8450_desc }, { .compatible = "qcom,sm8550-rpmhpd", .data = &sm8550_desc }, + { .compatible = "qcom,sm8650-rpmhpd", .data = &sm8650_desc }, { } }; MODULE_DEVICE_TABLE(of, rpmhpd_match_table);