linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver
@ 2021-07-01  9:40 Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr Enric Balletbo i Serra
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Enric Balletbo i Serra @ 2021-07-01  9:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mediatek, matthias.bgg, drinkcat, hsinyi,
	Collabora Kernel ML, Rob Herring, devicetree, linux-arm-kernel


This series, originally sent by Bilal Wasim [1], initially broke my
display in mainline (no gpu driver). The problem was not in the series
itself, and, after [2], this series works as expected. I was able to go
to the UI with and without the imgtec gpu driver on my Acer Chromebook
R13 (elm). Hence I rebased on top of mainline and resend it to take into
account for next merge window.

Best regards,
  Enric

[1] https://yhbt.net/lore/all/20210216165926.46bbafc7@a-VirtualBox/T/
[2] https://patchwork.kernel.org/project/linux-mediatek/patch/20210625062448.3462177-1-enric.balletbo@collabora.com/


Bilal Wasim (3):
  soc: mediatek: pm-domains: Use correct mask for bus_prot_clr
  soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD
  arm64: dts: mediatek: mt8173: Add domain supply for mfg_async

 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts  | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8173.dtsi     | 2 +-
 drivers/soc/mediatek/mt8173-pm-domains.h     | 1 +
 drivers/soc/mediatek/mtk-pm-domains.h        | 2 +-
 5 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.30.2


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

