2024-03-26 22:07:43

by Anjelique Melendez

[permalink] [raw]
Subject: [PATCH v2 0/4] Add GPIO support for various PMICs

Add GPIO support for PMXR2230, PM6450, PMIH0108 and PMD8028

Changes since v1:
- Removed wildcard character from PMIC names
- Combined patch 3/5 and 4/5
- Made subjects and commit messages consistent between changes

Anjelique Melendez (3):
dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIH0108 and PMD8028 support
pinctrl: qcom: spmi-gpio: Add PMXR2230 and PM6450 support
pinctrl: qcom: spmi-gpio: Add PMIH0108 and PMD8028 support

David Collins (1):
dt-bindings: pinctrl: qcom,pmic-gpio: Add PMXR2230 and PM6450 support

.../bindings/pinctrl/qcom,pmic-gpio.yaml | 26 +++++++++++++++++++
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 +++
2 files changed, 30 insertions(+)

--
2.34.1



2024-03-26 22:08:05

by Anjelique Melendez

[permalink] [raw]
Subject: [PATCH v2 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add PMXR2230 and PM6450 support

From: David Collins <[email protected]>

Update the Qualcomm Technologies, Inc. PMIC GPIO binding documentation
to include compatible strings for PMXR2230 and PM6450 PMICs.

Signed-off-by: David Collins <[email protected]>
Signed-off-by: Anjelique Melendez <[email protected]>
Acked-by: Krzystof Kozlowski <[email protected]>
---
.../devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 3f8ad07c7cfd..2b17d244f051 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -24,6 +24,7 @@ properties:
- qcom,pm6150-gpio
- qcom,pm6150l-gpio
- qcom,pm6350-gpio
+ - qcom,pm6450-gpio
- qcom,pm7250b-gpio
- qcom,pm7325-gpio
- qcom,pm7550ba-gpio
@@ -72,6 +73,7 @@ properties:
- qcom,pmx55-gpio
- qcom,pmx65-gpio
- qcom,pmx75-gpio
+ - qcom,pmxr2230-gpio

- enum:
- qcom,spmi-gpio
@@ -198,6 +200,7 @@ allOf:
contains:
enum:
- qcom,pm6350-gpio
+ - qcom,pm6450-gpio
- qcom,pm8350c-gpio
then:
properties:
@@ -261,6 +264,7 @@ allOf:
- qcom,pmc8180c-gpio
- qcom,pmp8074-gpio
- qcom,pms405-gpio
+ - qcom,pmxr2230-gpio
then:
properties:
gpio-line-names:
@@ -417,6 +421,7 @@ $defs:
- gpio1-gpio10 for pm6150
- gpio1-gpio12 for pm6150l
- gpio1-gpio9 for pm6350
+ - gpio1-gpio9 for pm6450
- gpio1-gpio12 for pm7250b
- gpio1-gpio10 for pm7325
- gpio1-gpio8 for pm7550ba
@@ -464,6 +469,7 @@ $defs:
and gpio11)
- gpio1-gpio16 for pmx65
- gpio1-gpio16 for pmx75
+ - gpio1-gpio12 for pmxr2230

items:
pattern: "^gpio([0-9]+)$"
--
2.34.1


2024-03-26 22:08:19

by Anjelique Melendez

