2022-05-09 02:04:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 0/4] dt-bindings/pinctrl/arm: qcom: second round of minor cleanups of QCOM PMIC pinctrl

Hi,

Dependencies
============
This is on top of:
dt-bindings/pinctrl/arm: qcom: minor cleanups of QCOM PMIC pinctrl
https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Not really tested on hardware (except SDM845).

Best regards,
Krzysztof

Krzysztof Kozlowski (4):
dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'
arm64: dts: qcom: add missing gpio-ranges in PMIC GPIOs
arm64: dts: qcom: correct interrupt controller on PM8916 and PMS405
ARM: dts: qcom: add missing gpio-ranges in PMIC GPIOs

.../bindings/pinctrl/qcom,pmic-gpio.yaml | 53 +++++++++++++++++++
arch/arm/boot/dts/qcom-pmx55.dtsi | 1 +
arch/arm/boot/dts/qcom-pmx65.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8009.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8150.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8150b.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8150l.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8350.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8350b.dtsi | 1 +
arch/arm64/boot/dts/qcom/pm8916.dtsi | 7 ++-
arch/arm64/boot/dts/qcom/pmr735b.dtsi | 1 +
arch/arm64/boot/dts/qcom/pms405.dtsi | 15 ++----
13 files changed, 69 insertions(+), 16 deletions(-)

--
2.32.0



2022-05-09 08:30:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

'gpio-reserved-ranges' property is already used and supported by common pinctrl
bindings, so add it also here to fix warnings like:

qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'

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

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 7e74a87ccc39..69195660ee2a 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -78,6 +78,12 @@ properties:
minItems: 2
maxItems: 44

+ gpio-reserved-ranges:
+ minItems: 1
+ # maxItems as half of total number of GPIOs, as there has to be at
+ # least one usable GPIO between each reserved range.
+ maxItems: 22
+
'#gpio-cells':
const: 2
description:
@@ -107,6 +113,8 @@ allOf:
gpio-line-names:
minItems: 2
maxItems: 2
+ gpio-reserved-ranges:
+ maxItems: 1

- if:
properties:
@@ -124,6 +132,9 @@ allOf:
gpio-line-names:
minItems: 4
maxItems: 4
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 2

- if:
properties:
@@ -137,6 +148,9 @@ allOf:
gpio-line-names:
minItems: 6
maxItems: 6
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 3

- if:
properties:
@@ -150,6 +164,9 @@ allOf:
gpio-line-names:
minItems: 8
maxItems: 8
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 4

- if:
properties:
@@ -163,6 +180,9 @@ allOf:
gpio-line-names:
minItems: 9
maxItems: 9
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 5

- if:
properties:
@@ -182,6 +202,9 @@ allOf:
gpio-line-names:
minItems: 10
maxItems: 10
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 5

- if:
properties:
@@ -194,6 +217,9 @@ allOf:
gpio-line-names:
minItems: 11
maxItems: 11
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 6

- if:
properties:
@@ -212,6 +238,9 @@ allOf:
gpio-line-names:
minItems: 12
maxItems: 12
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 6

- if:
properties:
@@ -224,6 +253,9 @@ allOf:
gpio-line-names:
minItems: 13
maxItems: 13
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 7

- if:
properties:
@@ -236,6 +268,9 @@ allOf:
gpio-line-names:
minItems: 14
maxItems: 14
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 7

- if:
properties:
@@ -248,6 +283,9 @@ allOf:
gpio-line-names:
minItems: 16
maxItems: 16
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 8

- if:
properties:
@@ -261,6 +299,9 @@ allOf:
gpio-line-names:
minItems: 22
maxItems: 22
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 11

- if:
properties:
@@ -273,6 +314,9 @@ allOf:
gpio-line-names:
minItems: 26
maxItems: 26
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 13

- if:
properties:
@@ -285,6 +329,9 @@ allOf:
gpio-line-names:
minItems: 36
maxItems: 36
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 18

- if:
properties:
@@ -297,6 +344,9 @@ allOf:
gpio-line-names:
minItems: 38
maxItems: 38
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 19

- if:
properties:
@@ -310,6 +360,9 @@ allOf:
gpio-line-names:
minItems: 44
maxItems: 44
+ gpio-reserved-ranges:
+ minItems: 1
+ maxItems: 22

patternProperties:
'-state$':
--
2.32.0


