2022-12-23 19:57:11

by Rayyan Ansari

[permalink] [raw]
Subject: [PATCH 0/3] ARM: dts: qcom: pm8226: style fixes and new nodes

Hello,

The following patches sort the nodes and includes in PM8226's
device tree file, and add new nodes for PON (with the resin sub-node)
and IADC.

Rayyan Ansari (3):
ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by
address
ARM: dts: qcom: pm8226: add PON device node along with resin sub-node
ARM: dts: qcom: pm8226: add IADC node

arch/arm/boot/dts/qcom-pm8226.dtsi | 46 +++++++++++++++++++++---------
1 file changed, 33 insertions(+), 13 deletions(-)

--
2.39.0


2022-12-23 20:05:04

by Rayyan Ansari

[permalink] [raw]
Subject: [PATCH 2/3] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node

The PON (Power On) device in PM8226 supports both the power key and
resin (reset input).
The reset input is usually connected to a physical volume up/down button.

Signed-off-by: Rayyan Ansari <[email protected]>
---
arch/arm/boot/dts/qcom-pm8226.dtsi | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi
index d99532ea70b2..403324a35cf5 100644
--- a/arch/arm/boot/dts/qcom-pm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: BSD-3-Clause
#include <dt-bindings/iio/qcom,spmi-vadc.h>
+#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>

@@ -10,12 +11,25 @@ pm8226_0: pm8226@0 {
#address-cells = <1>;
#size-cells = <0>;

- pwrkey@800 {
- compatible = "qcom,pm8941-pwrkey";
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
reg = <0x800>;
- interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
- debounce = <15625>;
- bias-pull-up;
+
+ pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ linux,code = <KEY_POWER>;
+ };
+
+ pm8226_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
};

smbb: charger@1000 {
--
2.39.0

2022-12-23 20:37:58

by Rayyan Ansari

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: qcom: pm8226: add IADC node

Add a node for the current ADC (IADC) found in PM8226.

Signed-off-by: Rayyan Ansari <[email protected]>
---
arch/arm/boot/dts/qcom-pm8226.dtsi | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi
index 403324a35cf5..82470549f240 100644
--- a/arch/arm/boot/dts/qcom-pm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
@@ -88,6 +88,12 @@ adc-chan@f {
};
};

+ pm8226_iadc: iadc@3600 {
+ compatible = "qcom,spmi-iadc";
+ reg = <0x3600>;
+ interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
+ };
+
rtc@6000 {
compatible = "qcom,pm8941-rtc";
reg = <0x6000>, <0x6100>;
--
2.39.0

2022-12-26 12:19:32

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 2/3] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node

On Freitag, 23. Dezember 2022 20:34:02 CET Rayyan Ansari wrote:
> The PON (Power On) device in PM8226 supports both the power key and
> resin (reset input).
> The reset input is usually connected to a physical volume up/down button.
>
> Signed-off-by: Rayyan Ansari <[email protected]>

Reviewed-by: Luca Weiss <[email protected]>