[permalink] [raw]
Subject: [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIH0108 and PMD8028 support

Update the Qualcomm Technologies, Inc. PMIC GPIO binding documentation
to include compatible strings for PMIH0108 and PMD8028 PMICs.

Signed-off-by: Anjelique Melendez <[email protected]>
---
.../bindings/pinctrl/qcom,pmic-gpio.yaml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 2b17d244f051..a786357ed1af 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -57,10 +57,12 @@ properties:
- qcom,pma8084-gpio
- qcom,pmc8180-gpio
- qcom,pmc8180c-gpio
+ - qcom,pmd8028-gpio
- qcom,pmi632-gpio
- qcom,pmi8950-gpio
- qcom,pmi8994-gpio
- qcom,pmi8998-gpio
+ - qcom,pmih0108-gpio
- qcom,pmk8350-gpio
- qcom,pmk8550-gpio
- qcom,pmm8155au-gpio
@@ -143,6 +145,7 @@ allOf:
- qcom,pm8005-gpio
- qcom,pm8450-gpio
- qcom,pm8916-gpio
+ - qcom,pmd8028-gpio
- qcom,pmk8350-gpio
- qcom,pmr735a-gpio
- qcom,pmr735b-gpio
@@ -304,6 +307,21 @@ allOf:
minItems: 1
maxItems: 7

+ - if:
+ properties:
+ comptaible:
+ contains:
+ enum:
+ - qcom,pmih0108-gpio
+ then:
+ properties:
+ gpio-line-names:
+ minItems: 18
+ maxItems: 18
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 9
+
- if:
properties:
compatible:
@@ -452,9 +470,11 @@ $defs:
- gpio1-gpio22 for pm8994
- gpio1-gpio26 for pm8998
- gpio1-gpio22 for pma8084
+ - gpio1-gpio4 for pmd8028
- gpio1-gpio8 for pmi632
- gpio1-gpio2 for pmi8950
- gpio1-gpio10 for pmi8994
+ - gpio1-gpio18 for pmih0108
- gpio1-gpio4 for pmk8350
- gpio1-gpio6 for pmk8550
- gpio1-gpio10 for pmm8155au
--
2.34.1


2024-03-26 22:08:32

by Anjelique Melendez

[permalink] [raw]
Subject: [PATCH v2 3/4] pinctrl: qcom: spmi-gpio: Add PMXR2230 and PM6450 support

Add support for qcom,pmxr2230-gpio and qcom,pm6450-gpio.

Signed-off-by: Anjelique Melendez <[email protected]>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index f4e2c88a7c82..54ffb7e1189a 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1202,6 +1202,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
{ .compatible = "qcom,pm6150-gpio", .data = (void *) 10 },
{ .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 },
{ .compatible = "qcom,pm6350-gpio", .data = (void *) 9 },
+ { .compatible = "qcom,pm6450-gpio", .data = (void *) 9 },
{ .compatible = "qcom,pm7250b-gpio", .data = (void *) 12 },
{ .compatible = "qcom,pm7325-gpio", .data = (void *) 10 },
{ .compatible = "qcom,pm7550ba-gpio", .data = (void *) 8},
@@ -1253,6 +1254,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
{ .compatible = "qcom,pmx55-gpio", .data = (void *) 11 },
{ .compatible = "qcom,pmx65-gpio", .data = (void *) 16 },
{ .compatible = "qcom,pmx75-gpio", .data = (void *) 16 },
+ { .compatible = "qcom,pmxr2230-gpio", .data = (void *) 12 },
{ },
};

--
2.34.1


2024-03-26 22:18:24

by Anjelique Melendez

[permalink] [raw]
Subject: [PATCH v2 4/4] pinctrl: qcom: spmi-gpio: Add PMIH0108 and PMD8028 support

Add support for qcom,pmih0108-gpio and qcom,pmd8028-gpio.

Signed-off-by: Anjelique Melendez <[email protected]>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 54ffb7e1189a..4e80c7204e5f 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1235,10 +1235,12 @@ static const struct of_device_id pmic_gpio_of_match[] = {
{ .compatible = "qcom,pm8994-gpio", .data = (void *) 22 },
{ .compatible = "qcom,pm8998-gpio", .data = (void *) 26 },
{ .compatible = "qcom,pma8084-gpio", .data = (void *) 22 },
+ { .compatible = "qcom,pmd8028-gpio", .data = (void *) 4 },
{ .compatible = "qcom,pmi632-gpio", .data = (void *) 8 },
{ .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 },
{ .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 },
{ .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 },
+ { .compatible = "qcom,pmih0108-gpio", .data = (void *) 18 },
{ .compatible = "qcom,pmk8350-gpio", .data = (void *) 4 },
{ .compatible = "qcom,pmk8550-gpio", .data = (void *) 6 },
{ .compatible = "qcom,pmm8155au-gpio", .data = (void *) 10 },
--
2.34.1


2024-03-27 08:10:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIH0108 and PMD8028 support

On 26/03/2024 23:06, Anjelique Melendez wrote:
> Update the Qualcomm Technologies, Inc. PMIC GPIO binding documentation
> to include compatible strings for PMIH0108 and PMD8028 PMICs.
>
> Signed-off-by: Anjelique Melendez <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-03-27 17:13:46

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] pinctrl: qcom: spmi-gpio: Add PMXR2230 and PM6450 support

