soc: mediatek: pm-domains: Add support always on flag
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 17 Jun 2022 09:58:41 +0000 (17:58 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Fri, 17 Jun 2022 11:49:37 +0000 (13:49 +0200)
commit72be1e7a447add1536653592b317e93aed46588d
treee808e956bbcbe81d76d40af8eb8cd7b82701b6c4
parent38077cb39b42edc5cf22500af94335827b171af9
soc: mediatek: pm-domains: Add support always on flag

There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is
used by PCIe, when power off its mtcmos, need software reset it
(workaround way, usually hardware do it, but has an issue on mt8195),
but it has side effect to USB2 phy(works with USB3 phy to support
USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make its
power always on.
Another reason is that USB3.2 Gen1/2 need keep power always on when
support runtime-pm due to hardware limitation until now.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220617095841.23031-1-chunfeng.yun@mediatek.com
[mb: smaller nit fixes on commit message]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mt8195-pm-domains.h
drivers/soc/mediatek/mtk-pm-domains.c
drivers/soc/mediatek/mtk-pm-domains.h