> ---
> arch/arm/boot/dts/qcom-pm8226.dtsi | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi
> b/arch/arm/boot/dts/qcom-pm8226.dtsi index d99532ea70b2..403324a35cf5
> 100644
> --- a/arch/arm/boot/dts/qcom-pm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
> @@ -1,5 +1,6 @@
> // SPDX-License-Identifier: BSD-3-Clause
> #include <dt-bindings/iio/qcom,spmi-vadc.h>
> +#include <dt-bindings/input/linux-event-codes.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/spmi/spmi.h>
>
> @@ -10,12 +11,25 @@ pm8226_0: pm8226@0 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> - pwrkey@800 {
> - compatible = "qcom,pm8941-pwrkey";
> + pon@800 {
> + compatible = "qcom,pm8916-pon";
> reg = <0x800>;
> - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> - debounce = <15625>;
> - bias-pull-up;
> +
> + pwrkey {
> + compatible = "qcom,pm8941-
pwrkey";
> + interrupts = <0x0 0x8 0
IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + linux,code = <KEY_POWER>;
> + };
> +
> + pm8226_resin: resin {
> + compatible = "qcom,pm8941-resin";
> + interrupts = <0x0 0x8 1
IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + status = "disabled";
> + };
> };
>
> smbb: charger@1000 {




2022-12-26 13:26:42

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: pm8226: add IADC node

Hi Rayyan,

On Freitag, 23. Dezember 2022 20:34:03 CET Rayyan Ansari wrote:
> Add a node for the current ADC (IADC) found in PM8226.
>
> Signed-off-by: Rayyan Ansari <[email protected]>
> ---
> arch/arm/boot/dts/qcom-pm8226.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi
> b/arch/arm/boot/dts/qcom-pm8226.dtsi index 403324a35cf5..82470549f240
> 100644
> --- a/arch/arm/boot/dts/qcom-pm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
> @@ -88,6 +88,12 @@ adc-chan@f {
> };
> };
>
> + pm8226_iadc: iadc@3600 {

Make this adc@ to conform to qcom,spmi-pmic.yaml docs

> + compatible = "qcom,spmi-iadc";

Make this "qcom,pm8226-iadc", "qcom,spmi-iadc" and add to docs to conform to
qcom,spmi-iadc.yaml

Regards
Luca

> + reg = <0x3600>;
> + interrupts = <0x0 0x36 0x0
IRQ_TYPE_EDGE_RISING>;
> + };
> +
> rtc@6000 {
> compatible = "qcom,pm8941-rtc";
> reg = <0x6000>, <0x6100>;




2022-12-29 03:50:07

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: qcom: pm8226: add IADC node

On Mon, Dec 26, 2022 at 01:14:59PM +0100, Luca Weiss wrote:
> Hi Rayyan,
>
> On Freitag, 23. Dezember 2022 20:34:03 CET Rayyan Ansari wrote:
> > Add a node for the current ADC (IADC) found in PM8226.
> >
> > Signed-off-by: Rayyan Ansari <[email protected]>
> > ---
> > arch/arm/boot/dts/qcom-pm8226.dtsi | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi
> > b/arch/arm/boot/dts/qcom-pm8226.dtsi index 403324a35cf5..82470549f240
> > 100644
> > --- a/arch/arm/boot/dts/qcom-pm8226.dtsi
> > +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
> > @@ -88,6 +88,12 @@ adc-chan@f {
> > };
> > };
> >
> > + pm8226_iadc: iadc@3600 {
>
> Make this adc@ to conform to qcom,spmi-pmic.yaml docs
>
> > + compatible = "qcom,spmi-iadc";
>
> Make this "qcom,pm8226-iadc", "qcom,spmi-iadc" and add to docs to conform to
> qcom,spmi-iadc.yaml
>

I adjusted the patch according to your requests and applied it. Rayyan,
please update dt binding documentation per Luca's request.

Thanks,
Bjorn

> Regards
> Luca
>
> > + reg = <0x3600>;
> > + interrupts = <0x0 0x36 0x0
> IRQ_TYPE_EDGE_RISING>;
> > + };
> > +
> > rtc@6000 {
> > compatible = "qcom,pm8941-rtc";
> > reg = <0x6000>, <0x6100>;
>
>
>
>

2022-12-29 03:51:29

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: dts: qcom: pm8226: style fixes and new nodes

On Fri, 23 Dec 2022 19:34:00 +0000, Rayyan Ansari wrote:
> The following patches sort the nodes and includes in PM8226's
> device tree file, and add new nodes for PON (with the resin sub-node)
> and IADC.
>
> Rayyan Ansari (3):
> ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by
> address
> ARM: dts: qcom: pm8226: add PON device node along with resin sub-node
> ARM: dts: qcom: pm8226: add IADC node
>
> [...]

Applied, thanks!

[1/3] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address
commit: bc6ecf993b10238b4747261f5b495ecd46a72833
[2/3] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node
commit: 79ca56c11e9004ba1b012822a68eb4d57826a721
[3/3] ARM: dts: qcom: pm8226: add IADC node
commit: 07eccde43b030bf8129fea1a81c00946c9edf1fe

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