All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
@ 2014-08-01 14:30 ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright, Stephen Boyd,
	David Collins, Stanimir Varbanov

Hello all,

Changes since v3:
 - rename the driver to qcom-spmi-pmic - suggested by David Collins
 - spmi regmap config now initialize .fast_io to true
 - added generalized comptatible string in DT binding document and driver
 - I dropped the pm8921 rename patch for now, it will be subject of another
   patchset later on.

regards,
Stan

--------------------------------------------------------------------------------

Changes since v2:
 - 1/4 - added new line, signed-off-by / acked-by and module_authors.
 - 3/4 - the subject has been changed.

The previous v2 can be found at [1].

I'm still waiting Acks for:
 - 4/4 from Qualcomm folks.
 - 2/4 and 3/4 from DT folks.

The patchset is ready to merge version and also it can be treated as an
intermediate step until we find a solution for non-translatable peripheral
addresses.

[1] https://lkml.org/lkml/2014/7/17/877

--------------------------------------------------------------------------------

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm
QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
 - removed completely custom *of* parser
 - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
 - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Removing of the custom *of* parser leads to that that the *reg* devicetree
property cannot exist and therefore cannot be parsed to get PMIC peripheral
resources. I took this step aside because no one from mfd drivers does this
parsing. This will lead to inconvenience in the peripheral drivers to define
internally the SPMI base addresses depending on the compatible property
i.e. PMIC version. 

Comments are welcome!

[1] https://lkml.org/lkml/2014/7/8/428

--------------------------------------------------------------------------------

Josh Cartwright (1):
  mfd: add support for Qualcomm SPMI PMICs

Stanimir Varbanov (2):
  mfd: document DT bindings for Qualcomm SPMI PMICs
  ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes

 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
 drivers/mfd/Kconfig                                |   15 +++++
 drivers/mfd/Makefile                               |    1 +
 drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
 5 files changed, 184 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
 create mode 100644 drivers/mfd/qcom-spmi-pmic.c

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

