Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15909873rwd; Mon, 26 Jun 2023 03:08:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lJ8AXvvhLZEoqXj8E7yfUlFHIAP7+z56d+rnC2ebarZ9HxOg2eMgQxvb+VUAoTu2Do2GD X-Received: by 2002:a17:906:fe4c:b0:977:e87c:e633 with SMTP id wz12-20020a170906fe4c00b00977e87ce633mr22918510ejb.23.1687774097699; Mon, 26 Jun 2023 03:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687774097; cv=none; d=google.com; s=arc-20160816; b=tRr1u6H3H/fJp2wrnb7YzDBxe++hKTYsfcULoHrZBychAaUrVotDcQmqTjZ4fKgYJV P2dhI1xkUmd/iHv+eWIiDGfU/QcJgBjC0j04rQtmAT5ZMpenjWu5dtWRIXzRodwZ+/L9 REaGWUfaoArDR15/H1sS6DadTXf+XemQ8gIXcQwRRpBWFBseEJMPyFdfCfEhU4Punfis rvXarZzt83+C1QxjfUdieOWBEnbfWSazGMIZR1fKd5fNdx9BidYmch+A7gBSreoR2GjK knC4PgakgOGgr1zeKijWfztjTc6L0UYCAS4z5rvzGc73r4FofzEi87jnuoACymhAZILu BVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bzmHG3uBwOiLKUhIBeNP0YKLyUt7DuZ4WnKEVXSjqm8=; fh=lbJ3IEFxCzZ5yObwjF9Wnv5Bo+LQ26BrJunOK4P1WpI=; b=HF4EBRednbHmb7nqc+qBDgBadsNczalFByAimKqMPPhyovICxuTkdNP5Se68HAMDrq SQ9ecH7qyovKgUHm0T6Cxju1DawAFdp8MB3VMFkTEkuZjYGC/mXBuFiqSck64z3kdNKg Bm4I5Y/2uNrFgYmOpJD8XYfUzr2WYCRgdOPxT6KuOM/Al0JPLqk+NQIGGePElm5R1dBC 9uNfASJi7Dmh4ntf0Jez/FtRZwE2YCqaNZIjbiQQuAae+fItsf4ciXqg/BulTnQLaODV aKEwW4jn+CsNwCzMvgCtucvkAESqr4KYA5K1ZqkU742/GdP/GV2Im1b7to0l2Ej/DMN/ xeXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170906345200b00986f48d5049si2700155ejb.116.2023.06.26.03.07.51; Mon, 26 Jun 2023 03:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbjFZJhG (ORCPT + 99 others); Mon, 26 Jun 2023 05:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbjFZJhF (ORCPT ); Mon, 26 Jun 2023 05:37:05 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D209FC7 for ; Mon, 26 Jun 2023 02:37:03 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qDieT-0003on-U0; Mon, 26 Jun 2023 11:36:53 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1qDieS-0003FA-RV; Mon, 26 Jun 2023 11:36:52 +0200 Date: Mon, 26 Jun 2023 11:36:52 +0200 From: Sascha Hauer To: Alibek Omarov Cc: linux-rockchip@lists.infradead.org, Michael Turquette , Stephen Boyd , Heiko Stuebner , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: rockchip: rk3568: Fix PLL rate setting for 78.75MHz Message-ID: <20230626093652.GR18491@pengutronix.de> References: <20230614134750.1056293-1-a1ba.omarov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614134750.1056293-1-a1ba.omarov@gmail.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 14, 2023 at 04:47:50PM +0300, Alibek Omarov wrote: > PLL rate on RK356x is calculated through the simple formula: > ((24000000 / _refdiv) * _fbdiv) / (_postdiv1 * _postdiv2) > > The PLL rate setting for 78.75MHz seems to be copied from 96MHz > so this patch fixes it and configures it properly. > > Signed-off-by: Alibek Omarov > Fixes: 842f4cb72639 ("clk: rockchip: Add more PLL rates for rk3568") Reviewed-by: Sascha Hauer > --- > drivers/clk/rockchip/clk-rk3568.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c > index 5dae960af4ce..48b8d06c305c 100644 > --- a/drivers/clk/rockchip/clk-rk3568.c > +++ b/drivers/clk/rockchip/clk-rk3568.c > @@ -82,7 +82,7 @@ static struct rockchip_pll_rate_table rk3568_pll_rates[] = { > RK3036_PLL_RATE(101000000, 1, 101, 6, 4, 1, 0), > RK3036_PLL_RATE(100000000, 1, 150, 6, 6, 1, 0), > RK3036_PLL_RATE(96000000, 1, 96, 6, 4, 1, 0), > - RK3036_PLL_RATE(78750000, 1, 96, 6, 4, 1, 0), > + RK3036_PLL_RATE(78750000, 4, 315, 6, 4, 1, 0), refdiv = 4 fbdiv = 315 postdiv1 = 6 postdiv2 = 4 ((24000000 / 4) * 315) / 6 / 4 = 78750000 LGTM Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |