Skip to contentSkip to conversation

add support for pf1550 PMIC MFD-based drivers

PATCH Applied Samuel Kayode 2 participants 10 messages Oct 1, 2025 – Oct 21, 2025

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

v12 cover add support for pf1550 PMIC MFD-based drivers

This series adds support for pf1550 PMIC. It provides the core driver and sub-drivers for the regulator, power supply and input subsystems.

Patch 1 adds the DT binding document for the PMIC. Patches 2-5 adds the pertinent drivers. Last patch adds a MAINTAINERS entry for the drivers.

The patches 3-5 depend on the core driver provided in patch 2.

Changes since v1:
- DT bindings for all devices included
- Add onkey driver
- Add driver for the regulators
- Ensure charger is activated as some variants have it off by default
- Update mfd and charger driver per feedback from [email protected]
- Add myself as maintainer for these drivers
- Link to v1: https://lore.kernel.org/[email protected]/

Changes since v2:
- Rebase on recent mainline kernel v6.15
- Single yaml file containing dt bindings for all pf1550 devices
- irq mapping done in MFD driver as suggested by Dmitry Torokhov
- Drop unnecessary includes in drivers
- Replace dev_err with dev_err_probe in probe method of drivers
- Drop compatible string from drivers of the sub-devices
- Remove dependency on OF from drivers of the sub-devices
- onkey: move driver from input/keyboard into input/misc
- onkey: remove dependency on OF
- onkey: use onkey virqs instead of central irq
- onkey: fix integer overflow for regmap_write when unmasking
interrupts during pf1550_onkey_resume
- charger: add support for monitored-battery which is used in setting
a constant voltage for the charger.
- Address other feedback from Dmitry Torokhov and Krzysztof Kozlowski
- Link to v2: https://lore.kernel.org/[email protected]/

Changes since v3:
- Update manufacturer from Freescale to NXP in compatible,
dt-binding and Kconfigs
- Use C++ style comments for SPDX license in .c code
- Add portions copyright to source code
- irqs are defined as struct resource in mfd cell such that
platform_get_irq is used in the sub-devices
- Make struct pf1550_dev of type const in sub-device driver
- irq variable dropped from sub-device driver struct
- EXPORT_SYMBOL of global pf1550_read_otp function for use in
regulator driver
- Drop unneeded info in driver_data when defining device table id
- regulator: validate ramp_delay
- regulator: report overcurrent and over temperature events
- onkey: drop unnecessary keycode variable
- onkey: change wakeup variable to type bool
- onkey: replace (error < 0) with error in if statement when possible
- onkey: use pm_sleep_ptr when defining driver.pm
- charger: finish handling of some interrupts in threaded irq handler
- Link to v3: https://lore.kernel.org/[email protected]/

Changes since v4:
- Use top level interrupt to minimize number of registers checked on
each interrupt
- Fix bad offset for temperature interrupts of regulator irq chip
- Address Krzysztof's comments for dt-binding
- regulator: add comments to clarify difference in its interrupts
- regulator: issue warn event for _LS interrupt and error event for
_HS interrupt
- regulator: validate maximum and minimum ramp_delay
- charger: drop lock in battery and charger delayed_work
- charger: more conservative locking for vbus delayed_work
- charger: apply lock when setting power_supply type during register intialization
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes since v5:
- Ensure lowercase when assigning hex values
- Add [email protected] to relevant mailing list in MAINTAINERS file
- Use GENMASK macro
- Drop unused chips variable
- Read the OTP in the mfd driver probe for new dvs_enb variable
- Hardcode IRQ flags in pf1550_add_child function
- charger: drop the mutex entirely
- charger: reverse christmas tree style local variable definition in
probe
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes since v6:
- Use reverse christmas tree order
- Drop 0 in table id's driver data
- charger: store virq to avoid reinvoking platform_get_irq in ISR
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes since v7:
- Thanks everyone for the reviews
- Use C++ comment only for SPDX license header in core, charger and
onkey drivers
- Drop filenames from comments
- Rename pf1550_dev to pf1550_ddata
- Define OTP register for accessing status of DVS
- core: rename from mfd driver to core driver
- core: add child devices in a cleaner manner
- charger: define two power supplies: battery and external power
- charger: use devm_delayed_work_autocancel
- Link to v7: https://lore.kernel.org/r/[email protected]

