regulator: fix pm8009 bindings on sm8250
Subsystems (4)
cover regulator: fix pm8009 bindings on sm8250
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.
PATCH 1/4 dt-bindings: regulator: qcom,rpmh-regulator: add pm8009 revision
PMIC pm8009 has special revision (P=1) made for sm8250 platform. The major difference is the S2 regulator which supplies 0.95 V instead of 2.848V. Add special compatibility string for this chip revision. The datasheet calls the chip just pm8009-1, so use the same name.
--- .../devicetree/bindings/regulator/qcom,rpmh-regulator.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt +1 -0
@@ -44,6 +44,7 @@ First Level Nodes - PMIC Definition: Must be one of below: "qcom,pm8005-rpmh-regulators" "qcom,pm8009-rpmh-regulators" + "qcom,pm8009-1-rpmh-regulators" "qcom,pm8150-rpmh-regulators" "qcom,pm8150l-rpmh-regulators" "qcom,pm8350-rpmh-regulators"
Signature · 1 line
2.29.2
PATCH 2/4 regulator: qcom-rpmh-regulator: correct hfsmps515 definition
In reply to Dmitry BaryshkovAccording to the datasheet pm8009's HFS515 regulators have 16mV resolution rather than declared 1.6 mV. Correct the resolution.
--- drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/qcom-rpmh-regulator.c +1 -1
@@ -726,7 +726,7 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps510 = {static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { .regulator_type =VRM , .ops = &rpmh_regulator_vrm_ops, - .voltage_range =REGULATOR_LINEAR_RANGE (2800000 ,0 ,4 ,1600 ), + .voltage_range =REGULATOR_LINEAR_RANGE (2800000 ,0 ,4 ,16000 ), .n_voltages =5 , .pmic_mode_map = pmic_mode_map_pmic5_smps, .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode,
Signature · 1 line
2.29.2
PATCH 3/4 regulator: qcom-rpmh-regulator: add pm8009-1 chip revision
In reply to Dmitry BaryshkovPM8009 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.
--- drivers/regulator/qcom-rpmh-regulator.c | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/regulator/qcom-rpmh-regulator.c +26 -0
@@ -732,6 +732,15 @@ static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_hfsmps515_1 = { + .regulator_type =VRM , + .ops = &rpmh_regulator_vrm_ops, + .voltage_range =REGULATOR_LINEAR_RANGE (900000 ,0 ,4 ,16000 ), + .n_voltages =5 , + .pmic_mode_map = pmic_mode_map_pmic5_smps, + .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, +}; +static const struct rpmh_vreg_hw_data pmic5_bob = { .regulator_type =VRM , .ops = &rpmh_regulator_vrm_bypass_ops,
@@ -932,6 +941,19 @@ static const struct rpmh_vreg_init_data pm8009_vreg_data[] = { {}, }; +static const struct rpmh_vreg_init_data pm8009_1_vreg_data[] = { +RPMH_VREG ("smps1" ,"smp%s1" , &pmic5_hfsmps510,"vdd-s1" ), +RPMH_VREG ("smps2" ,"smp%s2" , &pmic5_hfsmps515_1,"vdd-s2" ), +RPMH_VREG ("ldo1" ,"ldo%s1" , &pmic5_nldo,"vdd-l1" ), +RPMH_VREG ("ldo2" ,"ldo%s2" , &pmic5_nldo,"vdd-l2" ), +RPMH_VREG ("ldo3" ,"ldo%s3" , &pmic5_nldo,"vdd-l3" ), +RPMH_VREG ("ldo4" ,"ldo%s4" , &pmic5_nldo,"vdd-l4" ), +RPMH_VREG ("ldo5" ,"ldo%s5" , &pmic5_pldo,"vdd-l5-l6" ), +RPMH_VREG ("ldo6" ,"ldo%s6" , &pmic5_pldo,"vdd-l5-l6" ), +RPMH_VREG ("ldo7" ,"ldo%s6" , &pmic5_pldo_lv,"vdd-l7" ), + {}, +}; +static const struct rpmh_vreg_init_data pm6150_vreg_data[] = {RPMH_VREG ("smps1" ,"smp%s1" , &pmic5_ftsmps510,"vdd-s1" ),RPMH_VREG ("smps2" ,"smp%s2" , &pmic5_ftsmps510,"vdd-s2" ),
@@ -1057,6 +1079,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pm8009-rpmh-regulators", .data = pm8009_vreg_data, }, + { + .compatible = "qcom,pm8009-1-rpmh-regulators", + .data = pm8009_1_vreg_data, + }, { .compatible = "qcom,pm8150-rpmh-regulators", .data = pm8150_vreg_data,
Signature · 1 line
2.29.2
PATCH 4/4 arm64: dts: qcom: qrb5165-rb5: fix pm8009 regulators
In reply to Dmitry BaryshkovFix pm8009 compatibility string to reference pm8009 revision specific to sm8250 platform. Also add S2 regulator to be used for qca639x.
--- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +8 -1
@@ -140,7 +140,7 @@ qca639x: qca639x { &apps_rsc { pm8009-rpmh-regulators { - compatible = "qcom,pm8009-rpmh-regulators"; + compatible = "qcom,pm8009-1-rpmh-regulators"; qcom,pmic-id = "f"; vdd-s1-supply = <&vph_pwr>;
@@ -149,6 +149,13 @@ pm8009-rpmh-regulators { vdd-l5-l6-supply = <&vreg_bob>; vdd-l7-supply = <&vreg_s4a_1p8>; + vreg_s2f_0p95: smps2 { + regulator-name = "vreg_s2f_0p95"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <952000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; + }; + vreg_l1f_1p1: ldo1 { regulator-name = "vreg_l1f_1p1"; regulator-min-microvolt = <1104000>;
Signature · 1 line
2.29.2
Quoted 6 lines · Dmitry Baryshkov
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.
Thanks, this looks sane to me:
Signature · 1 line
~Vinod
Mark Brown
maintainerQuoted 5 lines · Dmitry Baryshkov
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.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/4] dt-bindings: regulator: qcom,rpmh-regulator: add pm8009 revision
commit: 2bf3a72b08e7f6356a2db9e1571ca65f683510bb
[2/4] regulator: qcom-rpmh-regulator: correct hfsmps515 definition
commit: df6b92fa40050e59ea89784294bf6d04c0c47705
[3/4] regulator: qcom-rpmh-regulator: add pm8009-1 chip revision
commit: 951384cabc5dfb09251d440dbc26058eba86f97e
[4/4] arm64: dts: qcom: qrb5165-rb5: fix pm8009 regulators
commit: c3da02421230639bf6ee5462b70b58f5b7f3b7c6All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
This series was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This series was applied to qcom/linux.git (refs/heads/for-next):
Quoted 5 lines · On Thu, 31 Dec 2020 15:23:44 +0300 you wrote:
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.
Here is the summary with links:
- [1/4] dt-bindings: regulator: qcom,rpmh-regulator: add pm8009 revision
https://git.kernel.org/qcom/c/2bf3a72b08e7 - [2/4] regulator: qcom-rpmh-regulator: correct hfsmps515 definition https://git.kernel.org/qcom/c/df6b92fa4005 - [3/4] regulator: qcom-rpmh-regulator: add pm8009-1 chip revision https://git.kernel.org/qcom/c/951384cabc5d - [4/4] arm64: dts: qcom: qrb5165-rb5: fix pm8009 regulators https://git.kernel.org/qcom/c/c3da02421230
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html