Add regulator support for IPQ9574 SoC
Subsystems (4)
v4 cover Add regulator support for IPQ9574 SoC
IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator for APSS voltage scaling. This patch series adds support for the same and also enables the RPM communication over the RPMSG framework.
DTS patch depends on the below series
https://lore.kernel.org/linux-arm-msm/[email protected]/
[V4]:
- Detailed change logs are added to the respective patches
[V3]:
https://lore.kernel.org/linux-arm-msm/[email protected]/
- Dropped PATCH [1/6] dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible as it is available in linux-next/master
- Dropped PATCH [4/6] regulator: qcom_smd: Add support to define the bootup voltage and updated the nominal voltage in the Board DT as discussed
- Splitted the board DT changes to a separate patch as suggested
- Detailed change logs are added to the respective patches
[V2]:
https://lore.kernel.org/linux-arm-msm/[email protected]/
- Reordered the patches to have the bindings and driver changes
in place before the device tree support
- Dropped the 'soc: qcom: smd-rpm: Add IPQ9574 compatible' since
it is already part of the linux-next/master
- Detailed change log is added to the respective patches
[V1]:
https://lore.kernel.org/linux-arm-msm/[email protected]/
Devi Priya (5):
regulator: qcom_smd: Add s1 sub-node to mp5496 regulator
regulator: qcom_smd: Add MP5496 S1 regulator
arm64: dts: qcom: ipq9574: Add RPM related nodes
arm64: dts: qcom: ipq9574: Add SMPA1 regulator node
arm64: dts: qcom: ipq9574: Add cpufreq support
.../regulator/qcom,smd-rpm-regulator.yaml | 2 +- arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 19 +++++ arch/arm64/boot/dts/qcom/ipq9574.dtsi | 75 +++++++++++++++++++ drivers/regulator/qcom_smd-regulator.c | 5 +- 4 files changed, 98 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
PATCH v4 1/5 regulator: qcom_smd: Add s1 sub-node to mp5496 regulator
Adding s1 sub-node entry to mp5496 regulator node.
---
Changes in V4:
- No change
.../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml +1 -1
@@ -22,7 +22,7 @@ description: Each sub-node is identified using the node's name, with valid values listed for each of the pmics below. - For mp5496, s2 + For mp5496, s1, s2 For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
Signature · 1 line
2.17.1
PATCH v4 2/5 regulator: qcom_smd: Add MP5496 S1 regulator
In reply to Devi PriyaAdding support for MP5496 S1 regulator on IPQ9574 SoC.
---
Changes in V4:
- Dropped struct mp5496_smpa1 which was the same as mp5496_smpa2 and renamed mp5496_smpa2 to mp5496_smps as suggested by Konrad
drivers/regulator/qcom_smd-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/regulator/qcom_smd-regulator.c +3 -2
@@ -749,7 +749,7 @@ static const struct regulator_desc pms405_pldo600 = { .ops = &rpm_smps_ldo_ops, }; -static const struct regulator_desc mp5496_smpa2 = { +static const struct regulator_desc mp5496_smps = { .linear_ranges = (struct linear_range []) {REGULATOR_LINEAR_RANGE (600000 ,0 ,127 ,12500 ), },
@@ -794,7 +794,8 @@ struct rpm_regulator_data { };static const struct rpm_regulator_data rpm_mp5496_regulators[] = { - {"s2" ,QCOM_SMD_RPM_SMPA ,2 , &mp5496_smpa2,"s2" }, + {"s1" ,QCOM_SMD_RPM_SMPA ,1 , &mp5496_smps,"s1" }, + {"s2" ,QCOM_SMD_RPM_SMPA ,2 , &mp5496_smps,"s2" }, {"l2" ,QCOM_SMD_RPM_LDOA ,2 , &mp5496_ldoa2,"l2" }, {} };
Signature · 1 line
2.17.1
Re: [PATCH V4 2/5] regulator: qcom_smd: Add MP5496 S1 regulator
Quoted 6 lines · Devi Priya
Adding support for MP5496 S1 regulator on IPQ9574 SoC.
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by Devi Priya <[email protected]>---
Konrad
Quoted 30 lines
Changes in V4:
- Dropped structmp5496_smpa1which was the same asmp5496_smpa2and renamedmp5496_smpa2tomp5496_smpsas suggested by Konraddrivers/regulator/qcom_smd-regulator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/regulator/qcom_smd-regulator.c +3
-2@@ -749,7 +749,7 @@ static const struct regulator_desc pms405_pldo600 = { .ops = &rpm_smps_ldo_ops, }; -static const struct regulator_desc mp5496_smpa2 = { +static const struct regulator_desc mp5496_smps = { .linear_ranges = (struct linear_range []) {REGULATOR_LINEAR_RANGE (600000 ,0 ,127 ,12500 ), },@@ -794,7 +794,8 @@ struct rpm_regulator_data { };static const struct rpm_regulator_data rpm_mp5496_regulators[] = { - {"s2" ,QCOM_SMD_RPM_SMPA ,2 , &mp5496_smpa2,"s2" }, + {"s1" ,QCOM_SMD_RPM_SMPA ,1 , &mp5496_smps,"s1" }, + {"s2" ,QCOM_SMD_RPM_SMPA ,2 , &mp5496_smps,"s2" }, {"l2" ,QCOM_SMD_RPM_LDOA ,2 , &mp5496_ldoa2,"l2" }, {} };
PATCH v4 3/5 arm64: dts: qcom: ipq9574: Add RPM related nodes
In reply to Devi PriyaAdd RPM Glink & RPM message RAM nodes to support frequency scaling on IPQ9574.
---
Changes in V4:
- Picked up the R-b tag
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +17 -0
@@ -110,12 +110,29 @@ }; }; + rpm-glink { + compatible = "qcom,glink-rpm"; + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + mboxes = <&apcs_glb 0>; + + rpm_requests: rpm-requests { + compatible = "qcom,rpm-ipq9574"; + qcom,glink-channels = "rpm_requests"; + }; + }; + soc: soc@0 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0 0 0 0xffffffff>; + rpm_msg_ram: sram@60000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0x00060000 0x6000>; + }; + pcie0_phy: phy@84000 { compatible = "qcom,ipq9574-qmp-gen3x1-pcie-phy"; reg = <0x00084000 0x1000>;
Signature · 1 line
2.17.1
PATCH v4 4/5 arm64: dts: qcom: ipq9574: Add SMPA1 regulator node
In reply to Devi PriyaAdd support for SMPA1 regulator node in IPQ9574.
---
Changes in V4:
- Updated the comment as suggested by konrad s/Updating/Update s/725000uV/725mV
arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts +19 -0
@@ -44,6 +44,25 @@ }; }; +&rpm_requests { + regulators { + compatible = "qcom,rpm-mp5496-regulators"; + + ipq9574_s1: s1 { + /* + * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders. + * During regulator registration, kernel not knowing the initial voltage, + * considers it as zero and brings up the regulators with minimum supported voltage. + * Update the regulator-min-microvolt with SVS voltage of 725mV so that + * the regulators are brought up with 725mV which is sufficient for all the + * corner parts to operate at 800MHz + */ + regulator-min-microvolt = <725000>; + regulator-max-microvolt = <1075000>; + }; + }; +}; + &pcie1_phy { status = "okay"; };
Signature · 1 line
2.17.1
Re: [PATCH V4 4/5] arm64: dts: qcom: ipq9574: Add SMPA1 regulator node
Quoted 6 lines · Devi Priya
Add support for SMPA1 regulator node in IPQ9574.
Co-developed-by Praveenkumar I <[email protected]>Signed-off-by Praveenkumar I <[email protected]>Signed-off-by Devi Priya <[email protected]>---
Konrad
Quoted 38 lines
Changes in V4:
- Updated the comment as suggested by konrad s/Updating/Update s/725000uV/725mVarch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts +19
-0@@ -44,6 +44,25 @@ }; }; +&rpm_requests { + regulators { + compatible = "qcom,rpm-mp5496-regulators"; + + ipq9574_s1: s1 { + /* + * During kernel bootup, the SoC runs at 800MHz with 875mV set by the bootloaders. + * During regulator registration, kernel not knowing the initial voltage, + * considers it as zero and brings up the regulators with minimum supported voltage. + * Update the regulator-min-microvolt with SVS voltage of 725mV so that + * the regulators are brought up with 725mV which is sufficient for all the + * corner parts to operate at 800MHz + */ + regulator-min-microvolt = <725000>; + regulator-max-microvolt = <1075000>; + }; + }; +}; + &pcie1_phy { status = "okay"; };
PATCH v4 5/5 arm64: dts: qcom: ipq9574: Add cpufreq support
In reply to Devi PriyaAdd cpu freq nodes in the device tree to bump cpu frequency above 800MHz.
---
Changes in V4:
- Picked up the R-b tag
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+)
arch/arm64/boot/dts/qcom/ipq9574.dtsi +58 -0
@@ -6,6 +6,7 @@ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. */ +#include <dt-bindings/clock/qcom,apss-ipq.h> #include <dt-bindings/clock/qcom,ipq9574-gcc.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/reset/qcom,ipq9574-gcc.h>
@@ -37,6 +38,10 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq9574_s1>; }; CPU1: cpu@1 {
@@ -45,6 +50,10 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq9574_s1>; }; CPU2: cpu@2 {
@@ -53,6 +62,10 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq9574_s1>; }; CPU3: cpu@3 {
@@ -61,6 +74,10 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; + cpu-supply = <&ipq9574_s1>; }; L2_0: l2-cache {
@@ -75,6 +92,47 @@ reg = <0x0 0x40000000 0x0 0x0>; }; + cpu_opp_table: opp-table-cpu { + compatible = "operating-points-v2"; + opp-shared; + + opp-936000000 { + opp-hz = /bits/ 64 <936000000>; + opp-microvolt = <725000>; + clock-latency-ns = <200000>; + }; + + opp-1104000000 { + opp-hz = /bits/ 64 <1104000000>; + opp-microvolt = <787500>; + clock-latency-ns = <200000>; + }; + + opp-1416000000 { + opp-hz = /bits/ 64 <1416000000>; + opp-microvolt = <862500>; + clock-latency-ns = <200000>; + }; + + opp-1488000000 { + opp-hz = /bits/ 64 <1488000000>; + opp-microvolt = <925000>; + clock-latency-ns = <200000>; + }; + + opp-1800000000 { + opp-hz = /bits/ 64 <1800000000>; + opp-microvolt = <987500>; + clock-latency-ns = <200000>; + }; + + opp-2208000000 { + opp-hz = /bits/ 64 <2208000000>; + opp-microvolt = <1062500>; + clock-latency-ns = <200000>; + }; + }; + firmware { scm { compatible = "qcom,scm-ipq9574", "qcom,scm";
Signature · 1 line
2.17.1
Mark Brown
maintainerRe: (subset) [PATCH V4 0/5] Add regulator support for IPQ9574 SoC
In reply to Devi PriyaQuoted 8 lines · Devi Priya
IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator for APSS voltage scaling. This patch series adds support for the same and also enables the RPM communication over the RPMSG framework.
DTS patch depends on the below series
https://lore.kernel.org/linux-arm-msm/[email protected]/[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/5] regulator: qcom_smd: Add s1 sub-node to mp5496 regulator
commit: e953450cf0f622e3249202e985c79d3faf9a58f2
[2/5] regulator: qcom_smd: Add MP5496 S1 regulator
commit: 60bbee7db43b97bf8c0978cc91f78d1746351871All 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
Re: (subset) [PATCH V4 0/5] Add regulator support for IPQ9574 SoC
In reply to Devi PriyaQuoted 8 lines · Devi Priya
IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator for APSS voltage scaling. This patch series adds support for the same and also enables the RPM communication over the RPMSG framework.
DTS patch depends on the below series
https://lore.kernel.org/linux-arm-msm/[email protected]/[...]
Applied, thanks!
[3/5] arm64: dts: qcom: ipq9574: Add RPM related nodes
commit: 8cc864a4375dd62023a2880050bf618a225cb907
[4/5] arm64: dts: qcom: ipq9574: Add SMPA1 regulator node
commit: 56ba2b3aeb4b76549a7759e79bd44330cd9b885a
[5/5] arm64: dts: qcom: ipq9574: Add cpufreq support
commit: 8f0ae6bc0098f63a008820f80c08b01ea2167da3Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>