Changes since v8:
- Collect Frank's Reviewed-by tags
- core: use consistent whitespace
- regulator: add standby support for regulators requested by Sean Nyekjaer
- regulator: add support for SW1 DVS enable/disable
- regulator: fix improper DVS activation
- regulator: add map_voltage for regulators
- regulator: add enable/disable for regulators
- charger: use datasheet thermal regulation temperature ranges
- charger: select charger operation mode based on the application
- onkey: add support for disabling system power down via onkey
- dt-bindings: changed temperature ranges
- dt-bindings: added disable-key-power
- Link to v8: https://lore.kernel.org/r/[email protected]

Changes since v9:
- add Sean's Tested-by tag
- core: style changes
- dt-bindings: add regulator-state-mem to examples
- onkey: use regmap_clear_bits to avoid overwriting all bits of the
PWRCTRL register
- Link to v9: https://lore.kernel.org/r/[email protected]

Changes since v10:
- add Sean's Tested-by tag on mfd patch
- charger: separate battery properties from charger properties
- Link to v10: https://lore.kernel.org/r/[email protected]

Changes since v11:
- rebase on v6.17
- charger: add Sebastian's Acked-by tag
- Link to v11: https://lore.kernel.org/r/[email protected]

---
Samuel Kayode (6):
dt-bindings: mfd: add pf1550
mfd: pf1550: add core driver
regulator: pf1550: add support for regulator
input: pf1550: add onkey support
power: supply: pf1550: add battery charger support
MAINTAINERS: add an entry for pf1550 mfd driver

 .../devicetree/bindings/mfd/nxp,pf1550.yaml        | 161 ++++++
 MAINTAINERS                                        |  11 +
 drivers/input/misc/Kconfig                         |  11 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/pf1550-onkey.c                  | 197 +++++++
 drivers/mfd/Kconfig                                |  16 +
 drivers/mfd/Makefile                               |   2 +
 drivers/mfd/pf1550.c                               | 367 ++++++++++++
 drivers/power/supply/Kconfig                       |  11 +
 drivers/power/supply/Makefile                      |   1 +
 drivers/power/supply/pf1550-charger.c              | 641 +++++++++++++++++++++
 drivers/regulator/Kconfig                          |   9 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/pf1550-regulator.c               | 429 ++++++++++++++
 include/linux/mfd/pf1550.h                         | 273 +++++++++
 15 files changed, 2131 insertions(+)

---
base-commit: 6063257da111c7639d020c5f15bfb37fb839d8b6
change-id: 20250527-pf1550-d401f0d07b80

Best regards,

Signature · 1 line
Samuel Kayode <[email protected]>
#1 lore raw

PATCH v12 1/6 dt-bindings: mfd: add pf1550

Add a DT binding document for pf1550 PMIC. This describes the core mfd device along with its children: regulators, charger and onkey.

---
v10:
- Add regulator-state-mem to examples
v9:
- Add regulator suspend bindings in example
- Add binding for disabling onkey power down
- Fix thermal regulation temperature range
v5:
- Address Krzystof's feedback:
- Drop monitored battery ref already included in power supply schema
- Move additionalProperties close to type for regulator
- Drop unneccessary |
- Change additionalProperties to unevaluatedProperties for the PMIC
v4:
- Address Krzystof's feedback:
- Filename changed to nxp,pf1550.yaml
- Replace Freescale with NXP
- Define include before battery-cell
- Drop operating-range-celsius in example since nxp,thermal-regulation-celsisus already exists
- Not sure if there is similar binding to thermal-regulation... for regulating temperature on thermal-zones? @Sebastian and @Krzysztof
v3:
- Address Krzysztof's feedback:
- Fold charger and onkey objects
- Drop compatible for sub-devices: onkey, charger and regulator.
- Drop constant voltage property already included in monitored-battery
- Fix whitespace warnings
- Fix license
v2:
- Add yamls for the PMIC and the sub-devices

---
 .../devicetree/bindings/mfd/nxp,pf1550.yaml        | 161 +++++++++++++++++++++
 1 file changed, 161 insertions(+)
