Re: [PATCH v2] arm64: dts: qcom: sdm845: Add cpu OPP tables

2020-07-09 Thread Bjorn Andersson
On Thu 02 Jul 13:46 PDT 2020, Sibi Sankar wrote:

> Add OPP tables required to scale DDR/L3 per freq-domain on SDM845 SoCs.
> 
> Signed-off-by: Sibi Sankar 

Tested-by: Bjorn Andersson 

and applied.

Thanks,
Bjorn

> ---
> 
> v2:
>  * Drop interconnect tags
>  * Add all possible cpu opps from supported frequency list
> 
> v1: https://patchwork.kernel.org/patch/11527589/
> 
>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 285 +++
>  1 file changed, 285 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
> b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 8eb5a31346d28..9a7e27ede7186 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -12,6 +12,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -198,6 +199,9 @@ _CPU_SLEEP_1
>   capacity-dmips-mhz = <607>;
>   dynamic-power-coefficient = <100>;
>   qcom,freq-domain = <_hw 0>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_0>;
>   L2_0: l2-cache {
> @@ -220,6 +224,9 @@ _CPU_SLEEP_1
>   capacity-dmips-mhz = <607>;
>   dynamic-power-coefficient = <100>;
>   qcom,freq-domain = <_hw 0>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_100>;
>   L2_100: l2-cache {
> @@ -239,6 +246,9 @@ _CPU_SLEEP_1
>   capacity-dmips-mhz = <607>;
>   dynamic-power-coefficient = <100>;
>   qcom,freq-domain = <_hw 0>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_200>;
>   L2_200: l2-cache {
> @@ -258,6 +268,9 @@ _CPU_SLEEP_1
>   capacity-dmips-mhz = <607>;
>   dynamic-power-coefficient = <100>;
>   qcom,freq-domain = <_hw 0>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_300>;
>   L2_300: l2-cache {
> @@ -277,6 +290,9 @@ _CPU_SLEEP_1
>  _SLEEP_0>;
>   dynamic-power-coefficient = <396>;
>   qcom,freq-domain = <_hw 1>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_400>;
>   L2_400: l2-cache {
> @@ -296,6 +312,9 @@ _CPU_SLEEP_1
>  _SLEEP_0>;
>   dynamic-power-coefficient = <396>;
>   qcom,freq-domain = <_hw 1>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_500>;
>   L2_500: l2-cache {
> @@ -315,6 +334,9 @@ _CPU_SLEEP_1
>  _SLEEP_0>;
>   dynamic-power-coefficient = <396>;
>   qcom,freq-domain = <_hw 1>;
> + operating-points-v2 = <_opp_table>;
> + interconnects = <_noc MASTER_APPSS_PROC 
> _noc SLAVE_EBI1>,
> + <_l3 MASTER_OSM_L3_APPS _l3 
> SLAVE_OSM_L3>;
>   #cooling-cells = <2>;
>   next-level-cache = <_600>;
>   L2_600: l2-cache {
> @@ -334,6 +356,9 @@ _CPU_SLEEP_1
>  _SLEEP_0>;
>   dynamic-power-coefficient = <396>;
>   

Re: [PATCH v2] arm64: dts: qcom: sdm845: Add cpu OPP tables

2020-07-09 Thread Sibi Sankar

On 2020-07-09 19:59, Bjorn Andersson wrote:

On Wed 08 Jul 19:22 PDT 2020, Steev Klimaszewski wrote:



On 7/2/20 3:46 PM, Sibi Sankar wrote:
> Add OPP tables required to scale DDR/L3 per freq-domain on SDM845 SoCs.
>
> Signed-off-by: Sibi Sankar 
> ---


Hi Sibi,


Bjorn asked me to give this patch a whirl, and I have to say, I like 
it

but I'm not sure if I'm missing a dependency somewhere...


In 5.8.0-rc4, I'm seeing a couple probe defers

[    0.131341] cpu cpu0: _allocate_opp_table: Error finding 
interconnect

paths: -517

[    0.132694] cpu cpu4: _allocate_opp_table: Error finding 
interconnect

paths: -517

And then a bit later on,

[    0.625837] cpu cpu0: failed to get clock: -2


If these aren't anything to worry about, you can throw my Tested-by on

Tested-by: Steev Klimaszewski 



You need to enable:
CONFIG_INTERCONNECT=y
CONFIG_INTERCONNECT_QCOM=y
CONFIG_INTERCONNECT_QCOM_OSM_L3=m
CONFIG_INTERCONNECT_QCOM_SDM845=m


Steev had ^^ enabled but he was missing
the required cpufreq driver changes
available in linux-next.



With this I can see the interconnect_summary in debugfs change with the
CPU frequency.

Regards,
Bjorn


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.


Re: [PATCH v2] arm64: dts: qcom: sdm845: Add cpu OPP tables

2020-07-09 Thread Bjorn Andersson
On Wed 08 Jul 19:22 PDT 2020, Steev Klimaszewski wrote:

> 
> On 7/2/20 3:46 PM, Sibi Sankar wrote:
> > Add OPP tables required to scale DDR/L3 per freq-domain on SDM845 SoCs.
> >
> > Signed-off-by: Sibi Sankar 
> > ---
> 
> 
> Hi Sibi,
> 
> 
> Bjorn asked me to give this patch a whirl, and I have to say, I like it
> but I'm not sure if I'm missing a dependency somewhere...
> 
> 
> In 5.8.0-rc4, I'm seeing a couple probe defers
> 
> [    0.131341] cpu cpu0: _allocate_opp_table: Error finding interconnect
> paths: -517
> 
> [    0.132694] cpu cpu4: _allocate_opp_table: Error finding interconnect
> paths: -517
> 
> And then a bit later on,
> 
> [    0.625837] cpu cpu0: failed to get clock: -2
> 
> 
> If these aren't anything to worry about, you can throw my Tested-by on
> 
> Tested-by: Steev Klimaszewski 
> 

You need to enable:
CONFIG_INTERCONNECT=y
CONFIG_INTERCONNECT_QCOM=y
CONFIG_INTERCONNECT_QCOM_OSM_L3=m
CONFIG_INTERCONNECT_QCOM_SDM845=m

With this I can see the interconnect_summary in debugfs change with the
CPU frequency.

Regards,
Bjorn


Re: [PATCH v2] arm64: dts: qcom: sdm845: Add cpu OPP tables

2020-07-08 Thread Steev Klimaszewski


On 7/2/20 3:46 PM, Sibi Sankar wrote:
> Add OPP tables required to scale DDR/L3 per freq-domain on SDM845 SoCs.
>
> Signed-off-by: Sibi Sankar 
> ---


Hi Sibi,


Bjorn asked me to give this patch a whirl, and I have to say, I like it
but I'm not sure if I'm missing a dependency somewhere...


In 5.8.0-rc4, I'm seeing a couple probe defers

[    0.131341] cpu cpu0: _allocate_opp_table: Error finding interconnect
paths: -517

[    0.132694] cpu cpu4: _allocate_opp_table: Error finding interconnect
paths: -517

And then a bit later on,

[    0.625837] cpu cpu0: failed to get clock: -2


If these aren't anything to worry about, you can throw my Tested-by on

Tested-by: Steev Klimaszewski