Skip to contentSkip to conversation

qcom: spmi/ssbi gpio: correct gpio hogging

PATCH In review Brian Masney 3 participants 13 messages Mar 6, 2019 – Apr 30, 2019

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

cover qcom: spmi/ssbi gpio: correct gpio hogging

Here are some patches that fix gpio hogging for all boards that use spmi-gpio and ssbi-gpio. These depend on the following two patches that were merged in 4.20-rc1:

commit 149a96047237 ("pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues")

commit 7ed078557738 ("pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues")

I've already fixed pm8941 for the Nexus 5 and that fix is queued to go into v5.1 during this merge window:

https://lore.kernel.org/lkml/[email protected]/

Andy: You may want to consider submitting these post rc1 as a fix for v5.1 and possibly marking these for stable.

Brian Masney (8):
ARM: dts: qcom: apq8064: add gpio-ranges
ARM: dts: qcom: mdm9615: add gpio-ranges
ARM: dts: qcom: msm8660: add gpio-ranges
ARM: dts: qcom: pma8084: add gpio-ranges
arm64: dts: qcom: pm8005: add gpio-ranges
arm64: dts: qcom: pm8998: add gpio-ranges
arm64: dts: qcom: pmi8994: add gpio-ranges
arm64: dts: qcom: pmi8998: add gpio-ranges

 arch/arm/boot/dts/qcom-apq8064.dtsi   | 1 +
 arch/arm/boot/dts/qcom-mdm9615.dtsi   | 1 +
 arch/arm/boot/dts/qcom-msm8660.dtsi   | 1 +
 arch/arm/boot/dts/qcom-pma8084.dtsi   | 1 +
 arch/arm64/boot/dts/qcom/pm8005.dtsi  | 1 +
 arch/arm64/boot/dts/qcom/pm8998.dtsi  | 1 +
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 1 +
 arch/arm64/boot/dts/qcom/pmi8998.dtsi | 1 +
 8 files changed, 8 insertions(+)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/8 ARM: dts: qcom: apq8064: add gpio-ranges

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-apq8064.dtsi +1 -0
index bd6907db615b..8ca89c79bd0e 100644
@@ -714,6 +714,7 @@
 					interrupt-controller;
 					#interrupt-cells = <2>;
 					gpio-controller;
+					gpio-ranges = <&pm8921_gpio 0 0 44>;
 					#gpio-cells = <2>;
 
 				};
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/8 ARM: dts: qcom: mdm9615: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm/boot/dts/qcom-mdm9615.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -0
index 02afc6a42005..356e9535f7a6 100644
@@ -326,6 +326,7 @@
 					interrupt-controller;
 					#interrupt-cells = <2>;
 					gpio-controller;
+					gpio-ranges = <&pmicgpio 0 0 6>;
 					#gpio-cells = <2>;
 				};
 			};
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/8 ARM: dts: qcom: msm8660: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm/boot/dts/qcom-msm8660.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-msm8660.dtsi +1 -0
index 65a994f0e09b..ec5cbc468bd3 100644
@@ -295,6 +295,7 @@
 					interrupt-controller;
 					#interrupt-cells = <2>;
 					gpio-controller;
+					gpio-ranges = <&pm8058_gpio 0 0 44>;
 					#gpio-cells = <2>;
 
 				};
Signature · 1 line
2.20.1
#4 lore raw

PATCH 4/8 ARM: dts: qcom: pma8084: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm/boot/dts/qcom-pma8084.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-pma8084.dtsi +1 -0
index 8f5ea7add20f..ea1ca166165c 100644
@@ -31,6 +31,7 @@
 			compatible = "qcom,pma8084-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pma8084_gpios 0 0 22>;
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
Signature · 1 line
2.20.1
#5 lore raw

PATCH 5/8 arm64: dts: qcom: pm8005: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm64/boot/dts/qcom/pm8005.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/pm8005.dtsi +1 -0
index c0ddf128136c..3f97607d8baa 100644
@@ -15,6 +15,7 @@
 			compatible = "qcom,pm8005-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pm8005_gpio 0 0 4>;
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
Signature · 1 line
2.20.1
#6 lore raw

PATCH 6/8 arm64: dts: qcom: pm8998: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm64/boot/dts/qcom/pm8998.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/pm8998.dtsi +1 -0
index 43cb5ea14089..4872f116758d 100644
@@ -93,6 +93,7 @@
 			compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pm8998_gpio 0 0 26>;
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
Signature · 1 line
2.20.1
#7 lore raw

PATCH 7/8 arm64: dts: qcom: pmi8994: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/pmi8994.dtsi +1 -0
index 3aee10e3f921..21e05215abe4 100644
@@ -14,6 +14,7 @@
 			compatible = "qcom,pmi8994-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pmi8994_gpios 0 0 10>;
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
Signature · 1 line
2.20.1
#8 lore raw

PATCH 8/8 arm64: dts: qcom: pmi8998: add gpio-ranges

In reply to Brian Masney