2022-05-09 09:55:19

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT 3/4] arm64: dts: qcom: correct interrupt controller on PM8916 and PMS405

The PM8916 and PMS405 PMIC GPIOs are interrupt controllers, as described
in the bindings and used by the driver. Drop the interrupts (apparently
copied from downstream tree), just like in commit 61d2ca503d0b ("arm64:
dts: qcom: fix pm8150 gpio interrupts"):

qcs404-evb-4000.dtb: gpio@c000: 'interrupts' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
qcs404-evb-4000.dtb: gpio@c000: 'interrupt-controller' is a required property

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/pm8916.dtsi | 6 ++----
arch/arm64/boot/dts/qcom/pms405.dtsi | 14 ++------------
2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index d52919a8c0b0..0b6e8ad7fa50 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -113,10 +113,8 @@ pm8916_gpios: gpios@c000 {
gpio-controller;
gpio-ranges = <&pm8916_gpios 0 0 4>;
#gpio-cells = <2>;
- interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
- <0 0xc1 0 IRQ_TYPE_NONE>,
- <0 0xc2 0 IRQ_TYPE_NONE>,
- <0 0xc3 0 IRQ_TYPE_NONE>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
};
};

diff --git a/arch/arm64/boot/dts/qcom/pms405.dtsi b/arch/arm64/boot/dts/qcom/pms405.dtsi
index 26f1e8cc9c6c..634b0681d04c 100644
--- a/arch/arm64/boot/dts/qcom/pms405.dtsi
+++ b/arch/arm64/boot/dts/qcom/pms405.dtsi
@@ -43,18 +43,8 @@ pms405_gpios: gpio@c000 {
gpio-controller;
gpio-ranges = <&pms405_gpios 0 0 12>;
#gpio-cells = <2>;
- interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
- <0 0xc1 0 IRQ_TYPE_NONE>,
- <0 0xc2 0 IRQ_TYPE_NONE>,
- <0 0xc3 0 IRQ_TYPE_NONE>,
- <0 0xc4 0 IRQ_TYPE_NONE>,
- <0 0xc5 0 IRQ_TYPE_NONE>,
- <0 0xc6 0 IRQ_TYPE_NONE>,
- <0 0xc7 0 IRQ_TYPE_NONE>,
- <0 0xc8 0 IRQ_TYPE_NONE>,
- <0 0xc9 0 IRQ_TYPE_NONE>,
- <0 0xca 0 IRQ_TYPE_NONE>,
- <0 0xcb 0 IRQ_TYPE_NONE>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
};