* [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr
  2021-07-01  9:40 [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Enric Balletbo i Serra
@ 2021-07-01  9:40 ` Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 2/3] soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD Enric Balletbo i Serra
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Enric Balletbo i Serra @ 2021-07-01  9:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mediatek, matthias.bgg, drinkcat, hsinyi,
	Collabora Kernel ML, Bilal Wasim, linux-arm-kernel

From: Bilal Wasim <Bilal.Wasim@imgtec.com>

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>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 drivers/soc/mediatek/mtk-pm-domains.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/soc/mediatek/mtk-pm-domains.h
index 21a4e113bbec..c5ac649ae51b 100644
--- a/drivers/soc/mediatek/mtk-pm-domains.h
+++ b/drivers/soc/mediatek/mtk-pm-domains.h
@@ -60,7 +60,7 @@
 #define BUS_PROT_UPDATE_TOPAXI(_mask)				\
 		BUS_PROT_UPDATE(_mask,				\
 				INFRA_TOPAXI_PROTECTEN,		\
-				INFRA_TOPAXI_PROTECTEN_CLR,	\
+				INFRA_TOPAXI_PROTECTEN,		\
 				INFRA_TOPAXI_PROTECTSTA1)
 
 struct scpsys_bus_prot_data {
-- 
2.30.2


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

* [RESEND PATCH 2/3] soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD
  2021-07-01  9:40 [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr Enric Balletbo i Serra
@ 2021-07-01  9:40 ` Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 3/3] arm64: dts: mediatek: mt8173: Add domain supply for mfg_async Enric Balletbo i Serra
  2021-07-01 17:27 ` [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: Enric Balletbo i Serra @ 2021-07-01  9:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mediatek, matthias.bgg, drinkcat, hsinyi,
	Collabora Kernel ML, Bilal Wasim, linux-arm-kernel

From: Bilal Wasim <Bilal.Wasim@imgtec.com>

The mfg_async power domain in mt8173 is used to power up imgtec
gpu. This domain requires the da9211 regulator to be enabled before
the power domain can be enabled successfully.

Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 drivers/soc/mediatek/mt8173-pm-domains.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/mediatek/mt8173-pm-domains.h b/drivers/soc/mediatek/mt8173-pm-domains.h
index 654c717e5467..714fa92575df 100644
--- a/drivers/soc/mediatek/mt8173-pm-domains.h
+++ b/drivers/soc/mediatek/mt8173-pm-domains.h
@@ -71,6 +71,7 @@ static const struct scpsys_domain_data scpsys_domain_data_mt8173[] = {
 		.ctl_offs = SPM_MFG_ASYNC_PWR_CON,
 		.sram_pdn_bits = GENMASK(11, 8),
 		.sram_pdn_ack_bits = 0,
+		.caps = MTK_SCPD_DOMAIN_SUPPLY,
 	},
 	[MT8173_POWER_DOMAIN_MFG_2D] = {
 		.name = "mfg_2d",
-- 
2.30.2


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

* [RESEND PATCH 3/3] arm64: dts: mediatek: mt8173: Add domain supply for mfg_async
  2021-07-01  9:40 [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr Enric Balletbo i Serra
  2021-07-01  9:40 ` [RESEND PATCH 2/3] soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD Enric Balletbo i Serra
@ 2021-07-01  9:40 ` Enric Balletbo i Serra
  2021-07-01 17:27 ` [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: Enric Balletbo i Serra @ 2021-07-01  9:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mediatek, matthias.bgg, drinkcat, hsinyi,
	Collabora Kernel ML, Bilal Wasim, Rob Herring, devicetree,
	linux-arm-kernel

From: Bilal Wasim <Bilal.Wasim@imgtec.com>

da9211 regulator needs to be enabled before enabling the mfg_async power
domain. Otherwise the subdomain is not enabled and causes failure in
imgtec gpu driver boot.

Add the "domain-supply" property to the "mfg_async" node in DT.

Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts  | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8173.dtsi     | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
index 21452c51a20a..a8efff2071bf 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
@@ -157,6 +157,10 @@ hdmi_connector_in: endpoint {
 	};
 };
 
+&mfg_async {
+	domain-supply = <&da9211_vgpu_reg>;
+};
+
 &cec {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
index f6a1738dfbaa..4fa1e93302c7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -62,6 +62,10 @@ usb_p0_vbus: regulator@1 {
 	};
 };
 
+&mfg_async {
+	domain-supply = <&da9211_vgpu_reg>;
+};
+
 &cec {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 003a5653c505..dbda5d656b29 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -504,7 +504,7 @@ power-domain@MT8173_POWER_DOMAIN_USB {
 					reg = <MT8173_POWER_DOMAIN_USB>;
 					#power-domain-cells = <0>;
 				};
-				power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC {
+				mfg_async: power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC {
 					reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>;
 					clocks = <&clk26m>;
 					clock-names = "mfg";
-- 
2.30.2


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

* Re: [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver
  2021-07-01  9:40 [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Enric Balletbo i Serra
                   ` (2 preceding siblings ...)
  2021-07-01  9:40 ` [RESEND PATCH 3/3] arm64: dts: mediatek: mt8173: Add domain supply for mfg_async Enric Balletbo i Serra
@ 2021-07-01 17:27 ` Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2021-07-01 17:27 UTC (permalink / raw)
  To: Enric Balletbo i Serra, linux-kernel
  Cc: linux-mediatek, drinkcat, hsinyi, Collabora Kernel ML,
	Rob Herring, devicetree, linux-arm-kernel



On 01/07/2021 11:40, Enric Balletbo i Serra wrote:
> 
> This series, originally sent by Bilal Wasim [1], initially broke my
> display in mainline (no gpu driver). The problem was not in the series
> itself, and, after [2], this series works as expected. I was able to go
> to the UI with and without the imgtec gpu driver on my Acer Chromebook
> R13 (elm). Hence I rebased on top of mainline and resend it to take into
> account for next merge window.
> 

Whole series pushed to v5.14-tmp/soc

Thanks!

> Best regards,
>   Enric
> 
> [1] https://yhbt.net/lore/all/20210216165926.46bbafc7@a-VirtualBox/T/
> [2] https://patchwork.kernel.org/project/linux-mediatek/patch/20210625062448.3462177-1-enric.balletbo@collabora.com/
> 
> 
> Bilal Wasim (3):
>   soc: mediatek: pm-domains: Use correct mask for bus_prot_clr
>   soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD
>   arm64: dts: mediatek: mt8173: Add domain supply for mfg_async
> 
>  arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 ++++
>  arch/arm64/boot/dts/mediatek/mt8173-evb.dts  | 4 ++++
>  arch/arm64/boot/dts/mediatek/mt8173.dtsi     | 2 +-
>  drivers/soc/mediatek/mt8173-pm-domains.h     | 1 +
>  drivers/soc/mediatek/mtk-pm-domains.h        | 2 +-
>  5 files changed, 11 insertions(+), 2 deletions(-)
> 

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

end of thread, other threads:[~2021-07-01 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  9:40 [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Enric Balletbo i Serra
2021-07-01  9:40 ` [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr Enric Balletbo i Serra
2021-07-01  9:40 ` [RESEND PATCH 2/3] soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD Enric Balletbo i Serra
2021-07-01  9:40 ` [RESEND PATCH 3/3] arm64: dts: mediatek: mt8173: Add domain supply for mfg_async Enric Balletbo i Serra
2021-07-01 17:27 ` [RESEND PATCH 0/3] Misc bug fixes in mtk power domain driver Matthias Brugger

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