* [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
@ 2014-08-01 14:30 ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

Changes since v3:
 - rename the driver to qcom-spmi-pmic - suggested by David Collins
 - spmi regmap config now initialize .fast_io to true
 - added generalized comptatible string in DT binding document and driver
 - I dropped the pm8921 rename patch for now, it will be subject of another
   patchset later on.

regards,
Stan

--------------------------------------------------------------------------------

Changes since v2:
 - 1/4 - added new line, signed-off-by / acked-by and module_authors.
 - 3/4 - the subject has been changed.

The previous v2 can be found at [1].

I'm still waiting Acks for:
 - 4/4 from Qualcomm folks.
 - 2/4 and 3/4 from DT folks.

The patchset is ready to merge version and also it can be treated as an
intermediate step until we find a solution for non-translatable peripheral
addresses.

[1] https://lkml.org/lkml/2014/7/17/877

--------------------------------------------------------------------------------

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm
QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
 - removed completely custom *of* parser
 - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
 - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Removing of the custom *of* parser leads to that that the *reg* devicetree
property cannot exist and therefore cannot be parsed to get PMIC peripheral
resources. I took this step aside because no one from mfd drivers does this
parsing. This will lead to inconvenience in the peripheral drivers to define
internally the SPMI base addresses depending on the compatible property
i.e. PMIC version. 

Comments are welcome!

[1] https://lkml.org/lkml/2014/7/8/428

--------------------------------------------------------------------------------

Josh Cartwright (1):
  mfd: add support for Qualcomm SPMI PMICs

Stanimir Varbanov (2):
  mfd: document DT bindings for Qualcomm SPMI PMICs
  ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes

 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
 drivers/mfd/Kconfig                                |   15 +++++
 drivers/mfd/Makefile                               |    1 +
 drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
 5 files changed, 184 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
 create mode 100644 drivers/mfd/qcom-spmi-pmic.c

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

* [PATCH v4 1/3] mfd: add support for Qualcomm SPMI PMICs
  2014-08-01 14:30 ` Stanimir Varbanov
@ 2014-08-01 14:30   ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright, Stephen Boyd,
	David Collins, Stanimir Varbanov

From: Josh Cartwright <joshc@codeaurora.org>

The Qualcomm SPMI PMIC chips are components used with the
Snapdragon 800 series SoC family.  This driver exists
largely as a glue mfd component, it exists to be an owner
of an SPMI regmap for children devices described in
device tree.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/Kconfig          |   15 +++++++++
 drivers/mfd/Makefile         |    1 +
 drivers/mfd/qcom-spmi-pmic.c |   67 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/qcom-spmi-pmic.c

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 6cc4b6a..abfe12a 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -524,6 +524,21 @@ config MFD_PM8921_CORE
 	  Say M here if you want to include support for PM8921 chip as a module.
 	  This will build a module called "pm8921-core".
 
+config MFD_SPMI_PMIC
+	tristate "Qualcomm SPMI PMICs"
+	depends on ARCH_QCOM || COMPILE_TEST
+	depends on OF
+	depends on SPMI
+	select REGMAP_SPMI
+	help
+	  This enables support for the Qualcomm SPMI PMICs.
+	  These PMICs are currently used with the Snapdragon 800 series of
+	  SoCs.  Note, that this will only be useful paired with descriptions
+	  of the independent functions as children nodes in the device tree.
+
+	  Say M here if you want to include support for the SPMI PMIC
+	  series as a module.  The module will be called "qcom-spmi-pmic".
+
 config MFD_RDC321X
 	tristate "RDC R-321x southbridge"
 	select MFD_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 8afedba..0e7f32e 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -153,6 +153,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
 obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
 obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
 obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
+obj-$(CONFIG_MFD_SPMI_PMIC)	+= qcom-spmi-pmic.o
 obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
new file mode 100644
index 0000000..4b8beb2
--- /dev/null
+++ b/drivers/mfd/qcom-spmi-pmic.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/spmi.h>
+#include <linux/regmap.h>
+#include <linux/of_platform.h>
+
+static const struct regmap_config spmi_regmap_config = {
+	.reg_bits	= 16,
+	.val_bits	= 8,
+	.max_register	= 0xffff,
+	.fast_io	= true,
+};
+
+static int pmic_spmi_probe(struct spmi_device *sdev)
+{
+	struct device_node *root = sdev->dev.of_node;
+	struct regmap *regmap;
+
+	regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config);
+	if (IS_ERR(regmap))
+		return PTR_ERR(regmap);
+
+	return of_platform_populate(root, NULL, NULL, &sdev->dev);
+}
+
+static void pmic_spmi_remove(struct spmi_device *sdev)
+{
+	of_platform_depopulate(&sdev->dev);
+}
+
+static const struct of_device_id pmic_spmi_id_table[] = {
+	{ .compatible = "qcom,spmi-pmic" },
+	{ .compatible = "qcom,pm8941" },
+	{ .compatible = "qcom,pm8841" },
+	{ .compatible = "qcom,pma8084" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);
+
+static struct spmi_driver pmic_spmi_driver = {
+	.probe = pmic_spmi_probe,
+	.remove = pmic_spmi_remove,
+	.driver = {
+		.name = "pmic-spmi",
+		.of_match_table = pmic_spmi_id_table,
+	},
+};
+module_spmi_driver(pmic_spmi_driver);
+
+MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver");
+MODULE_ALIAS("spmi:spmi-pmic");
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Josh Cartwright <joshc@codeaurora.org>");
+MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>");
-- 
1.7.0.4

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

* [PATCH v4 1/3] mfd: add support for Qualcomm SPMI PMICs
@ 2014-08-01 14:30   ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

From: Josh Cartwright <joshc@codeaurora.org>

The Qualcomm SPMI PMIC chips are components used with the
Snapdragon 800 series SoC family.  This driver exists
largely as a glue mfd component, it exists to be an owner
of an SPMI regmap for children devices described in
device tree.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/Kconfig          |   15 +++++++++
 drivers/mfd/Makefile         |    1 +
 drivers/mfd/qcom-spmi-pmic.c |   67 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/qcom-spmi-pmic.c

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 6cc4b6a..abfe12a 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -524,6 +524,21 @@ config MFD_PM8921_CORE
 	  Say M here if you want to include support for PM8921 chip as a module.
 	  This will build a module called "pm8921-core".
 
+config MFD_SPMI_PMIC
+	tristate "Qualcomm SPMI PMICs"
+	depends on ARCH_QCOM || COMPILE_TEST
+	depends on OF
+	depends on SPMI
+	select REGMAP_SPMI
+	help
+	  This enables support for the Qualcomm SPMI PMICs.
+	  These PMICs are currently used with the Snapdragon 800 series of
+	  SoCs.  Note, that this will only be useful paired with descriptions
+	  of the independent functions as children nodes in the device tree.
+
+	  Say M here if you want to include support for the SPMI PMIC
+	  series as a module.  The module will be called "qcom-spmi-pmic".
+
 config MFD_RDC321X
 	tristate "RDC R-321x southbridge"
 	select MFD_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 8afedba..0e7f32e 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -153,6 +153,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
 obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
 obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
 obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
+obj-$(CONFIG_MFD_SPMI_PMIC)	+= qcom-spmi-pmic.o
 obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
new file mode 100644
index 0000000..4b8beb2
--- /dev/null
+++ b/drivers/mfd/qcom-spmi-pmic.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/spmi.h>
+#include <linux/regmap.h>
+#include <linux/of_platform.h>
+
+static const struct regmap_config spmi_regmap_config = {
+	.reg_bits	= 16,
+	.val_bits	= 8,
+	.max_register	= 0xffff,
+	.fast_io	= true,
+};
+
+static int pmic_spmi_probe(struct spmi_device *sdev)
+{
+	struct device_node *root = sdev->dev.of_node;
+	struct regmap *regmap;
+
+	regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config);
+	if (IS_ERR(regmap))
+		return PTR_ERR(regmap);
+
+	return of_platform_populate(root, NULL, NULL, &sdev->dev);
+}
+
+static void pmic_spmi_remove(struct spmi_device *sdev)
+{
+	of_platform_depopulate(&sdev->dev);
+}
+
+static const struct of_device_id pmic_spmi_id_table[] = {
+	{ .compatible = "qcom,spmi-pmic" },
+	{ .compatible = "qcom,pm8941" },
+	{ .compatible = "qcom,pm8841" },
+	{ .compatible = "qcom,pma8084" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);
+
+static struct spmi_driver pmic_spmi_driver = {
+	.probe = pmic_spmi_probe,
+	.remove = pmic_spmi_remove,
+	.driver = {
+		.name = "pmic-spmi",
+		.of_match_table = pmic_spmi_id_table,
+	},
+};
+module_spmi_driver(pmic_spmi_driver);
+
+MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver");
+MODULE_ALIAS("spmi:spmi-pmic");
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Josh Cartwright <joshc@codeaurora.org>");
+MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>");
-- 
1.7.0.4

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

* [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
  2014-08-01 14:30 ` Stanimir Varbanov
  (?)
@ 2014-08-01 14:30     ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Courtney Cavin,
	Bjorn Andersson, Josh Cartwright, Stephen Boyd, David Collins,
	Stanimir Varbanov

Document DT bindings used to describe the Qualcomm SPMI PMICs.

Signed-off-by: Stanimir Varbanov <svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
---
 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
new file mode 100644
index 0000000..7182b88
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
@@ -0,0 +1,64 @@
+          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"
+                     or generalized "qcom,spmi-pmic".
+- reg:             Specifies the SPMI USID slave address for this device.
+                   For more information see:
+                   Documentation/devicetree/bindings/spmi/spmi.txt
+
+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";
+			};
+		};
+	};
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
@ 2014-08-01 14:30     ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright, Stephen Boyd,
	David Collins, Stanimir Varbanov

