From patchwork Tue Sep 20 22:37:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 607767 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 13683C6FA93 for ; Tue, 20 Sep 2022 22:37:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbiITWhz (ORCPT ); Tue, 20 Sep 2022 18:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbiITWhy (ORCPT ); Tue, 20 Sep 2022 18:37:54 -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 92E2B63F21; Tue, 20 Sep 2022 15:37:53 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id h194so3626589iof.4; Tue, 20 Sep 2022 15:37:53 -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=hJ/3F+3Q/iQ4fM5YaCBMqVUY89/aMeDjr8XJkGMcano=; b=mRS40Ca7NRdzrnra0s9lPotNSUSMx3ZEmbuO4Z3Bvbc7NNc7rmJOH0v9tz7eZ3URDQ aUFXUlQJke9a9pe79qDoBu8TpZIO/OQio6/5kvAaMg+zVJaiQWI7qSfWoGVSnnSLkPsB VAnT6wLdXhTipI5cGLOWvOoR14ZeiAOh71IMUBIiXd3J+sfxY3dAFMuXM8wIOgFF79ir 8c6wGhkk6GCPuW99Xt9X5IvIsdufQZZvx+0qgUgKBtl8exGJ6/W8RF9OSdSjo7PpI8B/ 01SbYKgVJep9Rl23pHKOaTXtpN1dNWYeuIa1RZ0x/pZqbkjbMKNihX1AVTQDXvenkXTO ssAw== 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=hJ/3F+3Q/iQ4fM5YaCBMqVUY89/aMeDjr8XJkGMcano=; b=6/Zna5367WdWuXM1yPcRQULaLc+j9vAyDtGCCpbUwG8blxXHGP2XQ2PKxQjQ0VoIfN YojvOVlgv0s57+LiaqujI6ti9K5E6SBP6fVJlNUSPuANbRgDim/8IykSkyWUNsjfceb5 u75CVOe7TCi/5k1079skcPmVjk2AFn0P7F8fJw3L1Efe+8tKCOW6DzO+LhlsCe1qGeGR OoBG4y2W4RniXWQj8E+0YG6RG5D+jbuy7foMpCVAK8siKRonghaM5w34oBmjeXoDe4vG Wdrjb4fdU1lW3FceWz1Z3lCqFh89ADkDmG7zgo6axoneXJxo1btDy90qusoJBbJUeQF/ 438w== X-Gm-Message-State: ACrzQf3ZQEEOZzqs/g0x9lZzFB5WOIcqsQ9Xv63W2Kn0KX+LUTwvfelV XlOWsZ6mdi2XOG+KdIXxiwy8O1aYBk8= X-Google-Smtp-Source: AMsMyM5aS4KZjjteSH2GaMW/zJDP1lxKqhLY9CbzPtAFMPwux505ypYHIMJlTcdrMNAd9a2fSV4TKg== X-Received: by 2002:a05:6638:2414:b0:35a:b7f0:492a with SMTP id z20-20020a056638241400b0035ab7f0492amr7595115jat.78.1663713472773; Tue, 20 Sep 2022 15:37:52 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::a533]) by smtp.gmail.com with UTF8SMTPSA id g38-20020a028529000000b00350682ba05csm389340jai.30.2022.09.20.15.37.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 15:37:52 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Taniya Das , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Richard Acayan Subject: [PATCH v2 1/2] dt-bindings: clock: add rpmhcc bindings for sdm670 Date: Tue, 20 Sep 2022 18:37:33 -0400 Message-Id: <20220920223734.151135-2-mailingradian@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220920223734.151135-1-mailingradian@gmail.com> References: <20220920223734.151135-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Snapdragon 670 uses the RPMh mailbox for some clocks. Document its support. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml index 8fcaf418f84a..437a34b930e3 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml @@ -21,6 +21,7 @@ properties: - qcom,sc7280-rpmh-clk - qcom,sc8180x-rpmh-clk - qcom,sc8280xp-rpmh-clk + - qcom,sdm670-rpmh-clk - qcom,sdm845-rpmh-clk - qcom,sdx55-rpmh-clk - qcom,sdx65-rpmh-clk From patchwork Tue Sep 20 22:33:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Acayan X-Patchwork-Id: 607768 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 27DD5C6FA82 for ; Tue, 20 Sep 2022 22:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230232AbiITWdr (ORCPT ); Tue, 20 Sep 2022 18:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiITWdp (ORCPT ); Tue, 20 Sep 2022 18:33:45 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15F2C474C1; Tue, 20 Sep 2022 15:33:44 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id c4so3628515iof.3; Tue, 20 Sep 2022 15:33:44 -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=8x7bkc+/nQ4Gak6zOOVzdJShWFx0m/P34PcdoTGcao4=; b=OswUv+NR5xlRdjGfDKP40MbmgCQjeXYtK8PqtzjqfHuA28/0EwyYLC2byrOhNmXORy E5wT9SNoIN9ZHmVfodXEL8ifRdaptQJ/8aw9F1jbnijn7aRNrOZ1cbGZ14UqLM76k9fV iYdtBayWcozVDKTAT8OJC4Vj9QXBh+5C0z9B7quh0pZScgSr5+gVAssOlUW1RP0dqt3m m5CpcysAfu2X6HpLoRaPXX7FC75n+CmSJBS9umvtcBWhJQYxM4KHKnymh0a2qWKJtcM+ YKsRPORqiefCldrwZD1gfMcvqaUN89VF4qZVrkUO1zKRz3Os1o4tXLfBSDgOG950Zq3u skug== 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=8x7bkc+/nQ4Gak6zOOVzdJShWFx0m/P34PcdoTGcao4=; b=qJdwTsz1HLDpUjLWPy72eeWA3nc/dYU3v+JhazkitOs3W9Ib5ekAWZO0R/vEyGDFHA C2OsWYfGP7SGpZr/cTdnVdTYsfTPLVRRzN/ILC0q133PeWI/dgBiSAYWyTWwtey0dysm UEdAAqEd9+fKB6H/mXUXX2vq1GbpqNnFn82bXowEsl6Mu1WKaSE1BD5e8f0KzzsZHgsm vVwWGY8SuSpBjcVyq/haXUevr3h3HT88PxSt5q+8Omu9R9K1+QxV0D8gxfD0NCWdwM4E O89H9qxJ9eanes23rnJ1nuSCEzyo7IxeoJKcHZCtME2/XGQS/g/0lxlg7inIDIBCdLpE C92w== X-Gm-Message-State: ACrzQf3ya1hQNL/+x7Ntj1aatOiGFkGtquDxu7GFJh/ulxGKKmSzAsR0 SnkDdo8x1pVDPkTCA114nyzcfosO0vo= X-Google-Smtp-Source: AMsMyM6l/w7kUfqUCApbzt7/WdUFWyfH1QfOS5eT3T38t3s41W0Ep1K+oPIusf4+CtDh9h9UMVb8Jg== X-Received: by 2002:a05:6602:2b14:b0:67b:8976:2945 with SMTP id p20-20020a0566022b1400b0067b89762945mr10333822iov.82.1663713223071; Tue, 20 Sep 2022 15:33:43 -0700 (PDT) Received: from localhost ([2607:fea8:a2e2:2d00::a533]) by smtp.gmail.com with UTF8SMTPSA id n4-20020a056638110400b0034ac4b215c3sm379128jal.102.2022.09.20.15.33.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 15:33:42 -0700 (PDT) From: Richard Acayan To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, Richard Acayan Subject: [PATCH v2 2/2] regulator: qcom-rpmh: add pm660 and pm660l pmics Date: Tue, 20 Sep 2022 18:33:31 -0400 Message-Id: <20220920223331.150635-3-mailingradian@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220920223331.150635-1-mailingradian@gmail.com> References: <20220920223331.150635-1-mailingradian@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The SDM630 and SDM660 both use RPM (not RPMh) for managing the PM660 and PM660L. The SDM670 uses RPMh to manage them as PMIC 4s. To support the SDM670, add the PM660 and PM660L to the RPMh regulator driver. Link: https://android.googlesource.com/kernel/msm/+/58064f13c0a436a82c35f2e3b5a122d874ae5846%5E%21/#F0 Link: https://android.googlesource.com/kernel/msm/+/f676d3d24f9d802bfe63369167c4a8cc162b8950%5E%21/#F3 Signed-off-by: Richard Acayan --- drivers/regulator/qcom-rpmh-regulator.c | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index b2debde79361..4158ff126a67 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -1198,6 +1198,52 @@ static const struct rpmh_vreg_init_data pmr735a_vreg_data[] = { {} }; +static const struct rpmh_vreg_init_data pm660_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic4_ftsmps426, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic4_ftsmps426, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic4_ftsmps426, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic4_hfsmps3, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic4_hfsmps3, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic4_hfsmps3, "vdd-s6"), + RPMH_VREG("ldo1", "ldo%s1", &pmic4_nldo, "vdd-l1-l6-l7"), + RPMH_VREG("ldo2", "ldo%s2", &pmic4_nldo, "vdd-l2-l3"), + RPMH_VREG("ldo3", "ldo%s3", &pmic4_nldo, "vdd-l2-l3"), + /* ldo4 is inaccessible on PM660 */ + RPMH_VREG("ldo5", "ldo%s5", &pmic4_nldo, "vdd-l5"), + RPMH_VREG("ldo6", "ldo%s6", &pmic4_nldo, "vdd-l1-l6-l7"), + RPMH_VREG("ldo7", "ldo%s7", &pmic4_nldo, "vdd-l1-l6-l7"), + RPMH_VREG("ldo8", "ldo%s8", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo9", "ldo%s9", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo10", "ldo%s10", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo11", "ldo%s11", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo12", "ldo%s12", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo13", "ldo%s13", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo14", "ldo%s14", &pmic4_pldo_lv, "vdd-l8-l9-l10-l11-l12-l13-l14"), + RPMH_VREG("ldo15", "ldo%s15", &pmic4_pldo, "vdd-l15-l16-l17-l18-l19"), + RPMH_VREG("ldo16", "ldo%s16", &pmic4_pldo, "vdd-l15-l16-l17-l18-l19"), + RPMH_VREG("ldo17", "ldo%s17", &pmic4_pldo, "vdd-l15-l16-l17-l18-l19"), + RPMH_VREG("ldo18", "ldo%s18", &pmic4_pldo, "vdd-l15-l16-l17-l18-l19"), + RPMH_VREG("ldo19", "ldo%s19", &pmic4_pldo, "vdd-l15-l16-l17-l18-l19"), + {} +}; + +static const struct rpmh_vreg_init_data pm660l_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic4_ftsmps426, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic4_ftsmps426, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic4_ftsmps426, "vdd-s3-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic4_ftsmps426, "vdd-s5"), + RPMH_VREG("ldo1", "ldo%s1", &pmic4_nldo, "vdd-l1-l9-l10"), + RPMH_VREG("ldo2", "ldo%s2", &pmic4_pldo, "vdd-l2"), + RPMH_VREG("ldo3", "ldo%s3", &pmic4_pldo, "vdd-l3-l5-l7-l8"), + RPMH_VREG("ldo4", "ldo%s4", &pmic4_pldo, "vdd-l4-l6"), + RPMH_VREG("ldo5", "ldo%s5", &pmic4_pldo, "vdd-l3-l5-l7-l8"), + RPMH_VREG("ldo6", "ldo%s6", &pmic4_pldo, "vdd-l4-l6"), + RPMH_VREG("ldo7", "ldo%s7", &pmic4_pldo, "vdd-l3-l5-l7-l8"), + RPMH_VREG("ldo8", "ldo%s8", &pmic4_pldo, "vdd-l3-l5-l7-l8"), + RPMH_VREG("bob", "bob%s1", &pmic4_bob, "vdd-bob"), + {} +}; + static int rpmh_regulator_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1320,6 +1366,14 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pmr735a-rpmh-regulators", .data = pmr735a_vreg_data, }, + { + .compatible = "qcom,pm660-rpmh-regulators", + .data = pm660_vreg_data, + }, + { + .compatible = "qcom,pm660l-rpmh-regulators", + .data = pm660l_vreg_data, + }, {} }; MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table);