]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: sm6350: Add OPP table support to UFSHC
authorLuca Weiss <luca.weiss@fairphone.com>
Thu, 23 Oct 2025 11:39:27 +0000 (13:39 +0200)
committerBjorn Andersson <andersson@kernel.org>
Mon, 27 Oct 2025 18:50:18 +0000 (13:50 -0500)
UFS host controller, when scaling gears, should choose appropriate
performance state of RPMh power domain controller along with clock
frequency. So let's add the OPP table support to specify both clock
frequency and RPMh performance states replacing the old "freq-table-hz"
property.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20251023-sm6350-ufs-things-v3-2-b68b74e29d35@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sm6350.dtsi

index 0d2eb51ecc503b4d2b213e53ba92318aafe032d0..c00ba5bb8c519602e8713715593d419b8e50974a 100644 (file)
                                 <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
                                 <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>,
                                 <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
-                       freq-table-hz =
-                               <50000000 200000000>,
-                               <0 0>,
-                               <0 0>,
-                               <37500000 150000000>,
-                               <0 0>,
-                               <0 0>,
-                               <0 0>,
-                               <0 0>,
-                               <75000000 300000000>;
+
+                       operating-points-v2 = <&ufs_opp_table>;
 
                        status = "disabled";
+
+                       ufs_opp_table: opp-table {
+                               compatible = "operating-points-v2";
+
+                               opp-50000000 {
+                                       opp-hz = /bits/ 64 <50000000>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <37500000>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <75000000>;
+                                       required-opps = <&rpmhpd_opp_low_svs>;
+                               };
+
+                               opp-200000000 {
+                                       opp-hz = /bits/ 64 <200000000>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <150000000>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <0>,
+                                                /bits/ 64 <300000000>;
+                                       required-opps = <&rpmhpd_opp_nom>;
+                               };
+                       };
                };
 
                ufs_mem_phy: phy@1d87000 {