All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 0/2] Convert qcom,spmi-pmic bindings from .txt to .yaml
@ 2020-12-18  8:14 Kiran Gunda
  2020-12-18  8:14 ` [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format Kiran Gunda
  2020-12-18  8:14 ` [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l Kiran Gunda
  0 siblings, 2 replies; 9+ messages in thread
From: Kiran Gunda @ 2020-12-18  8:14 UTC (permalink / raw)
  To: robh, swboyd; +Cc: linux-arm-msm, devicetree, linux-kernel, Kiran Gunda

This patch series does the following:
 - converts the qcom,spmi-pmic bindings from .txt to .yaml format
 - Sorted the compatible strings
 - Adds PM6150 and PM6150L subtypes.

Changes from V3:
 - Fixed compilation error in .yaml file.

Changes from V2:
 - Addressed Stephen Boyd and Rob Herring comments.

Kiran Gunda (2):
  mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l

 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 -------------
 .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 129 +++++++++++++++++++++
 drivers/mfd/qcom-spmi-pmic.c                       |   4 +
 3 files changed, 133 insertions(+), 80 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  2020-12-18  8:14 [PATCH V4 0/2] Convert qcom,spmi-pmic bindings from .txt to .yaml Kiran Gunda
@ 2020-12-18  8:14 ` Kiran Gunda
  2020-12-19 23:47   ` Stephen Boyd
  2020-12-21  8:50   ` Lee Jones
  2020-12-18  8:14 ` [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l Kiran Gunda
  1 sibling, 2 replies; 9+ messages in thread
From: Kiran Gunda @ 2020-12-18  8:14 UTC (permalink / raw)
  To: robh, swboyd, Andy Gross, Bjorn Andersson, Lee Jones,
	Rob Herring, Stephen Boyd, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Kiran Gunda

Convert the bindings from .txt to .yaml format.

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
---
 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 -------------
 .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 127 +++++++++++++++++++++
 2 files changed, 127 insertions(+), 80 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
deleted file mode 100644
index 79367a4..0000000
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-          Qualcomm SPMI PMICs multi-function device bindings
-
-The Qualcomm SPMI series presently includes PM8941, PM8841 and PMA8084
-PMICs.  These PMICs use a QPNP scheme through SPMI interface.
-QPNP is effectively a partitioning scheme for dividing the SPMI extended
-register space up into logical pieces, and set of fixed register
-locations/definitions within these regions, with some of these regions
-specifically used for interrupt handling.
-
-The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
-interfaced to the chip via the SPMI (System Power Management Interface) bus.
-Support for multiple independent functions are implemented by splitting the
-16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
-each. A function can consume one or more of these fixed-size register regions.
-
-Required properties:
-- compatible:      Should contain one of:
-                   "qcom,pm8941",
-                   "qcom,pm8841",
-                   "qcom,pma8084",
-                   "qcom,pm8019",
-                   "qcom,pm8226",
-                   "qcom,pm8110",
-                   "qcom,pma8084",
-                   "qcom,pmi8962",
-                   "qcom,pmd9635",
-                   "qcom,pm8994",
-                   "qcom,pmi8994",
-                   "qcom,pm8916",
-                   "qcom,pm8004",
-                   "qcom,pm8909",
-                   "qcom,pm8950",
-                   "qcom,pmi8950",
-                   "qcom,pm8998",
-                   "qcom,pmi8998",
-                   "qcom,pm8005",
-                   or generalized "qcom,spmi-pmic".
-- reg:             Specifies the SPMI USID slave address for this device.
-                   For more information see:
-                   Documentation/devicetree/bindings/spmi/spmi.yaml
-
-Required properties for peripheral child nodes:
-- compatible:      Should contain "qcom,xxx", where "xxx" is a peripheral name.
-
-Optional properties for peripheral child nodes:
-- interrupts:      Interrupts are specified as a 4-tuple. For more information
-                   see:
-                   Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
-- interrupt-names: Corresponding interrupt name to the interrupts property
-
-Each child node of SPMI slave id represents a function of the PMIC. In the
-example below the rtc device node represents a peripheral of pm8941
-SID = 0. The regulator device node represents a peripheral of pm8941 SID = 1.
-
-Example:
-
-	spmi {
-		compatible = "qcom,spmi-pmic-arb";
-
-		pm8941@0 {
-			compatible = "qcom,pm8941", "qcom,spmi-pmic";
-			reg = <0x0 SPMI_USID>;
-
-			rtc {
-				compatible = "qcom,rtc";
-				interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
-				interrupt-names = "alarm";
-			};
-		};
-
-		pm8941@1 {
-			compatible = "qcom,pm8941", "qcom,spmi-pmic";
-			reg = <0x1 SPMI_USID>;
-
-			regulator {
-				compatible = "qcom,regulator";
-				regulator-name = "8941_boost";
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
new file mode 100644
index 0000000..e458dd1
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -0,0 +1,127 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm SPMI PMICs multi-function device bindings
+
+maintainers:
+  - Stephen Boyd <sboyd@kernel.org>
+
+description: |
+  The Qualcomm SPMI PMICs use a QPNP scheme through SPMI interface.
+  QPNP is effectively a partitioning scheme for dividing the SPMI extended
+  register space up into logical pieces, and set of fixed register
+  locations/definitions within these regions, with some of these regions
+  specifically used for interrupt handling.
+
+  The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
+  interfaced to the chip via the SPMI (System Power Management Interface) bus.
+  Support for multiple independent functions are implemented by splitting the
+  16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
+  each. A function can consume one or more of these fixed-size register regions.
+
+properties:
+  spmi_bus:
+    type: object
+    description: SPMI bus node
+
+patternProperties:
+  "^pmic@[0-9]$":
+    description: Child PMIC nodes
+    type: object
+
+    properties:
+      compatible:
+        items:
+          - enum:
+              # Sorted based on subtype ID the device reports
+              - qcom,pm8941
+              - qcom,pm8841
+              - qcom,pma8084
+              - qcom,pm8019
+              - qcom,pm8226
+              - qcom,pm8110
+              - qcom,pma8084
+              - qcom,pmi8962
+              - qcom,pmd9635
+              - qcom,pm8994
+              - qcom,pmi8994
+              - qcom,pm8916
+              - qcom,pm8004
+              - qcom,pm8909
+              - qcom,pm8950
+              - qcom,pmi8950
+              - qcom,pm8998
+              - qcom,pmi8998
+              - qcom,pm8005
+              - qcom,pm660l
+              - qcom,pm660
+
+          - enum:
+              - qcom,spmi-pmic
+
+      reg:
+        maxItems: 1
+        description:
+          Specifies the SPMI USID slave address for this device.
+          For more information see bindings/spmi/spmi.txt
+
+    patternProperties:
+      "@[0-9a-f]$":
+        description:
+          Each child node of SPMI slave id represents a function of the PMIC.
+          In the example below the rtc device node represents a peripheral of
+          pm8941 SID = 0. The regulator device node represents a peripheral of
+          pm8941 SID = 1.
+        type: object
+
+        properties:
+          interrupts:
+            maxItems: 4
+            description:
+              Interrupts are specified as a 4-tuple. For more information
+              see bindings/spmi/qcom,spmi-pmic-arb.txt
+
+          interrupt-names:
+            description:
+              Corresponding interrupt name to the interrupts property
+
+    required:
+      - compatible
+      - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/spmi/spmi.h>
+
+    spmi_bus {
+        compatible = "qcom,spmi-pmic-arb";
+        #address-cells = <2>;
+        #size-cells = <0>;
+
+        pmic@0 {
+         compatible = "qcom,pm8941";
+         reg = <0x0 SPMI_USID>;
+
+         rtc {
+           compatible = "qcom,rtc";
+           interrupts = <0x0 0x61 0x1 0x1>;
+           interrupt-names = "alarm";
+          };
+        };
+
+        pmic@1 {
+         compatible = "qcom,pm8941";
+         reg = <0x1 SPMI_USID>;
+
+         regulator {
+           compatible = "qcom,regulator";
+           regulator-name = "8941_boost";
+           };
+          };
+        };
+...
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l
  2020-12-18  8:14 [PATCH V4 0/2] Convert qcom,spmi-pmic bindings from .txt to .yaml Kiran Gunda
  2020-12-18  8:14 ` [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format Kiran Gunda
@ 2020-12-18  8:14 ` Kiran Gunda
  2020-12-19 23:48   ` Stephen Boyd
  2020-12-21  8:47   ` Lee Jones
  1 sibling, 2 replies; 9+ messages in thread
From: Kiran Gunda @ 2020-12-18  8:14 UTC (permalink / raw)
  To: robh, swboyd, Andy Gross, Bjorn Andersson, Lee Jones,
	Rob Herring, Stephen Boyd, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Kiran Gunda

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs
found on SC7180 based platforms.

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
---
 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                              | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index e458dd1..2acddbc 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -58,6 +58,8 @@ patternProperties:
               - qcom,pm8005
               - qcom,pm660l
               - qcom,pm660
+              - qcom,pm6150l
+              - qcom,pm6150
 
           - enum:
               - qcom,spmi-pmic
diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
index a35d5cf..78e9084 100644
--- a/drivers/mfd/qcom-spmi-pmic.c
+++ b/drivers/mfd/qcom-spmi-pmic.c
@@ -38,6 +38,8 @@
 #define PM8005_SUBTYPE		0x18
 #define PM660L_SUBTYPE		0x1A
 #define PM660_SUBTYPE		0x1B
+#define PM6150L_SUBTYPE		0x1F
+#define PM6150_SUBTYPE		0x28
 
 static const struct of_device_id pmic_spmi_id_table[] = {
 	{ .compatible = "qcom,spmi-pmic", .data = (void *)COMMON_SUBTYPE },
@@ -61,6 +63,8 @@ static const struct of_device_id pmic_spmi_id_table[] = {
 	{ .compatible = "qcom,pm8005",    .data = (void *)PM8005_SUBTYPE },
 	{ .compatible = "qcom,pm660l",    .data = (void *)PM660L_SUBTYPE },
 	{ .compatible = "qcom,pm660",     .data = (void *)PM660_SUBTYPE },
+	{ .compatible = "qcom,pm6150l",    .data = (void *)PM6150L_SUBTYPE },
+	{ .compatible = "qcom,pm6150",     .data = (void *)PM6150_SUBTYPE },
 	{ }
 };
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  2020-12-18  8:14 ` [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format Kiran Gunda
@ 2020-12-19 23:47   ` Stephen Boyd
  2020-12-24  6:57     ` kgunda
  2020-12-21  8:50   ` Lee Jones
  1 sibling, 1 reply; 9+ messages in thread
From: Stephen Boyd @ 2020-12-19 23:47 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Kiran Gunda, Lee Jones, Rob Herring,
	devicetree, linux-arm-msm, linux-kernel, robh, swboyd
  Cc: Kiran Gunda

Quoting Kiran Gunda (2020-12-18 00:14:51)
> Convert the bindings from .txt to .yaml format.
> 
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> ---
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 -------------
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 127 +++++++++++++++++++++
>  2 files changed, 127 insertions(+), 80 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> deleted file mode 100644
> index 79367a4..0000000
> --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> +++ /dev/null
> @@ -1,80 +0,0 @@
> -          Qualcomm SPMI PMICs multi-function device bindings
> -
> -The Qualcomm SPMI series presently includes PM8941, PM8841 and PMA8084
> -PMICs.  These PMICs use a QPNP scheme through SPMI interface.
> -QPNP is effectively a partitioning scheme for dividing the SPMI extended
> -register space up into logical pieces, and set of fixed register
> -locations/definitions within these regions, with some of these regions
> -specifically used for interrupt handling.
> -
> -The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
> -interfaced to the chip via the SPMI (System Power Management Interface) bus.
> -Support for multiple independent functions are implemented by splitting the
> -16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
> -each. A function can consume one or more of these fixed-size register regions.
> -
> -Required properties:
> -- compatible:      Should contain one of:
> -                   "qcom,pm8941",
> -                   "qcom,pm8841",
> -                   "qcom,pma8084",
> -                   "qcom,pm8019",
> -                   "qcom,pm8226",
> -                   "qcom,pm8110",
> -                   "qcom,pma8084",
> -                   "qcom,pmi8962",
> -                   "qcom,pmd9635",
> -                   "qcom,pm8994",
> -                   "qcom,pmi8994",
> -                   "qcom,pm8916",
> -                   "qcom,pm8004",
> -                   "qcom,pm8909",
> -                   "qcom,pm8950",
> -                   "qcom,pmi8950",
> -                   "qcom,pm8998",
> -                   "qcom,pmi8998",
> -                   "qcom,pm8005",
> -                   or generalized "qcom,spmi-pmic".
> -- reg:             Specifies the SPMI USID slave address for this device.
> -                   For more information see:
> -                   Documentation/devicetree/bindings/spmi/spmi.yaml
> -
> -Required properties for peripheral child nodes:
> -- compatible:      Should contain "qcom,xxx", where "xxx" is a peripheral name.
> -
> -Optional properties for peripheral child nodes:
> -- interrupts:      Interrupts are specified as a 4-tuple. For more information
> -                   see:
> -                   Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
> -- interrupt-names: Corresponding interrupt name to the interrupts property
> -
> -Each child node of SPMI slave id represents a function of the PMIC. In the
> -example below the rtc device node represents a peripheral of pm8941
> -SID = 0. The regulator device node represents a peripheral of pm8941 SID = 1.
> -
> -Example:
> -
> -       spmi {
> -               compatible = "qcom,spmi-pmic-arb";
> -
> -               pm8941@0 {
> -                       compatible = "qcom,pm8941", "qcom,spmi-pmic";
> -                       reg = <0x0 SPMI_USID>;
> -
> -                       rtc {
> -                               compatible = "qcom,rtc";
> -                               interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
> -                               interrupt-names = "alarm";
> -                       };
> -               };
> -
> -               pm8941@1 {
> -                       compatible = "qcom,pm8941", "qcom,spmi-pmic";
> -                       reg = <0x1 SPMI_USID>;
> -
> -                       regulator {
> -                               compatible = "qcom,regulator";
> -                               regulator-name = "8941_boost";
> -                       };
> -               };
> -       };
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> new file mode 100644
> index 0000000..e458dd1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> @@ -0,0 +1,127 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm SPMI PMICs multi-function device bindings
> +
> +maintainers:
> +  - Stephen Boyd <sboyd@kernel.org>

Someone at Qualcomm should be the maintainer here. Maybe you?

> +
> +description: |
> +  The Qualcomm SPMI PMICs use a QPNP scheme through SPMI interface.

What is QPNP?

> +  QPNP is effectively a partitioning scheme for dividing the SPMI extended
> +  register space up into logical pieces, and set of fixed register
> +  locations/definitions within these regions, with some of these regions
> +  specifically used for interrupt handling.
> +
> +  The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
> +  interfaced to the chip via the SPMI (System Power Management Interface) bus.
> +  Support for multiple independent functions are implemented by splitting the
> +  16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
> +  each. A function can consume one or more of these fixed-size register regions.
> +
> +properties:
> +  spmi_bus:
> +    type: object
> +    description: SPMI bus node
> +
> +patternProperties:
> +  "^pmic@[0-9]$":
> +    description: Child PMIC nodes
> +    type: object
> +
> +    properties:
> +      compatible:
> +        items:
> +          - enum:
> +              # Sorted based on subtype ID the device reports
> +              - qcom,pm8941
> +              - qcom,pm8841
> +              - qcom,pma8084
> +              - qcom,pm8019
> +              - qcom,pm8226
> +              - qcom,pm8110
> +              - qcom,pma8084
> +              - qcom,pmi8962
> +              - qcom,pmd9635
> +              - qcom,pm8994
> +              - qcom,pmi8994
> +              - qcom,pm8916
> +              - qcom,pm8004
> +              - qcom,pm8909
> +              - qcom,pm8950
> +              - qcom,pmi8950
> +              - qcom,pm8998
> +              - qcom,pmi8998
> +              - qcom,pm8005
> +              - qcom,pm660l
> +              - qcom,pm660
> +
> +          - enum:
> +              - qcom,spmi-pmic
> +
> +      reg:
> +        maxItems: 1
> +        description:
> +          Specifies the SPMI USID slave address for this device.
> +          For more information see bindings/spmi/spmi.txt
> +
> +    patternProperties:
> +      "@[0-9a-f]$":

Is that @ sign supposed to be a ^ sign? I thought the child nodes of a
pmic node were [a-zA-Z0-9-] or some sort of regex like that. Certainly
not an address that doesn't exist. They look to be things like 'rtc' or
'regulator'.

> +        description:
> +          Each child node of SPMI slave id represents a function of the PMIC.
> +          In the example below the rtc device node represents a peripheral of
> +          pm8941 SID = 0. The regulator device node represents a peripheral of
> +          pm8941 SID = 1.
> +        type: object
> +
> +        properties:
> +          interrupts:
> +            maxItems: 4
> +            description:
> +              Interrupts are specified as a 4-tuple. For more information

Seems like minItems is also 4 though, so should be a const 4 instead?
But then this is about how many interrupts there are, which would be 1
or 2?  It really can't be known in case there are many interrupts for a
child node so not sure we need to specify anything.

> +              see bindings/spmi/qcom,spmi-pmic-arb.txt
> +
> +          interrupt-names:
> +            description:
> +              Corresponding interrupt name to the interrupts property

I suspect we should drop these two properties and leave them up to the
binding for the function, like rtc, or regualator, etc.

> +
> +    required:
> +      - compatible
> +      - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/spmi/spmi.h>
> +
> +    spmi_bus {
> +        compatible = "qcom,spmi-pmic-arb";
> +        #address-cells = <2>;
> +        #size-cells = <0>;
> +
> +        pmic@0 {
> +         compatible = "qcom,pm8941";
> +         reg = <0x0 SPMI_USID>;
> +
> +         rtc {
> +           compatible = "qcom,rtc";
> +           interrupts = <0x0 0x61 0x1 0x1>;
> +           interrupt-names = "alarm";
> +          };
> +        };
> +
> +        pmic@1 {
> +         compatible = "qcom,pm8941";
> +         reg = <0x1 SPMI_USID>;
> +
> +         regulator {
> +           compatible = "qcom,regulator";
> +           regulator-name = "8941_boost";
> +           };
> +          };
> +        };
> +...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l
  2020-12-18  8:14 ` [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l Kiran Gunda
@ 2020-12-19 23:48   ` Stephen Boyd
  2020-12-21  8:47   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2020-12-19 23:48 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Kiran Gunda, Lee Jones, Rob Herring,
	devicetree, linux-arm-msm, linux-kernel, robh, swboyd
  Cc: Kiran Gunda

Quoting Kiran Gunda (2020-12-18 00:14:52)
> Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs
> found on SC7180 based platforms.
> 
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l
  2020-12-18  8:14 ` [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l Kiran Gunda
  2020-12-19 23:48   ` Stephen Boyd
@ 2020-12-21  8:47   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2020-12-21  8:47 UTC (permalink / raw)
  To: Kiran Gunda
  Cc: robh, swboyd, Andy Gross, Bjorn Andersson, Rob Herring,
	Stephen Boyd, linux-arm-msm, devicetree, linux-kernel

On Fri, 18 Dec 2020, Kiran Gunda wrote:

> Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs
> found on SC7180 based platforms.
> 
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 2 ++
>  drivers/mfd/qcom-spmi-pmic.c                              | 4 ++++
>  2 files changed, 6 insertions(+)

I can't apply this until the file has been converted.

In the mean time:

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  2020-12-18  8:14 ` [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format Kiran Gunda
  2020-12-19 23:47   ` Stephen Boyd
@ 2020-12-21  8:50   ` Lee Jones
  2020-12-24  6:53     ` kgunda
  1 sibling, 1 reply; 9+ messages in thread
From: Lee Jones @ 2020-12-21  8:50 UTC (permalink / raw)
  To: Kiran Gunda
  Cc: robh, swboyd, Andy Gross, Bjorn Andersson, Rob Herring,
	Stephen Boyd, linux-arm-msm, devicetree, linux-kernel

On Fri, 18 Dec 2020, Kiran Gunda wrote:

> Convert the bindings from .txt to .yaml format.
> 
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> ---
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 -------------
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 127 +++++++++++++++++++++
>  2 files changed, 127 insertions(+), 80 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

What are the other patches that I was not cc'ed on?

Generally it's a bad idea to send only some patches of a set to some
maintainers.  Best for everyone to have full visibility.

Also looks like you're missing a cover-letter [PATCH 0/4] which adds
to the opaqueness/confusion.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  2020-12-21  8:50   ` Lee Jones
@ 2020-12-24  6:53     ` kgunda
  0 siblings, 0 replies; 9+ messages in thread
From: kgunda @ 2020-12-24  6:53 UTC (permalink / raw)
  To: Lee Jones
  Cc: robh, swboyd, Andy Gross, Bjorn Andersson, Rob Herring,
	Stephen Boyd, linux-arm-msm, devicetree, linux-kernel

On 2020-12-21 14:20, Lee Jones wrote:
> On Fri, 18 Dec 2020, Kiran Gunda wrote:
> 
>> Convert the bindings from .txt to .yaml format.
>> 
>> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> ---
>>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 
>> -------------
>>  .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 127 
>> +++++++++++++++++++++
>>  2 files changed, 127 insertions(+), 80 deletions(-)
>>  delete mode 100644 
>> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>>  create mode 100644 
>> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> 
> What are the other patches that I was not cc'ed on?
> 
> Generally it's a bad idea to send only some patches of a set to some
> maintainers.  Best for everyone to have full visibility.
> 
I ran the get_maintainer.pl script. Not sure how it is missed. Anyways
I will add you in the next post.

> Also looks like you're missing a cover-letter [PATCH 0/4] which adds
> to the opaqueness/confusion.
I have introduced the cover letter from V3 series. That's why the 
earlier
notes are missing from cover letter. Let me add them in next series.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format
  2020-12-19 23:47   ` Stephen Boyd
@ 2020-12-24  6:57     ` kgunda
  0 siblings, 0 replies; 9+ messages in thread
From: kgunda @ 2020-12-24  6:57 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Andy Gross, Bjorn Andersson, Lee Jones, Rob Herring, devicetree,
	linux-arm-msm, linux-kernel, robh

On 2020-12-20 05:17, Stephen Boyd wrote:
> Quoting Kiran Gunda (2020-12-18 00:14:51)
>> Convert the bindings from .txt to .yaml format.
>> 
>> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> ---
>>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |  80 
>> -------------
>>  .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml    | 127 
>> +++++++++++++++++++++
>>  2 files changed, 127 insertions(+), 80 deletions(-)
>>  delete mode 100644 
>> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>>  create mode 100644 
>> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
>> 
>> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt 
>> b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>> deleted file mode 100644
>> index 79367a4..0000000
>> --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>> +++ /dev/null
>> @@ -1,80 +0,0 @@
>> -          Qualcomm SPMI PMICs multi-function device bindings
>> -
>> -The Qualcomm SPMI series presently includes PM8941, PM8841 and 
>> PMA8084
>> -PMICs.  These PMICs use a QPNP scheme through SPMI interface.
>> -QPNP is effectively a partitioning scheme for dividing the SPMI 
>> extended
>> -register space up into logical pieces, and set of fixed register
>> -locations/definitions within these regions, with some of these 
>> regions
>> -specifically used for interrupt handling.
>> -
>> -The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and 
>> are
>> -interfaced to the chip via the SPMI (System Power Management 
>> Interface) bus.
>> -Support for multiple independent functions are implemented by 
>> splitting the
>> -16-bit SPMI slave address space into 256 smaller fixed-size regions, 
>> 256 bytes
>> -each. A function can consume one or more of these fixed-size register 
>> regions.
>> -
>> -Required properties:
>> -- compatible:      Should contain one of:
>> -                   "qcom,pm8941",
>> -                   "qcom,pm8841",
>> -                   "qcom,pma8084",
>> -                   "qcom,pm8019",
>> -                   "qcom,pm8226",
>> -                   "qcom,pm8110",
>> -                   "qcom,pma8084",
>> -                   "qcom,pmi8962",
>> -                   "qcom,pmd9635",
>> -                   "qcom,pm8994",
>> -                   "qcom,pmi8994",
>> -                   "qcom,pm8916",
>> -                   "qcom,pm8004",
>> -                   "qcom,pm8909",
>> -                   "qcom,pm8950",
>> -                   "qcom,pmi8950",
>> -                   "qcom,pm8998",
>> -                   "qcom,pmi8998",
>> -                   "qcom,pm8005",
>> -                   or generalized "qcom,spmi-pmic".
>> -- reg:             Specifies the SPMI USID slave address for this 
>> device.
>> -                   For more information see:
>> -                   Documentation/devicetree/bindings/spmi/spmi.yaml
>> -
>> -Required properties for peripheral child nodes:
>> -- compatible:      Should contain "qcom,xxx", where "xxx" is a 
>> peripheral name.
>> -
>> -Optional properties for peripheral child nodes:
>> -- interrupts:      Interrupts are specified as a 4-tuple. For more 
>> information
>> -                   see:
>> -                   
>> Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
>> -- interrupt-names: Corresponding interrupt name to the interrupts 
>> property
>> -
>> -Each child node of SPMI slave id represents a function of the PMIC. 
>> In the
>> -example below the rtc device node represents a peripheral of pm8941
>> -SID = 0. The regulator device node represents a peripheral of pm8941 
>> SID = 1.
>> -
>> -Example:
>> -
>> -       spmi {
>> -               compatible = "qcom,spmi-pmic-arb";
>> -
>> -               pm8941@0 {
>> -                       compatible = "qcom,pm8941", "qcom,spmi-pmic";
>> -                       reg = <0x0 SPMI_USID>;
>> -
>> -                       rtc {
>> -                               compatible = "qcom,rtc";
>> -                               interrupts = <0x0 0x61 0x1 
>> IRQ_TYPE_EDGE_RISING>;
>> -                               interrupt-names = "alarm";
>> -                       };
>> -               };
>> -
>> -               pm8941@1 {
>> -                       compatible = "qcom,pm8941", "qcom,spmi-pmic";
>> -                       reg = <0x1 SPMI_USID>;
>> -
>> -                       regulator {
>> -                               compatible = "qcom,regulator";
>> -                               regulator-name = "8941_boost";
>> -                       };
>> -               };
>> -       };
>> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml 
>> b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
>> new file mode 100644
>> index 0000000..e458dd1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
>> @@ -0,0 +1,127 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm SPMI PMICs multi-function device bindings
>> +
>> +maintainers:
>> +  - Stephen Boyd <sboyd@kernel.org>
> 
> Someone at Qualcomm should be the maintainer here. Maybe you?
> 
>> +
>> +description: |
>> +  The Qualcomm SPMI PMICs use a QPNP scheme through SPMI interface.
> 
> What is QPNP?
> 
Qualcomm Plug And Play.
>> +  QPNP is effectively a partitioning scheme for dividing the SPMI 
>> extended
>> +  register space up into logical pieces, and set of fixed register
>> +  locations/definitions within these regions, with some of these 
>> regions
>> +  specifically used for interrupt handling.
>> +
>> +  The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, 
>> and are
>> +  interfaced to the chip via the SPMI (System Power Management 
>> Interface) bus.
>> +  Support for multiple independent functions are implemented by 
>> splitting the
>> +  16-bit SPMI slave address space into 256 smaller fixed-size 
>> regions, 256 bytes
>> +  each. A function can consume one or more of these fixed-size 
>> register regions.
>> +
>> +properties:
>> +  spmi_bus:
>> +    type: object
>> +    description: SPMI bus node
>> +
>> +patternProperties:
>> +  "^pmic@[0-9]$":
>> +    description: Child PMIC nodes
>> +    type: object
>> +
>> +    properties:
>> +      compatible:
>> +        items:
>> +          - enum:
>> +              # Sorted based on subtype ID the device reports
>> +              - qcom,pm8941
>> +              - qcom,pm8841
>> +              - qcom,pma8084
>> +              - qcom,pm8019
>> +              - qcom,pm8226
>> +              - qcom,pm8110
>> +              - qcom,pma8084
>> +              - qcom,pmi8962
>> +              - qcom,pmd9635
>> +              - qcom,pm8994
>> +              - qcom,pmi8994
>> +              - qcom,pm8916
>> +              - qcom,pm8004
>> +              - qcom,pm8909
>> +              - qcom,pm8950
>> +              - qcom,pmi8950
>> +              - qcom,pm8998
>> +              - qcom,pmi8998
>> +              - qcom,pm8005
>> +              - qcom,pm660l
>> +              - qcom,pm660
>> +
>> +          - enum:
>> +              - qcom,spmi-pmic
>> +
>> +      reg:
>> +        maxItems: 1
>> +        description:
>> +          Specifies the SPMI USID slave address for this device.
>> +          For more information see bindings/spmi/spmi.txt
>> +
>> +    patternProperties:
>> +      "@[0-9a-f]$":
> 
> Is that @ sign supposed to be a ^ sign? I thought the child nodes of a
> pmic node were [a-zA-Z0-9-] or some sort of regex like that. Certainly
> not an address that doesn't exist. They look to be things like 'rtc' or
> 'regulator'.
> 
Will fix it in next series.
>> +        description:
>> +          Each child node of SPMI slave id represents a function of 
>> the PMIC.
>> +          In the example below the rtc device node represents a 
>> peripheral of
>> +          pm8941 SID = 0. The regulator device node represents a 
>> peripheral of
>> +          pm8941 SID = 1.
>> +        type: object
>> +
>> +        properties:
>> +          interrupts:
>> +            maxItems: 4
>> +            description:
>> +              Interrupts are specified as a 4-tuple. For more 
>> information
> 
> Seems like minItems is also 4 though, so should be a const 4 instead?
> But then this is about how many interrupts there are, which would be 1
> or 2?  It really can't be known in case there are many interrupts for a
> child node so not sure we need to specify anything.
> 
>> +              see bindings/spmi/qcom,spmi-pmic-arb.txt
>> +
>> +          interrupt-names:
>> +            description:
>> +              Corresponding interrupt name to the interrupts property
> 
> I suspect we should drop these two properties and leave them up to the
> binding for the function, like rtc, or regualator, etc.
> 
Okay. I will remove these properties.
>> +
>> +    required:
>> +      - compatible
>> +      - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/spmi/spmi.h>
>> +
>> +    spmi_bus {
>> +        compatible = "qcom,spmi-pmic-arb";
>> +        #address-cells = <2>;
>> +        #size-cells = <0>;
>> +
>> +        pmic@0 {
>> +         compatible = "qcom,pm8941";
>> +         reg = <0x0 SPMI_USID>;
>> +
>> +         rtc {
>> +           compatible = "qcom,rtc";
>> +           interrupts = <0x0 0x61 0x1 0x1>;
>> +           interrupt-names = "alarm";
>> +          };
>> +        };
>> +
>> +        pmic@1 {
>> +         compatible = "qcom,pm8941";
>> +         reg = <0x1 SPMI_USID>;
>> +
>> +         regulator {
>> +           compatible = "qcom,regulator";
>> +           regulator-name = "8941_boost";
>> +           };
>> +          };
>> +        };
>> +...

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-24  6:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18  8:14 [PATCH V4 0/2] Convert qcom,spmi-pmic bindings from .txt to .yaml Kiran Gunda
2020-12-18  8:14 ` [PATCH V4 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format Kiran Gunda
2020-12-19 23:47   ` Stephen Boyd
2020-12-24  6:57     ` kgunda
2020-12-21  8:50   ` Lee Jones
2020-12-24  6:53     ` kgunda
2020-12-18  8:14 ` [PATCH V4 2/2] mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l Kiran Gunda
2020-12-19 23:48   ` Stephen Boyd
2020-12-21  8:47   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.