Bilal Wasim
fb6d1d3b25
soc: mediatek: pm-domains: Use correct mask for bus_prot_clr
...
When "bus_prot_reg_update" is true, the driver should use
INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus
protection. However, the driver does not use this mask for
clearing bus protection which causes failure when booting
the imgtec gpu.
Corrected and tested with mt8173 chromebook.
Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org >
Link: https://lore.kernel.org/r/20210701114012.RESEND.1.I27436c29c3bede46dcf86df696f48683662d1ec1@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2021-07-12 12:26:28 +02:00
Enric Balletbo i Serra
022b02b450
soc: mediatek: pm-domains: Add a meaningful power domain name
...
Add the power domains names to the power domain struct so we
have meaningful name for every power domain. This also removes the
following debugfs error message.
[ 2.242068] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present!
[ 2.249949] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present!
[ 2.257784] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present!
...
Fixes: 59b644b01c ("soc: mediatek: Add MediaTek SCPSYS power domains")
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org >
Link: https://lore.kernel.org/r/20210225175000.824661-1-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2021-04-01 11:36:04 +02:00
Hsin-Yi Wang
1b18c0558d
soc: mediatek: pm-domains: Add domain regulator supply
...
Some power domains (eg. mfg) needs to turn on power supply before power
on.
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org >
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org >
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20210129101208.2625249-3-hsinyi@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2021-01-31 15:47:49 +01:00
Fabien Parent
207f13b419
soc: mediatek: pm-domains: Add support for mt8167
...
Add the needed board data to support mt8167 SoC.
Signed-off-by: Fabien Parent <fparent@baylibre.com >
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201209133238.384030-2-fparent@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2021-01-31 11:19:30 +01:00
Weiyi Lu
c1f3163d8f
soc: mediatek: pm-domains: Add default power off flag
...
For some power domain, like conn on MT8192, it should be default OFF.
Because the power on/off control relies the function of connectivity chip
and its firmware. And if project choose other chip vendor solution,
those necessary connectivity functions will not provided.
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-16-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:43 +01:00
Matthias Brugger
eb9fa767fb
soc: mediatek: pm-domains: Add support for mt8183
...
Add the needed board data to support mt8183 SoC.
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-12-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:43 +01:00
Matthias Brugger
1d4597fa18
soc: mediatek: pm-domains: Allow bus protection to ignore clear ack
...
In some cases the hardware does not create an acknowledgment of the
bus protection clearing. Add a flag to the bus protection indicating
that a clear event will be ignored.
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-10-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:43 +01:00
Matthias Brugger
123e8b4fd0
soc: mediatek: pm-domains: Add subsystem clocks
...
For the bus protection operations, some subsystem clocks need to be enabled
before releasing the protection. This patch identifies the subsystem clocks
by it's name.
Suggested-by: Weiyi Lu <weiyi.lu@mediatek.com >
[Adapted the patch to the mtk-pm-domains driver]
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-9-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:43 +01:00
Matthias Brugger
58a17e310a
soc: mediatek: pm-domains: Add extra sram control
...
For some power domains like vpu_core on MT8183 whose sram need to do clock
and internal isolation while power on/off sram. We add a cap
"MTK_SCPD_SRAM_ISO" to judge if we need to do the extra sram isolation
control or not.
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com >
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-8-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:43 +01:00
Matthias Brugger
f414854c88
soc: mediatek: pm-domains: Add SMI block as bus protection block
...
Apart from the infracfg block, the SMI block is used to enable the bus
protection for some power domains. Add support for this block.
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-7-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:42 +01:00
Matthias Brugger
916d6d71ba
soc: mediatek: pm-domains: Add bus protection protocol
...
Bus protection will need to update more then one register
in infracfg. Add support for several operations.
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-5-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:42 +01:00
Enric Balletbo i Serra
59b644b01c
soc: mediatek: Add MediaTek SCPSYS power domains
...
The System Control Processor System (SCPSYS) has several power management
related tasks in the system. This driver implements support to handle
the different power domains supported in order to meet high performance
and low power requirements.
Co-developed-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Matthias Brugger <mbrugger@suse.com >
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com >
Link: https://lore.kernel.org/r/20201030113622.201188-3-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com >
2020-11-27 12:04:42 +01:00