ARM: dts: qcom: Add binding for the qcom coincell charger
PATCH v3 1/3 ARM: dts: qcom: Add binding for the qcom coincell charger
This binding is used to configure the driver for the coincell charger found in Qualcomm PMICs.
---
Changes in v3:
- change charge-enable property to charger-disable
Changes in v2:
- remove 'qcom,' from example node name
- Added reference to parent node pm8941@0 and binding doc for it
.../bindings/power/qcom,coincell-charger.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/qcom,coincell-charger.txt
Documentation/devicetree/bindings/power/qcom,coincell-charger.txt new file +48 -0
@@ -0,0 +1,48 @@ +Qualcomm Coincell Charger: + +The hardware block controls charging for a coincell or capacitor that is +used to provide power backup for certain features of the power management +IC (PMIC) + +- compatible: + Usage: required + Value type: <string> + Definition: must be: "qcom,pm8941-coincell" + +- reg: + Usage: required + Value type: <u32> + Definition: base address of the coincell charger registers + +- qcom,rset-ohms: + Usage: required + Value type: <u32> + Definition: resistance (in ohms) for current-limiting resistor + must be one of: 800, 1200, 1700, 2100 + +- qcom,vset-millivolts: + Usage: required + Value type: <u32> + Definition: voltage (in millivolts) to apply for charging + must be one of: 2500, 3000, 3100, 3200 + +- qcom,charger-disable: + Usage: optional + Value type: <boolean> + Definition: definining this property disables charging + +This charger is a sub-node of one of the 8941 PMIC blocks, and is specified +as a child node in DTS of that node. See ../mfd/qcom,spmi-pmic.txt and +../mfd/qcom-pm8xxx.txt + +Example: + + pm8941@0 { + coincell@2800 { + compatible = "qcom,pm8941-coincell"; + reg = <0x2800>; + + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + }; + };
Signature · 6 lines
1.8.2.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 2/3 ARM: qcom: Add coincell charger driver
This driver is used to configure the coincell charger found in Qualcomm PMICs.
The driver allows configuring the current-limiting resistor for the charger, as well as the voltage to apply to the coincell (or capacitor) when charging.
---
Changes in v3:
- change 'depends on' in Kconfig
- remove 'select REGMAP' in Kconfig
- put spaces in map lists
- use 'bool' type for enable variable
- remove some printks
- add missing braces in error handling in qcom_coincell_chgr_config
- eliminate of_node NULL check in probe routine
- rename driver to qcom-spmi-coincell
- put struct qcom_coincell on stack, instead of allocating it
- return the result of a function directly (in a few places)
- reorder operations to avoid partial register update
drivers/misc/Kconfig | 10 +++ drivers/misc/Makefile | 1 + drivers/misc/qcom-coincell.c | 152 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 drivers/misc/qcom-coincell.c
drivers/misc/Kconfig +10 -0
@@ -271,6 +271,16 @@ config HP_ILO To compile this driver as a module, choose M here: the module will be called hpilo. +config QCOM_COINCELL + tristate "Qualcomm coincell charger support" + depends on MFD_SPMI_PMIC || COMPILE_TEST + help + This driver supports the coincell block found inside of + Qualcomm PMICs. The coincell charger provides a means to + charge a coincell battery or backup capacitor which is used + to maintain PMIC register and RTC state in the absence of + external power. + config SGI_GRU tristate "SGI GRU driver" depends on X86_UV && SMP
drivers/misc/Makefile +1 -0
@@ -18,6 +18,7 @@ obj-$(CONFIG_LKDTM) += lkdtm.o obj-$(CONFIG_TIFM_CORE) += tifm_core.o obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o obj-$(CONFIG_PHANTOM) += phantom.o +obj-$(CONFIG_QCOM_COINCELL) += qcom-coincell.o obj-$(CONFIG_SENSORS_BH1780) += bh1780gli.o obj-$(CONFIG_SENSORS_BH1770) += bh1770glc.o obj-$(CONFIG_SENSORS_APDS990X) += apds990x.o
drivers/misc/qcom-coincell.c new file +152 -0
152 lines not on this page · raw message
Signature · 1 line
1.8.2.2
Re: [PATCH v3 2/3] ARM: qcom: Add coincell charger driver
Quoted 9 lines · Tim Bird
This driver is used to configure the coincell charger found in Qualcomm PMICs.
The driver allows configuring the current-limiting resistor for the charger, as well as the voltage to apply to the coincell (or capacitor) when charging.
Signed-off-by Tim Bird <[email protected]>---
Looks fine.
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v3 3/3 ARM: dts: qcom: Add dts changes for qcom coincell charger
In reply to Tim BirdAdd framework for the coincell charger DT block in pm8941 file, and actual values for honami battery in the honami dts file.
---
Changes in v3:
- change charge-enable property to charger-disable
Changes in v2:
- change coincell node name to remove 'qcom,' prefix
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 10 ++++++++++ arch/arm/boot/dts/qcom-pm8941.dtsi | 6 ++++++ 2 files changed, 16 insertions(+)
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts +10 -0
@@ -17,3 +17,13 @@ status = "ok"; }; }; + +&spmi_bus { + pm8941@0 { + coincell@2800 { + status = "ok"; + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + }; + }; +};
arch/arm/boot/dts/qcom-pm8941.dtsi +6 -0
@@ -125,6 +125,12 @@ interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; qcom,external-resistor-micro-ohms = <10000>; }; + + coincell@2800 { + compatible = "qcom,pm8941-coincell"; + reg = <0x2800>; + status = "disabled"; + }; }; usid1: pm8941@1 {
Signature · 1 line
1.8.2.2
Re: [PATCH v3 3/3] ARM: dts: qcom: Add dts changes for qcom coincell charger
Quoted 5 lines · Tim Bird
Add framework for the coincell charger DT block in pm8941 file, and actual values for honami battery in the honami dts file.
Signed-off-by Tim Bird <[email protected]>---
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 4 lines · Tim Bird
This binding is used to configure the driver for the coincell charger found in Qualcomm PMICs.
Signed-off-by Tim Bird <[email protected]>
Quoted 69 lines
---
Changes in v3:
- change charge-enable property to charger-disable
Changes in v2:
- remove 'qcom,' from example node name
- Added reference to parent node pm8941@0 and binding doc for it.../bindings/power/qcom,coincell-charger.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/qcom,coincell-charger.txtDocumentation/devicetree/bindings/power/qcom,coincell-charger.txt new file +48
-1@@ -0,0 +1,48 @@ +Qualcomm Coincell Charger: + +The hardware block controls charging for a coincell or capacitor that is +used to provide power backup for certain features of the power management +IC (PMIC) + +- compatible: + Usage: required + Value type: <string> + Definition: must be: "qcom,pm8941-coincell" + +- reg: + Usage: required + Value type: <u32> + Definition: base address of the coincell charger registers + +- qcom,rset-ohms: + Usage: required + Value type: <u32> + Definition: resistance (in ohms) for current-limiting resistor + must be one of: 800, 1200, 1700, 2100 + +- qcom,vset-millivolts: + Usage: required + Value type: <u32> + Definition: voltage (in millivolts) to apply for charging + must be one of: 2500, 3000, 3100, 3200 + +- qcom,charger-disable: + Usage: optional + Value type: <boolean> + Definition: definining this property disables charging + +This charger is a sub-node of one of the 8941 PMIC blocks, and is specified +as a child node in DTS of that node. See ../mfd/qcom,spmi-pmic.txt and +../mfd/qcom-pm8xxx.txt + +Example: + + pm8941@0 { + coincell@2800 { + compatible = "qcom,pm8941-coincell"; + reg = <0x2800>; + + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + }; + }; --1.8.2.2
Greg,
At this point I've got Reviewed-by from Rob on the binding and dts bits, and Reviewed-by from Andy Gross on the complete patch series (v3).
I believe I've addressed all issues raised. Can you please add this (v3) to drivers/misc?
Let me know if you want me to re-send anything.
Thanks very much.
-- Tim
Quoted 69 lines · Rob Herring
Quoted 4 lines · Tim Bird
This binding is used to configure the driver for the coincell charger found in Qualcomm PMICs.
Signed-off-by Tim Bird <tim.bird-/[email protected]>Reviewed-by Rob Herring <[email protected]>Quoted 61 lines
---
Changes in v3:
- change charge-enable property to charger-disable
Changes in v2:
- remove 'qcom,' from example node name
- Added reference to parent node pm8941@0 and binding doc for it.../bindings/power/qcom,coincell-charger.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/qcom,coincell-charger.txtDocumentation/devicetree/bindings/power/qcom,coincell-charger.txt new file +43
-0@@ -0,0 +1,48 @@ +Qualcomm Coincell Charger: + +The hardware block controls charging for a coincell or capacitor that is +used to provide power backup for certain features of the power management +IC (PMIC) + +- compatible: + Usage: required + Value type: <string> + Definition: must be: "qcom,pm8941-coincell" + +- reg: + Usage: required + Value type: <u32> + Definition: base address of the coincell charger registers + +- qcom,rset-ohms: + Usage: required + Value type: <u32> + Definition: resistance (in ohms) for current-limiting resistor + must be one of: 800, 1200, 1700, 2100 + +- qcom,vset-millivolts: + Usage: required + Value type: <u32> + Definition: voltage (in millivolts) to apply for charging + must be one of: 2500, 3000, 3100, 3200 + +- qcom,charger-disable: + Usage: optional + Value type: <boolean> + Definition: definining this property disables charging + +This charger is a sub-node of one of the 8941 PMIC blocks, and is specified +as a child node in DTS of that node. See ../mfd/qcom,spmi-pmic.txt and +../mfd/qcom-pm8xxx.txt + +Example: + + pm8941@0 { + coincell@2800 { + compatible = "qcom,pm8941-coincell"; + reg = <0x2800>;
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/power/qcom,coincell-charger.txt new file +5
-1+ + qcom,rset-ohms = <2100>; + qcom,vset-millivolts = <3000>; + }; + }; --1.8.2.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg Kroah-Hartman
maintainerQuoted 9 lines · Tim Bird
Greg,
At this point I've got Reviewed-by from Rob on the binding and dts bits, and Reviewed-by from Andy Gross on the complete patch series (v3).
I believe I've addressed all issues raised. Can you please add this (v3) to
drivers/misc?Let me know if you want me to re-send anything.
Nope, I can take it from here, thanks.
greg k-h
Quoted 5 lines · Tim Bird
This binding is used to configure the driver for the coincell charger found in Qualcomm PMICs.
Signed-off-by Tim Bird <[email protected]>---
Looks reasonable.
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project