On 26.03.2024 11:06 PM, Anjelique Melendez wrote:
> Add support for qcom,pmxr2230-gpio and qcom,pm6450-gpio.
>
> Signed-off-by: Anjelique Melendez <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-03-27 17:14:03

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] pinctrl: qcom: spmi-gpio: Add PMIH0108 and PMD8028 support

On 26.03.2024 11:06 PM, Anjelique Melendez wrote:
> Add support for qcom,pmih0108-gpio and qcom,pmd8028-gpio.
>
> Signed-off-by: Anjelique Melendez <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-03-28 09:27:31

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] Add GPIO support for various PMICs

On Tue, Mar 26, 2024 at 11:07 PM Anjelique Melendez
<[email protected]> wrote:

> Add GPIO support for PMXR2230, PM6450, PMIH0108 and PMD8028

All patches applied for kernel v6.10!

Thanks!
Linus Walleij

2024-04-23 17:03:42

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIH0108 and PMD8028 support

On Tue, Mar 26, 2024 at 5:07 PM Anjelique Melendez
<[email protected]> wrote:
>
> Update the Qualcomm Technologies, Inc. PMIC GPIO binding documentation
> to include compatible strings for PMIH0108 and PMD8028 PMICs.

You didn't test this with dtbs_check:

47 gpio@c000: gpio-line-names: ['AP_SUSPEND', '', '', '', '',
'', '', '', '', '', '', ''] is too short
10 gpio@8800: gpio-line-names: ['FLASH_STROBE_1', 'AP_SUSPEND',
'PM8008_1_RST_N', '', '', '', 'PMIC_EDP_BL_EN', 'PMIC_EDP_BL_PWM', '']
is too short

>
> Signed-off-by: Anjelique Melendez <[email protected]>
> ---
> .../bindings/pinctrl/qcom,pmic-gpio.yaml | 20 +++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> index 2b17d244f051..a786357ed1af 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> @@ -57,10 +57,12 @@ properties:
> - qcom,pma8084-gpio
> - qcom,pmc8180-gpio
> - qcom,pmc8180c-gpio
> + - qcom,pmd8028-gpio
> - qcom,pmi632-gpio
> - qcom,pmi8950-gpio
> - qcom,pmi8994-gpio
> - qcom,pmi8998-gpio
> + - qcom,pmih0108-gpio
> - qcom,pmk8350-gpio
> - qcom,pmk8550-gpio
> - qcom,pmm8155au-gpio
> @@ -143,6 +145,7 @@ allOf:
> - qcom,pm8005-gpio
> - qcom,pm8450-gpio
> - qcom,pm8916-gpio
> + - qcom,pmd8028-gpio
> - qcom,pmk8350-gpio
> - qcom,pmr735a-gpio
> - qcom,pmr735b-gpio
> @@ -304,6 +307,21 @@ allOf:
> minItems: 1
> maxItems: 7
>
> + - if:
> + properties:
> + comptaible:

It took me a bit to find, but you've got a typo here. The result is
this "if" schema is always true unless you actually have an instance
with the typo too. Please send a fix.

> + contains:
> + enum:
> + - qcom,pmih0108-gpio
> + then:
> + properties:
> + gpio-line-names:
> + minItems: 18
> + maxItems: 18
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 9

2024-04-25 18:59:52

by Anjelique Melendez

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIH0108 and PMD8028 support

On 4/23/2024 10:02 AM, Rob Herring wrote:
> It took me a bit to find, but you've got a typo here. The result is
> this "if" schema is always true unless you actually have an instance
> with the typo too. Please send a fix.
Thanks for finding typo! Fix is here: https://lore.kernel.org/all/[email protected]/