Re: [PATCH v5 4/4] ARM: dts: qcom: ipq8064: Add CPU OPP table

Konrad Dybcio
2023-10-10T19:55:37Z

On 9/30/23 12:21, Robert Marko wrote:
> From: Christian Marangi <ansuelsmth@gmail.com>
>
> Add CPU OPP table for IPQ8062, IPQ8064 and IPQ8065 SoC.
> Use opp-supported-hw binding to correctly enable and disable the
> frequency as IPQ8062 supports up to 1.0Ghz, IPQ8064 supports up to
> 1.4GHz with 1.2GHz as an additional frequency and IPQ8065 supports
> 1.7GHZ but doesn't have 1.2GHZ frequency and has to be disabled.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
> Changes v4:
> * Add OPP DTS patch for IPQ8064
>
> arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi | 30 +++++++++++
> arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 67 ++++++++++++++++++++++++
> arch/arm/boot/dts/qcom/qcom-ipq8065.dtsi | 65 +++++++++++++++++++++++
> 3 files changed, 162 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi
> index 5d3ebd3e2e51..72d9782c3d6f 100644
> --- a/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi
> @@ -6,3 +6,33 @@ / {
> model = "Qualcomm Technologies, Inc. IPQ8062";
> compatible = "qcom,ipq8062", "qcom,ipq8064";
> };
> +
> +&opp_table_cpu {
> + opp-384000000 {
> + opp-microvolt-speed0-pvs0 = <1000000 950000 1050000>;
> + opp-microvolt-speed0-pvs1 = <925000 878750 971250>;
> + opp-microvolt-speed0-pvs2 = <875000 831250 918750>;
> + opp-microvolt-speed0-pvs3 = <800000 760000 840000>;
We can just make use of opp-supported-hw and define opp-384...-0,
opp-384..-1 etc. with a valid corresponding bitmask in opp-supported-hw

otherwise it's somewhat confusing to follow, I think..

Konrad