Documentation/devicetree/bindings/mfd/nxp,pf1550.yaml new file +161 -0
new file mode 100644
index 0000000000000000000000000000000000000000..e50dc44252c60063463295c5ec3e3c90d1592ec2
@@ -0,0 +1,161 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/nxp,pf1550.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PF1550 Power Management IC
+
+maintainers:
+  - Samuel Kayode <[email protected]>
+
+description:
+  PF1550 PMIC provides battery charging and power supply for low power IoT and
+  wearable applications. This device consists of an i2c controlled MFD that
+  includes regulators, battery charging and an onkey/power button.
+
+$ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    const: nxp,pf1550
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  wakeup-source: true
+
+  regulators:
+    type: object
+    additionalProperties: false
+
+    patternProperties:
+      "^(ldo[1-3]|sw[1-3]|vrefddr)$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml
+        description:
+          regulator configuration for ldo1-3, buck converters(sw1-3)
+          and DDR termination reference voltage (vrefddr)
+        unevaluatedProperties: false
+
+  monitored-battery:
+    description: |
+      A phandle to a monitored battery node that contains a valid value
+      for:
+      constant-charge-voltage-max-microvolt.
+
+  nxp,thermal-regulation-celsius:
+    description:
+      Temperature threshold for thermal regulation of charger in celsius.
+    enum: [ 80, 95, 110, 125 ]
+
+  nxp,min-system-microvolt:
+    description:
+      System specific lower limit voltage.
+    enum: [ 3500000, 3700000, 4300000 ]
+
+  nxp,disable-key-power:
+    type: boolean
+    description:
+      Disable power-down using a long key-press. The onkey driver will remove
+      support for the KEY_POWER key press when triggered using a long press of
+      the onkey.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/input/linux-event-codes.h>
+
+    battery: battery-cell {
+        compatible = "simple-battery";
+        constant-charge-voltage-max-microvolt = <4400000>;
+    };
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pmic@8 {
+            compatible = "nxp,pf1550";
+            reg = <0x8>;
+
+            interrupt-parent = <&gpio1>;
+            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+            wakeup-source;
+            monitored-battery = <&battery>;
+            nxp,min-system-microvolt = <4300000>;
+            nxp,thermal-regulation-celsius = <80>;
+
+            regulators {
+                sw1_reg: sw1 {
+                    regulator-name = "sw1";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <1387500>;
+                    regulator-always-on;
+                    regulator-ramp-delay = <6250>;
+
+                    regulator-state-mem {
+                        regulator-on-in-suspend;
+                        regulator-suspend-min-microvolt = <1270000>;
+                    };
+                };
+
+                sw2_reg: sw2 {
+                    regulator-name = "sw2";
+                    regulator-min-microvolt = <600000>;
+                    regulator-max-microvolt = <1387500>;
+                    regulator-always-on;
+
+                    regulator-state-mem {
+                        regulator-on-in-suspend;
+                    };
+                };
+
+                sw3_reg: sw3 {
+                    regulator-name = "sw3";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-always-on;
+
+                    regulator-state-mem {
+                        regulator-on-in-suspend;
+                    };
+                };
+
+                vldo1_reg: ldo1 {
+                    regulator-name = "ldo1";
+                    regulator-min-microvolt = <750000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-always-on;
+
+                    regulator-state-mem {
+                        regulator-off-in-suspend;
+                    };
+                };
+
+                vldo2_reg: ldo2 {
+                    regulator-name = "ldo2";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-always-on;
+                };
+
+                vldo3_reg: ldo3 {
+                    regulator-name = "ldo3";
+                    regulator-min-microvolt = <750000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-always-on;
+                };
+            };
+        };
+    };
Signature · 1 line
2.50.1
#2 lore raw

PATCH v12 2/6 mfd: pf1550: add core driver

In reply to Samuel Kayode

Add the core driver for pf1550 PMIC. There are 3 subdevices for which the drivers will be added in subsequent patches.

