Skip to contentSkip to conversation

Add support for the Qualcomm PM8018 PMIC

PATCH Superseded Neil Armstrong 4 participants 13 messages Jun 24, 2016 – Jun 28, 2016

Subsystems (7)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for the Qualcomm PM8018 PMIC

In order to support the Qualcomm MDM9615 in the Sierra Wireless WP8548 Modules, add the PM8018 PMIC support into MFD, Regulator, RTC and input.

This patchset is part of a global SoC + Module + Board support for the Sierra Wireless mangOH Board support with the WP8548 module.

Patch "mfd: qcom-rpm: Add support for pm8018 RPM Regulator" depends on :
- "fix offset error for msm8660" at http://lkml.kernel.org/r/1465897725-16213-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
- "parametrize also ack selector size" at http://lkml.kernel.org/r/1466576837-21995-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org

Changes since v1 at http://lkml.kernel.org/r/1466158929-19524-1-git-send-email-narmstrong-rdvid1DuHRBWk0Htik3J/[email protected] :
- Rebase mfd/qcom_rpm.c on top of Linus "fix offset error for msm8660" and "parametrize also ack selector size" patches
- Rename QCOM_RPM_NCP in to QCOM_RPM_PM8018_NCP
- Rebased qcom-rpm.h PM8018 defines numbers without a gap
- Dropped regulator corner

Neil Armstrong (5):
mfd: pm8921: Add support for pm8018
input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey
rtc: rtc-pm8xxx: Add support for pm8018 rtc
mfd: qcom-rpm: Add support for pm8018 RPM Regulator
regulator: qcom_rpm-regulator: Add support for pm8018 rpm regulator

 .../bindings/input/qcom,pm8xxx-pwrkey.txt          |   1 +
 .../devicetree/bindings/mfd/qcom-pm8xxx.txt        |   1 +
 Documentation/devicetree/bindings/mfd/qcom-rpm.txt |  15 ++++
 drivers/input/misc/pmic8xxx-pwrkey.c               |   1 +
 drivers/mfd/pm8921-core.c                          |   1 +
 drivers/mfd/qcom_rpm.c                             |  51 +++++++++++
 drivers/regulator/qcom_rpm-regulator.c             | 100 +++++++++++++++++++++
 drivers/rtc/rtc-pm8xxx.c                           |  11 +++
 include/dt-bindings/mfd/qcom-rpm.h                 |  22 +++++
 9 files changed, 203 insertions(+)
Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#1 lore raw

PATCH v2 1/5 mfd: pm8921: Add support for pm8018

In order to support the Qualcomm MDM9615 PMIC, add support for the pm8018 in pm8921 mfd driver.

---
 drivers/mfd/pm8921-core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/pm8921-core.c +1 -0