pon@800 {
--
2.32.0


2022-05-10 21:55:43

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

On Sun, 08 May 2022 15:59:29 +0200, Krzysztof Kozlowski wrote:
> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
>
> qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../bindings/pinctrl/qcom,pmic-gpio.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
>

Reviewed-by: Rob Herring <[email protected]>

2022-05-14 04:22:46

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

On Sun, May 8, 2022 at 3:59 PM Krzysztof Kozlowski
<[email protected]> wrote:

> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
>
> qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

This does not apply on top of pinctrl's devel branch, am I doing
something wrong?

Yours,
Linus Walleij

2022-05-16 02:05:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

On 14/05/2022 01:18, Linus Walleij wrote:
> On Sun, May 8, 2022 at 3:59 PM Krzysztof Kozlowski
> <[email protected]> wrote:
>
>> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
>> bindings, so add it also here to fix warnings like:
>>
>> qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> This does not apply on top of pinctrl's devel branch, am I doing
> something wrong?

Hi Linus,

Sorry for any confusion. This is on top of my previous patchset:
https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

2022-05-17 02:09:38

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

On Sun 08 May 06:59 PDT 2022, Krzysztof Kozlowski wrote:

> 'gpio-reserved-ranges' property is already used and supported by common pinctrl
> bindings, so add it also here to fix warnings like:
>
> qrb5165-rb5.dtb: gpio@c000: 'gpio-reserved-ranges' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: Bjorn Andersson <[email protected]>

> ---
> .../bindings/pinctrl/qcom,pmic-gpio.yaml | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> index 7e74a87ccc39..69195660ee2a 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> @@ -78,6 +78,12 @@ properties:
> minItems: 2
> maxItems: 44
>
> + gpio-reserved-ranges:
> + minItems: 1
> + # maxItems as half of total number of GPIOs, as there has to be at
> + # least one usable GPIO between each reserved range.
> + maxItems: 22
> +
> '#gpio-cells':
> const: 2
> description:
> @@ -107,6 +113,8 @@ allOf:
> gpio-line-names:
> minItems: 2
> maxItems: 2
> + gpio-reserved-ranges:
> + maxItems: 1
>
> - if:
> properties:
> @@ -124,6 +132,9 @@ allOf:
> gpio-line-names:
> minItems: 4
> maxItems: 4
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 2
>
> - if:
> properties:
> @@ -137,6 +148,9 @@ allOf:
> gpio-line-names:
> minItems: 6
> maxItems: 6
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 3
>
> - if:
> properties:
> @@ -150,6 +164,9 @@ allOf:
> gpio-line-names:
> minItems: 8
> maxItems: 8
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 4
>
> - if:
> properties:
> @@ -163,6 +180,9 @@ allOf:
> gpio-line-names:
> minItems: 9
> maxItems: 9
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 5
>
> - if:
> properties:
> @@ -182,6 +202,9 @@ allOf:
> gpio-line-names:
> minItems: 10
> maxItems: 10
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 5
>
> - if:
> properties:
> @@ -194,6 +217,9 @@ allOf:
> gpio-line-names:
> minItems: 11
> maxItems: 11
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 6
>
> - if:
> properties:
> @@ -212,6 +238,9 @@ allOf:
> gpio-line-names:
> minItems: 12
> maxItems: 12
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 6
>
> - if:
> properties:
> @@ -224,6 +253,9 @@ allOf:
> gpio-line-names:
> minItems: 13
> maxItems: 13
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 7
>
> - if:
> properties:
> @@ -236,6 +268,9 @@ allOf:
> gpio-line-names:
> minItems: 14
> maxItems: 14
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 7
>
> - if:
> properties:
> @@ -248,6 +283,9 @@ allOf:
> gpio-line-names:
> minItems: 16
> maxItems: 16
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 8
>
> - if:
> properties:
> @@ -261,6 +299,9 @@ allOf:
> gpio-line-names:
> minItems: 22
> maxItems: 22
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 11
>
> - if:
> properties:
> @@ -273,6 +314,9 @@ allOf:
> gpio-line-names:
> minItems: 26
> maxItems: 26
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 13
>
> - if:
> properties:
> @@ -285,6 +329,9 @@ allOf:
> gpio-line-names:
> minItems: 36
> maxItems: 36
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 18
>
> - if:
> properties:
> @@ -297,6 +344,9 @@ allOf:
> gpio-line-names:
> minItems: 38
> maxItems: 38
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 19
>
> - if:
> properties:
> @@ -310,6 +360,9 @@ allOf:
> gpio-line-names:
> minItems: 44
> maxItems: 44
> + gpio-reserved-ranges:
> + minItems: 1
> + maxItems: 22
>
> patternProperties:
> '-state$':
> --
> 2.32.0
>

2022-05-20 08:31:50

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 0/4] dt-bindings/pinctrl/arm: qcom: second round of minor cleanups of QCOM PMIC pinctrl

On Sun, May 8, 2022 at 3:59 PM Krzysztof Kozlowski
<[email protected]> wrote:

> Krzysztof Kozlowski (4):
> dt-bindings: pinctrl: qcom,pmic-gpio: add 'gpio-reserved-ranges'

This patch applied to the pinctrl tree on top of the other 4 patches
concerning bindings from the previous patch set.

Yours,
Linus Walleij

2022-06-28 20:48:33

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/4] dt-bindings/pinctrl/arm: qcom: second round of minor cleanups of QCOM PMIC pinctrl

On Sun, 8 May 2022 15:59:28 +0200, Krzysztof Kozlowski wrote:
> Dependencies
> ============
> This is on top of:
> dt-bindings/pinctrl/arm: qcom: minor cleanups of QCOM PMIC pinctrl
> https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t
>
> Not really tested on hardware (except SDM845).
>
> [...]

Applied, thanks!

[2/4] arm64: dts: qcom: add missing gpio-ranges in PMIC GPIOs
commit: b07bfd8ebe31b0a39184cba522fdae433b6cd0ad
[3/4] arm64: dts: qcom: correct interrupt controller on PM8916 and PMS405
commit: a984d5d191527108a934cb9da2a15b07ea05a8ea

Best regards,
--
Bjorn Andersson <[email protected]>