From patchwork Sun Nov 27 11:22:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 13056675 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 660B8C4321E for ; Sun, 27 Nov 2022 11:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbiK0LYm (ORCPT ); Sun, 27 Nov 2022 06:24:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbiK0LYl (ORCPT ); Sun, 27 Nov 2022 06:24:41 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43AACE099 for ; Sun, 27 Nov 2022 03:24:40 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id q1so7523054pgl.11 for ; Sun, 27 Nov 2022 03:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=af32RiZNOuCS1SpmNdhimvmfJ1uk/URYpjz9mBw96SQ=; b=jy0wVfV3VbjK6vnbeEMGF5KuhyMHGFPzWox8wvKIkcFG/HXdl5ggjSNkD/cq3HtEti FbcjMCtO3vYo5XM+uEMsS5nBY8aOUHO+WwYhU6kQLSFYvXlP5UTB7yomRoHBKyvYm1cN OZfhTsQ+hvG0E5/wQVAXX65unos/sx79FzXUEKw9WLvV0/rz2BAgRWudrtC0udPqWRYK pfss71dH2yHx/4NHOQ/C5HQwBGkilTv1xPe6KcDLdHf7fnNSBoAsCyAmWsCeVGgWSdnp IyRmomcN8Jc0clfmdtYaD4YPWaFO+pXdCNlWfg+Kf06+GkPebsUuhwAl72G+/izmgj+e RtHQ== 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:message-id:reply-to; bh=af32RiZNOuCS1SpmNdhimvmfJ1uk/URYpjz9mBw96SQ=; b=lREZGK7mwM11uvB0Ke7KJsiSvHXLq88q6wBfY1lG+9lBDdxNbuCandb0thJ+frFBo3 jxGFblrYymXmRXh4xEIQscEVrDoX1EegfaZVJzGczYwBiqvbXgeMJdpQmoMVcuiD6xe/ nSOn1Y+iARdUlmQsdbjBDE5aeOM1ymi3fFdb5P8qJeiwVrEUms/7Jj5vZ5dSh43TFrh1 3D53zPj7XhlbwKgXwVZgKzJ+BBXE6h3m3bwJj/xUceMVQHDyv/tM9ozVnMQck8E9yinv XB9Zkk59yv3bTqpf3gjuhcr2RDJKKT8xFkoenhntYmPiq5QIiL77+8nUzrJ0Zw+0JrVg +YTA== X-Gm-Message-State: ANoB5pnj3hWezIR1R6Eg4q7vGlU5h4M7za1iNk6WL7tEI7Zi9YwGCHp6 UvVOSlIdjtCBt958E/nHbWNborlrT3qrug== X-Google-Smtp-Source: AA0mqf5L3TYnjtJtzAa75ed/XwQKFkMTj7P+KxqwMlK5pbXVUY6CbgFHn+RGWM2wbLNqHgtdaEaB6w== X-Received: by 2002:a63:f510:0:b0:478:1020:b1e6 with SMTP id w16-20020a63f510000000b004781020b1e6mr1109710pgh.561.1669548279323; Sun, 27 Nov 2022 03:24:39 -0800 (PST) Received: from localhost.localdomain ([223.179.131.184]) by smtp.gmail.com with ESMTPSA id oa14-20020a17090b1bce00b0020d24ea4400sm7691349pjb.38.2022.11.27.03.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 03:24:38 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Rajendra Nayak , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 2/2] soc: qcom: rpmpd: Add SM4250 support Date: Sun, 27 Nov 2022 16:52:04 +0530 Message-Id: <20221127112204.1486337-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221127112204.1486337-1-bhupesh.sharma@linaro.org> References: <20221127112204.1486337-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM4250 has the same RPM power domains as SM6115. Add SM4250 support by reusing SM6115 power domains. Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma --- drivers/soc/qcom/rpmpd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 337b1ad1cd3b..f0db6a10cf4e 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -471,6 +471,23 @@ static const struct rpmpd_desc qcm2290_desc = { .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR, }; +static struct rpmpd *sm4250_rpmpds[] = { + [SM4250_VDDCX] = &sm6115_vddcx, + [SM4250_VDDCX_AO] = &sm6115_vddcx_ao, + [SM4250_VDDCX_VFL] = &sm6115_vddcx_vfl, + [SM4250_VDDMX] = &sm6115_vddmx, + [SM4250_VDDMX_AO] = &sm6115_vddmx_ao, + [SM4250_VDDMX_VFL] = &sm6115_vddmx_vfl, + [SM4250_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, + [SM4250_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, +}; + +static const struct rpmpd_desc sm4250_desc = { + .rpmpds = sm4250_rpmpds, + .num_pds = ARRAY_SIZE(sm4250_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR, +}; + static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,mdm9607-rpmpd", .data = &mdm9607_desc }, { .compatible = "qcom,msm8226-rpmpd", .data = &msm8226_desc }, @@ -485,6 +502,7 @@ static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,qcm2290-rpmpd", .data = &qcm2290_desc }, { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc }, + { .compatible = "qcom,sm4250-rpmpd", .data = &sm4250_desc }, { .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc }, { .compatible = "qcom,sm6125-rpmpd", .data = &sm6125_desc }, { .compatible = "qcom,sm6375-rpmpd", .data = &sm6375_desc },