Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752026AbcJJMKs (ORCPT ); Mon, 10 Oct 2016 08:10:48 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:55446 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbcJJMKr (ORCPT ); Mon, 10 Oct 2016 08:10:47 -0400 Subject: Re: [PATCH] Reorganize STM32 clocks in order to prepare them for PLLI2S and PLLSAI To: Alexandre Torgue , Daniel Thompson , =?UTF-8?Q?Rados=c5=82aw_Pietrzyk?= References: <1475791294-5804-1-git-send-email-user@localhost> <2d6d5c10-346e-0541-1bc0-b75ef5b40d3f@linaro.org> <1880a125-b5ec-b64a-5c9b-90d4e9c0af86@st.com> CC: Michael Turquette , , Maxime Coquelin , , , , Gabriel FERNANDEZ From: Gabriel Fernandez Message-ID: <4302f362-2ec4-73f8-d20b-b120d32b96a2@st.com> Date: Mon, 10 Oct 2016 14:10:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1880a125-b5ec-b64a-5c9b-90d4e9c0af86@st.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.48.1.80] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-10_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2905 Lines: 84 Hi Radosław, Yes i m nearly ready to push a patch-set to manage LCD-TFT clock. In my patch-set i introduced PLLI2S and PLLSAI in generic way, and offer the possibility to change the vco frequency (in order to cover all frequencies for any LCD). And then, the vco is no longer a fixed factor. This patch is just a fix or do you planned to upstream PLLI2S and PLLSAI ? If you are ok I can send my patch-set ? Best Regards Gabriel On 10/10/2016 01:32 PM, Alexandre Torgue wrote: > Hi Radoslaw, > > I add Gabriel in the discussion. Gabriel is updating PLL management > for STM32F429. > > Regards > Alex > > On 10/10/2016 12:31 PM, Daniel Thompson wrote: >> On 10/10/16 10:56, Radosław Pietrzyk wrote: >>> Hi, >>> all plls have the same clock parent which is after a main divider. >>> Currently the divider and multiplier are connected together within vco >>> clock and therefore there is no chance to reuse the divider and clearly >>> state where the conncetion "really" is. We can arrange all of them >>> separately but than the divider will be hidden for all of them >>> separately. >> >> Quoting my last mail "I can see the value of naming the "/M" >> pre-division separately". In other words I agree with the idea of the >> patch. >> >> To more explicitly state my review comments... >> >>> From: Radoslaw Pietrzyk >> >> Please add a explanation of the problem and solution in the patch >> description. >> >> >>> Signed-off-by: Radoslaw Pietrzyk >>> --- >>> drivers/clk/clk-stm32f4.c | 7 ++++--- >>> 1 file changed, 4 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c >>> index 02d6810..1fd3eac 100644 >>> --- a/drivers/clk/clk-stm32f4.c >>> +++ b/drivers/clk/clk-stm32f4.c >>> @@ -245,9 +245,10 @@ static void stm32f4_rcc_register_pll(const char >> *hse_clk, const char *hsi_clk) >>> const char *pllsrc = pllcfgr & BIT(22) ? hse_clk : hsi_clk; >>> unsigned long pllq = (pllcfgr >> 24) & 0xf; >>> >>> - clk_register_fixed_factor(NULL, "vco", pllsrc, 0, plln, pllm); >>> - clk_register_fixed_factor(NULL, "pll", "vco", 0, 1, pllp); >>> - clk_register_fixed_factor(NULL, "pll48", "vco", 0, 1, pllq); >>> + clk_register_fixed_factor(NULL, "vco-div", pllsrc, 0, 1, pllm); >> >> This strikes me as a bad name for a clock that is shared by all three >> PLLs (the vco being an internal component of the PLL) however since the >> clock is not named in the datasheet we are forced to invent a name [I >> suspect that's why I gave up trying to name it when I wrote the driver >> originally ;-) ]. >> >> Perhaps "pllin-prediv"? >> >> >>> + clk_register_fixed_factor(NULL, "vco-mul", "vco-div", 0, plln, 1); >> >> Why rename this clock? Multiplying is a what the vco (and its control >> circuits) is *for*. Tagging it "-mul" is meaningless. >> >> >> Daniel.