---
v11:
- Add Tested-by tag from Sean
v10:
- Address Lee's feedback:
- Change dvsX_enb to dvsX_enable
- Add new line where necessary
- Can use 100 chars in a line
- Begin comments with uppercase
- Rearrange members of struct pf1550_ddata
- Add support for disabling onkey shutting down system
v9:
- Requested by Sean:
- Add support for SW1 DVS enable/disable
- Use consistent whitespace
- Adjust commenting and log messages of the read_otp function
v8:
- Address Lee's feedback:
- Drop mfd from driver description and comments
- Add module name in Kconfig
- Fix license commenting
- Drop filenames from comments
- Drop unnecessary tabbing
- Alphabetical ordering of includes
- Remove magic numbers
- Add comments for pf1550_read_otp function
- Fix log error message in pf1550_read_otp
- Drop pf1550_add_child_device function
- Start comments with upper case
- Rename pf1550_dev to pf1550_ddata
- Drop i2c member in struct pf1550_ddata/pf1550_dev
- Use more helpful log message when device id not recognized
- Fix dvs_enb: when bit is set the DVS is disabled and when bit is clear the DVS is enabled
- Verified the PM_OPS suspend and resume do act as expected
v7:
- Address Frank's feedback:
- Ensure reverse christmas tree order for local variable definitions
- Drop unnecessary driver data definition in id table
v6:
- Address Frank's feedback:
- Ensure lowercase when defining register addresses
- Use GENMASK macro for masking
- Hardcode IRQ flags in pf1550_add_child_device
- Add dvs_enb variable for SW2 regulator
- Drop chip type variable
v5:
- Use top level interrupt to manage interrupts for the sub-drivers as recommended by Mark Brown. The regmap_irq_sub_irq_map would have been used if not for the irregular charger irq address. For all children, the mask register is directly after the irq register (i.e., 0x08, 0x09) except for the charger: 0x80, 0x82. Meaning .mask_base would be applicable for all but the charger
- Fix bad offset for temperature interrupts of regulator
v4:
- Use struct resource to define irq so platform_get_irq can be used in children as suggested by Dmitry
- Let mfd_add_devices create the mappings for the interrupts
- ack_base and init_ack_masked defined for charger and regulator irq chips
- No need to define driver_data in table id
v3:
- Address Dmitry's feedback:
- Place Table IDs next to each other
- Drop of_match_ptr
- Replace dev_err with dev_err_probe in probe method
- Drop useless log in probe
- Map all irqs instead of doing it in the sub-devices as recommended by Dmitry.
v2:
- Address feedback from Enric Balletbo Serra

---
 drivers/mfd/Kconfig        |  16 ++
 drivers/mfd/Makefile       |   2 +
 drivers/mfd/pf1550.c       | 367 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/pf1550.h | 273 +++++++++++++++++++++++++++++++++
 4 files changed, 658 insertions(+)
drivers/mfd/Kconfig +16 -0
index 425c5fba6cb1e7848dcea05bd77c729a71d48e2c..e48c471f572cf4fbfe4de82eae6eeae5fa3bfbfc 100644
@@ -604,6 +604,22 @@ config MFD_MX25_TSADC
 	  i.MX25 processors. They consist of a conversion queue for general
 	  purpose ADC and a queue for Touchscreens.
 
+config MFD_PF1550
+	tristate "NXP PF1550 PMIC Support"
+	depends on I2C=y && OF
+	select MFD_CORE
+	select REGMAP_I2C
+	select REGMAP_IRQ
+	help
+	  Say yes here to add support for NXP PF1550. This is a companion Power
+	  Management IC with regulators, onkey, and charger control on chip.
+	  This driver provides common support for accessing the device;
+	  additional drivers must be enabled in order to use the functionality
+	  of the device.
+
+	  This driver can also be built as a module and if so will be called
+	  pf1550.
+
 config MFD_HI6421_PMIC
 	tristate "HiSilicon Hi6421 PMU/Codec IC"
 	depends on OF
drivers/mfd/Makefile +2 -0
index f7bdedd5a66d16bf8ccee0da1236a441e6f085b0..987e8c2ba5bf7b449ea636f62f103c933f0ac3d0 100644
@@ -121,6 +121,8 @@ obj-$(CONFIG_MFD_MC13XXX)	+= mc13xxx-core.o
 obj-$(CONFIG_MFD_MC13XXX_SPI)	+= mc13xxx-spi.o
 obj-$(CONFIG_MFD_MC13XXX_I2C)	+= mc13xxx-i2c.o
 
