Re: [PATCH v2 2/3] scsi: ufs: mediatek: allow clock scaling when ufs_fde is absent
From: Ilia Snezhkov
Date: Thu Nov 26 2026 - 20:10:52 EST
Hi Peter,
No — this patch does not change whether UFSHCD_CAP_CLK_SCALING is
enabled.
ufs_mtk_is_clk_scale_ready() only checks ufs_sel, ufs_sel_max_src, and
ufs_sel_min_src, so on any platform (including MT6789) whose DT
provides those three clocks, UFSHCD_CAP_CLK_SCALING is already enabled
today and devfreq already runs. Platforms that omit ufs_sel_{min,max}_src
still have UFSHCD_CAP_CLK_SCALING cleared as before.
What was broken without this patch is that when a DT provides ufs_sel
and its min/max sources without ufs_fde, _ufs_mtk_clk_scale() returned
early on `!fde_clki`, so ufs_sel never actually switched parents while
ufshcd still treated the scaling transition as successful and updated
clki->curr_freq.
With this change, MT6789's already-enabled clock scaling actually
switches ufs_sel between 26 MHz (tck_26m_mx9) and 192 MHz (msdcpll_d2)
as intended.
Best regards,
Ilia