linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] pmdomain: Partial refactor, support modem and RTFF
@ 2025-08-05  7:47 AngeloGioacchino Del Regno
  2025-08-05  7:47 ` [PATCH v3 01/10] dt-bindings: memory: mtk-smi: Document #access-controller-cells AngeloGioacchino Del Regno
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-08-05  7:47 UTC (permalink / raw)
  To: linux-mediatek
  Cc: robh, conor+dt, mbrugger, y.oudjana, linux-pm, ulf.hansson,
	linux-kernel, devicetree, mandyjh.liu, lihongbo22, wenst,
	matthias.bgg, krzk+dt, kernel, linux-arm-kernel,
	angelogioacchino.delregno

Changes in v3:
 - Dropped specified items for cells restriction as suggested by Rob
 - Fixed an issue in patch 4 still referencing "mediatek,bus-protection"
   as it is entirely replaced by "access-controllers"

Changes in v2:
 - Added #access-controller-cells allowance for MT8188/95 infracfg_ao

This series is a subset of [1], leaving out the Hardware Voter specific
bits for MT8196 until the discussion around it reaches a conclusion.

Even though the proposed code was born as a preparation to support the
MT8196/MT6991 SoCs power domain controllers, it is a necessary cleanup
for all power domain controllers of all of the currently supported SoCs
from MediaTek.

You may also notice the addition of support for modem power sequences:
this was brought up 6 months ago (or more) by community contributors
(mainly Yassine Oudjana) that were trying to upstream the MediaTek
MT6735 Smartphone SoC and needed support to provide power to the MD
subsystem - so, even though in this specific series the code for the
modem power sequence is not yet triggered by any SoC, please please
please, let it in.
Besides, "a bunch" of upstream supported SoCs do have the MD power
domain even though it wasn't added to their drivers (because if there
was no support in the driver, it would just crash the system); the
addition is something that I plan to do at some point, but definitely
not now as I have no bandwidth for that (bar MT8196, which will have
this domain).

Compared to v1 in [1]:
 - Changed mediatek,bus-protection to access-controllers
   as suggested by Rob (thanks!)
 - Added commits to document #access-controller-cells on all of
   the access control providers

In the meanwhile.... relevant excerpt from the old series:

This series refactors the bus protection regmaps retrieval to avoid
searching in all power domain devicetree subnodes for vendor properties
to get syscons for different busses, and adds a new property which is
located in the power controller root node containing handles to the same.

Retrocompatibility is retained and was tested on multiple SoCs in the
Collabora lab - specifically, on Genio 350/510/700/1200, and manually
on MT6795 Helio (Xperia M5 Smartphone), MT8186, MT8192 and MT8195
Chromebooks.

This was tested *three times*:
 - Before the per-SoC conversion in drivers/pmdomain/mediatek
 - With per-SoC conversion code but with *legacy* devicetree
 - With per-SoC conversion code and with *new* devicetree conversion

All of those tests were successful on all of the aforementioned SoCs.

This also adds support for:
 - Modem power domain for both old and new MediaTek SoCs, useful for
   bringing up the GSM/3G/4G/5G modem for both laptop and smartphone use
 - RTFF MCU HW, as found in MT8196 Chromebooks and MT6991 Dimensity 9400

...and prepares the pmdomain code to accomodate only the directly
controlled power domains for MT8196 (HW Voter support was left out).

[1] https://lore.kernel.org/all/20250623120154.109429-1-angelogioacchino.delregno@collabora.com

AngeloGioacchino Del Regno (10):
  dt-bindings: memory: mtk-smi: Document #access-controller-cells
  dt-bindings: clock: mediatek: Document #access-controller-cells
  dt-bindings: power: mediatek: Document access-controllers property
  pmdomain: mediatek: Refactor bus protection regmaps retrieval
  pmdomain: mediatek: Handle SoCs with inverted SRAM power-down bits
  pmdomain: mediatek: Move ctl sequences out of power_on/off functions
  pmdomain: mediatek: Add support for modem power sequences
  pmdomain: mediatek: Add support for RTFF Hardware in MT8196/MT6991
  pmdomain: mediatek: Convert all SoCs to new style regmap retrieval
  arm64: dts: mediatek: Convert all SoCs to use access-controllers

 .../bindings/clock/mediatek,infracfg.yaml     |   3 +
 .../clock/mediatek,mt8186-sys-clock.yaml      |  15 +
 .../clock/mediatek,mt8188-sys-clock.yaml      |  15 +
 .../clock/mediatek,mt8192-sys-clock.yaml      |  15 +
 .../clock/mediatek,mt8195-sys-clock.yaml      |  15 +
 .../clock/mediatek,mt8365-sys-clock.yaml      |  15 +
 .../mediatek,smi-common.yaml                  |  16 +
 .../power/mediatek,power-controller.yaml      |  37 ++
 arch/arm64/boot/dts/mediatek/mt6795.dtsi      |   5 +-
 arch/arm64/boot/dts/mediatek/mt8167.dtsi      |   6 +-
 arch/arm64/boot/dts/mediatek/mt8173.dtsi      |   4 +-
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      |  17 +-
 arch/arm64/boot/dts/mediatek/mt8186.dtsi      |  12 +-
 arch/arm64/boot/dts/mediatek/mt8188.dtsi      |  23 +-
 arch/arm64/boot/dts/mediatek/mt8192.dtsi      |  13 +-
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      |  20 +-
 arch/arm64/boot/dts/mediatek/mt8365.dtsi      |  16 +-
 drivers/pmdomain/mediatek/mt6795-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8167-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8173-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8183-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8186-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8188-pm-domains.h |   6 +
 drivers/pmdomain/mediatek/mt8192-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8195-pm-domains.h |   5 +
 drivers/pmdomain/mediatek/mt8365-pm-domains.h |  14 +-
 drivers/pmdomain/mediatek/mtk-pm-domains.c    | 399 +++++++++++++++---
 drivers/pmdomain/mediatek/mtk-pm-domains.h    |  74 +++-
 28 files changed, 594 insertions(+), 181 deletions(-)

-- 
2.50.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-08-19 15:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05  7:47 [PATCH v3 00/10] pmdomain: Partial refactor, support modem and RTFF AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 01/10] dt-bindings: memory: mtk-smi: Document #access-controller-cells AngeloGioacchino Del Regno
2025-08-05 17:53   ` Rob Herring
2025-08-05  7:47 ` [PATCH v3 02/10] dt-bindings: clock: mediatek: " AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 03/10] dt-bindings: power: mediatek: Document access-controllers property AngeloGioacchino Del Regno
2025-08-05 17:56   ` Rob Herring (Arm)
2025-08-05  7:47 ` [PATCH v3 04/10] pmdomain: mediatek: Refactor bus protection regmaps retrieval AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 05/10] pmdomain: mediatek: Handle SoCs with inverted SRAM power-down bits AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 06/10] pmdomain: mediatek: Move ctl sequences out of power_on/off functions AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 07/10] pmdomain: mediatek: Add support for modem power sequences AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 08/10] pmdomain: mediatek: Add support for RTFF Hardware in MT8196/MT6991 AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 09/10] pmdomain: mediatek: Convert all SoCs to new style regmap retrieval AngeloGioacchino Del Regno
2025-08-05  7:47 ` [PATCH v3 10/10] arm64: dts: mediatek: Convert all SoCs to use access-controllers AngeloGioacchino Del Regno
2025-08-05 14:36 ` [PATCH v3 00/10] pmdomain: Partial refactor, support modem and RTFF Rob Herring (Arm)
2025-08-19 12:27 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).