This adds the gpio-ranges property so that the GPIO pins are initialized by the GPIO framework and not pinctrl. This fixes a circular dependency between these two frameworks so GPIO hogging can be used on this board.

This was not tested on this particular hardware, however this same change was tested on qcom-pm8941 using a LG Nexus 5 (hammerhead) phone.

---
 arch/arm64/boot/dts/qcom/pmi8998.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/pmi8998.dtsi +1 -0
index 051f57e7d6ac..23f9146a161e 100644
@@ -13,6 +13,7 @@
 			compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
 			gpio-controller;
+			gpio-ranges = <&pmi8998_gpio 0 0 14>;
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
Signature · 1 line
2.20.1
#10 lore raw
In reply to Brian Masney
Quoted 15 lines · Brian Masney

Here are some patches that fix gpio hogging for all boards that use spmi-gpio and ssbi-gpio. These depend on the following two patches that were merged in 4.20-rc1:

commit 149a96047237 ("pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues")

commit 7ed078557738 ("pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues")

I've already fixed pm8941 for the Nexus 5 and that fix is queued to go into v5.1 during this merge window:

https://lore.kernel.org/lkml/[email protected]/

Quoted 8 lines

Andy: You may want to consider submitting these post rc1 as a fix for v5.1 and possibly marking these for stable.

Brian Masney (8):
ARM: dts: qcom: apq8064: add gpio-ranges
ARM: dts: qcom: mdm9615: add gpio-ranges
ARM: dts: qcom: msm8660: add gpio-ranges
ARM: dts: qcom: pma8084: add gpio-ranges

Looks like I missed the ARM patches before. All 8 picked up now, with Linus' r-b.

Thanks,
Bjorn

Quoted 18 lines

arm64: dts: qcom: pm8005: add gpio-ranges
arm64: dts: qcom: pm8998: add gpio-ranges
arm64: dts: qcom: pmi8994: add gpio-ranges
arm64: dts: qcom: pmi8998: add gpio-ranges

 arch/arm/boot/dts/qcom-apq8064.dtsi   | 1 +
 arch/arm/boot/dts/qcom-mdm9615.dtsi   | 1 +
 arch/arm/boot/dts/qcom-msm8660.dtsi   | 1 +
 arch/arm/boot/dts/qcom-pma8084.dtsi   | 1 +
 arch/arm64/boot/dts/qcom/pm8005.dtsi  | 1 +
 arch/arm64/boot/dts/qcom/pm8998.dtsi  | 1 +
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 1 +
 arch/arm64/boot/dts/qcom/pmi8998.dtsi | 1 +
 8 files changed, 8 insertions(+)
Signature · 1 line
2.20.1
#11 lore raw

Hi Bjorn,

Quoted 20 lines · Bjorn Andersson
Quoted 18 lines · Brian Masney

Here are some patches that fix gpio hogging for all boards that use spmi-gpio and ssbi-gpio. These depend on the following two patches that were merged in 4.20-rc1:

commit 149a96047237 ("pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues")

commit 7ed078557738 ("pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues")

I've already fixed pm8941 for the Nexus 5 and that fix is queued to go into v5.1 during this merge window:

https://lore.kernel.org/lkml/[email protected]/

Andy: You may want to consider submitting these post rc1 as a fix for v5.1 and possibly marking these for stable.

Quoted 8 lines
Quoted 5 lines

Brian Masney (8):
ARM: dts: qcom: apq8064: add gpio-ranges
ARM: dts: qcom: mdm9615: add gpio-ranges
ARM: dts: qcom: msm8660: add gpio-ranges
ARM: dts: qcom: pma8084: add gpio-ranges

Looks like I missed the ARM patches before. All 8 picked up now, with Linus' r-b.

Andy already picked these 8 patches up in his tree.

https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git/log/?h=for-next

Brian

#12 lore raw
Quoted 29 lines · Brian Masney

Hi Bjorn,

Quoted 26 lines · Bjorn Andersson
Quoted 23 lines · Brian Masney

Here are some patches that fix gpio hogging for all boards that use spmi-gpio and ssbi-gpio. These depend on the following two patches that were merged in 4.20-rc1:

commit 149a96047237 ("pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues")

commit 7ed078557738 ("pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues")

I've already fixed pm8941 for the Nexus 5 and that fix is queued to go into v5.1 during this merge window:

https://lore.kernel.org/lkml/[email protected]/

Andy: You may want to consider submitting these post rc1 as a fix for v5.1 and possibly marking these for stable.

Brian Masney (8):
ARM: dts: qcom: apq8064: add gpio-ranges
ARM: dts: qcom: mdm9615: add gpio-ranges
ARM: dts: qcom: msm8660: add gpio-ranges
ARM: dts: qcom: pma8084: add gpio-ranges

Quoted 7 lines
Quoted 2 lines

Looks like I missed the ARM patches before. All 8 picked up now, with Linus' r-b.

Andy already picked these 8 patches up in his tree.

https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git/log/?h=for-next

Perfect. And I see that all 8 are included in Andy's pull request for 5.2

Regards,
Bjorn