Skip to contentSkip to conversation

SPMI GPIOs and MPPs on PM/PMI8950

PATCH In review [email protected] 2 participants 6 messages Oct 31, 2019 – Nov 5, 2019

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover SPMI GPIOs and MPPs on PM/PMI8950

From: AngeloGioacchino Del Regno <[email protected]>

This patch series enables support for GPIOs and MPPs found on the PM8950 and PMI8950 ICs, usually found on boards using the MSM8956, MSM8976, MSM8952, MSM8953 (and APQ variants) SoC.

These are important to get the PA_THERM, QUIET_THERM MPPs enabled on PM8950 for standard thermals (and other board specific ones, where applicable) and GPIOs usually used to enable the audio mclk path, the wlan sleep clock and sometimes the eLDO for the WCD codec, plus other board specific paths, where applicable.
For example, on the MSM8956 Sony Xperia Loire platform, this also includes a GPIO for the USB switch and one for the simple GPIO controlled vibrator included in all devices for this series of boards.

This has been tested on Sony Xperia Loire phones, including the Xperia X Compact (Kugo) and Xperia X (Suzu).

AngeloGioacchino Del Regno (4):
pinctrl: qcom: spmi-gpio: Add PM/PMI8950 compatibility
dt-bindings: pinctrl: qcom-pmic-gpio: Add support for PM/PMI8950
pinctrl: qcom: spmi-mpp: Add PM/PMI8950 compatible strings
dt-bindings: pinctrl: qcom-pmic-mpp: Add support for PM/PMI8950

 Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 4 ++++
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt  | 4 ++++
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c                     | 3 +++
 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c                      | 2 ++
 4 files changed, 13 insertions(+)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/4 pinctrl: qcom: spmi-gpio: Add PM/PMI8950 compatibility

From: AngeloGioacchino Del Regno <[email protected]>

The PM8950 features 8 GPIOs with hole in 3 and PMI8950 has only two; these PMICs are totally compatible with this driver.

