On 11-08-25, 15:35, Krishna Chaitanya Chundru wrote:As we have can have same frequency entries we will select the OPP based
Thanks Viresh for the suggestion. We will try this.
Can you confirm this is what you are expecting.
dt change
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -2214,13 +2214,23 @@ opp-2500000 {
opp-hz = /bits/ 64 <2500000>;
required-opps =
<&rpmhpd_opp_low_svs>;
opp-peak-kBps = <250000 1>;
+ opp-level = <1>;
};
- /* GEN 1 x2 and GEN 2 x1 */
+ /* GEN 1 x2 */
opp-5000000 {
opp-hz = /bits/ 64 <5000000>;
required-opps =
<&rpmhpd_opp_low_svs>;
opp-peak-kBps = <500000 1>;
+ opp-level = <1>;
+ };
+
+ /* GEN 2 x1 */
+ opp-5000000 {
The node-name has to be different, but freq can be same. Something
like opp-5000000-N, where N = 1, 2, 3.
+ opp-hz = /bits/ 64 <5000000>;
+ required-opps =
<&rpmhpd_opp_low_svs>;
+ opp-peak-kBps = <500000 1>;
+ opp-level = <2>;
};
And in the driver I need to have a change in OPP framework which
returns OPP based on both frequency and level something like
dev_pm_opp_find_level_freq_exact(struct device *dev,
unsigned int level, unsigned int freq);
I thought you wanted OPP based on freq and bandwidth ? But yeah, a new
OPP API like: dev_pm_opp_find_key_exact(dev, *key);
where,
struct dev_pm_opp_key {
unsigned long *freq;
unsigned int *level;
unsigned int *bw;
}
and match all non-NULL values only to begin with.