Skip to content

Commit f08e7a4

Browse files
Nicolas FrattaroliUlf Hansson
authored andcommitted
pmdomain: mediatek: Add support for MFlexGraphics
Various MediaTek SoCs use GPU integration silicon named "MFlexGraphics" by MediaTek. On the MT8196 and MT6991 SoCs, interacting with this integration silicon is required to power on the GPU. This glue silicon is in the form of an embedded microcontroller running special-purpose firmware, which autonomously adjusts clocks and regulators. Implement a driver, modelled as a pmdomain driver with a set_performance_state operation, to support these SoCs. The driver also exposes the actual achieved clock rate, as read back from the MCU, as common clock framework clocks, by acting as a clock provider as well. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 19e668e commit f08e7a4

3 files changed

Lines changed: 1061 additions & 0 deletions

File tree

drivers/pmdomain/mediatek/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ config MTK_SCPSYS_PM_DOMAINS
2626
Control Processor System (SCPSYS) has several power management related
2727
tasks in the system.
2828

29+
config MTK_MFG_PM_DOMAIN
30+
bool "MediaTek MFlexGraphics power domain"
31+
default ARCH_MEDIATEK
32+
depends on PM
33+
depends on OF
34+
depends on COMMON_CLK
35+
select PM_GENERIC_DOMAINS
36+
imply MTK_GPUEB_MBOX
37+
help
38+
Say y or m here to enable the power domains driver for MediaTek
39+
MFlexGraphics. This driver allows for power and frequency control of
40+
GPUs on MediaTek SoCs such as the MT8196 or MT6991.
41+
42+
This driver is required for the Mali GPU to work at all on MT8196 and
43+
MT6991.
44+
2945
config AIROHA_CPU_PM_DOMAIN
3046
tristate "Airoha CPU power domain"
3147
default ARCH_AIROHA

drivers/pmdomain/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-$(CONFIG_MTK_MFG_PM_DOMAIN) += mtk-mfg-pmdomain.o
23
obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o
34
obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o
45
obj-$(CONFIG_AIROHA_CPU_PM_DOMAIN) += airoha-cpu-pmdomain.o

0 commit comments

Comments
 (0)