index 1b7ec08..0e3a2ea 100644
@@ -309,6 +309,7 @@ static const struct regmap_config ssbi_regmap_config = {
 };
 
 static const struct of_device_id pm8921_id_table[] = {
+	{ .compatible = "qcom,pm8018", },
 	{ .compatible = "qcom,pm8058", },
 	{ .compatible = "qcom,pm8921", },
 	{ }
Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#3 lore raw

PATCH v2 2/5 input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey

In reply to Neil Armstrong

In order to support pwrkey for Qualcomm MDM9615 SoC, add support for the pm8018 pwrkey in pmic8xxx-pwrkey.

---
 Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt | 1 +
 drivers/input/misc/pmic8xxx-pwrkey.c                           | 1 +
 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt +1 -0
index 588536c..9e530e2 100644
@@ -8,6 +8,7 @@ PROPERTIES
 	Definition: must be one of:
 		    "qcom,pm8058-pwrkey"
 		    "qcom,pm8921-pwrkey"
+		    "qcom,pm8018-pwrkey"
 
 - reg:
 	Usage: required
drivers/input/misc/pmic8xxx-pwrkey.c +1 -0
index 67aab86..f6f9b87 100644
@@ -446,6 +446,7 @@ static int pmic8xxx_pwrkey_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id pm8xxx_pwr_key_id_table[] = {
+	{ .compatible = "qcom,pm8018-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8058-pwrkey", .data = &pm8058_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8921-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ }
Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#8 lore raw

PATCH v2 3/5 rtc: rtc-pm8xxx: Add support for pm8018 rtc

In reply to Neil Armstrong

In order to support RTC on Qualcomm MDM9615 SoC, add support for the pm8018 rtc in rtc-pm8xxx driver.

---
 Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt |  1 +
 drivers/rtc/rtc-pm8xxx.c                              | 11 +++++++++++
 2 files changed, 12 insertions(+)
Documentation/devicetree/bindings/mfd/qcom-pm8xxx.txt +1 -0
index f24f334..37a088f 100644
@@ -62,6 +62,7 @@ The below bindings specify the set of valid subnodes.
 		    "qcom,pm8058-rtc"
 		    "qcom,pm8921-rtc"
 		    "qcom,pm8941-rtc"
+		    "qcom,pm8018-rtc"
 
 - reg:
 	Usage: required
drivers/rtc/rtc-pm8xxx.c +11 -0
index 795fcbd..976f5f6 100644
@@ -393,6 +393,16 @@ static int pm8xxx_rtc_enable(struct pm8xxx_rtc *rtc_dd)
 	return 0;
 }
 
+static const struct pm8xxx_rtc_regs pm8018_regs = {
+	.ctrl		= 0x11d,
+	.write		= 0x11f,
+	.read		= 0x123,
+	.alarm_rw	= 0x127,
+	.alarm_ctrl	= 0x11d,
+	.alarm_ctrl2	= 0x11e,
+	.alarm_en	= BIT(1),
+};
+
 static const struct pm8xxx_rtc_regs pm8921_regs = {
 	.ctrl		= 0x11d,
 	.write		= 0x11f,
@@ -428,6 +438,7 @@ static const struct pm8xxx_rtc_regs pm8941_regs = {
  */
 static const struct of_device_id pm8xxx_id_table[] = {
 	{ .compatible = "qcom,pm8921-rtc", .data = &pm8921_regs },
+	{ .compatible = "qcom,pm8018-rtc", .data = &pm8018_regs },
 	{ .compatible = "qcom,pm8058-rtc", .data = &pm8058_regs },
 	{ .compatible = "qcom,pm8941-rtc", .data = &pm8941_regs },
 	{ },
Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#9 lore raw

PATCH v2 4/5 mfd: qcom-rpm: Add support for pm8018 RPM Regulator

In reply to Neil Armstrong

In order to support the Qualcomm MDM9615 SoC, add support for the RPM regulator entries in the qcom-rpm driver.

---
 Documentation/devicetree/bindings/mfd/qcom-rpm.txt |  1 +
 drivers/mfd/qcom_rpm.c                             | 51 ++++++++++++++++++++++
 include/dt-bindings/mfd/qcom-rpm.h                 | 22 ++++++++++
 3 files changed, 74 insertions(+)
Documentation/devicetree/bindings/mfd/qcom-rpm.txt +1 -0
index b98b291..72d68d4 100644
@@ -13,6 +13,7 @@ frequencies.
 		    "qcom,rpm-msm8660"
 		    "qcom,rpm-msm8960"
 		    "qcom,rpm-ipq8064"
+		    "qcom,rpm-mdm9615"
 
 - reg:
 	Usage: required
drivers/mfd/qcom_rpm.c +51 -0

62 lines not on this page · raw message

include/dt-bindings/mfd/qcom-rpm.h +22 -0
index 13a9d4b..54aef5e 100644
@@ -147,6 +147,28 @@
 #define QCOM_RPM_SMB208_S1b			137
 #define QCOM_RPM_SMB208_S2a			138
 #define QCOM_RPM_SMB208_S2b			139
+#define QCOM_RPM_PM8018_SMPS1			140
+#define QCOM_RPM_PM8018_SMPS2			141
+#define QCOM_RPM_PM8018_SMPS3			142
+#define QCOM_RPM_PM8018_SMPS4			143
+#define QCOM_RPM_PM8018_SMPS5			144
+#define QCOM_RPM_PM8018_LDO1			145
+#define QCOM_RPM_PM8018_LDO2			146
+#define QCOM_RPM_PM8018_LDO3			147
+#define QCOM_RPM_PM8018_LDO4			148
+#define QCOM_RPM_PM8018_LDO5			149
+#define QCOM_RPM_PM8018_LDO6			150
+#define QCOM_RPM_PM8018_LDO7			151
+#define QCOM_RPM_PM8018_LDO8			152
+#define QCOM_RPM_PM8018_LDO9			153
+#define QCOM_RPM_PM8018_LDO10			154
+#define QCOM_RPM_PM8018_LDO11			155
+#define QCOM_RPM_PM8018_LDO12			156
+#define QCOM_RPM_PM8018_LDO13			157
+#define QCOM_RPM_PM8018_LDO14			158
+#define QCOM_RPM_PM8018_LVS1			159
+#define QCOM_RPM_PM8018_NCP			160
+#define QCOM_RPM_VOLTAGE_CORNER			161
 
 /*
  * Constants used to select force mode for regulators.
Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#11 lore raw

PATCH v2 5/5 regulator: qcom_rpm-regulator: Add support for pm8018 rpm regulator

In reply to Neil Armstrong

In order to support eh Qualcomm MDM9615 SoC, add support for the PM8018 RPM regulator in the qcom_rpm-regulator driver.

---
 Documentation/devicetree/bindings/mfd/qcom-rpm.txt |  14 +++
 drivers/regulator/qcom_rpm-regulator.c             | 100 +++++++++++++++++++++
 2 files changed, 114 insertions(+)
Documentation/devicetree/bindings/mfd/qcom-rpm.txt +14 -0
index 72d68d4..485bc59 100644
@@ -60,6 +60,7 @@ Regulator nodes are identified by their compatible:
 		    "qcom,rpm-pm8058-regulators"
 		    "qcom,rpm-pm8901-regulators"
 		    "qcom,rpm-pm8921-regulators"
+		    "qcom,rpm-pm8018-regulators"
 
 - vdd_l0_l1_lvs-supply:
 - vdd_l2_l11_l12-supply:
@@ -138,6 +139,15 @@ Regulator nodes are identified by their compatible:
 	Definition: reference to regulator supplying the input pin, as
 		    described in the data sheet
 
+- vin_lvs1-supply:
+- vdd_l7-supply:
+- vdd_l8-supply:
+- vdd_l9_l10_l11_l12-supply:
+	Usage: optional (pm8018 only)
+	Value type: <phandle>
+	Definition: reference to regulator supplying the input pin, as
+		    described in the data sheet
+
 The regulator node houses sub-nodes for each regulator within the device. Each
 sub-node is identified using the node's name, with valid values listed for each
 of the pmics below.
@@ -157,6 +167,10 @@ pm8921:
 	l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch,
 	ncp
 
+pm8018:
+	s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
+	l12, l14, lvs1
+
 The content of each sub-node is defined by the standard binding for regulators -
 see regulator.txt - with additional custom properties described below:
 
drivers/regulator/qcom_rpm-regulator.c +100 -0

124 lines not on this page · raw message

Signature · 11 lines
1.9.1

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
maintainer Acked-by on v2 5/5
#12 lore raw

Re: [PATCH v2 5/5] regulator: qcom_rpm-regulator: Add support for pm8018 rpm regulator

Quoted 2 lines · Neil Armstrong

In order to support eh Qualcomm MDM9615 SoC, add support for the PM8018 RPM regulator in the qcom_rpm-regulator driver.

Signature · 8 lines
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
maintainer NAK
#4 lore raw

Re: [PATCH v2 2/5] input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey

In reply to Neil Armstrong
Quoted 5 lines · Neil Armstrong

In order to support pwrkey for Qualcomm MDM9615 SoC, add support for the pm8018 pwrkey in pmic8xxx-pwrkey.

NAK.

Quoted 32 lines
---
 Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt | 1 +
 drivers/input/misc/pmic8xxx-pwrkey.c                           | 1 +
 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt +1 -0
index 588536c..9e530e2 100644
@@ -8,6 +8,7 @@ PROPERTIES
 	Definition: must be one of:
 		    "qcom,pm8058-pwrkey"
 		    "qcom,pm8921-pwrkey"
+		    "qcom,pm8018-pwrkey"
 
 - reg:
 	Usage: required
drivers/input/misc/pmic8xxx-pwrkey.c +1 -0
index 67aab86..f6f9b87 100644
@@ -446,6 +446,7 @@ static int pmic8xxx_pwrkey_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id pm8xxx_pwr_key_id_table[] = {
+	{ .compatible = "qcom,pm8018-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8058-pwrkey", .data = &pm8058_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8921-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ }
Signature · 1 line
1.9.1
Signature · 1 line
Dmitry
#5 lore raw

Re: [PATCH v2 2/5] input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey

Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Neil Armstrong

In order to support pwrkey for Qualcomm MDM9615 SoC, add support for the pm8018 pwrkey in pmic8xxx-pwrkey.

NAK.

Hi Dmitry,

Actually, the new compatible string make sense, because the driver is compatible with the "pm8018" pwrkey but from a system point of view, it's not a pm8921 pwrkey, hence the new compatible string.

Rob Herring was very clear with me with this policy, and it will simplify further driver architecture change since it will not imply devicetree changes anymore.

My point of view is that the devicetree describes the hardware and need to have SoC specific compatible string since it describes the actual silicon, and drivers must make sure to handle all the SoC or family variants using the compatible string and the match data.

Neil

Quoted 34 lines
Quoted 33 lines
---
 Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt | 1 +
 drivers/input/misc/pmic8xxx-pwrkey.c                           | 1 +
 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt +1 -0
index 588536c..9e530e2 100644
@@ -8,6 +8,7 @@ PROPERTIES
 	Definition: must be one of:
 		    "qcom,pm8058-pwrkey"
 		    "qcom,pm8921-pwrkey"
+		    "qcom,pm8018-pwrkey"
 
 - reg:
 	Usage: required
drivers/input/misc/pmic8xxx-pwrkey.c +1 -0
index 67aab86..f6f9b87 100644
@@ -446,6 +446,7 @@ static int pmic8xxx_pwrkey_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id pm8xxx_pwr_key_id_table[] = {
+	{ .compatible = "qcom,pm8018-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8058-pwrkey", .data = &pm8058_pwrkey_shutdown },
 	{ .compatible = "qcom,pm8921-pwrkey", .data = &pm8921_pwrkey_shutdown },
 	{ }
Signature · 1 line
1.9.1
Signature · 8 lines
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
maintainer
#6 lore raw

Re: [PATCH v2 2/5] input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey

Quoted 8 lines · Neil Armstrong
Quoted 7 lines · Dmitry Torokhov
Quoted 5 lines · Neil Armstrong

In order to support pwrkey for Qualcomm MDM9615 SoC, add support for the pm8018 pwrkey in pmic8xxx-pwrkey.

Quoted 7 lines
Quoted 1 line

NAK.

Hi Dmitry,

Actually, the new compatible string make sense, because the driver is compatible with the "pm8018" pwrkey but from a system point of view, it's not a pm8921 pwrkey, hence the new compatible string.

A lot of systems note this fact in DTS, but not require driver changes, by specifying several compatible strings:

	compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
	compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
	compatible = "rockchip,rk3036-timer", "rockchip,rk3288-timer";
Quoted 2 lines

Rob Herring was very clear with me with this policy, and it will simplify further driver

Could I get a pointer to this discussion so I can educate myself better about DT policies?

Quoted 1 line

architecture change since it will not imply devicetree changes anymore.

Would we need the driver changes? What are the differences in power key functionality between 8018 and 8921?

Quoted 4 lines

My point of view is that the devicetree describes the hardware and need to have SoC specific compatible string since it describes the actual silicon, and drivers must make sure to handle all the SoC or family variants using the compatible string and the match data.

No, the compatible string means that the hardware is *compatible* with something. It does not mean that we need to adjust driver every time a company pumps out a new package including said hardware.

Thanks.

Signature · 11 lines
Dmitry

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
#7 lore raw

Re: [PATCH v2 2/5] input: pmic8xxx-pwrkey: Add support for pm8018 pwrkey

Quoted 17 lines · Dmitry Torokhov
Quoted 8 lines · Neil Armstrong
Quoted 7 lines · Dmitry Torokhov
Quoted 5 lines · Neil Armstrong

In order to support pwrkey for Qualcomm MDM9615 SoC, add support for the pm8018 pwrkey in pmic8xxx-pwrkey.

Quoted 7 lines
Quoted 1 line

NAK.

Hi Dmitry,

Actually, the new compatible string make sense, because the driver is compatible with the "pm8018" pwrkey but from a system point of view, it's not a pm8921 pwrkey, hence the new compatible string.

Quoted 6 lines

A lot of systems note this fact in DTS, but not require driver changes, by specifying several compatible strings:

	compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci";
	compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
	compatible = "rockchip,rk3036-timer", "rockchip,rk3288-timer";

Sure, your point is valid.
But here, the situation is quite different, the question is about confidence.

Quoted 1 line

From the system point of view, I'm 100% sure there is a pm8010-pwrkey variant here, but

I`m not convinced at all how it is similar from the 8921 version.

Quoted 1 line

From the software point of view, I'm 80% sure the *actual* driver in it current form

somehow works for the pm8018-pwrkey, not more.
If somehow the driver is updated to support a 8921 feature that is not supported by the 8018 version, it will rely on the compatible string to make this a smart move. Since I do not have the pm8018 datasheet and the 8921 either, I cannot statue on this, So the smartest move from my side is to actually have a different compatible string to avoid future blocking situations.

Quoted 5 lines
Quoted 2 lines

Rob Herring was very clear with me with this policy, and it will simplify further driver

Could I get a pointer to this discussion so I can educate myself better about DT policies?

I had quite a lot of comments on the OXNAS support push (started here https://lkml.org/lkml/2016/3/3/495) were the policy was to narrow the new compatible strings to a SoC specific naming.
For the qcom driver, the strings the already compliant and why not continue with the pm8018 ?

Quoted 4 lines
Quoted 1 line

architecture change since it will not imply devicetree changes anymore.

Would we need the driver changes? What are the differences in power key functionality between 8018 and 8921?

You raise the biggest question, I do not know, so why should we say the pm8018-pwrkey /is/ compatible with pm8921-pwronly only by looking existing driver ?

Quoted 8 lines
Quoted 4 lines

My point of view is that the devicetree describes the hardware and need to have SoC specific compatible string since it describes the actual silicon, and drivers must make sure to handle all the SoC or family variants using the compatible string and the match data.

No, the compatible string means that the hardware is *compatible* with something. It does not mean that we need to adjust driver every time a company pumps out a new package including said hardware.

It was something that I questionned myself about, but it seems the maintainers agrees quite easily to accept these compatible adding patches like the USB Ids or PCI ids patches.

Regards,
Neil

Quoted 2 lines

Thanks.

Signature · 8 lines
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
Acked-by on v2 4/5
#10 lore raw

Re: [PATCH v2 4/5] mfd: qcom-rpm: Add support for pm8018 RPM Regulator

In reply to Neil Armstrong
Quoted 8 lines · Neil Armstrong

In order to support the Qualcomm MDM9615 SoC, add support for the RPM regulator entries in the qcom-rpm driver.
=20

---
 Documentation/devicetree/bindings/mfd/qcom-rpm.txt |  1 +

drivers/mfd/qcom_rpm.c | 51 ++++++++++++++++=

++++++

Quoted 2 lines
 include/dt-bindings/mfd/qcom-rpm.h                 | 22 ++++++++++
 3 files changed, 74 insertions(+)

For my own reference:

=20

Documen=

Quoted 1 line
Documen= renamed from Documentation/devicetree/bindings/mfd/qcom-rpm.txt +0 -0

tation/devicetree/bindings/mfd/qcom-rpm.txt

drivers/mfd/qcom_rpm.c static const struct qcom_rpm_data ipq806x_template =

Quoted 16 lines

index b98b291..72d68d4 100644

Documentation/devicetree/bindings/mfd/qcom-rpm.txt +1 -0
@@ -13,6 +13,7 @@ frequencies.
 		    "qcom,rpm-msm8660"
 		    "qcom,rpm-msm8960"
 		    "qcom,rpm-ipq8064"
+		    "qcom,rpm-mdm9615"

=20
- reg:

Documentation/devicetree/bindings/mfd/qcom-rpm.txt +0 -0
 	Usage: required
drivers/mfd/qcom_rpm.c +0 -0
index 880d469..c309ebe 100644
@@ -390,11 +390,62 @@ static const struct qcom_rpm_data ipq806x_template =

=3D {

include/dt-bindings/mfd=

Quoted 63 lines
drivers/mfd/qcom_rpm.c +0 -0
 	.ack_sel_size =3D 7,
 };

=20

drivers/mfd/qcom_rpm.c +51 -0
+static const struct qcom_rpm_resource mdm9615_rpm_resource_table[] =3D {
+	[QCOM_RPM_CXO_CLK] =3D			{ 25, 9, 5, 1 },
+	[QCOM_RPM_SYS_FABRIC_CLK] =3D		{ 26, 10, 9, 1 },
+	[QCOM_RPM_DAYTONA_FABRIC_CLK] =3D		{ 27, 11, 11, 1 },
+	[QCOM_RPM_SFPB_CLK] =3D			{ 28, 12, 12, 1 },
+	[QCOM_RPM_CFPB_CLK] =3D			{ 29, 13, 13, 1 },
+	[QCOM_RPM_EBI1_CLK] =3D			{ 30, 14, 16, 1 },
+	[QCOM_RPM_APPS_FABRIC_HALT] =3D		{ 31, 15, 22, 2 },
+	[QCOM_RPM_APPS_FABRIC_MODE] =3D		{ 33, 16, 23, 3 },
+	[QCOM_RPM_APPS_FABRIC_IOCTL] =3D		{ 36, 17, 24, 1 },
+	[QCOM_RPM_APPS_FABRIC_ARB] =3D		{ 37, 18, 25, 27 },
+	[QCOM_RPM_PM8018_SMPS1] =3D		{ 64, 19, 30, 2 },
+	[QCOM_RPM_PM8018_SMPS2] =3D		{ 66, 21, 31, 2 },
+	[QCOM_RPM_PM8018_SMPS3] =3D		{ 68, 23, 32, 2 },
+	[QCOM_RPM_PM8018_SMPS4] =3D		{ 70, 25, 33, 2 },
+	[QCOM_RPM_PM8018_SMPS5] =3D		{ 72, 27, 34, 2 },
+	[QCOM_RPM_PM8018_LDO1] =3D		{ 74, 29, 35, 2 },
+	[QCOM_RPM_PM8018_LDO2] =3D		{ 76, 31, 36, 2 },
+	[QCOM_RPM_PM8018_LDO3] =3D		{ 78, 33, 37, 2 },
+	[QCOM_RPM_PM8018_LDO4] =3D		{ 80, 35, 38, 2 },
+	[QCOM_RPM_PM8018_LDO5] =3D		{ 82, 37, 39, 2 },
+	[QCOM_RPM_PM8018_LDO6] =3D		{ 84, 39, 40, 2 },
+	[QCOM_RPM_PM8018_LDO7] =3D		{ 86, 41, 41, 2 },
+	[QCOM_RPM_PM8018_LDO8] =3D		{ 88, 43, 42, 2 },
+	[QCOM_RPM_PM8018_LDO9] =3D		{ 90, 45, 43, 2 },
+	[QCOM_RPM_PM8018_LDO10] =3D		{ 92, 47, 44, 2 },
+	[QCOM_RPM_PM8018_LDO11] =3D		{ 94, 49, 45, 2 },
+	[QCOM_RPM_PM8018_LDO12] =3D		{ 96, 51, 46, 2 },
+	[QCOM_RPM_PM8018_LDO13] =3D		{ 98, 53, 47, 2 },
+	[QCOM_RPM_PM8018_LDO14] =3D		{ 100, 55, 48, 2 },
+	[QCOM_RPM_PM8018_LVS1] =3D		{ 102, 57, 49, 1 },
+	[QCOM_RPM_PM8018_NCP] =3D			{ 103, 58, 80, 2 },
+	[QCOM_RPM_CXO_BUFFERS] =3D		{ 105, 60, 81, 1 },
+	[QCOM_RPM_USB_OTG_SWITCH] =3D		{ 106, 61, 82, 1 },
+	[QCOM_RPM_HDMI_SWITCH] =3D		{ 107, 62, 83, 1 },
+	[QCOM_RPM_VOLTAGE_CORNER] =3D		{ 109, 64, 87, 1 },
+};
+
+static const struct qcom_rpm_data mdm9615_template =3D {
+	.version =3D 3,
+	.resource_table =3D mdm9615_rpm_resource_table,
+	.n_resources =3D ARRAY_SIZE(mdm9615_rpm_resource_table),
+	.req_ctx_off =3D 3,
+	.req_sel_off =3D 11,
+	.ack_ctx_off =3D 15,
+	.ack_sel_off =3D 23,
+	.req_sel_size =3D 4,
+	.ack_sel_size =3D 7,
+};
+
 static const struct of_device_id qcom_rpm_of_match[] =3D {
 	{ .compatible =3D "qcom,rpm-apq8064", .data =3D &apq8064_template },
 	{ .compatible =3D "qcom,rpm-msm8660", .data =3D &msm8660_template },
 	{ .compatible =3D "qcom,rpm-msm8960", .data =3D &msm8960_template },
 	{ .compatible =3D "qcom,rpm-ipq8064", .data =3D &ipq806x_template },
+	{ .compatible =3D "qcom,rpm-mdm9615", .data =3D &mdm9615_template },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_rpm_of_match);
include/dt-bindings/mfd= renamed from include/dt-bindings/mfd/qcom-rpm.h +0 -0

/qcom-rpm.h

Quoted 29 lines

index 13a9d4b..54aef5e 100644

include/dt-bindings/mfd/qcom-rpm.h +22 -0
@@ -147,6 +147,28 @@
 #define QCOM_RPM_SMB208_S1b			137
 #define QCOM_RPM_SMB208_S2a			138
 #define QCOM_RPM_SMB208_S2b			139
+#define QCOM_RPM_PM8018_SMPS1			140
+#define QCOM_RPM_PM8018_SMPS2			141
+#define QCOM_RPM_PM8018_SMPS3			142
+#define QCOM_RPM_PM8018_SMPS4			143
+#define QCOM_RPM_PM8018_SMPS5			144
+#define QCOM_RPM_PM8018_LDO1			145
+#define QCOM_RPM_PM8018_LDO2			146
+#define QCOM_RPM_PM8018_LDO3			147
+#define QCOM_RPM_PM8018_LDO4			148
+#define QCOM_RPM_PM8018_LDO5			149
+#define QCOM_RPM_PM8018_LDO6			150
+#define QCOM_RPM_PM8018_LDO7			151
+#define QCOM_RPM_PM8018_LDO8			152
+#define QCOM_RPM_PM8018_LDO9			153
+#define QCOM_RPM_PM8018_LDO10			154
+#define QCOM_RPM_PM8018_LDO11			155
+#define QCOM_RPM_PM8018_LDO12			156
+#define QCOM_RPM_PM8018_LDO13			157
+#define QCOM_RPM_PM8018_LDO14			158
+#define QCOM_RPM_PM8018_LVS1			159
+#define QCOM_RPM_PM8018_NCP			160
+#define QCOM_RPM_VOLTAGE_CORNER			161
Quoted 3 lines

=20
/*
* Constants used to select force mode for regulators.

--=20
Lee Jones
Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog

--=20
You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "= rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected].
For more options, visit https://groups.google.com/d/optout.

Acked-by on v2 1/5
#2 lore raw

Re: [PATCH v2 1/5] mfd: pm8921: Add support for pm8018

In reply to Neil Armstrong
Quoted 8 lines · Neil Armstrong

In order to support the Qualcomm MDM9615 PMIC, add support for the pm8018 in pm8921 mfd driver.
=20

---
 drivers/mfd/pm8921-core.c | 1 +
 1 file changed, 1 insertion(+)

For my own reference:

drivers/mfd/pm8921-core.c static const struct regmap_config ssbi_regmap_config =

Quoted 5 lines
drivers/mfd/pm8921-core.c +0 -0
index 1b7ec08..0e3a2ea 100644
@@ -309,6 +309,7 @@ static const struct regmap_config ssbi_regmap_config =

=3D {

drivers/mfd/pm8921-core.c

Quoted 7 lines
drivers/mfd/pm8921-core.c +0 -0
 };

=20
static const struct of_device_id pm8921_id_table[] =3D {

drivers/mfd/pm8921-core.c +1 -0
+	{ .compatible =3D "qcom,pm8018", },
 	{ .compatible =3D "qcom,pm8058", },
 	{ .compatible =3D "qcom,pm8921", },
 	{ }

--=20
Lee Jones
Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog

--=20
You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "= rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected].
For more options, visit https://groups.google.com/d/optout.