Skip to contentSkip to conversation

clk: qcom: gcc-kaanapali: Enable FORCE_MEM_CORE_ON for UFS AXI PHY clock

PATCH Applied Joonhoe Kim 4 participants 4 messages Oct 7 – Nov 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: qcom: gcc-kaanapali: Enable FORCE_MEM_CORE_ON for UFS AXI PHY clock

As on SM8650, SM8750 and Eliza, the UFS AXI PHY clock needs FORCE_MEM_CORE_ON for the UFS controller in MCQ mode. Without it the MCQ configuration is lost over system suspend, and with MCQ enabled every resume from s2idle ends in an SMMU fault and a host reset.

The UFS PHY ICE core clock already has the bit set; set it for the UFS PHY AXI clock as well.

Fixes d1919c375f21 ("clk: qcom: Add support for Global clock controller on Kaanapali")
Assisted-by LLM

---
Tested on a Lenovo Legion Tab Y700 Gen 5 with MCQ enabled in its DT:
the MCQ registers keep their values over s2idle, 7 of 7 resumes without a UFS error. Kaanapali was noted as the missing one in the Eliza thread [1].

[1] https://lore.kernel.org/all/[email protected]/

 drivers/clk/qcom/gcc-kaanapali.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/qcom/gcc-kaanapali.c +1 -0
index c9473fb79ccc..6834f43b72ca 100644
@@ -3484,6 +3484,7 @@ static void clk_kaanapali_regs_configure(struct device *dev, struct regmap *regm
 
 	/* FORCE_MEM_CORE_ON for ufs phy ice core clocks */
 	qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_ice_core_clk, true);
+	qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_axi_clk, true);
 }
 
 static const struct qcom_cc_driver_data gcc_kaanapali_driver_data = {
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Joonhoe Kim

As on SM8650, SM8750 and Eliza, the UFS AXI PHY clock needs FORCE_MEM_CORE_ON for the UFS controller in MCQ mode. Without it the MCQ configuration is lost over system suspend, and with MCQ enabled every resume from s2idle ends in an SMMU fault and a host reset.

The UFS PHY ICE core clock already has the bit set; set it for the UFS PHY AXI clock as well.

Fixes d1919c375f21 ("clk: qcom: Add support for Global clock controller on Kaanapali")
Assisted-by LLM
Reviewed-by on v1 1/1
#2 lore raw
In reply to Joonhoe Kim
Quoted 28 lines · Joonhoe Kim

As on SM8650, SM8750 and Eliza, the UFS AXI PHY clock needs FORCE_MEM_CORE_ON for the UFS controller in MCQ mode. Without it the MCQ configuration is lost over system suspend, and with MCQ enabled every resume from s2idle ends in an SMMU fault and a host reset.

The UFS PHY ICE core clock already has the bit set; set it for the UFS PHY AXI clock as well.

Fixes d1919c375f21 ("clk: qcom: Add support for Global clock controller on Kaanapali")
Assisted-by LLM

---
Tested on a Lenovo Legion Tab Y700 Gen 5 with MCQ enabled in its DT:
the MCQ registers keep their values over s2idle, 7 of 7 resumes without a UFS error. Kaanapali was noted as the missing one in the Eliza thread [1].

[1] https://lore.kernel.org/all/a0b6030f-be42-4f5d-a59c-
[email protected]/

 drivers/clk/qcom/gcc-kaanapali.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/qcom/gcc-kaanapali.c +0 -0
index c9473fb79ccc..6834f43b72ca 100644

drivers/clk/qcom/gcc-kaanapali.c static void clk_kaanapali_regs_configure(struct device *dev, struct regmap *regm · line 3489

Quoted 6 lines
drivers/clk/qcom/gcc-kaanapali.c +1 -0
@@ -3484,6 +3484,7 @@ static void clk_kaanapali_regs_configure(struct device *dev, struct regmap *regm
 
 	/* FORCE_MEM_CORE_ON for ufs phy ice core clocks */
 	qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_ice_core_clk, true);
+	qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_axi_clk, true);
 }
 
Signature · 2 lines
Thanks,
Taniya Das
maintainer Applied
#3 lore raw
In reply to Joonhoe Kim
Quoted 9 lines · Joonhoe Kim

As on SM8650, SM8750 and Eliza, the UFS AXI PHY clock needs FORCE_MEM_CORE_ON for the UFS controller in MCQ mode. Without it the MCQ configuration is lost over system suspend, and with MCQ enabled every resume from s2idle ends in an SMMU fault and a host reset.

The UFS PHY ICE core clock already has the bit set; set it for the UFS PHY AXI clock as well.

[...]

Applied, thanks!

[1/1] clk: qcom: gcc-kaanapali: Enable FORCE_MEM_CORE_ON for UFS AXI PHY clock

      commit: ab3c9fbc73091b3c132fce5827ef7de2f5bcd58a

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>