linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/13] pmdomain: Partial refactor, add MT8196 support
@ 2025-06-23 12:01 AngeloGioacchino Del Regno
  2025-06-23 12:01 ` [PATCH v1 01/13] dt-bindings: power: mediatek: Document mediatek,bus-protection AngeloGioacchino Del Regno
                   ` (13 more replies)
  0 siblings, 14 replies; 20+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-06-23 12:01 UTC (permalink / raw)
  To: linux-mediatek
  Cc: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	ulf.hansson, y.oudjana, fshao, wenst, lihongbo22, mandyjh.liu,
	mbrugger, devicetree, linux-kernel, linux-arm-kernel, linux-pm,
	kernel

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
 - Hardware Voter (MT8196/MT6991), allowing ATF, remote processors and
   the AP (Linux) to manage the same power domains through a voter MCU,
   avoiding power racing
 - Directly controlled power domains for MT8196
 - Voted power domains for MT8196
 - Multimedia (voted) power domains for MT8196.

Note that all of the power domains for MT8196 should also work on MT6991
but since I have no Dimensity 9400 boards, even though I'm 99.5% sure that
it will simply work as those are the same, I avoided to add compatibles
for 6991 as it's impossible for me to test.

AngeloGioacchino Del Regno (13):
  dt-bindings: power: mediatek: Document mediatek,bus-protection
  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: Add support for Hardware Voter power domains
  pmdomain: mediatek: Add support for secure HWCCF infra power on
  pmdomain: mediatek: Convert all SoCs to new style regmap retrieval
  arm64: dts: mediatek: Convert all SoCs to use mediatek,bus-protection
  dt-bindings: power: Add support for MT8196 power controllers
  pmdomain: mediatek: Add support for MT8196 SCPSYS power domains
  pmdomain: mediatek: Add support for MT8196 HFRPSYS power domains

 .../power/mediatek,power-controller.yaml      |  44 ++
 arch/arm64/boot/dts/mediatek/mt6795.dtsi      |   4 +-
 arch/arm64/boot/dts/mediatek/mt6893.dtsi      |  11 +-
 arch/arm64/boot/dts/mediatek/mt8167.dtsi      |   5 +-
 arch/arm64/boot/dts/mediatek/mt8173.dtsi      |   3 +-
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      |  15 +-
 arch/arm64/boot/dts/mediatek/mt8186.dtsi      |  11 +-
 arch/arm64/boot/dts/mediatek/mt8188.dtsi      |  22 +-
 arch/arm64/boot/dts/mediatek/mt8192.dtsi      |  12 +-
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      |  21 +-
 arch/arm64/boot/dts/mediatek/mt8365.dtsi      |  14 +-
 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/mt8196-pm-domains.h | 625 ++++++++++++++++
 drivers/pmdomain/mediatek/mt8365-pm-domains.h |  14 +-
 drivers/pmdomain/mediatek/mtk-pm-domains.c    | 694 +++++++++++++++---
 drivers/pmdomain/mediatek/mtk-pm-domains.h    | 123 +++-
 .../dt-bindings/power/mediatek,mt8196-power.h |  58 ++
 24 files changed, 1500 insertions(+), 217 deletions(-)
 create mode 100644 drivers/pmdomain/mediatek/mt8196-pm-domains.h
 create mode 100644 include/dt-bindings/power/mediatek,mt8196-power.h

-- 
2.49.0



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

end of thread, other threads:[~2025-06-30 22:14 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 12:01 [PATCH v1 00/13] pmdomain: Partial refactor, add MT8196 support AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 01/13] dt-bindings: power: mediatek: Document mediatek,bus-protection AngeloGioacchino Del Regno
2025-06-27 20:15   ` Rob Herring
2025-06-30  9:36     ` AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 02/13] pmdomain: mediatek: Refactor bus protection regmaps retrieval AngeloGioacchino Del Regno
2025-06-27 12:12   ` Fei Shao
2025-06-30  9:32     ` AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 03/13] pmdomain: mediatek: Handle SoCs with inverted SRAM power-down bits AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 04/13] pmdomain: mediatek: Move ctl sequences out of power_on/off functions AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 05/13] pmdomain: mediatek: Add support for modem power sequences AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 06/13] pmdomain: mediatek: Add support for RTFF Hardware in MT8196/MT6991 AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 07/13] pmdomain: mediatek: Add support for Hardware Voter power domains AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 08/13] pmdomain: mediatek: Add support for secure HWCCF infra power on AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 09/13] pmdomain: mediatek: Convert all SoCs to new style regmap retrieval AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 10/13] arm64: dts: mediatek: Convert all SoCs to use mediatek,bus-protection AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 11/13] dt-bindings: power: Add support for MT8196 power controllers AngeloGioacchino Del Regno
2025-06-30 22:09   ` Rob Herring (Arm)
2025-06-23 12:01 ` [PATCH v1 12/13] pmdomain: mediatek: Add support for MT8196 SCPSYS power domains AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 13/13] pmdomain: mediatek: Add support for MT8196 HFRPSYS " AngeloGioacchino Del Regno
2025-06-24 14:24 ` [PATCH v1 00/13] pmdomain: Partial refactor, add MT8196 support Nícolas F. R. A. Prado

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).