* [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes
@ 2022-12-28 23:04 Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Rayyan Ansari
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Rayyan Ansari @ 2022-12-28 23:04 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, Rayyan Ansari, devicetree,
Jonathan Cameron, Konrad Dybcio, Krzysztof Kozlowski,
Lars-Peter Clausen, linux-iio, linux-kernel, Luca Weiss,
Rob Herring
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.
Changes since v1:
- Use adc@ generic node name
- Use specific PM8226 IADC compatible with fallback
- Document PM8226 IADC compatible
Rayyan Ansari (4):
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
dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible
.../bindings/iio/adc/qcom,spmi-iadc.yaml | 1 +
arch/arm/boot/dts/qcom-pm8226.dtsi | 46 +++++++++++++------
2 files changed, 34 insertions(+), 13 deletions(-)
--
2.39.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address
2022-12-28 23:04 [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes Rayyan Ansari
@ 2022-12-28 23:04 ` Rayyan Ansari
2022-12-29 10:14 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node Rayyan Ansari
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Rayyan Ansari @ 2022-12-28 23:04 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, Rayyan Ansari, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
Sort the includes and nodes for consistency.
Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
---
arch/arm/boot/dts/qcom-pm8226.dtsi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi
index eb36d3662464..a2092569970a 100644
--- a/arch/arm/boot/dts/qcom-pm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
-#include <dt-bindings/iio/qcom,spmi-vadc.h>
&spmi_bus {
pm8226_0: pm8226@0 {
@@ -41,13 +41,6 @@ smbb: charger@1000 {
chg_otg: otg-vbus { };
};
- rtc@6000 {
- compatible = "qcom,pm8941-rtc";
- reg = <0x6000>, <0x6100>;
- reg-names = "rtc", "alarm";
- interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
- };
-
pm8226_vadc: adc@3100 {
compatible = "qcom,spmi-vadc";
reg = <0x3100>;
@@ -81,6 +74,13 @@ adc-chan@f {
};
};
+ rtc@6000 {
+ compatible = "qcom,pm8941-rtc";
+ reg = <0x6000>, <0x6100>;
+ reg-names = "rtc", "alarm";
+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+ };
+
pm8226_mpps: mpps@a000 {
compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
reg = <0xa000>;
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node
2022-12-28 23:04 [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Rayyan Ansari
@ 2022-12-28 23:04 ` Rayyan Ansari
2022-12-29 10:36 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible Rayyan Ansari
3 siblings, 1 reply; 10+ messages in thread
From: Rayyan Ansari @ 2022-12-28 23:04 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, Rayyan Ansari, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
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 <rayyan@ansari.sh>
---
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 a2092569970a..6af259218f63 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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node
2022-12-28 23:04 [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node Rayyan Ansari
@ 2022-12-28 23:04 ` Rayyan Ansari
2022-12-29 10:15 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible Rayyan Ansari
3 siblings, 1 reply; 10+ messages in thread
From: Rayyan Ansari @ 2022-12-28 23:04 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, Rayyan Ansari, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
Add a node for the current ADC (IADC) found in PM8226.
Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
---
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 6af259218f63..46ba84f86c9f 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: adc@3600 {
+ compatible = "qcom,pm8226-iadc", "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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible
2022-12-28 23:04 [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes Rayyan Ansari
` (2 preceding siblings ...)
2022-12-28 23:04 ` [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node Rayyan Ansari
@ 2022-12-28 23:04 ` Rayyan Ansari
2022-12-29 8:47 ` Krzysztof Kozlowski
3 siblings, 1 reply; 10+ messages in thread
From: Rayyan Ansari @ 2022-12-28 23:04 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, Rayyan Ansari, Jonathan Cameron,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
linux-iio, devicetree, linux-kernel
Document the compatible for the IADC used on PM8226.
Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
---
Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
index fa855baa368c..18aaf6df179d 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml
@@ -20,6 +20,7 @@ properties:
compatible:
items:
- enum:
+ - qcom,pm8226-iadc
- qcom,pm8941-iadc
- const: qcom,spmi-iadc
--
2.39.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible
2022-12-28 23:04 ` [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible Rayyan Ansari
@ 2022-12-29 8:47 ` Krzysztof Kozlowski
2022-12-30 17:23 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-29 8:47 UTC (permalink / raw)
To: Rayyan Ansari, linux-arm-msm
Cc: ~postmarketos/upstreaming, Jonathan Cameron, Lars-Peter Clausen,
Rob Herring, Krzysztof Kozlowski, Luca Weiss, linux-iio,
devicetree, linux-kernel
On 29/12/2022 00:04, Rayyan Ansari wrote:
> Document the compatible for the IADC used on PM8226.
>
> Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address
2022-12-28 23:04 ` [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Rayyan Ansari
@ 2022-12-29 10:14 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2022-12-29 10:14 UTC (permalink / raw)
To: Rayyan Ansari, linux-arm-msm
Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
On 29.12.2022 00:04, Rayyan Ansari wrote:
> Sort the includes and nodes for consistency.
>
> Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm/boot/dts/qcom-pm8226.dtsi | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi
> index eb36d3662464..a2092569970a 100644
> --- a/arch/arm/boot/dts/qcom-pm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: BSD-3-Clause
> +#include <dt-bindings/iio/qcom,spmi-vadc.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/spmi/spmi.h>
> -#include <dt-bindings/iio/qcom,spmi-vadc.h>
>
> &spmi_bus {
> pm8226_0: pm8226@0 {
> @@ -41,13 +41,6 @@ smbb: charger@1000 {
> chg_otg: otg-vbus { };
> };
>
> - rtc@6000 {
> - compatible = "qcom,pm8941-rtc";
> - reg = <0x6000>, <0x6100>;
> - reg-names = "rtc", "alarm";
> - interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
> - };
> -
> pm8226_vadc: adc@3100 {
> compatible = "qcom,spmi-vadc";
> reg = <0x3100>;
> @@ -81,6 +74,13 @@ adc-chan@f {
> };
> };
>
> + rtc@6000 {
> + compatible = "qcom,pm8941-rtc";
> + reg = <0x6000>, <0x6100>;
> + reg-names = "rtc", "alarm";
> + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
> + };
> +
> pm8226_mpps: mpps@a000 {
> compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
> reg = <0xa000>;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node
2022-12-28 23:04 ` [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node Rayyan Ansari
@ 2022-12-29 10:15 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2022-12-29 10:15 UTC (permalink / raw)
To: Rayyan Ansari, linux-arm-msm
Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
On 29.12.2022 00:04, Rayyan Ansari wrote:
> Add a node for the current ADC (IADC) found in PM8226.
>
> Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
> ---
> 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 6af259218f63..46ba84f86c9f 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: adc@3600 {
> + compatible = "qcom,pm8226-iadc", "qcom,spmi-iadc";
This needs a bindings update (unless it was merged beforehand somehow).
Konrad
> + reg = <0x3600>;
> + interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
> + };
> +
> rtc@6000 {
> compatible = "qcom,pm8941-rtc";
> reg = <0x6000>, <0x6100>;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node
2022-12-28 23:04 ` [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node Rayyan Ansari
@ 2022-12-29 10:36 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2022-12-29 10:36 UTC (permalink / raw)
To: Rayyan Ansari, linux-arm-msm
Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
On 29.12.2022 00:04, 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 <rayyan@ansari.sh>
> ---
> 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 a2092569970a..6af259218f63 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>;
That's redundant, the driver sets this by default if linux,code is
not found.
Konrad
> + };
> +
> + 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 {
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible
2022-12-29 8:47 ` Krzysztof Kozlowski
@ 2022-12-30 17:23 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2022-12-30 17:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rayyan Ansari, linux-arm-msm, ~postmarketos/upstreaming,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski, Luca Weiss,
linux-iio, devicetree, linux-kernel
On Thu, 29 Dec 2022 09:47:27 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 29/12/2022 00:04, Rayyan Ansari wrote:
> > Document the compatible for the IADC used on PM8226.
> >
> > Signed-off-by: Rayyan Ansari <rayyan@ansari.sh>
>
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Applied to the togreg branch of iio.git and initially pushed out as testing for 0-day
to take a poke at it.
Thanks,
Jonathan
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-12-30 17:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28 23:04 [PATCH v2 0/4] ARM: dts: qcom: pm8226: style fixes and new nodes Rayyan Ansari
2022-12-28 23:04 ` [PATCH v2 1/4] ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Rayyan Ansari
2022-12-29 10:14 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 2/4] ARM: dts: qcom: pm8226: add PON device node along with resin sub-node Rayyan Ansari
2022-12-29 10:36 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 3/4] ARM: dts: qcom: pm8226: add IADC node Rayyan Ansari
2022-12-29 10:15 ` Konrad Dybcio
2022-12-28 23:04 ` [PATCH v2 4/4] dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible Rayyan Ansari
2022-12-29 8:47 ` Krzysztof Kozlowski
2022-12-30 17:23 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).