+obj-$(CONFIG_MFD_PF1550)	+= pf1550.o
+
 obj-$(CONFIG_MFD_CORE)		+= mfd-core.o
 
 ocelot-soc-objs			:= ocelot-core.o ocelot-spi.o
drivers/mfd/pf1550.c new file +367 -0

367 lines not on this page · raw message

include/linux/mfd/pf1550.h new file +273 -0

273 lines not on this page · raw message

Signature · 1 line
2.50.1
#3 lore raw

PATCH v12 3/6 regulator: pf1550: add support for regulator

In reply to Samuel Kayode

Add regulator support for the pf1550 PMIC.

---
v10:
- Change dvsX_enb to dvsX_enable
v9:
- Requested by Sean:
- Add support for SW1 DVS enable/disable
- Add support for standby voltages
- Add map_voltage for all configurable regulators
- Add regulator enable/disable for all regulators
- Fix for DVS activation when meant to be disabled v7:
- Use reverese christmas tree style
- Drop unecessary 0 in id table's driver data
v6:
- Use dvs_enb variable in pf1550_dev as suggested by Frank Li v5:
- Address Mark's feedback:
- Add comments to clarify difference in interrupts
- Issue warn event for _LS(low side) interrupt
- Validate maximum ramp_delay
v4:
- Address Mark's feedback:
- Use C++ comments for SPDX license
- Add portions copyright to reflect my update
- Validate ramp_delay
- Report overcurrent and temperature events
- Use platform_get_irq
v3:
- Drop duplicate include
- Drop unnecessary includes
- Accept lower case regulator names from devicetree
- Use virqs mapped in core MFD driver
v2:
- Add driver for regulator

---
 drivers/regulator/Kconfig            |   9 +
 drivers/regulator/Makefile           |   1 +
 drivers/regulator/pf1550-regulator.c | 429 +++++++++++++++++++++++++++++++++++
 3 files changed, 439 insertions(+)
drivers/regulator/Kconfig +9 -0
index eaa6df1c9f806652a21942bcb48084ba63f942d9..b7dd374134382c30b282eaf71c9045aa31179291 100644
@@ -1049,6 +1049,15 @@ config REGULATOR_PV88090
 	  Say y here to support the voltage regulators and convertors
 	  on PV88090
 
+config REGULATOR_PF1550
+	tristate "NXP PF1550 regulator"
+	depends on MFD_PF1550
+	help
+	  Say y here to select this option to enable the regulators on
+	  the PF1550 PMICs.
+	  This driver controls the PF1550 regulators via I2C bus.
+	  The regulators include three bucks and three ldos.
+
 config REGULATOR_PWM
 	tristate "PWM voltage regulator"
 	depends on PWM
drivers/regulator/Makefile +1 -0
index be98b29d6675d8be1ca984c2d137bdfc4ba2de87..1e2e58874123ecb3e2694eff357fc011d53014e8 100644
@@ -125,6 +125,7 @@ obj-$(CONFIG_REGULATOR_QCOM_USB_VBUS) += qcom_usb_vbus-regulator.o
 obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o
 obj-$(CONFIG_REGULATOR_PCA9450) += pca9450-regulator.o
 obj-$(CONFIG_REGULATOR_PF9453) += pf9453-regulator.o
+obj-$(CONFIG_REGULATOR_PF1550) += pf1550-regulator.o
 obj-$(CONFIG_REGULATOR_PF8X00) += pf8x00-regulator.o
 obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o
 obj-$(CONFIG_REGULATOR_PV88060) += pv88060-regulator.o
drivers/regulator/pf1550-regulator.c new file +429 -0

429 lines not on this page · raw message

Signature · 1 line
2.50.1
#4 lore raw

PATCH v12 4/6 input: pf1550: add onkey support

In reply to Samuel Kayode

Add support for the onkey of the pf1550 PMIC.

