* [PATCH 0/8] Add PM8937 PMIC support
@ 2023-11-06 12:08 Dang Huynh
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
` (9 more replies)
0 siblings, 10 replies; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
PM8937 is a power management IC. It is used in various boards with
MSM8917, MSM8937, MSM8940 and APQ variants.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
Dang Huynh (8):
mfd: qcom-spmi-pmic: Add support for PM8937
dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC
regulator: qcom_spmi: Add PM8937 SPMI regulator
dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC
regulator: qcom_smd: Add PM8937 regulators
dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC
arm64: dts: qcom: Add PM8937 PMIC
soc: qcom: socinfo: Add PM8937 Power IC
.../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
.../bindings/regulator/qcom,smd-rpm-regulator.yaml | 4 +
.../bindings/regulator/qcom,spmi-regulator.yaml | 19 ++
arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++
drivers/mfd/qcom-spmi-pmic.c | 1 +
drivers/regulator/qcom_smd-regulator.c | 34 ++++
drivers/regulator/qcom_spmi-regulator.c | 34 ++++
drivers/soc/qcom/socinfo.c | 2 +-
include/soc/qcom/qcom-spmi-pmic.h | 1 +
9 files changed, 297 insertions(+), 1 deletion(-)
---
base-commit: 12c9e8890929813dc852d9739f8d900ff51d9814
change-id: 20231106-pm8937-000e423a75fb
Best regards,
--
Dang Huynh <danct12@riseup.net>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 13:55 ` Caleb Connolly
2023-11-06 12:08 ` [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Dang Huynh
` (8 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
Add the subtype and compatible strings for PM8937.
The PM8937 is found in various SoCs, including MSM8917, MSM8937,
MSM8940 and APQ variants.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
drivers/mfd/qcom-spmi-pmic.c | 1 +
include/soc/qcom/qcom-spmi-pmic.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
index 4549fa9f7d4b..eab5bf6cff10 100644
--- a/drivers/mfd/qcom-spmi-pmic.c
+++ b/drivers/mfd/qcom-spmi-pmic.c
@@ -53,6 +53,7 @@ static const struct of_device_id pmic_spmi_id_table[] = {
{ .compatible = "qcom,pm8901", .data = N_USIDS(2) },
{ .compatible = "qcom,pm8909", .data = N_USIDS(2) },
{ .compatible = "qcom,pm8916", .data = N_USIDS(2) },
+ { .compatible = "qcom,pm8937", .data = N_USIDS(2) },
{ .compatible = "qcom,pm8941", .data = N_USIDS(2) },
{ .compatible = "qcom,pm8950", .data = N_USIDS(2) },
{ .compatible = "qcom,pm8994", .data = N_USIDS(2) },
diff --git a/include/soc/qcom/qcom-spmi-pmic.h b/include/soc/qcom/qcom-spmi-pmic.h
index c47cc71a999e..17a0a8c3d656 100644
--- a/include/soc/qcom/qcom-spmi-pmic.h
+++ b/include/soc/qcom/qcom-spmi-pmic.h
@@ -31,6 +31,7 @@
#define PM8998_SUBTYPE 0x14
#define PMI8998_SUBTYPE 0x15
#define PM8005_SUBTYPE 0x18
+#define PM8937_SUBTYPE 0x19
#define PM660L_SUBTYPE 0x1a
#define PM660_SUBTYPE 0x1b
#define PM8150_SUBTYPE 0x1e
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 13:11 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator Dang Huynh
` (7 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
Add bindings for PM8937 PMIC (qcom,pm8937). This PMIC is found in
boards with MSM8917, MSM8937, MSM8940 and APQ variants.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index 9fa568603930..8f728920df9e 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -66,6 +66,7 @@ properties:
- qcom,pm8841
- qcom,pm8909
- qcom,pm8916
+ - qcom,pm8937
- qcom,pm8941
- qcom,pm8950
- qcom,pm8953
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
2023-11-06 12:08 ` [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 12:35 ` Dmitry Baryshkov
2023-11-06 12:08 ` [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Dang Huynh
` (6 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
The PM8937 has 4 HFSMPS, 2 FTSMPS2.5 (for controlling APC voltage)
and 23 LDO regulators.
Add the configuration for this chip.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
drivers/regulator/qcom_spmi-regulator.c | 34 +++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 94f9092b29ef..9a9fa20dcd95 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -2239,6 +2239,39 @@ static const struct spmi_regulator_data pm8916_regulators[] = {
{ }
};
+static const struct spmi_regulator_data pm8937_regulators[] = {
+ { "s1", 0x1400, "vdd_s1", },
+ { "s2", 0x1700, "vdd_s2", },
+ { "s3", 0x1a00, "vdd_s3", },
+ { "s4", 0x1d00, "vdd_s4", },
+ { "s5", 0x2000, "vdd_s5", },
+ { "s6", 0x2300, "vdd_s6", },
+ { "l1", 0x4000, "vdd_l1_l19", },
+ { "l2", 0x4100, "vdd_l2_l23", },
+ { "l3", 0x4200, "vdd_l3", },
+ { "l4", 0x4300, "vdd_l4_l5_l6_l7_l16", },
+ { "l5", 0x4400, "vdd_l4_l5_l6_l7_l16", },
+ { "l6", 0x4500, "vdd_l4_l5_l6_l7_l16", },
+ { "l7", 0x4600, "vdd_l4_l5_l6_l7_l16", },
+ { "l8", 0x4700, "vdd_l8_l11_l12_l17_l22", },
+ { "l9", 0x4800, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l10", 0x4900, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l11", 0x4a00, "vdd_l8_l11_l12_l17_l22", },
+ { "l12", 0x4b00, "vdd_l8_l11_l12_l17_l22", },
+ { "l13", 0x4c00, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l14", 0x4d00, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l15", 0x4e00, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l16", 0x4f00, "vdd_l4_l5_l6_l7_l16", },
+ { "l17", 0x5000, "vdd_l8_l11_l12_l17_l22", },
+ { "l18", 0x5100, "vdd_l9_l10_l13_l14_l15_l18", },
+ { "l19", 0x5200, "vdd_l1_l19", },
+ { "l20", 0x5300, "vdd_l20_l21", },
+ { "l21", 0x5400, "vdd_l21_l21", },
+ { "l22", 0x5500, "vdd_l8_l11_l12_l17_l22", },
+ { "l23", 0x5600, "vdd_l2_l23", },
+ { }
+};
+
static const struct spmi_regulator_data pm8941_regulators[] = {
{ "s1", 0x1400, "vdd_s1", },
{ "s2", 0x1700, "vdd_s2", },
@@ -2453,6 +2486,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = {
{ .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators },
{ .compatible = "qcom,pm8909-regulators", .data = &pm8909_regulators },
{ .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators },
+ { .compatible = "qcom,pm8937-regulators", .data = &pm8937_regulators },
{ .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators },
{ .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators },
{ .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators },
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (2 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 13:12 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators Dang Huynh
` (5 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
Add support for qcom,pm8937-regulators compatible string and add
relevant supplies in QCOM's SPMI regulator documentation.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
.../bindings/regulator/qcom,spmi-regulator.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
index 7a1b7d2abbd4..aea849e8eadf 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
@@ -22,6 +22,7 @@ properties:
- qcom,pm8841-regulators
- qcom,pm8909-regulators
- qcom,pm8916-regulators
+ - qcom,pm8937-regulators
- qcom,pm8941-regulators
- qcom,pm8950-regulators
- qcom,pm8994-regulators
@@ -291,6 +292,24 @@ allOf:
patternProperties:
"^vdd_s[1-3]-supply$": true
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pm8937-regulators
+ then:
+ properties:
+ vdd_l1_l19-supply: true
+ vdd_l20_l21-supply: true
+ vdd_l2_l23-supply: true
+ vdd_l3-supply: true
+ vdd_l4_l5_l6_l7_l16-supply: true
+ vdd_l8_l11_l12_l17_l22-supply: true
+ vdd_l9_l10_l13_l14_l15_l18-supply: true
+ patternProperties:
+ "^vdd_s[1-6]-supply$": true
+
- if:
properties:
compatible:
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (3 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 12:15 ` Dmitry Baryshkov
2023-11-06 12:08 ` [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Dang Huynh
` (4 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
The PM8937 is found on boards with MSM8917, MSM8937, MSM8940 SoCs and
APQ variants.
It provides 6 SMPS (two are controlled by SPMI) and 23 LDO regulators.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
drivers/regulator/qcom_smd-regulator.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index f53ada076252..09c471a0ba2e 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -1012,6 +1012,39 @@ static const struct rpm_regulator_data rpm_pm8916_regulators[] = {
{}
};
+static const struct rpm_regulator_data rpm_pm8937_regulators[] = {
+ { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8994_hfsmps, "vdd_s1" },
+ { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8994_hfsmps, "vdd_s2" },
+ { "s3", QCOM_SMD_RPM_SMPA, 3, &pm8994_hfsmps, "vdd_s3" },
+ { "s4", QCOM_SMD_RPM_SMPA, 4, &pm8994_hfsmps, "vdd_s4" },
+ /* S5 - S6 are managed by SPMI */
+
+ { "l1", QCOM_SMD_RPM_LDOA, 1, &pm8953_ult_nldo, "vdd_l1_l19" },
+ { "l2", QCOM_SMD_RPM_LDOA, 2, &pm8953_ult_nldo, "vdd_l2_l23" },
+ { "l3", QCOM_SMD_RPM_LDOA, 3, &pm8953_ult_nldo, "vdd_l3" },
+ { "l4", QCOM_SMD_RPM_LDOA, 4, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" },
+ { "l5", QCOM_SMD_RPM_LDOA, 5, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" },
+ { "l6", QCOM_SMD_RPM_LDOA, 6, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" },
+ { "l7", QCOM_SMD_RPM_LDOA, 7, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" },
+ { "l8", QCOM_SMD_RPM_LDOA, 8, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" },
+ { "l9", QCOM_SMD_RPM_LDOA, 9, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" },
+ { "l10", QCOM_SMD_RPM_LDOA, 10, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"},
+ { "l11", QCOM_SMD_RPM_LDOA, 11, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" },
+ { "l12", QCOM_SMD_RPM_LDOA, 12, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" },
+ { "l13", QCOM_SMD_RPM_LDOA, 13, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" },
+ { "l14", QCOM_SMD_RPM_LDOA, 14, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" },
+ { "l15", QCOM_SMD_RPM_LDOA, 15, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" },
+ { "l16", QCOM_SMD_RPM_LDOA, 16, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" },
+ { "l17", QCOM_SMD_RPM_LDOA, 17, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" },
+ { "l18", QCOM_SMD_RPM_LDOA, 18, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" },
+ { "l19", QCOM_SMD_RPM_LDOA, 19, &pm8953_ult_nldo, "vdd_l1_l19" },
+ { "l20", QCOM_SMD_RPM_LDOA, 20, &pm8953_lnldo, "vdd_l20_l21" },
+ { "l21", QCOM_SMD_RPM_LDOA, 21, &pm8953_lnldo, "vdd_l20_l21" },
+ { "l22", QCOM_SMD_RPM_LDOA, 22, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" },
+ { "l23", QCOM_SMD_RPM_LDOA, 23, &pm8994_nldo, "vdd_l2_l23" },
+ {}
+};
+
static const struct rpm_regulator_data rpm_pm8941_regulators[] = {
{ "s1", QCOM_SMD_RPM_SMPA, 1, &pm8x41_hfsmps, "vdd_s1" },
{ "s2", QCOM_SMD_RPM_SMPA, 2, &pm8x41_hfsmps, "vdd_s2" },
@@ -1329,6 +1362,7 @@ static const struct of_device_id rpm_of_match[] = {
{ .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators },
{ .compatible = "qcom,rpm-pm8909-regulators", .data = &rpm_pm8909_regulators },
{ .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators },
+ { .compatible = "qcom,rpm-pm8937-regulators", .data = &rpm_pm8937_regulators },
{ .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators },
{ .compatible = "qcom,rpm-pm8950-regulators", .data = &rpm_pm8950_regulators },
{ .compatible = "qcom,rpm-pm8953-regulators", .data = &rpm_pm8953_regulators },
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (4 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 13:13 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
` (3 subsequent siblings)
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
Document the pm8937 compatible string and available regulators in
the QCOM SMD RPM regulator documentation.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
.../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
index 9ea8ac0786ac..f2fd2df68a9e 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
@@ -47,6 +47,9 @@ description:
For pm8916, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18
+ For pm8937, 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, l23
+
For pm8941, 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, l23, l24, lvs1, lvs2,
lvs3, 5vs1, 5vs2
@@ -92,6 +95,7 @@ properties:
- qcom,rpm-pm8841-regulators
- qcom,rpm-pm8909-regulators
- qcom,rpm-pm8916-regulators
+ - qcom,rpm-pm8937-regulators
- qcom,rpm-pm8941-regulators
- qcom,rpm-pm8950-regulators
- qcom,rpm-pm8953-regulators
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (5 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-06 12:20 ` Dmitry Baryshkov
` (2 more replies)
2023-11-06 12:08 ` [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC Dang Huynh
` (2 subsequent siblings)
9 siblings, 3 replies; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
The PM8937 features integrated peripherals like ADC, GPIO controller,
MPPs, PON keys and others.
Add the device tree so that any boards with this PMIC can use it.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++
1 file changed, 202 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi
new file mode 100644
index 000000000000..6091d6938885
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
+ */
+
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
+#include <dt-bindings/spmi/spmi.h>
+
+/ {
+ thermal-zones {
+ pm8937-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8937_temp>;
+
+ trips {
+ pm8937_trip0: pm8937-trip0 {
+ temperature = <105000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ pm8937_trip1: pm8937-trip1 {
+ temperature = <125000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ pm8937_trip2: pm8937-trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ };
+ };
+ };
+};
+
+&spmi_bus {
+ pmic@0 {
+ compatible = "qcom,pm8937", "qcom,spmi-pmic";
+ reg = <0x0 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
+ reg = <0x800>;
+ mode-bootloader = <0x2>;
+ mode-recovery = <0x1>;
+
+ pm8937_pwrkey: pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ linux,code = <KEY_POWER>;
+ };
+
+ pm8937_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+ };
+
+ pm8937_gpios: gpio@c000 {
+ compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio";
+ reg = <0xc000>;
+ gpio-controller;
+ gpio-ranges = <&pm8937_gpios 0 0 8>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8937_mpps: mpps@a000 {
+ compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+ gpio-controller;
+ gpio-ranges = <&pm8937_mpps 0 0 4>;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pm8937_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ io-channels = <&pm8937_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
+ #thermal-sensor-cells = <0>;
+ };
+
+ pm8937_vadc: adc@3100 {
+ compatible = "qcom,spmi-vadc";
+ reg = <0x3100>;
+ interrupts = <0 0x31 0 IRQ_TYPE_EDGE_RISING>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #io-channel-cells = <1>;
+
+ channel@5 {
+ reg = <VADC_VCOIN>;
+ qcom,pre-scaling = <1 1>;
+ label = "vcoin";
+ };
+
+ channel@7 {
+ reg = <VADC_VSYS>;
+ qcom,pre-scaling = <1 1>;
+ label = "vph_pwr";
+ };
+
+ channel@8 {
+ reg = <VADC_DIE_TEMP>;
+ qcom,pre-scaling = <1 1>;
+ label = "die_temp";
+ };
+
+ channel@9 {
+ reg = <VADC_REF_625MV>;
+ qcom,pre-scaling = <1 1>;
+ label = "ref_625mv";
+ };
+
+ channel@a {
+ reg = <VADC_REF_1250MV>;
+ qcom,pre-scaling = <1 1>;
+ label = "ref_1250mv";
+ };
+
+ channel@c {
+ reg = <VADC_SPARE1>;
+ qcom,pre-scaling = <1 1>;
+ label = "ref_buf_625mv";
+ };
+
+ channel@11 {
+ reg = <VADC_P_MUX2_1_1>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ label = "pa_therm1";
+ };
+
+ channel@13 {
+ reg = <VADC_P_MUX4_1_1>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ label = "case_therm";
+ };
+
+ channel@32 {
+ reg = <VADC_LR_MUX3_XO_THERM>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ label = "xo_therm";
+ };
+
+ channel@36 {
+ reg = <VADC_LR_MUX7_HW_ID>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ label = "pa_therm0";
+ };
+
+ channel@3c {
+ reg = <VADC_LR_MUX3_BUF_XO_THERM>;
+ qcom,pre-scaling = <1 1>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ label = "xo_therm_buf";
+ };
+ };
+
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>, <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
+ };
+ };
+
+ pmic@1 {
+ compatible = "qcom,pm8937", "qcom,spmi-pmic";
+ reg = <0x1 SPMI_USID>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8937_spmi_regulators: regulators {
+ compatible = "qcom,pm8937-regulators";
+ };
+ };
+};
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (6 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
@ 2023-11-06 12:08 ` Dang Huynh
2023-11-07 21:30 ` Konrad Dybcio
2023-11-06 12:16 ` [PATCH 0/8] Add PM8937 PMIC support Dmitry Baryshkov
2023-11-13 19:40 ` (subset) " Mark Brown
9 siblings, 1 reply; 24+ messages in thread
From: Dang Huynh @ 2023-11-06 12:08 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree, Dang Huynh
The PM8917 and PM8937 uses the same SUBTYPE ID.
The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940
and APQ variants.
Signed-off-by: Dang Huynh <danct12@riseup.net>
---
drivers/soc/qcom/socinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 51e05bec5bfc..37692fc1aefb 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -93,7 +93,7 @@ static const char *const pmic_models[] = {
[22] = "PM8821",
[23] = "PM8038",
[24] = "PM8005/PM8922",
- [25] = "PM8917",
+ [25] = "PM8917/PM8937",
[26] = "PM660L",
[27] = "PM660",
[30] = "PM8150",
--
2.42.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators
2023-11-06 12:08 ` [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators Dang Huynh
@ 2023-11-06 12:15 ` Dmitry Baryshkov
2023-11-06 19:32 ` Stephan Gerhold
0 siblings, 1 reply; 24+ messages in thread
From: Dmitry Baryshkov @ 2023-11-06 12:15 UTC (permalink / raw)
To: Dang Huynh
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, 6 Nov 2023 at 14:11, Dang Huynh <danct12@riseup.net> wrote:
>
> The PM8937 is found on boards with MSM8917, MSM8937, MSM8940 SoCs and
> APQ variants.
>
> It provides 6 SMPS (two are controlled by SPMI) and 23 LDO regulators.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
I haven't checked LDO / SMPS types. Other than that:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/regulator/qcom_smd-regulator.c | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/8] Add PM8937 PMIC support
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (7 preceding siblings ...)
2023-11-06 12:08 ` [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC Dang Huynh
@ 2023-11-06 12:16 ` Dmitry Baryshkov
2023-11-13 19:40 ` (subset) " Mark Brown
9 siblings, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2023-11-06 12:16 UTC (permalink / raw)
To: Dang Huynh
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, 6 Nov 2023 at 14:11, Dang Huynh <danct12@riseup.net> wrote:
>
> PM8937 is a power management IC. It is used in various boards with
> MSM8917, MSM8937, MSM8940 and APQ variants.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> Dang Huynh (8):
> mfd: qcom-spmi-pmic: Add support for PM8937
> dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC
> regulator: qcom_spmi: Add PM8937 SPMI regulator
> dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC
> regulator: qcom_smd: Add PM8937 regulators
> dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC
> arm64: dts: qcom: Add PM8937 PMIC
> soc: qcom: socinfo: Add PM8937 Power IC
It seems that some of the patches didn't get it to linux-arm-msm@.
Could you please check, what was wrong and resend your patchset?
>
> .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 +
> .../bindings/regulator/qcom,smd-rpm-regulator.yaml | 4 +
> .../bindings/regulator/qcom,spmi-regulator.yaml | 19 ++
> arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++
> drivers/mfd/qcom-spmi-pmic.c | 1 +
> drivers/regulator/qcom_smd-regulator.c | 34 ++++
> drivers/regulator/qcom_spmi-regulator.c | 34 ++++
> drivers/soc/qcom/socinfo.c | 2 +-
> include/soc/qcom/qcom-spmi-pmic.h | 1 +
> 9 files changed, 297 insertions(+), 1 deletion(-)
> ---
> base-commit: 12c9e8890929813dc852d9739f8d900ff51d9814
> change-id: 20231106-pm8937-000e423a75fb
>
> Best regards,
> --
> Dang Huynh <danct12@riseup.net>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
@ 2023-11-06 12:20 ` Dmitry Baryshkov
2023-11-06 17:21 ` Stephan Gerhold
2023-11-07 21:29 ` Konrad Dybcio
2 siblings, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2023-11-06 12:20 UTC (permalink / raw)
To: Dang Huynh
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, 6 Nov 2023 at 14:11, Dang Huynh <danct12@riseup.net> wrote:
>
> The PM8937 features integrated peripherals like ADC, GPIO controller,
> MPPs, PON keys and others.
>
> Add the device tree so that any boards with this PMIC can use it.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++
> 1 file changed, 202 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> new file mode 100644
> index 000000000000..6091d6938885
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> @@ -0,0 +1,202 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> +/ {
> + thermal-zones {
> + pm8937-thermal {
> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> + thermal-sensors = <&pm8937_temp>;
> +
> + trips {
> + pm8937_trip0: pm8937-trip0 {
I don't think you need labels here. Also you can drop PMIC name from
trip point node names.
> + temperature = <105000>;
> + hysteresis = <0>;
> + type = "passive";
> + };
> + pm8937_trip1: pm8937-trip1 {
> + temperature = <125000>;
> + hysteresis = <0>;
> + type = "passive";
> + };
> + pm8937_trip2: pm8937-trip2 {
> + temperature = <145000>;
> + hysteresis = <0>;
> + type = "passive";
145°C is very hot for the passive trip point
Comparing this with other platforms, 125°C can be "hot" and 145°C is "critical".
Other than that:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> + };
> + };
> + };
> + };
> +};
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator
2023-11-06 12:08 ` [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator Dang Huynh
@ 2023-11-06 12:35 ` Dmitry Baryshkov
0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2023-11-06 12:35 UTC (permalink / raw)
To: Dang Huynh
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, 6 Nov 2023 at 14:19, Dang Huynh <danct12@riseup.net> wrote:
>
> The PM8937 has 4 HFSMPS, 2 FTSMPS2.5 (for controlling APC voltage)
> and 23 LDO regulators.
> Add the configuration for this chip.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> drivers/regulator/qcom_spmi-regulator.c | 34 +++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC
2023-11-06 12:08 ` [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Dang Huynh
@ 2023-11-06 13:11 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-06 13:11 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 06/11/2023 13:08, Dang Huynh wrote:
> Add bindings for PM8937 PMIC (qcom,pm8937). This PMIC is found in
> boards with MSM8917, MSM8937, MSM8940 and APQ variants.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC
2023-11-06 12:08 ` [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Dang Huynh
@ 2023-11-06 13:12 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-06 13:12 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 06/11/2023 13:08, Dang Huynh wrote:
> Add support for qcom,pm8937-regulators compatible string and add
> relevant supplies in QCOM's SPMI regulator documentation.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> .../bindings/regulator/qcom,spmi-regulator.yaml | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC
2023-11-06 12:08 ` [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Dang Huynh
@ 2023-11-06 13:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-06 13:13 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 06/11/2023 13:08, Dang Huynh wrote:
> Document the pm8937 compatible string and available regulators in
> the QCOM SMD RPM regulator documentation.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
@ 2023-11-06 13:55 ` Caleb Connolly
0 siblings, 0 replies; 24+ messages in thread
From: Caleb Connolly @ 2023-11-06 13:55 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 06/11/2023 12:08, Dang Huynh wrote:
> Add the subtype and compatible strings for PM8937.
>
> The PM8937 is found in various SoCs, including MSM8917, MSM8937,
> MSM8940 and APQ variants.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> drivers/mfd/qcom-spmi-pmic.c | 1 +
> include/soc/qcom/qcom-spmi-pmic.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> index 4549fa9f7d4b..eab5bf6cff10 100644
> --- a/drivers/mfd/qcom-spmi-pmic.c
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -53,6 +53,7 @@ static const struct of_device_id pmic_spmi_id_table[] = {
> { .compatible = "qcom,pm8901", .data = N_USIDS(2) },
> { .compatible = "qcom,pm8909", .data = N_USIDS(2) },
> { .compatible = "qcom,pm8916", .data = N_USIDS(2) },
> + { .compatible = "qcom,pm8937", .data = N_USIDS(2) },
> { .compatible = "qcom,pm8941", .data = N_USIDS(2) },
> { .compatible = "qcom,pm8950", .data = N_USIDS(2) },
> { .compatible = "qcom,pm8994", .data = N_USIDS(2) },
> diff --git a/include/soc/qcom/qcom-spmi-pmic.h b/include/soc/qcom/qcom-spmi-pmic.h
> index c47cc71a999e..17a0a8c3d656 100644
> --- a/include/soc/qcom/qcom-spmi-pmic.h
> +++ b/include/soc/qcom/qcom-spmi-pmic.h
> @@ -31,6 +31,7 @@
> #define PM8998_SUBTYPE 0x14
> #define PMI8998_SUBTYPE 0x15
> #define PM8005_SUBTYPE 0x18
> +#define PM8937_SUBTYPE 0x19
> #define PM660L_SUBTYPE 0x1a
> #define PM660_SUBTYPE 0x1b
> #define PM8150_SUBTYPE 0x1e
>
--
// Caleb (they/them)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
2023-11-06 12:20 ` Dmitry Baryshkov
@ 2023-11-06 17:21 ` Stephan Gerhold
2023-11-07 21:29 ` Konrad Dybcio
2 siblings, 0 replies; 24+ messages in thread
From: Stephan Gerhold @ 2023-11-06 17:21 UTC (permalink / raw)
To: Dang Huynh
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, Nov 06, 2023 at 07:08:35PM +0700, Dang Huynh wrote:
> The PM8937 features integrated peripherals like ADC, GPIO controller,
> MPPs, PON keys and others.
>
> Add the device tree so that any boards with this PMIC can use it.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++
> 1 file changed, 202 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> new file mode 100644
> index 000000000000..6091d6938885
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> @@ -0,0 +1,202 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> [...]
> +&spmi_bus {
> + pmic@0 {
> + compatible = "qcom,pm8937", "qcom,spmi-pmic";
> + reg = <0x0 SPMI_USID>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pon@800 {
> + compatible = "qcom,pm8916-pon";
> + reg = <0x800>;
> + mode-bootloader = <0x2>;
> + mode-recovery = <0x1>;
> +
> + pm8937_pwrkey: pwrkey {
> + compatible = "qcom,pm8941-pwrkey";
> + interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + linux,code = <KEY_POWER>;
> + };
> +
> + pm8937_resin: resin {
> + compatible = "qcom,pm8941-resin";
> + interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + linux,code = <KEY_VOLUMEDOWN>;
Please move the linux,code into the board-specific part and make this
status = "disabled" by default, like in the other PMIC dtsi files.
One could theoretically assign any other function to this key. Also,
some devices don't have this hooked up at all.
Thanks,
Stephan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators
2023-11-06 12:15 ` Dmitry Baryshkov
@ 2023-11-06 19:32 ` Stephan Gerhold
0 siblings, 0 replies; 24+ messages in thread
From: Stephan Gerhold @ 2023-11-06 19:32 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Mark Brown, Robert Marko, linux-arm-msm,
linux-kernel, devicetree
On Mon, Nov 06, 2023 at 02:15:12PM +0200, Dmitry Baryshkov wrote:
> On Mon, 6 Nov 2023 at 14:11, Dang Huynh <danct12@riseup.net> wrote:
> >
> > The PM8937 is found on boards with MSM8917, MSM8937, MSM8940 SoCs and
> > APQ variants.
> >
> > It provides 6 SMPS (two are controlled by SPMI) and 23 LDO regulators.
> >
> > Signed-off-by: Dang Huynh <danct12@riseup.net>
>
> I haven't checked LDO / SMPS types.
That's kind of the part where one would most likely make mistakes
though. :D
I checked them based on the log Dang posted on IRC, by cross-referencing
the voltage ranges with the regulator types in the SPMI regulator driver.
Looks good :)
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Thanks,
Stephan
(bootloader) Detected PMIC 0x10019
(bootloader) s1: 1225000 mV, disabled, fast (smps)
(bootloader) s2: 1162500 mV, enabled, fast (smps)
(bootloader) s3: 1412500 mV, enabled, fast (smps)
(bootloader) s4: 2050000 mV, enabled, fast (smps)
(bootloader) s5: 1225000 mV, enabled, fast (ftsmps2p5)
(bootloader) s6: 1225000 mV, enabled, fast (ftsmps2p5)
(bootloader) l1: 1000000 mV, disabled, normal (ult_nldo)
(bootloader) l2: 1250000 mV, enabled, normal (ult_nldo)
(bootloader) l3: 1350000 mV, enabled, idle (ult_nldo)
(bootloader) l4: 1800000 mV, disabled, normal (ult_pldo)
(bootloader) l5: 1800000 mV, enabled, idle (ult_pldo)
(bootloader) l6: 1800000 mV, enabled, normal (ult_pldo)
(bootloader) l7: 1800000 mV, enabled, normal (ult_pldo)
(bootloader) l8: 2900000 mV, enabled, normal (ult_pldo)
(bootloader) l9: 3300000 mV, disabled, normal (ult_pldo)
(bootloader) l10: 2800000 mV, disabled, normal (ult_pldo)
(bootloader) l11: 2950000 mV, enabled, normal (ult_pldo)
(bootloader) l12: 2950000 mV, enabled, normal (ult_pldo)
(bootloader) l13: 3075000 mV, enabled, normal (ult_pldo)
(bootloader) l14: 1800000 mV, disabled, normal (ult_pldo)
(bootloader) l15: 1800000 mV, disabled, normal (ult_pldo)
(bootloader) l16: 1800000 mV, disabled, normal (ult_pldo)
(bootloader) l17: 2850000 mV, enabled, normal (ult_pldo)
(bootloader) l18: 2700000 mV, disabled, normal (ult_pldo)
(bootloader) l19: 1300000 mV, disabled, normal (ult_nldo)
(bootloader) l20: 1740000 mV, disabled (ln_ldo)
(bootloader) l21: 1740000 mV, disabled (ln_ldo)
(bootloader) l22: 2800000 mV, disabled, normal (ult_pldo)
(bootloader) l23: 1300000 mV, disabled, normal (nldo1)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
2023-11-06 12:20 ` Dmitry Baryshkov
2023-11-06 17:21 ` Stephan Gerhold
@ 2023-11-07 21:29 ` Konrad Dybcio
2 siblings, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2023-11-07 21:29 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Liam Girdwood,
Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 11/6/23 13:08, Dang Huynh wrote:
> The PM8937 features integrated peripherals like ADC, GPIO controller,
> MPPs, PON keys and others.
>
> Add the device tree so that any boards with this PMIC can use it.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++
> 1 file changed, 202 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> new file mode 100644
> index 000000000000..6091d6938885
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi
> @@ -0,0 +1,202 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
> +#include <dt-bindings/spmi/spmi.h>
> +
> +/ {
> + thermal-zones {
> + pm8937-thermal {
> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> + thermal-sensors = <&pm8937_temp>;
> +
> + trips {
> + pm8937_trip0: pm8937-trip0 {
> + temperature = <105000>;
> + hysteresis = <0>;
> + type = "passive";
> + };
Add a newline between the subnodes, please
[...]
> + pm8937_resin: resin {
> + compatible = "qcom,pm8941-resin";
> + interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + linux,code = <KEY_VOLUMEDOWN>;
This keycode varies per-device, please move it out
> + };
> + };
> +
> + pm8937_gpios: gpio@c000 {
> + compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio";
> + reg = <0xc000>;
> + gpio-controller;
> + gpio-ranges = <&pm8937_gpios 0 0 8>;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + pm8937_mpps: mpps@a000 {
> + compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp";
> + reg = <0xa000>;
[...]
> +
> + rtc@6000 {
> + compatible = "qcom,pm8941-rtc";
> + reg = <0x6000>, <0x6100>;
> + reg-names = "rtc", "alarm";
> + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
This is probably IRQ_TYPE_EDGE_RISING
Konrad
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC
2023-11-06 12:08 ` [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC Dang Huynh
@ 2023-11-07 21:30 ` Konrad Dybcio
2023-11-08 5:38 ` Dang Huynh
2023-11-09 15:22 ` Bjorn Andersson
0 siblings, 2 replies; 24+ messages in thread
From: Konrad Dybcio @ 2023-11-07 21:30 UTC (permalink / raw)
To: Dang Huynh, Andy Gross, Bjorn Andersson, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Liam Girdwood,
Mark Brown, Robert Marko
Cc: linux-arm-msm, linux-kernel, devicetree
On 11/6/23 13:08, Dang Huynh wrote:
> The PM8917 and PM8937 uses the same SUBTYPE ID.
>
> The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940
> and APQ variants.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
Are they secretly the same thing? Do you know somebody with a PM8917-
equipped device to check that theory out?
Konrad
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC
2023-11-07 21:30 ` Konrad Dybcio
@ 2023-11-08 5:38 ` Dang Huynh
2023-11-09 15:22 ` Bjorn Andersson
1 sibling, 0 replies; 24+ messages in thread
From: Dang Huynh @ 2023-11-08 5:38 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Liam Girdwood,
Mark Brown, Robert Marko, Konrad Dybcio
Cc: linux-arm-msm, linux-kernel, devicetree
On Tuesday, November 7, 2023 9:30:34 PM UTC Konrad Dybcio wrote:
> On 11/6/23 13:08, Dang Huynh wrote:
> > The PM8917 and PM8937 uses the same SUBTYPE ID.
> >
> > The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940
> > and APQ variants.
> >
> > Signed-off-by: Dang Huynh <danct12@riseup.net>
> > ---
>
> Are they secretly the same thing? Do you know somebody with a PM8917-
> equipped device to check that theory out?
>
> Konrad
I don't know anyone with a PM8917 device, but I did check with downstream
source and all the reference to pm8917 are either not used in any dts or point
towards pm8937.
Dang
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC
2023-11-07 21:30 ` Konrad Dybcio
2023-11-08 5:38 ` Dang Huynh
@ 2023-11-09 15:22 ` Bjorn Andersson
1 sibling, 0 replies; 24+ messages in thread
From: Bjorn Andersson @ 2023-11-09 15:22 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Dang Huynh, Andy Gross, Bjorn Andersson, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Liam Girdwood,
Mark Brown, Robert Marko, linux-arm-msm, linux-kernel, devicetree
On Tue, Nov 07, 2023 at 10:30:34PM +0100, Konrad Dybcio wrote:
>
>
> On 11/6/23 13:08, Dang Huynh wrote:
> > The PM8917 and PM8937 uses the same SUBTYPE ID.
> >
> > The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940
> > and APQ variants.
> >
> > Signed-off-by: Dang Huynh <danct12@riseup.net>
> > ---
> Are they secretly the same thing? Do you know somebody with a PM8917-
> equipped device to check that theory out?
>
PM8917 and PM8937 are not the same.
Regards,
Bjorn
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: (subset) [PATCH 0/8] Add PM8937 PMIC support
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
` (8 preceding siblings ...)
2023-11-06 12:16 ` [PATCH 0/8] Add PM8937 PMIC support Dmitry Baryshkov
@ 2023-11-13 19:40 ` Mark Brown
9 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2023-11-13 19:40 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Lee Jones,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
Liam Girdwood, Robert Marko, Dang Huynh
Cc: linux-arm-msm, linux-kernel, devicetree
On Mon, 06 Nov 2023 19:08:28 +0700, Dang Huynh wrote:
> PM8937 is a power management IC. It is used in various boards with
> MSM8917, MSM8937, MSM8940 and APQ variants.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator
commit: c0d6b2acf78e3195a6b100a236210f2e6e42b0c0
[4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC
commit: f2b003c8235e0afed60ed426e891e41dab131821
[5/8] regulator: qcom_smd: Add PM8937 regulators
commit: 18cc1cd011131d878be2619b56eff7bc2a278bdf
[6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC
commit: 40e13ae67c6fc2897b49398d6f804b5d1ec63fff
All 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
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2023-11-13 19:40 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 12:08 [PATCH 0/8] Add PM8937 PMIC support Dang Huynh
2023-11-06 12:08 ` [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 Dang Huynh
2023-11-06 13:55 ` Caleb Connolly
2023-11-06 12:08 ` [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Dang Huynh
2023-11-06 13:11 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator Dang Huynh
2023-11-06 12:35 ` Dmitry Baryshkov
2023-11-06 12:08 ` [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Dang Huynh
2023-11-06 13:12 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators Dang Huynh
2023-11-06 12:15 ` Dmitry Baryshkov
2023-11-06 19:32 ` Stephan Gerhold
2023-11-06 12:08 ` [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Dang Huynh
2023-11-06 13:13 ` Krzysztof Kozlowski
2023-11-06 12:08 ` [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC Dang Huynh
2023-11-06 12:20 ` Dmitry Baryshkov
2023-11-06 17:21 ` Stephan Gerhold
2023-11-07 21:29 ` Konrad Dybcio
2023-11-06 12:08 ` [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC Dang Huynh
2023-11-07 21:30 ` Konrad Dybcio
2023-11-08 5:38 ` Dang Huynh
2023-11-09 15:22 ` Bjorn Andersson
2023-11-06 12:16 ` [PATCH 0/8] Add PM8937 PMIC support Dmitry Baryshkov
2023-11-13 19:40 ` (subset) " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).