This series pays off technical debt from the beginning of the device
tree for ARM initiative in the early 2010s.

Today the Ux500 SoC specifically DB8500 is using what is called "EPOD
regulators" (EPOD = Electric POwer Domain) to control its power domains.
This was done like this because at the time, power domains did not exist
as a concept in the Linux kernel.

This patch series completes the ambitious work started in commit
cd931dcfda5e ("ARM: ux500: Initial support for PM domains") which added
a dummy domain driver for Ux500 in the following steps:

- Convert the old Ux500 power domain text DT bindings to YAML schema.

- Extend the bindings with all the 16 power domains actually existing in
  the hardware.

- Add these domains to the existing ux500 power domain driver (still as
  dummy domains).

- Add the power domains to the DB8500 SoC DTSI file.

- Move code over from the EPOD regulators to the actual power domain
  driver. Since the two drivers now control the same hardware, make the
  drivers mutually exclusive.

- Modify the MCDE display driver to use the power domain instead of the
  EPOD regulators.

- Modify the DMA40 DMA controller to use the power domain instead of the
  EPOD regulators.

- Delete the old EPOD regulators.

- Delete the references to the unused EPOD regulators from the device
  tree.

The series is ordered so binding updates and compatibility glue precede
the DTS and driver changes that depend on them.

MERGE STRATEGY:

1. Device tree bindings need review, before that the series is a
   no-go.

2. For simplicity, the series can be merged in separate paths and
   subsystems as there are no build-time dependencies, as long as the
   result ends up in kernel v7.4.

   Once the concept and patches are ACKed by the power domain folks, I
   will send the patches that can be split out individually to each
   maintainer and it can all be merged in parallel. I will send a
   pull request to the SoC tree with bindings and DTS changes.

Signed-off-by: Linus Walleij <[email protected]>
---
Changes in v2:
- Went on a detour clean-up job relating to buck regulators.
  Rebased on kernel v7.3-rc1 and the regulator re-works in this
  mail thread:
  
https://lore.kernel.org/mfd/20260901-ux500-dts-snowball-regulator-v2-0-fe88b0182...@kernel.org/
- Drop the PM domain "regulators" entirely, the external components
  now use their actual buck regulators.
- Fix the DB8500 pin controller power domain to use VAPE.
- Allow power-domain references in the l2c2x0, arm,pmu,
  stericsson,u8500-clks, arm,twd-timer, arm,twd-wdt and ste,mcde
  schemas used by the DB8500 DTS additions.
- Treat only negative pm_runtime_put_sync_suspend() returns as errors.
- Fix the MCDE probe error path to disable the main clock after reset.
- Fix Ux500 PM-domain probe error cleanup for domains and provider data.
- Drop the unused Ux500 power-state activity counter.
- Describe Ux500 subdomains in DT and use OF child ID helpers.
- Move DMA40 LCLA power-domain get out of atomic transfer paths.
- Enable runtime PM in the generic SRAM driver so SRAM power domains
  are managed by their owner before DMA40 takes LCLA references.
- Add a DMA40 device link so system PM orders the LCLA SRAM supplier.
- Add binding fixes for the DB8500 PRCMU regulator child nodes.
- Add an MCDE binding update for the new power-domain reference.
- Fix up the DB8500 DTS changes for the remaining VAPE and VSMPS2
  compatibility regulators.
- Link to v1: 
https://lore.kernel.org/r/[email protected]

---
Linus Walleij (20):
      dt-bindings: power: Convert Ux500 PM domains to schema
      dt-bindings: arm: ux500: Drop NR_DOMAINS
      dt-bindings: arm: Add the actual power domains on U8500
      dt-bindings: mfd: db8500-prcmu: Relax EPOD regulators
      dt-bindings: display: ste,mcde: Allow power domains
      pmdomain: st: ux500: Implement more power domains
      ARM: dts: ux500: Rename power domains node
      dt-bindings: cache: l2c2x0: Document power domain
      dt-bindings: arm: pmu: Allow power domains
      dt-bindings: clock: stericsson,u8500-clks: Allow power domains
      dt-bindings: timer: arm,twd-timer: Allow power domains
      dt-bindings: watchdog: arm,twd-wdt: Allow power domains
      ARM: dts: ux500: Add power domains
      pmdomain: st: ux500: Control DB8500 EPODs
      drm/mcde: Use power domain for display power
      misc: sram: Enable runtime PM
      dmaengine: ste_dma40: Use power domain for LCLA SRAM
      mfd/regulator: db8500-prcmu: Remove EPOD regulators
      dt-bindings: display: ste,mcde: Deprecate EPOD supply
      ARM: dts: ux500: Remove DB8500 EPOD regulators

 Documentation/devicetree/bindings/arm/pmu.yaml     |   3 +
 .../devicetree/bindings/arm/ux500/power_domain.txt |  35 --
 .../devicetree/bindings/cache/l2c2x0.yaml          |   2 +
 .../bindings/clock/stericsson,u8500-clks.yaml      |   3 +
 .../devicetree/bindings/display/ste,mcde.yaml      |  10 +-
 .../bindings/mfd/stericsson,db8500-prcmu.yaml      |  24 +-
 .../power/stericsson,ux500-pm-domains.yaml         |  46 ++
 .../devicetree/bindings/timer/arm,twd-timer.yaml   |   3 +
 .../devicetree/bindings/watchdog/arm,twd-wdt.yaml  |   3 +
 MAINTAINERS                                        |   1 +
 arch/arm/boot/dts/st/ste-dbx5x0.dtsi               | 144 +++---
 arch/arm/mach-ux500/Kconfig                        |   2 +-
 drivers/dma/ste_dma40.c                            | 130 ++++--
 drivers/gpu/drm/mcde/mcde_clk_div.c                |   4 +-
 drivers/gpu/drm/mcde/mcde_display.c                |  11 +-
 drivers/gpu/drm/mcde/mcde_drm.h                    |   2 -
 drivers/gpu/drm/mcde/mcde_drv.c                    |  68 +--
 drivers/gpu/drm/mcde/mcde_dsi.c                    |   1 -
 drivers/mfd/db8500-prcmu.c                         | 239 ----------
 drivers/misc/sram.c                                |   5 +
 drivers/pmdomain/st/ste-ux500-pm-domain.c          | 330 ++++++++++++--
 drivers/regulator/Kconfig                          |  11 -
 drivers/regulator/Makefile                         |   2 -
 drivers/regulator/db8500-prcmu.c                   | 501 ---------------------
 drivers/regulator/dbx500-prcmu.c                   | 155 -------
 drivers/regulator/dbx500-prcmu.h                   |  55 ---
 include/dt-bindings/arm/ux500_pm_domains.h         |  17 +-
 include/linux/regulator/db8500-prcmu.h             |  38 --
 28 files changed, 566 insertions(+), 1279 deletions(-)
---
base-commit: 67aa45aae7efe0162f198f26714f668b759468c4
change-id: 20260618-ux500-power-domains-v7-1-3c9d095828c2

Best regards,
-- 
Linus Walleij <[email protected]>

Reply via email to