Document DT bindings used to describe the Qualcomm SPMI PMICs.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
new file mode 100644
index 0000000..7182b88
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
@@ -0,0 +1,64 @@
+          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"
+                     or generalized "qcom,spmi-pmic".
+- reg:             Specifies the SPMI USID slave address for this device.
+                   For more information see:
+                   Documentation/devicetree/bindings/spmi/spmi.txt
+
+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";
+			};
+		};
+	};
-- 
1.7.0.4


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

* [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
@ 2014-08-01 14:30     ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

Document DT bindings used to describe the Qualcomm SPMI PMICs.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
 .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
new file mode 100644
index 0000000..7182b88
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
@@ -0,0 +1,64 @@
+          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"
+                     or generalized "qcom,spmi-pmic".
+- reg:             Specifies the SPMI USID slave address for this device.
+                   For more information see:
+                   Documentation/devicetree/bindings/spmi/spmi.txt
+
+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 at 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 at 1 {
+			compatible = "qcom,pm8941", "qcom,spmi-pmic";
+			reg = <0x1 SPMI_USID>;
+
+			regulator {
+				compatible = "qcom,regulator";
+				regulator-name = "8941_boost";
+			};
+		};
+	};
-- 
1.7.0.4

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

* [PATCH v4 3/3] ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
  2014-08-01 14:30 ` Stanimir Varbanov
  (?)
@ 2014-08-01 14:30     ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Courtney Cavin,
	Bjorn Andersson, Josh Cartwright, Stephen Boyd, David Collins,
	Stanimir Varbanov

The pm8941 and pm8841 spmi devicetree nodes are childrens of
spmi pmic arbiter. The msm8974 SoC uses two PMIC chips
pm8941 and pm8841. Every PMIC chip has two spmi bus slave id's.

Signed-off-by: Stanimir Varbanov <svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi |   37 +++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 69dca2a..5e08d43 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/spmi/spmi.h>
 
 / {
 	model = "Qualcomm MSM8974";
@@ -236,5 +237,41 @@
 			#interrupt-cells = <2>;
 			interrupts = <0 208 0>;
 		};
+
+		spmi@fc4cf000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg-names = "core", "intr", "cnfg";
+			reg = <0xfc4cf000 0x1000>,
+			      <0xfc4cb000 0x1000>,
+			      <0xfc4ca000 0x1000>;
+			interrupt-names = "periph_irq";
+			interrupts = <0 190 0>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+
+			pm8941@0 {
+				compatible = "qcom,pm8941";
+				reg = <0x0 SPMI_USID>;
+			};
+
+			pm8941@1 {
+				compatible = "qcom,pm8941";
+				reg = <0x1 SPMI_USID>;
+			};
+
+			pm8841@4 {
+				compatible = "qcom,pm8841";
+				reg = <0x4 SPMI_USID>;
+			};
+
+			pm8841@5 {
+				compatible = "qcom,pm8841";
+				reg = <0x5 SPMI_USID>;
+			};
+		};
 	};
 };
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v4 3/3] ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
@ 2014-08-01 14:30     ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright, Stephen Boyd,
	David Collins, Stanimir Varbanov

The pm8941 and pm8841 spmi devicetree nodes are childrens of
spmi pmic arbiter. The msm8974 SoC uses two PMIC chips
pm8941 and pm8841. Every PMIC chip has two spmi bus slave id's.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi |   37 +++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 69dca2a..5e08d43 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/spmi/spmi.h>
 
 / {
 	model = "Qualcomm MSM8974";
@@ -236,5 +237,41 @@
 			#interrupt-cells = <2>;
 			interrupts = <0 208 0>;
 		};
+
+		spmi@fc4cf000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg-names = "core", "intr", "cnfg";
+			reg = <0xfc4cf000 0x1000>,
+			      <0xfc4cb000 0x1000>,
+			      <0xfc4ca000 0x1000>;
+			interrupt-names = "periph_irq";
+			interrupts = <0 190 0>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+
+			pm8941@0 {
+				compatible = "qcom,pm8941";
+				reg = <0x0 SPMI_USID>;
+			};
+
+			pm8941@1 {
+				compatible = "qcom,pm8941";
+				reg = <0x1 SPMI_USID>;
+			};
+
+			pm8841@4 {
+				compatible = "qcom,pm8841";
+				reg = <0x4 SPMI_USID>;
+			};
+
+			pm8841@5 {
+				compatible = "qcom,pm8841";
+				reg = <0x5 SPMI_USID>;
+			};
+		};
 	};
 };
-- 
1.7.0.4


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

* [PATCH v4 3/3] ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
@ 2014-08-01 14:30     ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-01 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

The pm8941 and pm8841 spmi devicetree nodes are childrens of
spmi pmic arbiter. The msm8974 SoC uses two PMIC chips
pm8941 and pm8841. Every PMIC chip has two spmi bus slave id's.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi |   37 +++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 69dca2a..5e08d43 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/spmi/spmi.h>
 
 / {
 	model = "Qualcomm MSM8974";
@@ -236,5 +237,41 @@
 			#interrupt-cells = <2>;
 			interrupts = <0 208 0>;
 		};
+
+		spmi at fc4cf000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg-names = "core", "intr", "cnfg";
+			reg = <0xfc4cf000 0x1000>,
+			      <0xfc4cb000 0x1000>,
+			      <0xfc4ca000 0x1000>;
+			interrupt-names = "periph_irq";
+			interrupts = <0 190 0>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+
+			pm8941 at 0 {
+				compatible = "qcom,pm8941";
+				reg = <0x0 SPMI_USID>;
+			};
+
+			pm8941 at 1 {
+				compatible = "qcom,pm8941";
+				reg = <0x1 SPMI_USID>;
+			};
+
+			pm8841 at 4 {
+				compatible = "qcom,pm8841";
+				reg = <0x4 SPMI_USID>;
+			};
+
+			pm8841 at 5 {
+				compatible = "qcom,pm8841";
+				reg = <0x5 SPMI_USID>;
+			};
+		};
 	};
 };
-- 
1.7.0.4

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

* Re: [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
  2014-08-01 14:30     ` Stanimir Varbanov