---
v10:
- Use regmap_clear_bits instead of regmap_write
v9:
- Requested by Sean:
- Add support for disabling power down of system by onkey
v8:
- Pick up Acked-by tag from Dmitry
- Use C++ for SPDX license header comment and C type for rest of license comment
v7:
- Use reverese christmas tree style
- Drop unecessary 0 in id table's driver data
v4:
- Address Dmitry's feedback
- Drop irq variable in onkey_drv_data
- Drop keycode variable in onkey_drv_data
- Define wakeup as type bool
- Use platform_get_irq
- Use type const for struct pf1550_dev in onkey_drv_data
- Replace (error < 0) with (error) in if statement when applicable
- No need to define driver_data in table id
- Define driver.pm with pm_sleep_ptr
v3:
- Address Dmitry's feedback
- Drop compatible string
- Remove dependency on OF
- Use generic device properties
- Drop unnecessary includes
- Drop unnecessary initializations in probe
- Always use the KEY_POWER property for onkey->keycode
- Do mapping of irqs in MFD driver
- Define onkey->input before interrupts are active
- Drop unnecessary input_free_device since devm
- Manage onkey irqs instead of the main interrupt line.
- Fix integer overflow when unmasking onkey irqs in onkey_resume. v2:
- Add driver for onkey

---
 drivers/input/misc/Kconfig        |  11 +++
 drivers/input/misc/Makefile       |   1 +
 drivers/input/misc/pf1550-onkey.c | 197 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 209 insertions(+)
drivers/input/misc/Kconfig +11 -0
index 0fb21c99a5e3d1230d7f40f99e0c2d360bbe80e8..4312a1f533e370b4bbef439bceae8f0969712249 100644
@@ -179,6 +179,17 @@ config INPUT_PCSPKR
 	  To compile this driver as a module, choose M here: the
 	  module will be called pcspkr.
 
+config INPUT_PF1550_ONKEY
+	tristate "NXP PF1550 Onkey support"
+	depends on MFD_PF1550
+	help
+	  Say Y here if you want support for PF1550 PMIC. Onkey can trigger
+	  release and 1s(push hold), 2s, 3s, 4s, 8s interrupt for long press
+	  detect.
+
+	  To compile this driver as a module, choose M here. The module will be
+	  called pf1550-onkey.
+
 config INPUT_PM8941_PWRKEY
 	tristate "Qualcomm PM8941 power key support"
 	depends on MFD_SPMI_PMIC
drivers/input/misc/Makefile +1 -0
index d468c8140b93da5bb537e8a3baea2b90e7bb4229..bbf1aa7bec4f10274af5ffcb5a5651bf7c776dc6 100644
@@ -61,6 +61,7 @@ obj-$(CONFIG_INPUT_PALMAS_PWRBUTTON)	+= palmas-pwrbutton.o
 obj-$(CONFIG_INPUT_PCAP)		+= pcap_keys.o
 obj-$(CONFIG_INPUT_PCF8574)		+= pcf8574_keypad.o
 obj-$(CONFIG_INPUT_PCSPKR)		+= pcspkr.o
+obj-$(CONFIG_INPUT_PF1550_ONKEY)	+= pf1550-onkey.o
 obj-$(CONFIG_INPUT_PM8941_PWRKEY)	+= pm8941-pwrkey.o
 obj-$(CONFIG_INPUT_PM8XXX_VIBRATOR)	+= pm8xxx-vibrator.o
 obj-$(CONFIG_INPUT_PMIC8XXX_PWRKEY)	+= pmic8xxx-pwrkey.o
drivers/input/misc/pf1550-onkey.c new file +197 -0

197 lines not on this page · raw message

Signature · 1 line
2.50.1
#5 lore raw

PATCH v12 5/6 power: supply: pf1550: add battery charger support

In reply to Samuel Kayode

Add support for the battery charger for pf1550 PMIC.

