[PATCH 0/6] mfd: sc27xx: Use MFD cells and devm_mfd_add_devices()

From: Otto Pflüger

Date: Sun Feb 22 2026 - 08:18:46 EST


These changes resulted from the need to decouple the the Linux device
driver hierarchy from the device tree bindings for two different series
introducing regulator [1] and poweroff [2] support for the SC2730 PMIC.

There are different PMICs in the SC27xx series, including SC2730 and
SC2731. These have a lot of similarities, but some differences too. For
instance, they contain compatible RTC blocks, but completely different
sets of regulators.

On the Linux side, each PMIC block needs its own driver. The MFD driver
currently uses devm_of_platform_populate() to load the drivers for the
components of the PMIC, which only works when each component has its own
sub-node with a "compatible" property that is used to select a driver
for the device.

When viewed from the device tree side, the parent node representing the
PMIC already contains a "compatible" property that distinguishes the
different PMICs. While the device tree bindings currently do require a
separate "compatible" property for each sub-node (ADC, fuel gauge,
regulators, ...), this is essentially redundant since the node name and
the parent compatible uniquely identify the component. Moreover, some
parts of the PMIC such as the poweroff/reboot controller do not even
need a corresponding device tree node.

Change the MFD driver to use MFD cells instead, which allows it to
instantiate sub-devices both with and without device tree nodes.
Devices that do not have a separate device tree node with its own
"compatible" property can be matched by their platform device ID.
Use this to hook up the existing SC2731 poweroff and regulator drivers,
which were previously not loaded at all due to the lack of an ID table.

In the device tree bindings, deprecate the redundant "compatible"
property for the "regulators" node. While it might make sense to do this
for the other components too, there are a few reasons to only change the
regulators at this point:
- The regulators node is special since it is not as independent as the
other components. For instance, it is the only child node of the PMIC
that does not have a "reg" property. The set of regulators also
differs much more between different PMIC models than the register
layout of the other components.
- We already have some other PMICs where only the regulators are
treated specially like this, such as MediaTek MT6359 and MT6370.
- It was suggested to remove the "compatible" property for the new
SC2730 regulator bindings I am preparing in [2]. The bindings for
the other components do not need any significant changes at the
moment.
- Unlike the poweroff and regulator components, the other parts are
already working with the existing drivers and bindings.

For the other components that still have a "compatible" property used
for matching MFD cells, ensure that an SC2730-specific compatible is
defined in the bindings so that it can be listed in the SC2730-specific
device table in the MFD driver.

Signed-off-by: Otto Pflüger <otto.pflueger@xxxxxxxxx>

[1]: https://lore.kernel.org/all/20250926-sc2730-reboot-v1-0-62ebfd3d31bb@xxxxxxxxx/
[2]: https://lore.kernel.org/all/20260220-sc2730-regulators-v1-0-3f2bbc9ecf14@xxxxxxxxx/

---
Otto Pflüger (6):
dt-bindings: rtc: sc2731: Add compatible for SC2730
dt-bindings: leds: sc2731: Add compatible for SC2730
regulator: dt-bindings: sc2731: Deprecate compatible property
mfd: sprd-sc27xx: Switch to devm_mfd_add_devices()
power: reset: sc27xx: Add platform_device_id table
regulator: sc2731: Add platform_device_id table

.../devicetree/bindings/leds/sprd,sc2731-bltc.yaml | 7 ++++-
.../devicetree/bindings/mfd/sprd,sc2731.yaml | 2 --
.../bindings/regulator/sprd,sc2731-regulator.yaml | 4 +--
.../devicetree/bindings/rtc/sprd,sc2731-rtc.yaml | 7 ++++-
drivers/mfd/sprd-sc27xx-spi.c | 33 +++++++++++++++++++++-
drivers/power/reset/sc27xx-poweroff.c | 8 ++++++
drivers/regulator/sc2731-regulator.c | 10 ++++++-
7 files changed, 62 insertions(+), 9 deletions(-)
---
base-commit: d4906ae14a5f136ceb671bb14cedbf13fa560da6
change-id: 20260221-sc27xx-mfd-cells-dab7905f3aae

Best regards,
--
Otto Pflüger <otto.pflueger@xxxxxxxxx>