From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941839AbcJSOV5 (ORCPT ); Wed, 19 Oct 2016 10:21:57 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:36744 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941170AbcJSOVy (ORCPT ); Wed, 19 Oct 2016 10:21:54 -0400 Date: Wed, 19 Oct 2016 19:25:22 +0530 From: Viresh Kumar To: Masahiro Yamada Cc: Mark Rutland , devicetree@vger.kernel.org, Catalin Marinas , Will Deacon , Linux Kernel Mailing List , Rob Herring , linux-arm-kernel Subject: Re: [PATCH 2/3] arm64: dts: uniphier: add CPU clock and OPP table for LD11 SoC Message-ID: <20161019135522.GH11471@vireshk-i7> References: <1476629958-25368-1-git-send-email-yamada.masahiro@socionext.com> <1476629958-25368-3-git-send-email-yamada.masahiro@socionext.com> <20161018112548.GA11471@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-10-16, 17:33, Masahiro Yamada wrote: > Hi Viresh, > > > 2016-10-18 20:25 GMT+09:00 Viresh Kumar : > > On 16-10-16, 23:59, Masahiro Yamada wrote: > >> + cluster0_opp: opp_table { > >> + compatible = "operating-points-v2"; > >> + opp-shared; > >> + > >> + opp@245000000 { > >> + opp-hz = /bits/ 64 <245000000>; > >> + clock-latency-ns = <300>; > >> + }; > >> + opp@250000000 { > >> + opp-hz = /bits/ 64 <250000000>; > >> + clock-latency-ns = <300>; > >> + }; > >> + opp@490000000 { > >> + opp-hz = /bits/ 64 <490000000>; > >> + clock-latency-ns = <300>; > >> + }; > >> + opp@500000000 { > >> + opp-hz = /bits/ 64 <500000000>; > >> + clock-latency-ns = <300>; > >> + }; > >> + opp@653333333 { > > > > Why isn't ^^ matching with below values ? Same in next patch as well. > > > > When I try to update /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq, > it did not work as I had expected. > > > scaling_max_freq is specified by kHz unit, > on the other hand, clock frequency in the clk driver is specified by Hz. > > > > If the operating point is 653333kHz, the cpufreq requests > the clk driver to set 653333000, but it is lower than > the exact clock, 653333333. > So, the next lower frequency, 500000000 is selected. > As a result, the operating point 653333kHz is never enabled. > > > So, the operating point must be equal or a little bit bigger. > > > Do you know a better way to solve this distortion? I am not sure about how to fix that problem but there is no reason to have the exact frequency in opp@*** name. Just use what you have used in opp-hz line and you will have the exact same behavior. Right now, its a bit confusing if we read the DT. -- viresh