devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller
@ 2022-12-14 13:11 AngeloGioacchino Del Regno
  2022-12-14 13:11 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY AngeloGioacchino Del Regno
  2022-12-16 11:29 ` [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller Matthias Brugger
  0 siblings, 2 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-12-14 13:11 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, tinghan.shen, weiyi.lu,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	AngeloGioacchino Del Regno

Despite there being some flexibility regarding the P0/P1 connections,
especially for TL and PERI, we must use P1 clocks on pcie1 otherwise
we'll be dealing with unclocked access.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 5d31536f4c48..e61944510b8e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -1258,9 +1258,9 @@ pcie1: pcie@112f8000 {
 
 			clocks = <&infracfg_ao CLK_INFRA_AO_PCIE_PL_P_250M_P1>,
 				 <&clk26m>,
-				 <&infracfg_ao CLK_INFRA_AO_PCIE_TL_96M>,
+				 <&infracfg_ao CLK_INFRA_AO_PCIE_P1_TL_96M>,
 				 <&clk26m>,
-				 <&infracfg_ao CLK_INFRA_AO_PCIE_PERI_26M>,
+				 <&infracfg_ao CLK_INFRA_AO_PCIE_P1_PERI_26M>,
 				 /* Designer has connect pcie1 with peri_mem_p0 clock */
 				 <&pericfg_ao CLK_PERI_AO_PCIE_P0_MEM>;
 			clock-names = "pl_250m", "tl_26m", "tl_96m",
-- 
2.38.1


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

* [PATCH 2/2] arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY
  2022-12-14 13:11 [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller AngeloGioacchino Del Regno
@ 2022-12-14 13:11 ` AngeloGioacchino Del Regno
  2022-12-16 11:29 ` [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller Matthias Brugger
  1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-12-14 13:11 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, tinghan.shen, weiyi.lu,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	AngeloGioacchino Del Regno

Assign power domain to the U3PHY1 T-PHY in otder to keep this PHY
alive after unused PD shutdown and to be able to completely cut
and restore power to it, for example, to save some power during
system suspend/sleep.

Fixes: 2b515194bf0c ("arm64: dts: mt8195: Add power domains controller")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index e61944510b8e..131945c44dcc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -1549,6 +1549,7 @@ u3phy1: t-phy@11e30000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges = <0 0 0x11e30000 0xe00>;
+			power-domains = <&spm MT8195_POWER_DOMAIN_SSUSB_PCIE_PHY>;
 			status = "disabled";
 
 			u2port1: usb-phy@0 {
-- 
2.38.1


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

* Re: [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller
  2022-12-14 13:11 [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller AngeloGioacchino Del Regno
  2022-12-14 13:11 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY AngeloGioacchino Del Regno
@ 2022-12-16 11:29 ` Matthias Brugger
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2022-12-16 11:29 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: robh+dt, krzysztof.kozlowski+dt, tinghan.shen, weiyi.lu,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel



On 14/12/2022 14:11, AngeloGioacchino Del Regno wrote:
> Despite there being some flexibility regarding the P0/P1 connections,
> especially for TL and PERI, we must use P1 clocks on pcie1 otherwise
> we'll be dealing with unclocked access.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Seems my mail got lost somewhere:
Both patches applied, thanks!

> ---
>   arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> index 5d31536f4c48..e61944510b8e 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> @@ -1258,9 +1258,9 @@ pcie1: pcie@112f8000 {
>   
>   			clocks = <&infracfg_ao CLK_INFRA_AO_PCIE_PL_P_250M_P1>,
>   				 <&clk26m>,
> -				 <&infracfg_ao CLK_INFRA_AO_PCIE_TL_96M>,
> +				 <&infracfg_ao CLK_INFRA_AO_PCIE_P1_TL_96M>,
>   				 <&clk26m>,
> -				 <&infracfg_ao CLK_INFRA_AO_PCIE_PERI_26M>,
> +				 <&infracfg_ao CLK_INFRA_AO_PCIE_P1_PERI_26M>,
>   				 /* Designer has connect pcie1 with peri_mem_p0 clock */
>   				 <&pericfg_ao CLK_PERI_AO_PCIE_P0_MEM>;
>   			clock-names = "pl_250m", "tl_26m", "tl_96m",

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

end of thread, other threads:[~2022-12-16 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-14 13:11 [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller AngeloGioacchino Del Regno
2022-12-14 13:11 ` [PATCH 2/2] arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY AngeloGioacchino Del Regno
2022-12-16 11:29 ` [PATCH 1/2] arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller 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).