---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +3 -0
index 387917c517d3..653d1095bfea 100644
@@ -1108,6 +1108,9 @@ static const struct of_device_id pmic_gpio_of_match[] = {
 	{ .compatible = "qcom,pm8005-gpio", .data = (void *) 4 },
 	{ .compatible = "qcom,pm8916-gpio", .data = (void *) 4 },
 	{ .compatible = "qcom,pm8941-gpio", .data = (void *) 36 },
+	/* pm8950 has 8 GPIOs with holes on 3 */
+	{ .compatible = "qcom,pm8950-gpio", .data = (void *) 8 },
+	{ .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 },
 	{ .compatible = "qcom,pm8994-gpio", .data = (void *) 22 },
 	{ .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 },
 	{ .compatible = "qcom,pm8998-gpio", .data = (void *) 26 },
Signature · 1 line
2.21.0
#2 lore raw

PATCH 2/4 dt-bindings: pinctrl: qcom-pmic-gpio: Add support for PM/PMI8950

In reply to [email protected]

From: AngeloGioacchino Del Regno <[email protected]>

Document the bindings for PM8950 and PMI8950 PMIC GPIOs.

---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt +4 -0
index 2f48cca1d581..7be5de8d253f 100644
@@ -15,9 +15,11 @@ PMIC's from Qualcomm.
 		    "qcom,pm8917-gpio"
 		    "qcom,pm8921-gpio"
 		    "qcom,pm8941-gpio"
+		    "qcom,pm8950-gpio"
 		    "qcom,pm8994-gpio"
 		    "qcom,pm8998-gpio"
 		    "qcom,pma8084-gpio"
+		    "qcom,pmi8950-gpio"
 		    "qcom,pmi8994-gpio"
 		    "qcom,pmi8998-gpio"
 		    "qcom,pms405-gpio"
@@ -93,9 +95,11 @@ to specify in a pin configuration subnode:
 		    gpio1-gpio38 for pm8917
 		    gpio1-gpio44 for pm8921
 		    gpio1-gpio36 for pm8941
+		    gpio1-gpio8 for pm8950 (hole on gpio3)
 		    gpio1-gpio22 for pm8994
 		    gpio1-gpio26 for pm8998
 		    gpio1-gpio22 for pma8084
+		    gpio1-gpio2 for pmi8950
 		    gpio1-gpio10 for pmi8994
 		    gpio1-gpio12 for pms405 (holes on gpio1, gpio9 and gpio10)
 		    gpio1-gpio10 for pm8150 (holes on gpio2, gpio5, gpio7
Signature · 1 line
2.21.0
#3 lore raw

PATCH 3/4 pinctrl: qcom: spmi-mpp: Add PM/PMI8950 compatible strings

In reply to [email protected]

From: AngeloGioacchino Del Regno <[email protected]>

PM8950 and PMI8950 have four MPPs and this driver is compatible.

---
 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +2 -0
index 91407b024cf3..48602dba4967 100644
@@ -915,6 +915,8 @@ static const struct of_device_id pmic_mpp_of_match[] = {
 	{ .compatible = "qcom,pm8841-mpp" },	/* 4 MPP's */
 	{ .compatible = "qcom,pm8916-mpp" },	/* 4 MPP's */
 	{ .compatible = "qcom,pm8941-mpp" },	/* 8 MPP's */
+	{ .compatible = "qcom,pm8950-mpp" },	/* 4 MPP's */
+	{ .compatible = "qcom,pmi8950-mpp" },	/* 4 MPP's */
 	{ .compatible = "qcom,pm8994-mpp" },	/* 8 MPP's */
 	{ .compatible = "qcom,pma8084-mpp" },	/* 8 MPP's */
 	{ .compatible = "qcom,spmi-mpp" },	/* Generic */
Signature · 1 line
2.21.0
#4 lore raw

PATCH 4/4 dt-bindings: pinctrl: qcom-pmic-mpp: Add support for PM/PMI8950

In reply to [email protected]

From: AngeloGioacchino Del Regno <[email protected]>

Document the bindings for PM8950 and PMI8950 PMIC MPPs.

---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt +4 -0
index 2ab95bc26066..448d36a85730 100644
@@ -16,6 +16,8 @@ of PMIC's from Qualcomm.
 		    "qcom,pm8917-mpp",
 		    "qcom,pm8921-mpp",
 		    "qcom,pm8941-mpp",
+		    "qcom,pm8950-mpp",
+		    "qcom,pmi8950-mpp",
 		    "qcom,pm8994-mpp",
 		    "qcom,pma8084-mpp",
 
@@ -80,6 +82,8 @@ to specify in a pin configuration subnode:
 		    mpp1-mpp4 for pm8841
 		    mpp1-mpp4 for pm8916
 		    mpp1-mpp8 for pm8941
+		    mpp1-mpp4 for pm8950
+		    mpp1-mpp4 for pmi8950
 		    mpp1-mpp4 for pma8084
 
 - function:
Signature · 1 line
2.21.0
#5 lore raw
In reply to [email protected]
Quoted 16 lines · On Thu, Oct 31, 2019 at 11:35 AM <[email protected]> wrote:

From: AngeloGioacchino Del Regno <[email protected]>

This patch series enables support for GPIOs and MPPs found on the PM8950 and PMI8950 ICs, usually found on boards using the MSM8956, MSM8976, MSM8952, MSM8953 (and APQ variants) SoC.

These are important to get the PA_THERM, QUIET_THERM MPPs enabled on PM8950 for standard thermals (and other board specific ones, where applicable) and GPIOs usually used to enable the audio mclk path, the wlan sleep clock and sometimes the eLDO for the WCD codec, plus other board specific paths, where applicable.
For example, on the MSM8956 Sony Xperia Loire platform, this also includes a GPIO for the USB switch and one for the simple GPIO controlled vibrator included in all devices for this series of boards.

Quoted 8 lines

This has been tested on Sony Xperia Loire phones, including the Xperia X Compact (Kugo) and Xperia X (Suzu).

AngeloGioacchino Del Regno (4):
pinctrl: qcom: spmi-gpio: Add PM/PMI8950 compatibility
dt-bindings: pinctrl: qcom-pmic-gpio: Add support for PM/PMI8950
pinctrl: qcom: spmi-mpp: Add PM/PMI8950 compatible strings
dt-bindings: pinctrl: qcom-pmic-mpp: Add support for PM/PMI8950

These patches seem very simple and straight-forward and noncontroversial so I just applied them.

Stakeholders can complain if they think otherwise.

Yours,
Linus Walleij