---
v11:
- Seperate the battery properties from the charger properties v9:
- Fix thermal regulation temperature ranges
- Fix default thermal regulation temperature
- Drop unused data variable in reg_init
- Select charger operation mode based on application - suggested by Sean v8:
- Drop PF1550_CHARGER_NAME
- Drop unnecessary POWER_SUPPLY_STATUS_CHARGING s
- Replace POWER_SUPPLY_HEALTH_DEAD with POWER_SUPPLY_HEALTH_NO_BATTERY
- Drop check for charger in delayed_work s
- Use dev_warn when battery is over-voltage
- Define two power supplies: charger and battery
- Use devm_delayed_work_autocancel to automate cleanup and fix race condition
v7:
- Use reverse christmas tree order
- Drop unecessary 0 in id table's driver data field
- Store virqs to avoid reinvoking platform_get_irq in the interrupt service routine
- Drop manufacturer and model global variables
v6:
- Drop lock entirely
- Reverse christmas tree order for variables defined in probe as suggested by Frank
- return pf1550_reg_init
v5:
- Drop lock for battery and charger delayed_work
- More conservative locking in vbus delayed_work
- Apply lock when setting power supply type during register initialization v4:
- Finish handling of some interrupts in threaded irq handler
- Use platform_get_irq
v3:
- Use struct power_supply_get_battery_info to get constant charge voltage if specified
- Use virqs mapped in MFD driver
v2:
- Address feedback from Enric Balletbo Serra

---
 drivers/power/supply/Kconfig          |  11 +
 drivers/power/supply/Makefile         |   1 +
 drivers/power/supply/pf1550-charger.c | 641 ++++++++++++++++++++++++++++++++++
 3 files changed, 653 insertions(+)
drivers/power/supply/Kconfig +11 -0
index 79ddb006e2dad6bf96b71ed570a37c006b5f9433..6d0c872edac1f45da314632e671af1aeda4c87b8 100644
@@ -471,6 +471,17 @@ config CHARGER_88PM860X
 	help
 	  Say Y here to enable charger for Marvell 88PM860x chip.
 
+config CHARGER_PF1550
+	tristate "NXP PF1550 battery charger driver"
+	depends on MFD_PF1550
+	help
+	  Say Y to enable support for the NXP PF1550 battery charger.
+	  The device is a single cell Li-Ion/Li-Polymer battery charger for
+	  portable application.
+
+	  This driver can also be built as a module. If so, the module will be
+	  called pf1550-charger.
+
 config BATTERY_RX51
 	tristate "Nokia RX-51 (N900) battery driver"
 	depends on TWL4030_MADC
drivers/power/supply/Makefile +1 -0
index f943c9150b326d41ff241f82610f70298635eb08..5a177f4884deb79f059cfbfa95466932630a48de 100644
@@ -64,6 +64,7 @@ obj-$(CONFIG_CHARGER_RT9467)	+= rt9467-charger.o
 obj-$(CONFIG_CHARGER_RT9471)	+= rt9471.o
 obj-$(CONFIG_BATTERY_TWL4030_MADC)	+= twl4030_madc_battery.o
 obj-$(CONFIG_CHARGER_88PM860X)	+= 88pm860x_charger.o
+obj-$(CONFIG_CHARGER_PF1550)	+= pf1550-charger.o
 obj-$(CONFIG_BATTERY_RX51)	+= rx51_battery.o
 obj-$(CONFIG_AB8500_BM)		+= ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o ab8500_chargalg.o
 obj-$(CONFIG_CHARGER_CPCAP)	+= cpcap-charger.o
drivers/power/supply/pf1550-charger.c new file +641 -0

641 lines not on this page · raw message

Signature · 1 line
2.50.1
#6 lore raw

PATCH v12 6/6 MAINTAINERS: add an entry for pf1550 mfd driver

In reply to Samuel Kayode

Add MAINTAINERS entry for pf1550 PMIC.

---
v9:
- Pick up Frank's Reviewed-by tag
v6:
- Add imx mailing list

---
 MAINTAINERS | 11 +++++++++++
 1 file changed, 11 insertions(+)
