Skip to contentSkip to conversation

Add LV/MV subtypes support for QCOM PMIC GPIOs

PATCH In review [email protected] 2 participants 5 messages Aug 15, 2017

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

PATCH v3 1/2 pinctrl: qcom: spmi-gpio: Add support for GPIO LV/MV subtype

In reply to [email protected]

From: Fenglin Wu <[email protected]>

GPIO LV (low voltage)/MV (medium voltage) subtypes have different features and register mappings than 4CH/8CH subtypes. Add support for LV and MV subtypes.

---
 .../devicetree/bindings/pinctrl/qcom,pmic-gpio.txt |  17 +-
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c           | 281 +++++++++++++++++----
 include/dt-bindings/pinctrl/qcom,pmic-gpio.h       |   2 +
 3 files changed, 250 insertions(+), 50 deletions(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt +16 -1
index 8d893a8..d9d2054 100644
@@ -98,7 +98,10 @@ to specify in a pin configuration subnode:
 		    "dtest1",
 		    "dtest2",
 		    "dtest3",
-		    "dtest4"
+		    "dtest4",
+		    And following values are supported by LV/MV GPIO subtypes:
+		    "func3",
+		    "func4"
 
 - bias-disable:
 	Usage: optional
@@ -183,6 +186,18 @@ to specify in a pin configuration subnode:
 	Value type: <none>
 	Definition: The specified pins are configured in open-source mode.
 
+- qcom,analog-pass:
+	Usage: optional
+	Value type: <none>
+	Definition: The specified pins are configured in analog-pass-through mode.
+
+- qcom,atest:
+	Usage: optional
+	Value type: <u32>
+	Definition: Selects ATEST rail to route to GPIO when it's configured
+		    in analog-pass-through mode.
+		    Valid values are 1-4 corresponding to ATEST1 to ATEST4.
+
 Example:
 
 	pm8921_gpio: gpio@150 {
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +232 -49

453 lines not on this page · raw message

include/dt-bindings/pinctrl/qcom,pmic-gpio.h +2 -0
index d33f17c..b8ff882 100644
@@ -98,6 +98,8 @@
 #define PMIC_GPIO_FUNC_PAIRED		"paired"
 #define PMIC_GPIO_FUNC_FUNC1		"func1"
 #define PMIC_GPIO_FUNC_FUNC2		"func2"
+#define PMIC_GPIO_FUNC_FUNC3		"func3"
+#define PMIC_GPIO_FUNC_FUNC4		"func4"
 #define PMIC_GPIO_FUNC_DTEST1		"dtest1"
 #define PMIC_GPIO_FUNC_DTEST2		"dtest2"
 #define PMIC_GPIO_FUNC_DTEST3		"dtest3"
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
#3 lore raw

PATCH v3 2/2 pinctrl: qcom: spmi-gpio: Add dtest route for digital input

In reply to [email protected]

From: Fenglin Wu <[email protected]>

Add property "qcom,dtest-buffer" to specify which dtest rail to feed when the pin is configured as a digital input.

---
 .../devicetree/bindings/pinctrl/qcom,pmic-gpio.txt |  7 +++
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c           | 50 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt +7 -0
index d9d2054..f4cf24f 100644
@@ -198,6 +198,13 @@ to specify in a pin configuration subnode:
 		    in analog-pass-through mode.
 		    Valid values are 1-4 corresponding to ATEST1 to ATEST4.
 
+- qcom,dtest-buffer:
+	Usage: optional
+	Value type: <u32>
+	Definition: Selects DTEST rail to route to GPIO when it's configured
+		    as digital input.
+		    Valid values are 1-4 corresponding to DTEST1 to DTEST4.
+
 Example:
 
 	pm8921_gpio: gpio@150 {
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +50 -0

122 lines not on this page · raw message

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
#0 lore raw

v3 cover Add LV/MV subtypes support for QCOM PMIC GPIOs

From: Fenglin Wu <[email protected]>

LV (low voltage) and MV (medium voltage) subtype GPIO modules are support in QCOM PMICs like PMI8998, PM660. These modules support addtional features (func3, func4, analog-pass-through mode) and the register mappings are also different compared with legacy 4CH/8CH subtypes.

These patches add the support for the new functions in LV/MV subtypes, and add "dtest-buffer" setting for digital input configuration.

Fenglin Wu (2):
pinctrl: qcom: spmi-gpio: Add support for GPIO LV/MV subtype
pinctrl: qcom: spmi-gpio: Add dtest route for digital input

 .../devicetree/bindings/pinctrl/qcom,pmic-gpio.txt |  24 +-
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c           | 321 ++++++++++++++++++---
 include/dt-bindings/pinctrl/qcom,pmic-gpio.h       |   2 +
 3 files changed, 302 insertions(+), 45 deletions(-)
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
#2 lore raw

Re: [PATCH V3 1/2] pinctrl: qcom: spmi-gpio: Add support for GPIO LV/MV subtype

In reply to [email protected]
Quoted 9 lines · On Tue, Aug 15, 2017 at 2:38 AM, <[email protected]…

From: Fenglin Wu <[email protected]>

GPIO LV (low voltage)/MV (medium voltage) subtypes have different features and register mappings than 4CH/8CH subtypes. Add support for LV and MV subtypes.

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: [PATCH V3 2/2] pinctrl: qcom: spmi-gpio: Add dtest route for digital input

In reply to [email protected]
Quoted 8 lines · On Tue, Aug 15, 2017 at 2:38 AM, <[email protected]> wrote:

From: Fenglin Wu <[email protected]>

Add property "qcom,dtest-buffer" to specify which dtest rail to feed when the pin is configured as a digital input.

Patch applied.

Yours,
Linus Walleij