summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/qcom-rpmh-regulator.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* regulator: qcom-rpmh: add pm660 and pm660l pmicsRichard Acayan2022-09-231-0/+54
| | | | | | | | | | | | | 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 <mailingradian@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220920223331.150635-3-mailingradian@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()Douglas Anderson2022-08-151-9/+8
| | | | | | | | | | | Since we don't actually pass the load to the firmware, switch to using get_optimum_mode() instead of open-coding it. This is intended to have no effect other than cleanup. Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20220726102024.1.Icc838fe7bf0ef54a014ab2fee8af311654f5342a@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add support for SDX65Rohit Agarwal2022-03-181-0/+37
| | | | | | | | Add support from RPMH regulators found in SDX65 platform. Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> Link: https://lore.kernel.org/r/1647410837-22537-3-git-send-email-quic_rohiagar@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add support for PM8450 regulatorsVinod Koul2021-12-011-0/+18
| | | | | | | | | Add the rpmh regulators found in PM8450 PMIC Signed-off-by: Vinod Koul <vkoul@kernel.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20211201072515.3968843-3-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add PMG1110 regulatorsSatya Priya2021-11-291-0/+9
| | | | | | | | Add support for PMG1110 regulators. Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com> Link: https://lore.kernel.org/r/1637668167-31325-3-git-send-email-quic_c_skakit@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add PM6350 regulatorsLuca Weiss2021-10-211-0/+32
| | | | | | | | | | | | | Add the configuration for pm6350 regulators. The supplies are not known so leave them out for now. Additionally leave out configuration of smps3 - smps5 and ldo17 as these are not configured in the downstream kernel and the type of them is not known. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Link: https://lore.kernel.org/r/20211007212444.328034-4-luca@z3ntu.xyz Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh-regulator: fix pm8009-1 ldo7 resource nameDmitry Baryshkov2021-09-011-1/+1
| | | | | | | | | | | Fix a typo in the pm8009 LDO7 declaration, it uses resource name ldo%s6 instead of ldo%s7. Fixes: 951384cabc5d ("regulator: qcom-rpmh-regulator: add pm8009-1 chip revision") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210901114350.1106073-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add new regulator found on SA8155p adp boardBhupesh Sharma2021-06-211-0/+36
| | | | | | | | | | | | | | | | | | SA8155p-adp board supports a new regulator - pmm8155au. The output power management circuits in this regulator include: - FTS510 smps, - HFS510 smps, and - LDO510 linear regulators Add support for the same. Cc: Mark Brown <broonie@kernel.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210617051712.345372-6-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add terminator at the end of pm7325x_vreg_data[] arrayBhupesh Sharma2021-06-211-0/+2
| | | | | | | | | | | | Add missing terminator(s) at the end of pm7325x_vreg_data[] array instances. Fixes: c4e5aa3dbee5 ("regulator: qcom-rpmh: Add PM7325/PMR735A regulator support") Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Link: https://lore.kernel.org/r/20210617051712.345372-5-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Cleanup terminator line commasBhupesh Sharma2021-06-211-12/+12
| | | | | | | | | | | Cleanup the qcom-rpmh regulator driver to remove comma(s) at the end of the terminator line(s). Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Link: https://lore.kernel.org/r/20210617051712.345372-4-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add PM7325/PMR735A regulator supportsatya priya2021-04-011-1/+52
| | | | | | | | | | | Add support for PM7325/PMR735A regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: satya priya <skakit@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/1617192339-3760-3-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add pmic5_ftsmps520 bucksatya priya2021-04-011-0/+9
| | | | | | | | | | Add pmic5_ftsmps520 buck as this is required for PM7325 and PMR735A PMICs. Signed-off-by: satya priya <skakit@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/1617192339-3760-2-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Use correct buck for S1C regulatorsatya priya2021-03-101-1/+1
| | | | | | | | | Use correct buck, that is, pmic5_hfsmps515 for S1C regulator of PM8350C PMIC. Signed-off-by: satya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-7-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Correct the pmic5_hfsmps515 bucksatya priya2021-03-101-2/+2
| | | | | | | | | Correct the REGULATOR_LINEAR_RANGE and n_voltges for pmic5_hfsmps515 buck. Signed-off-by: satya priya <skakit@codeaurora.org> Link: https://lore.kernel.org/r/1614155592-14060-4-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'regulator/for-5.12' into regulator-nextMark Brown2021-02-121-0/+34
|\
| * regulator: qcom-rpmh: Add pmc8180 and pmc8180cBjorn Andersson2021-01-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | The regulators from PMC8180 and PMC8180C exposed by the RPMH in the Qualcomm SC8180X seems to be the same as PM8150 and PM8150L. Add compatibles for the two new PMICs and reuse the definition of the existing PMICs. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210120224901.1611232-2-bjorn.andersson@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * regulator: qcom-rpmh-regulator: add pm8009-1 chip revisionDmitry Baryshkov2021-01-041-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PM8009 has special revision (P=1), which is to be used for sm8250 platform. The major difference is the S2 regulator which supplies 0.95 V instead of 2.848V. Declare regulators data to be used for this chip revision. The datasheet calls the chip just pm8009-1, so use the same name. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Reviewed-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20201231122348.637917-4-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: qcom-rpmh: fix pm8009 ldo7Jonathan Marek2021-02-111-1/+1
|/ | | | | | | | | | Use the correct name to avoid ldo7 commands being sent to ldo6's address. Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20210211034935.5622-1-jonathan@marek.ca Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh-regulator: correct hfsmps515 definitionDmitry Baryshkov2021-01-041-1/+1
| | | | | | | | | | | According to the datasheet pm8009's HFS515 regulators have 16mV resolution rather than declared 1.6 mV. Correct the resolution. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Reviewed-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20201231122348.637917-3-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add support for PM8350/PM8350cVinod Koul2020-12-041-0/+62
| | | | | | | | | Add support from RPMH regulators found in PM8350 and PM8350c PMICs Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20201203071244.2652297-2-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add support for SDX55Vinod Koul2020-11-261-0/+31
| | | | | | | | Add support from RPMH regulators found in SDX55 platform Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20201126093018.1085594-2-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=nJisheng Zhang2020-08-211-1/+1
| | | | | | | | | | | | Fix below warning when CONFIG_OF=n: drivers/regulator/qcom-rpmh-regulator.c:970:34: warning: ‘rpmh_regulator_match_table’ defined but not used [-Wunused-const-variable=] 970 | static const struct of_device_id rpmh_regulator_match_table[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/20200821111913.1096f7cc@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formattingLee Jones2020-06-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | W=1 kernel builds report a lack of descriptions for various enum properties and function arguments. In reality they are documented, but the formatting was not as expected '@.*:'. Instead, some weird arg identifiers were used or none at all. This change fixes the following warnings: drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg' Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Andy Gross <agross@kernel.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-3-lee.jones@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'regulator/for-5.8' into regulator-linusMark Brown2020-06-011-1/+1
|\
| * regulator: use linear_ranges helperMatti Vaittinen2020-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Change the regulator helpers to use common linear_ranges code. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: qcom-rpmh: Fix typos in pm8150 and pm8150lBjorn Andersson2020-04-151-4/+4
|/ | | | | | | | | | | Fix typos in pm8150 l13/l16/l17 and pm8150l ldo8 supplies. Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200415053708.717623-1-bjorn.andersson@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'regulator-5.4' into regulator-5.5Mark Brown2019-10-081-2/+2
|\
| * regulator: qcom-rpmh: Fix PMIC5 BoB min voltageKiran Gunda2019-10-041-2/+2
| | | | | | | | | | | | | | | | | | Correct the PMIC5 BoB min voltage from 0.3V to 3V. Also correct the voltage selector accordingly. Signed-off-by: Kiran Gunda <kgunda@codeaurora.org> Link: https://lore.kernel.org/r/1570184215-5355-1-git-send-email-kgunda@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: qcom-rpmh: add PM6150/PM6150L regulator supportKiran Gunda2019-10-041-1/+61
|/ | | | | | | | | | Add support for PM6150/PM6150L regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: Kiran Gunda <kgunda@codeaurora.org> Link: https://lore.kernel.org/r/1570183734-30706-3-git-send-email-kgunda@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Update PMIC modes for PMIC5Vinod Koul2019-08-091-7/+45
| | | | | | | | Add the PMIC5 modes and use them pmic5 ldo and smps Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-4-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Fix pmic5_bob voltage countVinod Koul2019-08-091-1/+1
| | | | | | | | pmic5_bob voltages count is 136 [0,135] so update it Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-3-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Sort the compatiblesVinod Koul2019-08-091-10/+10
| | | | | | | | | It helps to keep sorted order for compatibles, so sort them Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190809073616.1235-2-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add support for SM8150Vinod Koul2019-08-081-0/+147
| | | | | | | | Add support from RPMH regulators found in SM8150 platform Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20190808093343.5600-2-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: Use of_node_name_eq for node name comparisonsRob Herring2018-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Support Opensource <support.opensource@diasemi.com> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: qcom-rpmh: Add stylistic breaks in the default casesDouglas Anderson2018-08-281-0/+3
| | | | | | | | | | No functional change here but it can make the code more readable to have breaks in the "default" case even though it's the last case. Let's add them. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: David Collins <collinsd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: Convert to using %pOFn instead of device_node.nameRob Herring2018-08-281-7/+7
| | | | | | | | In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: add QCOM RPMh regulator driverDavid Collins2018-08-101-0/+769
Add the QCOM RPMh regulator driver to manage PMIC regulators which are controlled via RPMh on some Qualcomm Technologies, Inc. SoCs. RPMh is a hardware block which contains several accelerators which are used to manage various hardware resources that are shared between the processors of the SoC. The final hardware state of a regulator is determined within RPMh by performing max aggregation of the requests made by all of the processors. Add support for PMIC regulator control via the voltage regulator manager (VRM) and oscillator buffer (XOB) RPMh accelerators. VRM supports manipulation of enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins <collinsd@codeaurora.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>