@ 2014-08-04 13:51       ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-04 13:51 UTC (permalink / raw)
  To: Kumar Gala, Stephen Boyd, David Collins
  Cc: Stanimir Varbanov, Ian Campbell, Pawel Moll, Rob Herring,
	Mark Rutland, Grant Likely, Lee Jones, Samuel Ortiz,
	linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright

Kumar, Stephen, David can I have your Acked/Reviewed-by tag for 2/3 and
if possible for 3/3. The last patch can wait because currently we don't
have child peripherals. Thanks.

regards,
Stan

On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> Document DT bindings used to describe the Qualcomm SPMI PMICs.
> 
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> ---
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
>  1 files changed, 64 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> new file mode 100644
> index 0000000..7182b88
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> @@ -0,0 +1,64 @@
> +          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"
> +                     or generalized "qcom,spmi-pmic".
> +- reg:             Specifies the SPMI USID slave address for this device.
> +                   For more information see:
> +                   Documentation/devicetree/bindings/spmi/spmi.txt
> +
> +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";
> +			};
> +		};
> +	};
> 


-- 
regards,
Stan

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

* [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
@ 2014-08-04 13:51       ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-04 13:51 UTC (permalink / raw)
  To: linux-arm-kernel

Kumar, Stephen, David can I have your Acked/Reviewed-by tag for 2/3 and
if possible for 3/3. The last patch can wait because currently we don't
have child peripherals. Thanks.

regards,
Stan

On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> Document DT bindings used to describe the Qualcomm SPMI PMICs.
> 
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> ---
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
>  1 files changed, 64 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> new file mode 100644
> index 0000000..7182b88
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> @@ -0,0 +1,64 @@
> +          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"
> +                     or generalized "qcom,spmi-pmic".
> +- reg:             Specifies the SPMI USID slave address for this device.
> +                   For more information see:
> +                   Documentation/devicetree/bindings/spmi/spmi.txt
> +
> +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 at 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 at 1 {
> +			compatible = "qcom,pm8941", "qcom,spmi-pmic";
> +			reg = <0x1 SPMI_USID>;
> +
> +			regulator {
> +				compatible = "qcom,regulator";
> +				regulator-name = "8941_boost";
> +			};
> +		};
> +	};
> 


-- 
regards,
Stan

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

