[PATCH v2 00/10] pmdomain: Partial refactor, support modem and RTFF
Ulf Hansson
ulf.hansson at linaro.org
Tue Jul 8 08:04:50 PDT 2025
On Mon, 7 Jul 2025 at 12:56, AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> wrote:
>
> 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
The series looks good to me! I can pick patch 1->9, but I am awaiting
an ack from some of the DT maintainers for patch 1->3 first.
Kind regards
Uffe
>
> 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 | 39 ++
> 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, 596 insertions(+), 181 deletions(-)
>
> --
> 2.49.0
>
More information about the Linux-mediatek
mailing list