MAINTAINERS +11 -0
index 97d958c945e4ffa3031590823f7a2867f577ebf3..5cc042b7ffe31a79bbbcbfd1fec7831b3546054d 100644
@@ -18293,6 +18293,17 @@ F:	Documentation/devicetree/bindings/clock/*imx*
 F:	drivers/clk/imx/
 F:	include/dt-bindings/clock/*imx*
 
+NXP PF1550 PMIC MFD DRIVER
+M:	Samuel Kayode <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/mfd/nxp,pf1550.yaml
+F:	drivers/input/misc/pf1550-onkey.c
+F:	drivers/mfd/pf1550.c
+F:	drivers/power/supply/pf1550-charger.c
+F:	drivers/regulator/pf1550-regulator.c
+F:	include/linux/mfd/pfd1550.h
+
 NXP PF8100/PF8121A/PF8200 PMIC REGULATOR DEVICE DRIVER
 M:	Jagan Teki <[email protected]>
 S:	Maintained
Signature · 1 line
2.50.1
maintainer
#7 lore raw
In reply to Samuel Kayode
Quoted 2 lines · On Wed, 01 Oct 2025, Samuel Kayode via B4 Relay wrote:

This series adds support for pf1550 PMIC. It provides the core driver and sub-drivers for the regulator, power supply and input subsystems.

Note to self: Everything is in order. Apply to an IB once -rc1 is out.

Signature · 1 line
Lee Jones [李琼斯]
maintainer Applied
#8 lore raw
In reply to Samuel Kayode
Quoted 9 lines · Samuel Kayode

This series adds support for pf1550 PMIC. It provides the core driver and sub-drivers for the regulator, power supply and input subsystems.

Patch 1 adds the DT binding document for the PMIC. Patches 2-5 adds the pertinent drivers. Last patch adds a MAINTAINERS entry for the drivers.

The patches 3-5 depend on the core driver provided in patch 2.

[...]

Applied, thanks!

[1/6] dt-bindings: mfd: add pf1550

      commit: 2391e1377e39a7ca8592257d6b17126bffd58d48
[2/6] mfd: pf1550: add core driver
      commit: ebaec90ec0b5850ab80ca017e7b63183adcca131
[3/6] regulator: pf1550: add support for regulator
      commit: 7320d41c29bbd80144bb89112b8bf0c8223b94a1
[4/6] input: pf1550: add onkey support
      commit: 9acb215cbebdce721af2219e2859ad17342c9084
[5/6] power: supply: pf1550: add battery charger support
      commit: 4b6b6433a97d5863b5340fc87f866d784fdf0783
[6/6] MAINTAINERS: add an entry for pf1550 mfd driver
      commit: a7d6255a0bf302c028ac680564633a6aac5f611d

--
Lee Jones [李琼斯]

maintainer
#9 lore raw

[GIT PULL] Immutable branch between MFD, Input, Power and Regulator due for the v6.19 merge window

In reply to Samuel Kayode

Enjoy!

The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:

Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-input-power-regulator-v6.19

for you to fetch changes up to a7d6255a0bf302c028ac680564633a6aac5f611d:

MAINTAINERS: Add an entry for PF1550 MFD driver (2025-10-21 16:59:07 +0100)

----------------------------------------------------------------
Immutable branch between MFD, Input, Power and Regulator due for the v6.19 merge window

----------------------------------------------------------------
Samuel Kayode (6):
dt-bindings: mfd: Add binding for the PF1550 PMIC
mfd: pf1550: Add core driver for the PF1550 PMIC
regulator: pf1550: Add support for regulator
Input: pf1550 - add onkey support
power: supply: pf1550: add battery charger support
MAINTAINERS: Add an entry for PF1550 MFD driver

 .../devicetree/bindings/mfd/nxp,pf1550.yaml        | 161 ++++++
 MAINTAINERS                                        |  11 +
 drivers/input/misc/Kconfig                         |  11 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/pf1550-onkey.c                  | 197 +++++++
 drivers/mfd/Kconfig                                |  16 +
 drivers/mfd/Makefile                               |   2 +
 drivers/mfd/pf1550.c                               | 367 ++++++++++++
 drivers/power/supply/Kconfig                       |  11 +
 drivers/power/supply/Makefile                      |   1 +
 drivers/power/supply/pf1550-charger.c              | 641 +++++++++++++++++++++
 drivers/regulator/Kconfig                          |   9 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/pf1550-regulator.c               | 429 ++++++++++++++
 include/linux/mfd/pf1550.h                         | 273 +++++++++
 15 files changed, 2131 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/nxp,pf1550.yaml
 create mode 100644 drivers/input/misc/pf1550-onkey.c
 create mode 100644 drivers/mfd/pf1550.c
 create mode 100644 drivers/power/supply/pf1550-charger.c
 create mode 100644 drivers/regulator/pf1550-regulator.c
 create mode 100644 include/linux/mfd/pf1550.h
Signature · 1 line
Lee Jones [李琼斯]