* Re: [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
  2014-08-01 14:30 ` Stanimir Varbanov
@ 2014-08-05  7:20   ` Pramod Gurav
  -1 siblings, 0 replies; 22+ messages in thread
From: Pramod Gurav @ 2014-08-05  7:20 UTC (permalink / raw)
  To: Stanimir Varbanov
  Cc: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz, linux-arm-msm,
	linux-kernel, linux-arm-kernel, devicetree, Courtney Cavin,
	Bjorn Andersson, Josh Cartwright, Stephen Boyd, David Collins

Hi Stanimir.
On Friday 01 August 2014 08:00 PM, Stanimir Varbanov wrote:
> Hello all,
> 
> Changes since v3:
>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>  - spmi regmap config now initialize .fast_io to true
>  - added generalized comptatible string in DT binding document and driver
>  - I dropped the pm8921 rename patch for now, it will be subject of another
>    patchset later on.
> 
> regards,
> Stan
> 
> --------------------------------------------------------------------------------
> 
> Changes since v2:
>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>  - 3/4 - the subject has been changed.
> 
> The previous v2 can be found at [1].
> 
> I'm still waiting Acks for:
>  - 4/4 from Qualcomm folks.

If I am not missing something obvious, this patch needs to be resent as
it does not apply on top of patches in this series. I tried applying and
it fails in Kconfig.

>  - 2/4 and 3/4 from DT folks.
> 
> The patchset is ready to merge version and also it can be treated as an
> intermediate step until we find a solution for non-translatable peripheral
> addresses.
> 
> [1] https://lkml.org/lkml/2014/7/17/877
> 
> --------------------------------------------------------------------------------
> 
> Hello everyone,
> 
> Here is the continuation of patch sets sent recently about Qualcomm
> QPNP SPMI PMICs.
> 
> The previous version of the patch set can be found at [1].
> 
> Changes since v1:
>  - removed completely custom *of* parser
>  - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
>  - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI
> 
> Removing of the custom *of* parser leads to that that the *reg* devicetree
> property cannot exist and therefore cannot be parsed to get PMIC peripheral
> resources. I took this step aside because no one from mfd drivers does this
> parsing. This will lead to inconvenience in the peripheral drivers to define
> internally the SPMI base addresses depending on the compatible property
> i.e. PMIC version. 
> 
> Comments are welcome!
> 
> [1] https://lkml.org/lkml/2014/7/8/428
> 
> --------------------------------------------------------------------------------
> 
> Josh Cartwright (1):
>   mfd: add support for Qualcomm SPMI PMICs
> 
> Stanimir Varbanov (2):
>   mfd: document DT bindings for Qualcomm SPMI PMICs
>   ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
> 
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
>  arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
>  drivers/mfd/Kconfig                                |   15 +++++
>  drivers/mfd/Makefile                               |    1 +
>  drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
>  5 files changed, 184 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

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

* [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
@ 2014-08-05  7:20   ` Pramod Gurav
  0 siblings, 0 replies; 22+ messages in thread
From: Pramod Gurav @ 2014-08-05  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stanimir.
On Friday 01 August 2014 08:00 PM, Stanimir Varbanov wrote:
> Hello all,
> 
> Changes since v3:
>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>  - spmi regmap config now initialize .fast_io to true
>  - added generalized comptatible string in DT binding document and driver
>  - I dropped the pm8921 rename patch for now, it will be subject of another
>    patchset later on.
> 
> regards,
> Stan
> 
> --------------------------------------------------------------------------------
> 
> Changes since v2:
>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>  - 3/4 - the subject has been changed.
> 
> The previous v2 can be found at [1].
> 
> I'm still waiting Acks for:
>  - 4/4 from Qualcomm folks.

If I am not missing something obvious, this patch needs to be resent as
it does not apply on top of patches in this series. I tried applying and
it fails in Kconfig.

>  - 2/4 and 3/4 from DT folks.
> 
> The patchset is ready to merge version and also it can be treated as an
> intermediate step until we find a solution for non-translatable peripheral
> addresses.
> 
> [1] https://lkml.org/lkml/2014/7/17/877
> 
> --------------------------------------------------------------------------------
> 
> Hello everyone,
> 
> Here is the continuation of patch sets sent recently about Qualcomm
> QPNP SPMI PMICs.
> 
> The previous version of the patch set can be found at [1].
> 
> Changes since v1:
>  - removed completely custom *of* parser
>  - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
>  - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI
> 
> Removing of the custom *of* parser leads to that that the *reg* devicetree
> property cannot exist and therefore cannot be parsed to get PMIC peripheral
> resources. I took this step aside because no one from mfd drivers does this
> parsing. This will lead to inconvenience in the peripheral drivers to define
> internally the SPMI base addresses depending on the compatible property
> i.e. PMIC version. 
> 
> Comments are welcome!
> 
> [1] https://lkml.org/lkml/2014/7/8/428
> 
> --------------------------------------------------------------------------------
> 
> Josh Cartwright (1):
>   mfd: add support for Qualcomm SPMI PMICs
> 
> Stanimir Varbanov (2):
>   mfd: document DT bindings for Qualcomm SPMI PMICs
>   ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
> 
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
>  arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
>  drivers/mfd/Kconfig                                |   15 +++++
>  drivers/mfd/Makefile                               |    1 +
>  drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
>  5 files changed, 184 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

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

* Re: [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
  2014-08-05  7:20   ` Pramod Gurav
@ 2014-08-05 12:00     ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-05 12:00 UTC (permalink / raw)
  To: Pramod Gurav
  Cc: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Lee Jones, Samuel Ortiz, linux-arm-msm,
	linux-kernel, linux-arm-kernel, devicetree, Courtney Cavin,
	Bjorn Andersson, Josh Cartwright, Stephen Boyd, David Collins

Hi Pramod,

On 08/05/2014 10:20 AM, Pramod Gurav wrote:
> Hi Stanimir.
> On Friday 01 August 2014 08:00 PM, Stanimir Varbanov wrote:
>> Hello all,
>>
>> Changes since v3:
>>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>>  - spmi regmap config now initialize .fast_io to true
>>  - added generalized comptatible string in DT binding document and driver
>>  - I dropped the pm8921 rename patch for now, it will be subject of another
>>    patchset later on.
>>
>> regards,
>> Stan
>>
>> --------------------------------------------------------------------------------
>>
>> Changes since v2:
>>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>>  - 3/4 - the subject has been changed.
>>
>> The previous v2 can be found at [1].
>>
>> I'm still waiting Acks for:
>>  - 4/4 from Qualcomm folks.
> 
> If I am not missing something obvious, this patch needs to be resent as
> it does not apply on top of patches in this series. I tried applying and
> it fails in Kconfig.

I dropped 4/4 from v4. See above what has been changed since v3.

-- 
regards,
Stan

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

* [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
@ 2014-08-05 12:00     ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-08-05 12:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Pramod,

On 08/05/2014 10:20 AM, Pramod Gurav wrote:
> Hi Stanimir.
> On Friday 01 August 2014 08:00 PM, Stanimir Varbanov wrote:
>> Hello all,
>>
>> Changes since v3:
>>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>>  - spmi regmap config now initialize .fast_io to true
>>  - added generalized comptatible string in DT binding document and driver
>>  - I dropped the pm8921 rename patch for now, it will be subject of another
>>    patchset later on.
>>
>> regards,
>> Stan
>>
>> --------------------------------------------------------------------------------
>>
>> Changes since v2:
>>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>>  - 3/4 - the subject has been changed.
>>
>> The previous v2 can be found at [1].
>>
>> I'm still waiting Acks for:
>>  - 4/4 from Qualcomm folks.
> 
> If I am not missing something obvious, this patch needs to be resent as
> it does not apply on top of patches in this series. I tried applying and
> it fails in Kconfig.

I dropped 4/4 from v4. See above what has been changed since v3.

-- 
regards,
Stan

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

* Re: [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
  2014-08-01 14:30 ` Stanimir Varbanov
@ 2014-09-23 12:33   ` Stanimir Varbanov
  -1 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-09-23 12:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: Stanimir Varbanov, Ian Campbell, Pawel Moll, Rob Herring,
	Kumar Gala, Mark Rutland, Grant Likely, Samuel Ortiz,
	linux-arm-msm, linux-kernel, linux-arm-kernel, devicetree,
	Courtney Cavin, Bjorn Andersson, Josh Cartwright, Stephen Boyd,
	David Collins

Hi Lee,

There are no comments on this set for more then month,
could you queue up 1/3 and 2/3 for 3.18 merge window?

On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> Hello all,
> 
> Changes since v3:
>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>  - spmi regmap config now initialize .fast_io to true
>  - added generalized comptatible string in DT binding document and driver
>  - I dropped the pm8921 rename patch for now, it will be subject of another
>    patchset later on.
> 
> regards,
> Stan
> 
> --------------------------------------------------------------------------------
> 
> Changes since v2:
>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>  - 3/4 - the subject has been changed.
> 
> The previous v2 can be found at [1].
> 
> I'm still waiting Acks for:
>  - 4/4 from Qualcomm folks.
>  - 2/4 and 3/4 from DT folks.
> 
> The patchset is ready to merge version and also it can be treated as an
> intermediate step until we find a solution for non-translatable peripheral
> addresses.
> 
> [1] https://lkml.org/lkml/2014/7/17/877
> 
> --------------------------------------------------------------------------------
> 
> Hello everyone,
> 
> Here is the continuation of patch sets sent recently about Qualcomm
> QPNP SPMI PMICs.
> 
> The previous version of the patch set can be found at [1].
> 
> Changes since v1:
>  - removed completely custom *of* parser
>  - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
>  - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI
> 
> Removing of the custom *of* parser leads to that that the *reg* devicetree
> property cannot exist and therefore cannot be parsed to get PMIC peripheral
> resources. I took this step aside because no one from mfd drivers does this
> parsing. This will lead to inconvenience in the peripheral drivers to define
> internally the SPMI base addresses depending on the compatible property
> i.e. PMIC version. 
> 
> Comments are welcome!
> 
> [1] https://lkml.org/lkml/2014/7/8/428
> 
> --------------------------------------------------------------------------------
> 
> Josh Cartwright (1):
>   mfd: add support for Qualcomm SPMI PMICs
> 
> Stanimir Varbanov (2):
>   mfd: document DT bindings for Qualcomm SPMI PMICs
>   ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
> 
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
>  arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
>  drivers/mfd/Kconfig                                |   15 +++++
>  drivers/mfd/Makefile                               |    1 +
>  drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
>  5 files changed, 184 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
regards,
Stan

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

* [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's
@ 2014-09-23 12:33   ` Stanimir Varbanov
  0 siblings, 0 replies; 22+ messages in thread
From: Stanimir Varbanov @ 2014-09-23 12:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lee,

There are no comments on this set for more then month,
could you queue up 1/3 and 2/3 for 3.18 merge window?

On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> Hello all,
> 
> Changes since v3:
>  - rename the driver to qcom-spmi-pmic - suggested by David Collins
>  - spmi regmap config now initialize .fast_io to true
>  - added generalized comptatible string in DT binding document and driver
>  - I dropped the pm8921 rename patch for now, it will be subject of another
>    patchset later on.
> 
> regards,
> Stan
> 
> --------------------------------------------------------------------------------
> 
> Changes since v2:
>  - 1/4 - added new line, signed-off-by / acked-by and module_authors.
>  - 3/4 - the subject has been changed.
> 
> The previous v2 can be found at [1].
> 
> I'm still waiting Acks for:
>  - 4/4 from Qualcomm folks.
>  - 2/4 and 3/4 from DT folks.
> 
> The patchset is ready to merge version and also it can be treated as an
> intermediate step until we find a solution for non-translatable peripheral
> addresses.
> 
> [1] https://lkml.org/lkml/2014/7/17/877
> 
> --------------------------------------------------------------------------------
> 
> Hello everyone,
> 
> Here is the continuation of patch sets sent recently about Qualcomm
> QPNP SPMI PMICs.
> 
> The previous version of the patch set can be found at [1].
> 
> Changes since v1:
>  - removed completely custom *of* parser
>  - renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
>  - now MFD_PM8XXX_SPMI Kconfig option depends on SPMI
> 
> Removing of the custom *of* parser leads to that that the *reg* devicetree
> property cannot exist and therefore cannot be parsed to get PMIC peripheral
> resources. I took this step aside because no one from mfd drivers does this
> parsing. This will lead to inconvenience in the peripheral drivers to define
> internally the SPMI base addresses depending on the compatible property
> i.e. PMIC version. 
> 
> Comments are welcome!
> 
> [1] https://lkml.org/lkml/2014/7/8/428
> 
> --------------------------------------------------------------------------------
> 
> Josh Cartwright (1):
>   mfd: add support for Qualcomm SPMI PMICs
> 
> Stanimir Varbanov (2):
>   mfd: document DT bindings for Qualcomm SPMI PMICs
>   ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes
> 
>  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 +++++++++++++++++++
>  arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 +++++++++++
>  drivers/mfd/Kconfig                                |   15 +++++
>  drivers/mfd/Makefile                               |    1 +
>  drivers/mfd/qcom-spmi-pmic.c                       |   67 ++++++++++++++++++++
>  5 files changed, 184 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
regards,
Stan

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

* Re: [PATCH v4 1/3] mfd: add support for Qualcomm SPMI PMICs
  2014-08-01 14:30   ` Stanimir Varbanov
@ 2014-09-24  9:12     ` Lee Jones
  -1 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2014-09-24  9:12 UTC (permalink / raw)
  To: Stanimir Varbanov
  Cc: Ian Campbell, Pawel Moll, Rob Herring, Kumar Gala, Mark Rutland,
	Grant Likely, Samuel Ortiz, linux-arm-msm, linux-kernel,
	linux-arm-kernel, devicetree, Courtney Cavin, Bjorn Andersson,
	Josh Cartwright, Stephen Boyd, David Collins

On Fri, 01 Aug 2014, Stanimir Varbanov wrote:
> From: Josh Cartwright <joshc@codeaurora.org>
> 
> The Qualcomm SPMI PMIC chips are components used with the
> Snapdragon 800 series SoC family.  This driver exists
> largely as a glue mfd component, it exists to be an owner
> of an SPMI regmap for children devices described in
> device tree.
> 
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/Kconfig          |   15 +++++++++
>  drivers/mfd/Makefile         |    1 +
>  drivers/mfd/qcom-spmi-pmic.c |   67 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 83 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 6cc4b6a..abfe12a 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -524,6 +524,21 @@ config MFD_PM8921_CORE
>  	  Say M here if you want to include support for PM8921 chip as a module.
>  	  This will build a module called "pm8921-core".
>  
> +config MFD_SPMI_PMIC
> +	tristate "Qualcomm SPMI PMICs"
> +	depends on ARCH_QCOM || COMPILE_TEST
> +	depends on OF
> +	depends on SPMI
> +	select REGMAP_SPMI
> +	help
> +	  This enables support for the Qualcomm SPMI PMICs.
> +	  These PMICs are currently used with the Snapdragon 800 series of
> +	  SoCs.  Note, that this will only be useful paired with descriptions
> +	  of the independent functions as children nodes in the device tree.
> +
> +	  Say M here if you want to include support for the SPMI PMIC
> +	  series as a module.  The module will be called "qcom-spmi-pmic".
> +
>  config MFD_RDC321X
>  	tristate "RDC R-321x southbridge"
>  	select MFD_CORE
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 8afedba..0e7f32e 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -153,6 +153,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
>  obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
>  obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
>  obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
> +obj-$(CONFIG_MFD_SPMI_PMIC)	+= qcom-spmi-pmic.o
>  obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
>  obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
>  obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> new file mode 100644
> index 0000000..4b8beb2
> --- /dev/null
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -0,0 +1,67 @@
> +/*
> + * Copyright (c) 2014, The Linux Foundation. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/spmi.h>
> +#include <linux/regmap.h>
> +#include <linux/of_platform.h>
> +
> +static const struct regmap_config spmi_regmap_config = {
> +	.reg_bits	= 16,
> +	.val_bits	= 8,
> +	.max_register	= 0xffff,
> +	.fast_io	= true,
> +};
> +
> +static int pmic_spmi_probe(struct spmi_device *sdev)
> +{
> +	struct device_node *root = sdev->dev.of_node;
> +	struct regmap *regmap;
> +
> +	regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config);
> +	if (IS_ERR(regmap))
> +		return PTR_ERR(regmap);
> +
> +	return of_platform_populate(root, NULL, NULL, &sdev->dev);
> +}
> +
> +static void pmic_spmi_remove(struct spmi_device *sdev)
> +{
> +	of_platform_depopulate(&sdev->dev);
> +}
> +
> +static const struct of_device_id pmic_spmi_id_table[] = {
> +	{ .compatible = "qcom,spmi-pmic" },
> +	{ .compatible = "qcom,pm8941" },
> +	{ .compatible = "qcom,pm8841" },
> +	{ .compatible = "qcom,pma8084" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);
> +
> +static struct spmi_driver pmic_spmi_driver = {
> +	.probe = pmic_spmi_probe,
> +	.remove = pmic_spmi_remove,
> +	.driver = {
> +		.name = "pmic-spmi",
> +		.of_match_table = pmic_spmi_id_table,
> +	},
> +};
> +module_spmi_driver(pmic_spmi_driver);
> +
> +MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver");
> +MODULE_ALIAS("spmi:spmi-pmic");
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Josh Cartwright <joshc@codeaurora.org>");
> +MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH v4 1/3] mfd: add support for Qualcomm SPMI PMICs
@ 2014-09-24  9:12     ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2014-09-24  9:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 01 Aug 2014, Stanimir Varbanov wrote:
> From: Josh Cartwright <joshc@codeaurora.org>
> 
> The Qualcomm SPMI PMIC chips are components used with the
> Snapdragon 800 series SoC family.  This driver exists
> largely as a glue mfd component, it exists to be an owner
> of an SPMI regmap for children devices described in
> device tree.
> 
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> Acked-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/Kconfig          |   15 +++++++++
>  drivers/mfd/Makefile         |    1 +
>  drivers/mfd/qcom-spmi-pmic.c |   67 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 83 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/mfd/qcom-spmi-pmic.c

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 6cc4b6a..abfe12a 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -524,6 +524,21 @@ config MFD_PM8921_CORE
>  	  Say M here if you want to include support for PM8921 chip as a module.
>  	  This will build a module called "pm8921-core".
>  
> +config MFD_SPMI_PMIC
> +	tristate "Qualcomm SPMI PMICs"
> +	depends on ARCH_QCOM || COMPILE_TEST
> +	depends on OF
> +	depends on SPMI
> +	select REGMAP_SPMI
> +	help
> +	  This enables support for the Qualcomm SPMI PMICs.
> +	  These PMICs are currently used with the Snapdragon 800 series of
> +	  SoCs.  Note, that this will only be useful paired with descriptions
> +	  of the independent functions as children nodes in the device tree.
> +
> +	  Say M here if you want to include support for the SPMI PMIC
> +	  series as a module.  The module will be called "qcom-spmi-pmic".
> +
>  config MFD_RDC321X
>  	tristate "RDC R-321x southbridge"
>  	select MFD_CORE
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 8afedba..0e7f32e 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -153,6 +153,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
>  obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
>  obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
>  obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
> +obj-$(CONFIG_MFD_SPMI_PMIC)	+= qcom-spmi-pmic.o
>  obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
>  obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
>  obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> new file mode 100644
> index 0000000..4b8beb2
> --- /dev/null
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -0,0 +1,67 @@
> +/*
> + * Copyright (c) 2014, The Linux Foundation. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/spmi.h>
> +#include <linux/regmap.h>
> +#include <linux/of_platform.h>
> +
> +static const struct regmap_config spmi_regmap_config = {
> +	.reg_bits	= 16,
> +	.val_bits	= 8,
> +	.max_register	= 0xffff,
> +	.fast_io	= true,
> +};
> +
> +static int pmic_spmi_probe(struct spmi_device *sdev)
> +{
> +	struct device_node *root = sdev->dev.of_node;
> +	struct regmap *regmap;
> +
> +	regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config);
> +	if (IS_ERR(regmap))
> +		return PTR_ERR(regmap);
> +
> +	return of_platform_populate(root, NULL, NULL, &sdev->dev);
> +}
> +
> +static void pmic_spmi_remove(struct spmi_device *sdev)
> +{
> +	of_platform_depopulate(&sdev->dev);
> +}
> +
> +static const struct of_device_id pmic_spmi_id_table[] = {
> +	{ .compatible = "qcom,spmi-pmic" },
> +	{ .compatible = "qcom,pm8941" },
> +	{ .compatible = "qcom,pm8841" },
> +	{ .compatible = "qcom,pma8084" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, pmic_spmi_id_table);
> +
> +static struct spmi_driver pmic_spmi_driver = {
> +	.probe = pmic_spmi_probe,
> +	.remove = pmic_spmi_remove,
> +	.driver = {
> +		.name = "pmic-spmi",
> +		.of_match_table = pmic_spmi_id_table,
> +	},
> +};
> +module_spmi_driver(pmic_spmi_driver);
> +
> +MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver");
> +MODULE_ALIAS("spmi:spmi-pmic");
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Josh Cartwright <joshc@codeaurora.org>");
> +MODULE_AUTHOR("Stanimir Varbanov <svarbanov@mm-sol.com>");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
  2014-08-04 13:51       ` Stanimir Varbanov
@ 2014-09-24  9:14         ` Lee Jones
  -1 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2014-09-24  9:14 UTC (permalink / raw)
  To: Stanimir Varbanov
  Cc: Kumar Gala, Stephen Boyd, David Collins, Ian Campbell,
	Pawel Moll, Rob Herring, Mark Rutland, Grant Likely,
	Samuel Ortiz, linux-arm-msm, linux-kernel, linux-arm-kernel,
	devicetree, Courtney Cavin, Bjorn Andersson, Josh Cartwright

On Mon, 04 Aug 2014, Stanimir Varbanov wrote:
> Kumar, Stephen, David can I have your Acked/Reviewed-by tag for 2/3 and
> if possible for 3/3. The last patch can wait because currently we don't
> have child peripherals. Thanks.

No one seems to have an opinion, negative or otherwise.

Applied, thanks.

> On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> > Document DT bindings used to describe the Qualcomm SPMI PMICs.
> > 
> > Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> > ---
> >  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
> >  1 files changed, 64 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > new file mode 100644
> > index 0000000..7182b88
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > @@ -0,0 +1,64 @@
> > +          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"
> > +                     or generalized "qcom,spmi-pmic".
> > +- reg:             Specifies the SPMI USID slave address for this device.
> > +                   For more information see:
> > +                   Documentation/devicetree/bindings/spmi/spmi.txt
> > +
> > +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";
> > +			};
> > +		};
> > +	};
> > 
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH v4 2/3] mfd: document DT bindings for Qualcomm SPMI PMICs
@ 2014-09-24  9:14         ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2014-09-24  9:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 04 Aug 2014, Stanimir Varbanov wrote:
> Kumar, Stephen, David can I have your Acked/Reviewed-by tag for 2/3 and
> if possible for 3/3. The last patch can wait because currently we don't
> have child peripherals. Thanks.

No one seems to have an opinion, negative or otherwise.

Applied, thanks.

> On 08/01/2014 05:30 PM, Stanimir Varbanov wrote:
> > Document DT bindings used to describe the Qualcomm SPMI PMICs.
> > 
> > Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> > ---
> >  .../devicetree/bindings/mfd/qcom,spmi-pmic.txt     |   64 ++++++++++++++++++++
> >  1 files changed, 64 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > new file mode 100644
> > index 0000000..7182b88
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt
> > @@ -0,0 +1,64 @@
> > +          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"
> > +                     or generalized "qcom,spmi-pmic".
> > +- reg:             Specifies the SPMI USID slave address for this device.
> > +                   For more information see:
> > +                   Documentation/devicetree/bindings/spmi/spmi.txt
> > +
> > +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 at 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 at 1 {
> > +			compatible = "qcom,pm8941", "qcom,spmi-pmic";
> > +			reg = <0x1 SPMI_USID>;
> > +
> > +			regulator {
> > +				compatible = "qcom,regulator";
> > +				regulator-name = "8941_boost";
> > +			};
> > +		};
> > +	};
> > 
> 
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2014-09-24  9:14 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 14:30 [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's Stanimir Varbanov
2014-08-01 14:30 ` Stanimir Varbanov
2014-08-01 14:30 ` [PATCH v4 1/3] mfd: add support for Qualcomm SPMI PMICs Stanimir Varbanov
2014-08-01 14:30   ` Stanimir Varbanov
2014-09-24  9:12   ` Lee Jones
2014-09-24  9:12     ` Lee Jones
     [not found] ` <1406903450-27283-1-git-send-email-svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-08-01 14:30   ` [PATCH v4 2/3] mfd: document DT bindings " Stanimir Varbanov
2014-08-01 14:30     ` Stanimir Varbanov
2014-08-01 14:30     ` Stanimir Varbanov
2014-08-04 13:51     ` Stanimir Varbanov
2014-08-04 13:51       ` Stanimir Varbanov
2014-09-24  9:14       ` Lee Jones
2014-09-24  9:14         ` Lee Jones
2014-08-01 14:30   ` [PATCH v4 3/3] ARM: dts: qcom: add pm8941 and pm8841 PMICs device nodes Stanimir Varbanov
2014-08-01 14:30     ` Stanimir Varbanov
2014-08-01 14:30     ` Stanimir Varbanov
2014-08-05  7:20 ` [PATCH v4 0/3] Support for Qualcomm QPNP PMIC's Pramod Gurav
2014-08-05  7:20   ` Pramod Gurav
2014-08-05 12:00   ` Stanimir Varbanov
2014-08-05 12:00     ` Stanimir Varbanov
2014-09-23 12:33 ` Stanimir Varbanov
2014-09-23 12:33   ` Stanimir Varbanov

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.